From 9e9339cde650c614cbc76e8577cc2d6c743c5c96 Mon Sep 17 00:00:00 2001 From: Cristian Pufu Date: Sun, 1 Mar 2026 14:53:48 +0200 Subject: [PATCH] feat: add debugging hints to agent system prompt and reference docs When evaluations fail because the function crashes (not wrong logic), the agent had no guidance on diagnosing the issue. Add structured debugging protocol to the system prompt and expand troubleshooting sections in evaluations.md and running-agents.md with concrete error patterns and fix steps. Co-Authored-By: Claude Opus 4.6 --- pyproject.toml | 2 +- .../components/explorer/ExplorerSidebar.tsx | 3 +- .../src/components/explorer/FileEditor.tsx | 98 ++++++++++--- .../frontend/src/store/useAgentStore.ts | 13 +- .../frontend/src/store/useExplorerStore.ts | 36 +++++ .../server/frontend/src/store/useWebSocket.ts | 98 +++++++++++-- .../dev/server/frontend/src/styles/global.css | 10 ++ ...anel-C97Mws6P.js => ChatPanel-DR8dCKHB.js} | 2 +- .../{index-Cp7BsqrO.js => index-DDtQJ0N8.js} | 66 ++++----- .../server/static/assets/index-DcgkONKP.css | 1 - .../server/static/assets/index-tYuNMmSp.css | 1 + ...elk-CzxJ-xdZ.js => vendor-elk-CiLKfHel.js} | 2 +- ...t-BN_uQvcy.js => vendor-react-N5xbSGOh.js} | 2 +- ..._V7ttx.js => vendor-reactflow-CxoS0d5s.js} | 2 +- src/uipath/dev/server/static/index.html | 8 +- src/uipath/dev/services/agent/loop.py | 68 ++++++++- src/uipath/dev/services/agent/service.py | 137 ++++++++++++++++++ src/uipath/dev/services/agent/tools.py | 50 +++++-- src/uipath/dev/services/skill_service.py | 23 ++- src/uipath/dev/skills/uipath/SKILL.md | 69 +-------- .../skills/uipath/references/evaluations.md | 53 +++++-- .../uipath/references/running-agents.md | 16 +- uv.lock | 2 +- 23 files changed, 582 insertions(+), 180 deletions(-) rename src/uipath/dev/server/static/assets/{ChatPanel-C97Mws6P.js => ChatPanel-DR8dCKHB.js} (98%) rename src/uipath/dev/server/static/assets/{index-Cp7BsqrO.js => index-DDtQJ0N8.js} (56%) delete mode 100644 src/uipath/dev/server/static/assets/index-DcgkONKP.css create mode 100644 src/uipath/dev/server/static/assets/index-tYuNMmSp.css rename src/uipath/dev/server/static/assets/{vendor-elk-CzxJ-xdZ.js => vendor-elk-CiLKfHel.js} (99%) rename src/uipath/dev/server/static/assets/{vendor-react-BN_uQvcy.js => vendor-react-N5xbSGOh.js} (98%) rename src/uipath/dev/server/static/assets/{vendor-reactflow-BP_V7ttx.js => vendor-reactflow-CxoS0d5s.js} (99%) diff --git a/pyproject.toml b/pyproject.toml index 7af4b1f..88f3404 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "uipath-dev" -version = "0.0.65" +version = "0.0.66" description = "UiPath Developer Console" readme = { file = "README.md", content-type = "text/markdown" } requires-python = ">=3.11" diff --git a/src/uipath/dev/server/frontend/src/components/explorer/ExplorerSidebar.tsx b/src/uipath/dev/server/frontend/src/components/explorer/ExplorerSidebar.tsx index d6b2eba..45aaab5 100644 --- a/src/uipath/dev/server/frontend/src/components/explorer/ExplorerSidebar.tsx +++ b/src/uipath/dev/server/frontend/src/components/explorer/ExplorerSidebar.tsx @@ -13,6 +13,7 @@ function FileTreeNode({ path, name, type, depth }: { const isExpanded = useExplorerStore((s) => !!s.expanded[path]); const isLoading = useExplorerStore((s) => !!s.loadingDirs[path]); const isDirty = useExplorerStore((s) => !!s.dirty[path]); + const isAgentChanged = useExplorerStore((s) => !!s.agentChangedFiles[path]); const selectedFile = useExplorerStore((s) => s.selectedFile); const { setChildren, toggleExpanded, setLoadingDir, openTab } = useExplorerStore(); const { navigate } = useHashRoute(); @@ -40,7 +41,7 @@ function FileTreeNode({ path, name, type, depth }: { <> - {/* Editor */} + {/* Diff banner */} + {showDiff && ( +
+ + + + + + Agent modified this file +
+ +
+ )} + {/* Editor or DiffEditor */}
- + {showDiff ? ( + + ) : ( + + )}
); diff --git a/src/uipath/dev/server/frontend/src/store/useAgentStore.ts b/src/uipath/dev/server/frontend/src/store/useAgentStore.ts index 7de9922..f52161b 100644 --- a/src/uipath/dev/server/frontend/src/store/useAgentStore.ts +++ b/src/uipath/dev/server/frontend/src/store/useAgentStore.ts @@ -9,6 +9,7 @@ function nextId() { interface AgentStore { sessionId: string | null; status: AgentStatus; + _lastActiveAt: number | null; messages: AgentMessage[]; plan: AgentPlanItem[]; activeQuestion: AgentQuestion | null; @@ -45,6 +46,7 @@ interface AgentStore { export const useAgentStore = create((set) => ({ sessionId: null, status: "idle", + _lastActiveAt: null, messages: [], plan: [], activeQuestion: null, @@ -55,7 +57,15 @@ export const useAgentStore = create((set) => ({ selectedSkillIds: [], skillsLoading: false, - setStatus: (status) => set({ status }), + setStatus: (status) => + set((state) => { + const wasActive = state.status === "thinking" || state.status === "planning" || state.status === "executing" || state.status === "awaiting_approval"; + const isActive = status === "thinking" || status === "planning" || status === "executing" || status === "awaiting_approval"; + return { + status, + _lastActiveAt: wasActive && !isActive ? Date.now() : state._lastActiveAt, + }; + }), addUserMessage: (text) => set((state) => ({ @@ -277,6 +287,7 @@ export const useAgentStore = create((set) => ({ set({ sessionId: null, status: "idle", + _lastActiveAt: null, messages: [], plan: [], activeQuestion: null, diff --git a/src/uipath/dev/server/frontend/src/store/useExplorerStore.ts b/src/uipath/dev/server/frontend/src/store/useExplorerStore.ts index 2e0b056..2e0309d 100644 --- a/src/uipath/dev/server/frontend/src/store/useExplorerStore.ts +++ b/src/uipath/dev/server/frontend/src/store/useExplorerStore.ts @@ -1,6 +1,13 @@ import { create } from "zustand"; import type { FileEntry, FileContent } from "../types/explorer"; +interface DiffView { + path: string; + original: string; + modified: string; + language: string | null; +} + interface ExplorerStore { children: Record; expanded: Record; @@ -11,6 +18,8 @@ interface ExplorerStore { buffers: Record; loadingDirs: Record; loadingFile: boolean; + agentChangedFiles: Record; + diffView: DiffView | null; setChildren: (path: string, entries: FileEntry[]) => void; toggleExpanded: (path: string) => void; @@ -22,6 +31,10 @@ interface ExplorerStore { markClean: (path: string) => void; setLoadingDir: (path: string, loading: boolean) => void; setLoadingFile: (loading: boolean) => void; + markAgentChanged: (path: string) => void; + clearAgentChanged: (path: string) => void; + setDiffView: (diff: DiffView | null) => void; + expandPath: (filePath: string) => void; } export const useExplorerStore = create((set) => ({ @@ -34,6 +47,8 @@ export const useExplorerStore = create((set) => ({ buffers: {}, loadingDirs: {}, loadingFile: false, + agentChangedFiles: {}, + diffView: null, setChildren: (path, entries) => set((state) => ({ children: { ...state.children, [path]: entries } })), @@ -86,4 +101,25 @@ export const useExplorerStore = create((set) => ({ set((state) => ({ loadingDirs: { ...state.loadingDirs, [path]: loading } })), setLoadingFile: (loading) => set({ loadingFile: loading }), + + markAgentChanged: (path) => + set((state) => ({ agentChangedFiles: { ...state.agentChangedFiles, [path]: Date.now() } })), + + clearAgentChanged: (path) => + set((state) => { + const { [path]: _, ...rest } = state.agentChangedFiles; + return { agentChangedFiles: rest }; + }), + + setDiffView: (diff) => set({ diffView: diff }), + + expandPath: (filePath) => + set((state) => { + const parts = filePath.split("/"); + const expanded = { ...state.expanded }; + for (let i = 1; i < parts.length; i++) { + expanded[parts.slice(0, i).join("/")] = true; + } + return { expanded }; + }), })); diff --git a/src/uipath/dev/server/frontend/src/store/useWebSocket.ts b/src/uipath/dev/server/frontend/src/store/useWebSocket.ts index 21d9f75..13b8ee1 100644 --- a/src/uipath/dev/server/frontend/src/store/useWebSocket.ts +++ b/src/uipath/dev/server/frontend/src/store/useWebSocket.ts @@ -72,17 +72,95 @@ export function useWebSocket() { const changedFiles = msg.payload.files as string[]; const changedSet = new Set(changedFiles); const explorer = useExplorerStore.getState(); - // Refresh open tab contents - for (const tab of explorer.openTabs) { - if (explorer.dirty[tab] || !changedSet.has(tab)) continue; - readFile(tab).then((fc) => { - const s = useExplorerStore.getState(); - if (s.dirty[tab]) return; - if (s.fileCache[tab]?.content === fc.content) return; - s.setFileContent(tab, fc); - }).catch(() => {}); + const agentState = useAgentStore.getState(); + const agentStatus = agentState.status; + const agentIsActive = agentStatus === "thinking" || agentStatus === "planning" || agentStatus === "executing" || agentStatus === "awaiting_approval"; + // Grace period: treat changes within 3s of agent finishing as agent-driven + // (file watcher debounce can delay files.changed past agent.status:done) + const recentlyActive = !agentIsActive && agentState._lastActiveAt != null && (Date.now() - agentState._lastActiveAt) < 3000; + + // Filter out directory paths — file watcher reports both files and dirs. + // A path with a dot in the last segment is likely a file; no dot = likely a directory. + // Also skip paths already known as directories in the tree. + const fileChanges = changedFiles.filter((p) => { + if (p in explorer.children) return false; // known directory + const lastSegment = p.split("/").pop() ?? ""; + return lastSegment.includes("."); + }); + + console.log("[files.changed]", { all: changedFiles, files: fileChanges, agentStatus, agentIsActive, recentlyActive }); + + if (agentIsActive || recentlyActive) { + // Agent is running (or just finished) — treat file changes as agent-driven + // We track diff candidate across async calls; first file to resolve wins + let diffShown = false; + + for (const filePath of fileChanges) { + // Skip dirty files (user is editing) + if (explorer.dirty[filePath]) continue; + + // Snapshot old content before fetching new (for diff) + const oldContent = explorer.fileCache[filePath]?.content ?? null; + const oldLanguage = explorer.fileCache[filePath]?.language ?? null; + + // Fetch new content — this also validates the file still exists + readFile(filePath).then((fc) => { + const s = useExplorerStore.getState(); + if (s.dirty[filePath]) return; + s.setFileContent(filePath, fc); + + // Expand tree to reveal the file (but don't auto-open a new tab) + s.expandPath(filePath); + + // Load unloaded parent directories so tree reveals the file + const parts = filePath.split("/"); + for (let j = 1; j < parts.length; j++) { + const dir = parts.slice(0, j).join("/"); + if (!(dir in useExplorerStore.getState().children)) { + listDirectory(dir) + .then((entries) => useExplorerStore.getState().setChildren(dir, entries)) + .catch(() => {}); + } + } + + // Show diff for the first eligible file (only if already open in a tab) + const isOpenInTab = useExplorerStore.getState().openTabs.includes(filePath); + if (!diffShown && isOpenInTab && oldContent !== null && fc.content !== null && oldContent !== fc.content) { + diffShown = true; + useExplorerStore.getState().setSelectedFile(filePath); + s.setDiffView({ path: filePath, original: oldContent, modified: fc.content, language: oldLanguage }); + setTimeout(() => { + const cur = useExplorerStore.getState().diffView; + if (cur && cur.path === filePath && cur.original === oldContent) { + useExplorerStore.getState().setDiffView(null); + } + }, 5000); + } + + s.markAgentChanged(filePath); + setTimeout(() => useExplorerStore.getState().clearAgentChanged(filePath), 10000); + }).catch(() => { + // File doesn't exist (deleted) — close tab if it was open + const s = useExplorerStore.getState(); + if (s.openTabs.includes(filePath)) { + s.closeTab(filePath); + } + }); + } + } else { + // No agent running — regular refresh logic + for (const tab of explorer.openTabs) { + if (explorer.dirty[tab] || !changedSet.has(tab)) continue; + readFile(tab).then((fc) => { + const s = useExplorerStore.getState(); + if (s.dirty[tab]) return; + if (s.fileCache[tab]?.content === fc.content) return; + s.setFileContent(tab, fc); + }).catch(() => {}); + } } - // Refresh directory listings for already-loaded parent dirs + + // Refresh directory listings for already-loaded parent dirs (always) const dirsToRefresh = new Set(); for (const filePath of changedFiles) { const lastSlash = filePath.lastIndexOf("/"); diff --git a/src/uipath/dev/server/frontend/src/styles/global.css b/src/uipath/dev/server/frontend/src/styles/global.css index 69f5d19..56ce776 100644 --- a/src/uipath/dev/server/frontend/src/styles/global.css +++ b/src/uipath/dev/server/frontend/src/styles/global.css @@ -343,3 +343,13 @@ select option { [data-theme="light"] .chat-markdown .hljs-bullet { color: #735c0f } [data-theme="light"] .chat-markdown .hljs-addition { color: #22863a; background-color: #f0fff4 } [data-theme="light"] .chat-markdown .hljs-deletion { color: #b31d28; background-color: #ffeef0 } + +/* Agent file change pulse animation (uses box-shadow to avoid inline style conflicts) */ +@keyframes agent-changed-pulse { + 0%, 100% { box-shadow: inset 0 0 0 50px color-mix(in srgb, var(--success) 20%, transparent); } + 50% { box-shadow: none; } +} + +.agent-changed-file { + animation: agent-changed-pulse 2s ease-in-out 3; +} diff --git a/src/uipath/dev/server/static/assets/ChatPanel-C97Mws6P.js b/src/uipath/dev/server/static/assets/ChatPanel-DR8dCKHB.js similarity index 98% rename from src/uipath/dev/server/static/assets/ChatPanel-C97Mws6P.js rename to src/uipath/dev/server/static/assets/ChatPanel-DR8dCKHB.js index 5ddb215..5982d19 100644 --- a/src/uipath/dev/server/static/assets/ChatPanel-C97Mws6P.js +++ b/src/uipath/dev/server/static/assets/ChatPanel-DR8dCKHB.js @@ -1,2 +1,2 @@ -import{j as e,a as y}from"./vendor-react-BN_uQvcy.js";import{M,r as T,a as O,u as S}from"./index-Cp7BsqrO.js";import"./vendor-reactflow-BP_V7ttx.js";const J={user:{label:"You",color:"var(--info)"},tool:{label:"Tool",color:"var(--warning)"},assistant:{label:"AI",color:"var(--success)"}};function A({message:t,onToolCallClick:r,toolCallIndices:o}){const i=t.role==="user",l=t.tool_calls&&t.tool_calls.length>0,a=J[i?"user":l?"tool":"assistant"];return e.jsxs("div",{className:"py-1.5",children:[e.jsxs("div",{className:"flex items-center gap-1.5 mb-0.5",children:[e.jsx("div",{className:"w-2 h-2 rounded-full",style:{background:a.color}}),e.jsx("span",{className:"text-[11px] font-semibold",style:{color:a.color},children:a.label})]}),t.content&&(i?e.jsx("div",{className:"text-sm leading-relaxed pl-2.5 max-w-prose",style:{color:"var(--text-primary)"},children:t.content}):e.jsx("div",{className:"text-sm leading-relaxed pl-2.5 max-w-prose chat-markdown",style:{color:"var(--text-secondary)"},children:e.jsx(M,{remarkPlugins:[O],rehypePlugins:[T],children:t.content})})),t.tool_calls&&t.tool_calls.length>0&&e.jsx("div",{className:"flex flex-wrap gap-1 mt-1 pl-2.5",children:t.tool_calls.map((p,c)=>e.jsxs("span",{className:"inline-flex items-center gap-1 text-[11px] font-mono px-2 py-1 rounded cursor-pointer hover:brightness-125",style:{background:"var(--bg-primary)",border:"1px solid var(--border)",color:p.has_result?"var(--success)":"var(--text-muted)"},onClick:()=>r==null?void 0:r(p.name,(o==null?void 0:o[c])??0),children:[p.has_result?"✓":"•"," ",p.name]},`${p.name}-${c}`))})]})}function L({onSend:t,disabled:r,placeholder:o}){const[i,l]=y.useState(""),u=()=>{const c=i.trim();c&&(t(c),l(""))},a=c=>{c.key==="Enter"&&!c.shiftKey&&(c.preventDefault(),u())},p=!r&&i.trim().length>0;return e.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 border-t",style:{borderColor:"var(--border)"},children:[e.jsx("input",{value:i,onChange:c=>l(c.target.value),onKeyDown:a,disabled:r,placeholder:o??"Message...",className:"flex-1 bg-transparent text-sm py-1 disabled:opacity-40 placeholder:text-[var(--text-muted)]",style:{color:"var(--text-primary)"}}),e.jsx("button",{onClick:u,disabled:!p,className:"text-xs font-semibold px-3 py-1.5 rounded transition-colors cursor-pointer disabled:opacity-30 disabled:cursor-not-allowed","aria-label":"Send message",style:{color:p?"var(--accent)":"var(--text-muted)",background:"transparent"},onMouseEnter:c=>{p&&(c.currentTarget.style.background="color-mix(in srgb, var(--accent) 10%, transparent)")},onMouseLeave:c=>{c.currentTarget.style.background="transparent"},children:"Send"})]})}function $(t){if(typeof t!="object"||t===null)return!1;const r=t;return typeof r.properties=="object"&&r.properties!==null&&Object.keys(r.properties).length>0}const f={color:"var(--text-primary)",border:"1px solid var(--border)",background:"var(--bg-primary)"},j="w-full text-[11px] font-mono py-1 px-2 rounded focus:outline-none";function R({name:t,prop:r,value:o,onChange:i}){const l=e.jsxs("label",{className:"text-[11px] font-medium block mb-1",style:{color:"var(--text-muted)"},children:[t,r.description&&e.jsxs("span",{className:"font-normal normal-case tracking-normal ml-1",style:{color:"var(--text-muted)",opacity:.7},children:["— ",r.description]})]});if(r.enum&&Array.isArray(r.enum))return e.jsxs("div",{children:[l,e.jsx("select",{value:String(o??""),onChange:a=>i(a.target.value),className:j,style:f,children:r.enum.map(a=>e.jsx("option",{value:String(a),children:String(a)},String(a)))})]});if(r.type==="boolean")return e.jsxs("div",{children:[l,e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer py-1",children:[e.jsx("input",{type:"checkbox",checked:!!o,onChange:a=>i(a.target.checked),className:"accent-[var(--accent)]"}),e.jsx("span",{className:"text-[11px] font-mono",style:{color:"var(--text-secondary)"},children:o?"true":"false"})]})]});if(r.type==="number"||r.type==="integer")return e.jsxs("div",{children:[l,e.jsx("input",{type:"number",value:o==null?"":String(o),onChange:a=>i(a.target.value===""?null:Number(a.target.value)),step:r.type==="integer"?1:"any",className:j,style:f})]});if(r.type==="object"||r.type==="array"){const a=typeof o=="string"?o:JSON.stringify(o??null,null,2);return e.jsxs("div",{children:[l,e.jsx("textarea",{value:a,onChange:p=>i(p.target.value),rows:3,className:`${j} resize-y`,style:f})]})}const u=o==null?"":String(o);return u.length>100||u.includes(` +import{j as e,a as y}from"./vendor-react-N5xbSGOh.js";import{M,r as T,a as O,u as S}from"./index-DDtQJ0N8.js";import"./vendor-reactflow-CxoS0d5s.js";const J={user:{label:"You",color:"var(--info)"},tool:{label:"Tool",color:"var(--warning)"},assistant:{label:"AI",color:"var(--success)"}};function A({message:t,onToolCallClick:r,toolCallIndices:o}){const i=t.role==="user",l=t.tool_calls&&t.tool_calls.length>0,a=J[i?"user":l?"tool":"assistant"];return e.jsxs("div",{className:"py-1.5",children:[e.jsxs("div",{className:"flex items-center gap-1.5 mb-0.5",children:[e.jsx("div",{className:"w-2 h-2 rounded-full",style:{background:a.color}}),e.jsx("span",{className:"text-[11px] font-semibold",style:{color:a.color},children:a.label})]}),t.content&&(i?e.jsx("div",{className:"text-sm leading-relaxed pl-2.5 max-w-prose",style:{color:"var(--text-primary)"},children:t.content}):e.jsx("div",{className:"text-sm leading-relaxed pl-2.5 max-w-prose chat-markdown",style:{color:"var(--text-secondary)"},children:e.jsx(M,{remarkPlugins:[O],rehypePlugins:[T],children:t.content})})),t.tool_calls&&t.tool_calls.length>0&&e.jsx("div",{className:"flex flex-wrap gap-1 mt-1 pl-2.5",children:t.tool_calls.map((p,c)=>e.jsxs("span",{className:"inline-flex items-center gap-1 text-[11px] font-mono px-2 py-1 rounded cursor-pointer hover:brightness-125",style:{background:"var(--bg-primary)",border:"1px solid var(--border)",color:p.has_result?"var(--success)":"var(--text-muted)"},onClick:()=>r==null?void 0:r(p.name,(o==null?void 0:o[c])??0),children:[p.has_result?"✓":"•"," ",p.name]},`${p.name}-${c}`))})]})}function L({onSend:t,disabled:r,placeholder:o}){const[i,l]=y.useState(""),u=()=>{const c=i.trim();c&&(t(c),l(""))},a=c=>{c.key==="Enter"&&!c.shiftKey&&(c.preventDefault(),u())},p=!r&&i.trim().length>0;return e.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 border-t",style:{borderColor:"var(--border)"},children:[e.jsx("input",{value:i,onChange:c=>l(c.target.value),onKeyDown:a,disabled:r,placeholder:o??"Message...",className:"flex-1 bg-transparent text-sm py-1 disabled:opacity-40 placeholder:text-[var(--text-muted)]",style:{color:"var(--text-primary)"}}),e.jsx("button",{onClick:u,disabled:!p,className:"text-xs font-semibold px-3 py-1.5 rounded transition-colors cursor-pointer disabled:opacity-30 disabled:cursor-not-allowed","aria-label":"Send message",style:{color:p?"var(--accent)":"var(--text-muted)",background:"transparent"},onMouseEnter:c=>{p&&(c.currentTarget.style.background="color-mix(in srgb, var(--accent) 10%, transparent)")},onMouseLeave:c=>{c.currentTarget.style.background="transparent"},children:"Send"})]})}function $(t){if(typeof t!="object"||t===null)return!1;const r=t;return typeof r.properties=="object"&&r.properties!==null&&Object.keys(r.properties).length>0}const f={color:"var(--text-primary)",border:"1px solid var(--border)",background:"var(--bg-primary)"},j="w-full text-[11px] font-mono py-1 px-2 rounded focus:outline-none";function R({name:t,prop:r,value:o,onChange:i}){const l=e.jsxs("label",{className:"text-[11px] font-medium block mb-1",style:{color:"var(--text-muted)"},children:[t,r.description&&e.jsxs("span",{className:"font-normal normal-case tracking-normal ml-1",style:{color:"var(--text-muted)",opacity:.7},children:["— ",r.description]})]});if(r.enum&&Array.isArray(r.enum))return e.jsxs("div",{children:[l,e.jsx("select",{value:String(o??""),onChange:a=>i(a.target.value),className:j,style:f,children:r.enum.map(a=>e.jsx("option",{value:String(a),children:String(a)},String(a)))})]});if(r.type==="boolean")return e.jsxs("div",{children:[l,e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer py-1",children:[e.jsx("input",{type:"checkbox",checked:!!o,onChange:a=>i(a.target.checked),className:"accent-[var(--accent)]"}),e.jsx("span",{className:"text-[11px] font-mono",style:{color:"var(--text-secondary)"},children:o?"true":"false"})]})]});if(r.type==="number"||r.type==="integer")return e.jsxs("div",{children:[l,e.jsx("input",{type:"number",value:o==null?"":String(o),onChange:a=>i(a.target.value===""?null:Number(a.target.value)),step:r.type==="integer"?1:"any",className:j,style:f})]});if(r.type==="object"||r.type==="array"){const a=typeof o=="string"?o:JSON.stringify(o??null,null,2);return e.jsxs("div",{children:[l,e.jsx("textarea",{value:a,onChange:p=>i(p.target.value),rows:3,className:`${j} resize-y`,style:f})]})}const u=o==null?"":String(o);return u.length>100||u.includes(` `)?e.jsxs("div",{children:[l,e.jsx("textarea",{value:u,onChange:a=>i(a.target.value),rows:3,className:`${j} resize-y`,style:f})]}):e.jsxs("div",{children:[l,e.jsx("input",{type:"text",value:u,onChange:a=>i(a.target.value),className:j,style:f})]})}function _({label:t,color:r,onClick:o}){return e.jsx("button",{onClick:o,className:"text-xs font-semibold px-3 py-1.5 rounded cursor-pointer transition-colors",style:{background:`color-mix(in srgb, var(--${r}) 15%, var(--bg-secondary))`,color:`var(--${r})`,border:`1px solid color-mix(in srgb, var(--${r}) 30%, var(--border))`},onMouseEnter:i=>{i.currentTarget.style.background=`color-mix(in srgb, var(--${r}) 25%, var(--bg-secondary))`},onMouseLeave:i=>{i.currentTarget.style.background=`color-mix(in srgb, var(--${r}) 15%, var(--bg-secondary))`},children:t})}function F({interrupt:t,onRespond:r}){const[o,i]=y.useState(""),[l,u]=y.useState(!1),[a,p]=y.useState({}),[c,N]=y.useState(""),[k,h]=y.useState(null),g=t.input_schema,b=$(g),C=y.useCallback(()=>{const s=typeof t.input_value=="object"&&t.input_value!==null?t.input_value:{};if(b){const d={...s};for(const m of Object.keys(g.properties))m in d||(d[m]=null);const x=g.properties;for(const[m,v]of Object.entries(x))(v.type==="object"||v.type==="array")&&typeof d[m]!="string"&&(d[m]=JSON.stringify(d[m]??null,null,2));p(d)}else N(typeof t.input_value=="string"?t.input_value:JSON.stringify(t.input_value??null,null,2));h(null),u(!0)},[t.input_value,b,g]),E=()=>{u(!1),h(null)},w=()=>{if(b){const s={},d=g.properties;for(const[x,m]of Object.entries(a)){const v=d[x];if(((v==null?void 0:v.type)==="object"||(v==null?void 0:v.type)==="array")&&typeof m=="string")try{s[x]=JSON.parse(m)}catch{h(`Invalid JSON for "${x}"`);return}else s[x]=m}r({approved:!0,input:s})}else try{const s=JSON.parse(c);r({approved:!0,input:s})}catch{h("Invalid JSON");return}},n=y.useCallback((s,d)=>{p(x=>({...x,[s]:d}))},[]);return t.interrupt_type==="tool_call_confirmation"?e.jsxs("div",{className:"mx-3 my-2 rounded-lg overflow-hidden",style:{border:"1px solid color-mix(in srgb, var(--warning) 40%, var(--border))"},children:[e.jsxs("div",{className:"px-3 py-2 flex items-center gap-2",style:{background:"color-mix(in srgb, var(--warning) 10%, var(--bg-secondary))"},children:[e.jsx("span",{className:"text-[11px] font-semibold",style:{color:"var(--warning)"},children:l?"Edit Arguments":"Action Required"}),t.tool_name&&e.jsx("span",{className:"text-[11px] font-mono px-1.5 py-0.5 rounded",style:{background:"color-mix(in srgb, var(--warning) 15%, var(--bg-secondary))",color:"var(--text-primary)"},children:t.tool_name}),!l&&(t.input_value!=null||b)&&e.jsx("button",{onClick:C,className:"ml-auto p-1.5 rounded cursor-pointer transition-colors",style:{color:"var(--text-muted)"},"aria-label":"Edit arguments",onMouseEnter:s=>{s.currentTarget.style.color="var(--warning)"},onMouseLeave:s=>{s.currentTarget.style.color="var(--text-muted)"},title:"Edit arguments",children:e.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),e.jsx("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]})})]}),l?e.jsxs("div",{className:"px-3 py-2 space-y-3 overflow-y-auto",style:{background:"var(--bg-secondary)",maxHeight:300},children:[b?Object.entries(g.properties).map(([s,d])=>e.jsx(R,{name:s,prop:d,value:a[s],onChange:x=>n(s,x)},s)):e.jsx("textarea",{value:c,onChange:s=>{N(s.target.value),h(null)},rows:8,className:"w-full text-[11px] font-mono py-1 px-2 rounded focus:outline-none resize-y",style:f}),k&&e.jsx("p",{className:"text-[11px]",style:{color:"var(--error)"},children:k})]}):t.input_value!=null&&e.jsx("pre",{className:"px-3 py-2 text-[11px] font-mono whitespace-pre-wrap break-words overflow-y-auto leading-normal",style:{background:"var(--bg-secondary)",color:"var(--text-secondary)",maxHeight:200},children:typeof t.input_value=="string"?t.input_value:JSON.stringify(t.input_value,null,2)}),e.jsx("div",{className:"flex items-center gap-2 px-3 py-2",style:{background:"var(--bg-secondary)",borderTop:"1px solid var(--border)"},children:l?e.jsxs(e.Fragment,{children:[e.jsx(_,{label:"Approve",color:"success",onClick:w}),e.jsx(_,{label:"Cancel",color:"text-muted",onClick:E})]}):e.jsxs(e.Fragment,{children:[e.jsx(_,{label:"Approve",color:"success",onClick:()=>r({approved:!0})}),e.jsx(_,{label:"Reject",color:"error",onClick:()=>r({approved:!1})})]})})]}):e.jsxs("div",{className:"mx-3 my-2 rounded-lg overflow-hidden",style:{border:"1px solid color-mix(in srgb, var(--accent) 40%, var(--border))"},children:[e.jsx("div",{className:"px-3 py-2",style:{background:"color-mix(in srgb, var(--accent) 10%, var(--bg-secondary))"},children:e.jsx("span",{className:"text-[11px] font-semibold",style:{color:"var(--accent)"},children:"Input Required"})}),t.content!=null&&e.jsx("div",{className:"px-3 py-2 text-sm leading-relaxed",style:{background:"var(--bg-secondary)",color:"var(--text-secondary)"},children:typeof t.content=="string"?t.content:JSON.stringify(t.content,null,2)}),e.jsxs("div",{className:"flex items-center gap-2 px-3 py-2",style:{background:"var(--bg-secondary)",borderTop:"1px solid var(--border)"},children:[e.jsx("input",{value:o,onChange:s=>i(s.target.value),onKeyDown:s=>{s.key==="Enter"&&!s.shiftKey&&o.trim()&&(s.preventDefault(),r({response:o.trim()}))},placeholder:"Type your response...",className:"flex-1 bg-transparent text-sm py-1 placeholder:text-[var(--text-muted)]",style:{color:"var(--text-primary)"}}),e.jsx("button",{onClick:()=>{o.trim()&&r({response:o.trim()})},disabled:!o.trim(),className:"text-xs font-semibold px-3 py-1.5 rounded transition-colors cursor-pointer disabled:opacity-30 disabled:cursor-not-allowed",style:{color:o.trim()?"var(--accent)":"var(--text-muted)",background:"transparent"},children:"Send"})]})]})}function I({messages:t,runId:r,runStatus:o,ws:i}){const l=y.useRef(null),u=y.useRef(!0),a=S(n=>n.addLocalChatMessage),p=S(n=>n.setFocusedSpan),c=S(n=>n.activeInterrupt[r]??null),N=S(n=>n.setActiveInterrupt),k=y.useMemo(()=>{const n=new Map,s=new Map;for(const d of t)if(d.tool_calls){const x=[];for(const m of d.tool_calls){const v=s.get(m.name)??0;x.push(v),s.set(m.name,v+1)}n.set(d.message_id,x)}return n},[t]),[h,g]=y.useState(!1),b=()=>{const n=l.current;if(!n)return;const s=n.scrollHeight-n.scrollTop-n.clientHeight<40;u.current=s,g(n.scrollTop>100)};y.useEffect(()=>{u.current&&l.current&&(l.current.scrollTop=l.current.scrollHeight)});const C=n=>{u.current=!0,a(r,{message_id:`local-${Date.now()}`,role:"user",content:n}),i.sendChatMessage(r,n)},E=n=>{u.current=!0,i.sendInterruptResponse(r,n),N(r,null)},w=o==="running"||!!c;return e.jsxs("div",{className:"flex flex-col h-full",children:[e.jsxs("div",{className:"relative flex-1 overflow-hidden",children:[e.jsxs("div",{ref:l,onScroll:b,className:"h-full overflow-y-auto px-3 py-2 space-y-0.5",children:[t.length===0&&e.jsx("p",{className:"text-[var(--text-muted)] text-sm text-center py-6",children:"No messages yet"}),t.map(n=>e.jsx(A,{message:n,toolCallIndices:k.get(n.message_id),onToolCallClick:(s,d)=>p({name:s,index:d})},n.message_id)),c&&e.jsx(F,{interrupt:c,onRespond:E})]}),h&&e.jsx("button",{onClick:()=>{var n;return(n=l.current)==null?void 0:n.scrollTo({top:0,behavior:"smooth"})},className:"absolute top-2 right-3 w-6 h-6 flex items-center justify-center rounded-full cursor-pointer transition-opacity opacity-70 hover:opacity-100",style:{background:"var(--bg-tertiary)",color:"var(--text-primary)"},title:"Scroll to top",children:e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("polyline",{points:"18 15 12 9 6 15"})})})]}),e.jsx(L,{onSend:C,disabled:w,placeholder:c?"Respond to the interrupt above...":w?"Waiting for response...":"Message..."})]})}export{I as default}; diff --git a/src/uipath/dev/server/static/assets/index-Cp7BsqrO.js b/src/uipath/dev/server/static/assets/index-DDtQJ0N8.js similarity index 56% rename from src/uipath/dev/server/static/assets/index-Cp7BsqrO.js rename to src/uipath/dev/server/static/assets/index-DDtQJ0N8.js index 1e49b11..c344822 100644 --- a/src/uipath/dev/server/static/assets/index-Cp7BsqrO.js +++ b/src/uipath/dev/server/static/assets/index-DDtQJ0N8.js @@ -1,10 +1,10 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vendor-elk-CzxJ-xdZ.js","assets/vendor-react-BN_uQvcy.js","assets/ChatPanel-C97Mws6P.js","assets/vendor-reactflow-BP_V7ttx.js","assets/vendor-reactflow-B5DZHykP.css"])))=>i.map(i=>d[i]); -var Nl=Object.defineProperty;var Sl=(e,t,n)=>t in e?Nl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var It=(e,t,n)=>Sl(e,typeof t!="symbol"?t+"":t,n);import{W as Tn,a as S,j as a,F as Tl,g as Vr,b as Cl}from"./vendor-react-BN_uQvcy.js";import{H as gt,P as bt,B as Al,M as Ml,u as Il,a as Rl,R as Ol,b as Ll,C as jl,c as Dl,d as Pl}from"./vendor-reactflow-BP_V7ttx.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();const Ai=e=>{let t;const n=new Set,r=(c,d)=>{const p=typeof c=="function"?c(t):c;if(!Object.is(p,t)){const m=t;t=d??(typeof p!="object"||p===null)?p:Object.assign({},t,p),n.forEach(f=>f(t,m))}},i=()=>t,l={setState:r,getState:i,getInitialState:()=>u,subscribe:c=>(n.add(c),()=>n.delete(c))},u=t=e(r,i,l);return l},Bl=(e=>e?Ai(e):Ai),Fl=e=>e;function zl(e,t=Fl){const n=Tn.useSyncExternalStore(e.subscribe,Tn.useCallback(()=>t(e.getState()),[e,t]),Tn.useCallback(()=>t(e.getInitialState()),[e,t]));return Tn.useDebugValue(n),n}const Mi=e=>{const t=Bl(e),n=r=>zl(t,r);return Object.assign(n,t),n},Ot=(e=>e?Mi(e):Mi),ke=Ot(e=>({runs:{},selectedRunId:null,traces:{},logs:{},chatMessages:{},entrypoints:[],setRuns:t=>e(n=>{var s;let r=n.breakpoints;for(const o of t)(s=o.breakpoints)!=null&&s.length&&!r[o.id]&&(r={...r,[o.id]:Object.fromEntries(o.breakpoints.map(l=>[l,!0]))});const i={runs:Object.fromEntries(t.map(o=>[o.id,o]))};return r!==n.breakpoints&&(i.breakpoints=r),i}),upsertRun:t=>e(n=>{var i;const r={runs:{...n.runs,[t.id]:t}};if((i=t.breakpoints)!=null&&i.length&&!n.breakpoints[t.id]&&(r.breakpoints={...n.breakpoints,[t.id]:Object.fromEntries(t.breakpoints.map(s=>[s,!0]))}),(t.status==="completed"||t.status==="failed")&&n.activeNodes[t.id]){const{[t.id]:s,...o}=n.activeNodes;r.activeNodes=o}if(t.status!=="suspended"&&n.activeInterrupt[t.id]){const{[t.id]:s,...o}=n.activeInterrupt;r.activeInterrupt=o}return r}),selectRun:t=>e({selectedRunId:t}),addTrace:t=>e(n=>{const r=n.traces[t.run_id]??[],i=r.findIndex(o=>o.span_id===t.span_id),s=i>=0?r.map((o,l)=>l===i?t:o):[...r,t];return{traces:{...n.traces,[t.run_id]:s}}}),setTraces:(t,n)=>e(r=>({traces:{...r.traces,[t]:n}})),addLog:t=>e(n=>{const r=n.logs[t.run_id]??[];return{logs:{...n.logs,[t.run_id]:[...r,t]}}}),setLogs:(t,n)=>e(r=>({logs:{...r.logs,[t]:n}})),addChatEvent:(t,n)=>e(r=>{const i=r.chatMessages[t]??[],s=n.message;if(!s)return r;const o=s.messageId??s.message_id,l=s.role??"assistant",d=(s.contentParts??s.content_parts??[]).filter(x=>{const y=x.mimeType??x.mime_type??"";return y.startsWith("text/")||y==="application/json"}).map(x=>{const y=x.data;return(y==null?void 0:y.inline)??""}).join(` -`).trim(),p=(s.toolCalls??s.tool_calls??[]).map(x=>({name:x.name??"",has_result:!!x.result})),m={message_id:o,role:l,content:d,tool_calls:p.length>0?p:void 0},f=i.findIndex(x=>x.message_id===o);if(f>=0)return{chatMessages:{...r.chatMessages,[t]:i.map((x,y)=>y===f?m:x)}};if(l==="user"){const x=i.findIndex(y=>y.message_id.startsWith("local-")&&y.role==="user"&&y.content===d);if(x>=0)return{chatMessages:{...r.chatMessages,[t]:i.map((y,b)=>b===x?m:y)}}}const g=[...i,m];return{chatMessages:{...r.chatMessages,[t]:g}}}),addLocalChatMessage:(t,n)=>e(r=>{const i=r.chatMessages[t]??[];return{chatMessages:{...r.chatMessages,[t]:[...i,n]}}}),setChatMessages:(t,n)=>e(r=>({chatMessages:{...r.chatMessages,[t]:n}})),setEntrypoints:t=>e({entrypoints:t}),breakpoints:{},toggleBreakpoint:(t,n)=>e(r=>{const i={...r.breakpoints[t]??{}};return i[n]?delete i[n]:i[n]=!0,{breakpoints:{...r.breakpoints,[t]:i}}}),clearBreakpoints:t=>e(n=>{const{[t]:r,...i}=n.breakpoints;return{breakpoints:i}}),activeNodes:{},setActiveNode:(t,n,r)=>e(i=>{const s=i.activeNodes[t]??{executing:{},prev:null};return{activeNodes:{...i.activeNodes,[t]:{executing:{...s.executing,[n]:r??null},prev:s.prev}}}}),removeActiveNode:(t,n)=>e(r=>{const i=r.activeNodes[t];if(!i)return r;const{[n]:s,...o}=i.executing;return{activeNodes:{...r.activeNodes,[t]:{executing:o,prev:n}}}}),resetRunGraphState:t=>e(n=>({stateEvents:{...n.stateEvents,[t]:[]},activeNodes:{...n.activeNodes,[t]:{executing:{},prev:null}}})),stateEvents:{},addStateEvent:(t,n,r,i,s)=>e(o=>{const l=o.stateEvents[t]??[];return{stateEvents:{...o.stateEvents,[t]:[...l,{node_name:n,qualified_node_name:i,phase:s,timestamp:Date.now(),payload:r}]}}}),setStateEvents:(t,n)=>e(r=>({stateEvents:{...r.stateEvents,[t]:n}})),focusedSpan:null,setFocusedSpan:t=>e({focusedSpan:t}),activeInterrupt:{},setActiveInterrupt:(t,n)=>e(r=>({activeInterrupt:{...r.activeInterrupt,[t]:n}})),reloadPending:!1,setReloadPending:t=>e({reloadPending:t}),graphCache:{},setGraphCache:(t,n)=>e(r=>({graphCache:{...r.graphCache,[t]:n}}))})),Vn="/api";async function $l(e){const t=await fetch(`${Vn}/auth/login`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({environment:e})});if(!t.ok)throw new Error(`Login failed: ${t.status}`);return t.json()}async function lr(){const e=await fetch(`${Vn}/auth/status`);if(!e.ok)throw new Error(`Status check failed: ${e.status}`);return e.json()}async function Ul(e){const t=await fetch(`${Vn}/auth/select-tenant`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({tenant_name:e})});if(!t.ok)throw new Error(`Tenant selection failed: ${t.status}`);return t.json()}async function Hl(){await fetch(`${Vn}/auth/logout`,{method:"POST"})}const bs="uipath-env",Wl=["cloud","staging","alpha"];function Kl(){const e=localStorage.getItem(bs);return Wl.includes(e)?e:"cloud"}const zn=Ot((e,t)=>({enabled:!0,status:"unauthenticated",environment:Kl(),tenants:[],uipathUrl:null,pollTimer:null,expiryTimer:null,init:async()=>{try{const n=await fetch("/api/config");if(n.ok&&!(await n.json()).auth_enabled){e({enabled:!1});return}const r=await lr();e({status:r.status,tenants:r.tenants??[],uipathUrl:r.uipath_url??null}),r.status==="authenticated"&&t().startExpiryCheck()}catch(n){console.error("Auth init failed",n)}},setEnvironment:n=>{localStorage.setItem(bs,n),e({environment:n})},startLogin:async()=>{const{environment:n}=t();try{const r=await $l(n);e({status:"pending"}),window.open(r.auth_url,"_blank"),t().pollStatus()}catch(r){console.error("Login failed",r)}},pollStatus:()=>{const{pollTimer:n}=t();if(n)return;const r=setInterval(async()=>{try{const i=await lr();i.status!=="pending"&&(t().stopPolling(),e({status:i.status,tenants:i.tenants??[],uipathUrl:i.uipath_url??null}),i.status==="authenticated"&&t().startExpiryCheck())}catch{}},2e3);e({pollTimer:r})},stopPolling:()=>{const{pollTimer:n}=t();n&&(clearInterval(n),e({pollTimer:null}))},startExpiryCheck:()=>{const{expiryTimer:n}=t();if(n)return;const r=setInterval(async()=>{try{(await lr()).status==="expired"&&(t().stopExpiryCheck(),e({status:"expired"}))}catch{}},3e4);e({expiryTimer:r})},stopExpiryCheck:()=>{const{expiryTimer:n}=t();n&&(clearInterval(n),e({expiryTimer:null}))},selectTenant:async n=>{try{const r=await Ul(n);e({status:"authenticated",uipathUrl:r.uipath_url,tenants:[]}),t().startExpiryCheck()}catch(r){console.error("Tenant selection failed",r)}},logout:async()=>{t().stopPolling(),t().stopExpiryCheck();try{await Hl()}catch{}e({status:"unauthenticated",tenants:[],uipathUrl:null})}})),xs=Ot(e=>({projectName:null,projectVersion:null,projectAuthors:null,init:async()=>{try{const t=await fetch("/api/config");if(t.ok){const n=await t.json();e({projectName:n.project_name??null,projectVersion:n.project_version??null,projectAuthors:n.project_authors??null})}}catch{}}}));class Gl{constructor(t){It(this,"ws",null);It(this,"url");It(this,"handlers",new Set);It(this,"reconnectTimer",null);It(this,"shouldReconnect",!0);It(this,"pendingMessages",[]);It(this,"activeSubscriptions",new Set);const n=window.location.protocol==="https:"?"wss:":"ws:";this.url=t??`${n}//${window.location.host}/ws`}connect(){var t;((t=this.ws)==null?void 0:t.readyState)!==WebSocket.OPEN&&(this.ws=new WebSocket(this.url),this.ws.onopen=()=>{console.log("[ws] connected");for(const n of this.activeSubscriptions)this.sendRaw(JSON.stringify({type:"subscribe",payload:{run_id:n}}));for(const n of this.pendingMessages)this.sendRaw(n);this.pendingMessages=[]},this.ws.onmessage=n=>{let r;try{r=JSON.parse(n.data)}catch{console.warn("[ws] failed to parse message",n.data);return}this.handlers.forEach(i=>{try{i(r)}catch(s){console.error("[ws] handler error",s)}})},this.ws.onclose=()=>{console.log("[ws] disconnected"),this.shouldReconnect&&(this.reconnectTimer=setTimeout(()=>this.connect(),2e3))},this.ws.onerror=()=>{var n;(n=this.ws)==null||n.close()})}disconnect(){var t;this.shouldReconnect=!1,this.reconnectTimer&&clearTimeout(this.reconnectTimer),(t=this.ws)==null||t.close(),this.ws=null}onMessage(t){return this.handlers.add(t),()=>this.handlers.delete(t)}sendRaw(t){var n;((n=this.ws)==null?void 0:n.readyState)===WebSocket.OPEN&&this.ws.send(t)}send(t,n){var i;const r=JSON.stringify({type:t,payload:n});((i=this.ws)==null?void 0:i.readyState)===WebSocket.OPEN?this.ws.send(r):this.pendingMessages.push(r)}subscribe(t){this.activeSubscriptions.add(t),this.send("subscribe",{run_id:t})}unsubscribe(t){this.activeSubscriptions.delete(t),this.send("unsubscribe",{run_id:t})}sendChatMessage(t,n){this.send("chat.message",{run_id:t,text:n})}sendInterruptResponse(t,n){this.send("chat.interrupt_response",{run_id:t,data:n})}debugStep(t){this.send("debug.step",{run_id:t})}debugContinue(t){this.send("debug.continue",{run_id:t})}debugStop(t){this.send("debug.stop",{run_id:t})}setBreakpoints(t,n){this.send("debug.set_breakpoints",{run_id:t,breakpoints:n})}sendAgentMessage(t,n,r,i){this.send("agent.message",{text:t,model:n,session_id:r??void 0,skill_ids:i&&i.length>0?i:void 0})}sendAgentStop(t){this.send("agent.stop",{session_id:t})}sendToolApproval(t,n,r){this.send("agent.tool_response",{session_id:t,tool_call_id:n,approved:r})}sendQuestionResponse(t,n,r){this.send("agent.question_response",{session_id:t,question_id:n,answer:r})}}const Ae=Ot(e=>({evaluators:[],localEvaluators:[],evalSets:{},evalRuns:{},setEvaluators:t=>e({evaluators:t}),setLocalEvaluators:t=>e({localEvaluators:t}),addLocalEvaluator:t=>e(n=>({localEvaluators:[...n.localEvaluators,t]})),upsertLocalEvaluator:t=>e(n=>({localEvaluators:n.localEvaluators.some(r=>r.id===t.id)?n.localEvaluators.map(r=>r.id===t.id?t:r):[...n.localEvaluators,t]})),setEvalSets:t=>e({evalSets:Object.fromEntries(t.map(n=>[n.id,n]))}),addEvalSet:t=>e(n=>({evalSets:{...n.evalSets,[t.id]:t}})),updateEvalSetEvaluators:(t,n)=>e(r=>{const i=r.evalSets[t];return i?{evalSets:{...r.evalSets,[t]:{...i,evaluator_ids:n}}}:r}),incrementEvalSetCount:(t,n=1)=>e(r=>{const i=r.evalSets[t];return i?{evalSets:{...r.evalSets,[t]:{...i,eval_count:i.eval_count+n}}}:r}),setEvalRuns:t=>e({evalRuns:Object.fromEntries(t.map(n=>[n.id,n]))}),upsertEvalRun:t=>e(n=>({evalRuns:{...n.evalRuns,[t.id]:t}})),updateEvalRunProgress:(t,n,r)=>e(i=>{const s=i.evalRuns[t];return s?{evalRuns:{...i.evalRuns,[t]:{...s,progress_completed:n,progress_total:r,status:"running"}}}:i}),completeEvalRun:(t,n,r)=>e(i=>{const s=i.evalRuns[t];return s?{evalRuns:{...i.evalRuns,[t]:{...s,status:"completed",overall_score:n,evaluator_scores:r,end_time:new Date().toISOString()}}}:i})}));let ql=0;function $t(){return`agent-msg-${++ql}`}const $e=Ot(e=>({sessionId:null,status:"idle",messages:[],plan:[],activeQuestion:null,models:[],selectedModel:null,modelsLoading:!1,skills:[],selectedSkillIds:[],skillsLoading:!1,setStatus:t=>e({status:t}),addUserMessage:t=>e(n=>({messages:[...n.messages,{id:$t(),role:"user",content:t,timestamp:Date.now()}]})),appendAssistantText:(t,n)=>e(r=>{const i=[...r.messages],s=i[i.length-1];return s&&s.role==="assistant"&&!s.done?i[i.length-1]={...s,content:s.content+t,done:n}:i.push({id:$t(),role:"assistant",content:t,timestamp:Date.now(),done:n}),{messages:i}}),setPlan:t=>e(n=>{const r=[...n.messages],i=r.findIndex(o=>o.role==="plan"),s={id:i>=0?r[i].id:$t(),role:"plan",content:"",timestamp:Date.now(),planItems:t};return i>=0?r[i]=s:r.push(s),{messages:r,plan:t}}),addToolUse:(t,n)=>e(r=>{const i=[...r.messages],s=i[i.length-1],o={tool:t,args:n};return s&&s.role==="tool"&&s.toolCalls?i[i.length-1]={...s,toolCalls:[...s.toolCalls,o]}:i.push({id:$t(),role:"tool",content:"",timestamp:Date.now(),toolCalls:[o]}),{messages:i}}),addToolResult:(t,n,r)=>e(i=>{const s=[...i.messages];for(let o=s.length-1;o>=0;o--){const l=s[o];if(l.role==="tool"&&l.toolCalls){const u=[...l.toolCalls];for(let c=u.length-1;c>=0;c--)if(u[c].tool===t&&u[c].result===void 0)return u[c]={...u[c],result:n,is_error:r},s[o]={...l,toolCalls:u},{messages:s}}}return{messages:s}}),addToolApprovalRequest:(t,n,r)=>e(i=>{const s=[...i.messages];for(let u=s.length-1;u>=0;u--){const c=s[u];if(c.role==="tool"&&c.toolCalls){const d=[...c.toolCalls];for(let p=d.length-1;p>=0;p--)if(d[p].tool===n&&!d[p].status&&d[p].result===void 0)return d[p]={...d[p],tool_call_id:t,status:"pending"},s[u]={...c,toolCalls:d},{messages:s}}if(c.role!=="tool")break}const o={tool:n,args:r,tool_call_id:t,status:"pending"},l=s[s.length-1];return l&&l.role==="tool"&&l.toolCalls?s[s.length-1]={...l,toolCalls:[...l.toolCalls,o]}:s.push({id:$t(),role:"tool",content:"",timestamp:Date.now(),toolCalls:[o]}),{messages:s}}),resolveToolApproval:(t,n)=>e(r=>{const i=[...r.messages];for(let s=i.length-1;s>=0;s--){const o=i[s];if(o.role==="tool"&&o.toolCalls){const l=[...o.toolCalls];for(let u=l.length-1;u>=0;u--)if(l[u].tool_call_id===t)return l[u]={...l[u],status:n?"approved":"denied"},i[s]={...o,toolCalls:l},{messages:i}}}return{messages:i}}),appendThinking:t=>e(n=>{const r=[...n.messages],i=r[r.length-1];return i&&i.role==="thinking"?r[r.length-1]={...i,content:i.content+t}:r.push({id:$t(),role:"thinking",content:t,timestamp:Date.now()}),{messages:r}}),addError:t=>e(n=>({status:"error",messages:[...n.messages,{id:$t(),role:"assistant",content:`Error: ${t}`,timestamp:Date.now(),done:!0}]})),setActiveQuestion:t=>e({activeQuestion:t}),setSessionId:t=>{sessionStorage.setItem("agent_session_id",t),e({sessionId:t})},setModels:t=>e({models:t}),setSelectedModel:t=>e({selectedModel:t}),setModelsLoading:t=>e({modelsLoading:t}),setSkills:t=>e({skills:t}),setSelectedSkillIds:t=>e({selectedSkillIds:t}),toggleSkill:t=>e(n=>({selectedSkillIds:n.selectedSkillIds.includes(t)?n.selectedSkillIds.filter(i=>i!==t):[...n.selectedSkillIds,t]})),setSkillsLoading:t=>e({skillsLoading:t}),hydrateSession:t=>e({sessionId:t.session_id,status:t.status||"done",messages:t.messages,plan:t.plan,selectedModel:t.model||null}),clearSession:()=>{sessionStorage.removeItem("agent_session_id"),e({sessionId:null,status:"idle",messages:[],plan:[],activeQuestion:null})}})),Me=Ot(e=>({children:{},expanded:{},selectedFile:null,openTabs:[],fileCache:{},dirty:{},buffers:{},loadingDirs:{},loadingFile:!1,setChildren:(t,n)=>e(r=>({children:{...r.children,[t]:n}})),toggleExpanded:t=>e(n=>({expanded:{...n.expanded,[t]:!n.expanded[t]}})),setSelectedFile:t=>e({selectedFile:t}),openTab:t=>e(n=>({selectedFile:t,openTabs:n.openTabs.includes(t)?n.openTabs:[...n.openTabs,t]})),closeTab:t=>e(n=>{const r=n.openTabs.filter(c=>c!==t);let i=n.selectedFile;if(i===t){const c=n.openTabs.indexOf(t);i=r[Math.min(c,r.length-1)]??null}const{[t]:s,...o}=n.dirty,{[t]:l,...u}=n.buffers;return{openTabs:r,selectedFile:i,dirty:o,buffers:u}}),setFileContent:(t,n)=>e(r=>({fileCache:{...r.fileCache,[t]:n}})),updateBuffer:(t,n)=>e(r=>({buffers:{...r.buffers,[t]:n},dirty:{...r.dirty,[t]:!0}})),markClean:t=>e(n=>{const{[t]:r,...i}=n.dirty,{[t]:s,...o}=n.buffers;return{dirty:i,buffers:o}}),setLoadingDir:(t,n)=>e(r=>({loadingDirs:{...r.loadingDirs,[t]:n}})),setLoadingFile:t=>e({loadingFile:t})})),Yr="/api";async function Xr(e,t){const n=await fetch(e,t);if(!n.ok){let r;try{r=(await n.json()).detail||n.statusText}catch{r=n.statusText}const i=new Error(`HTTP ${n.status}`);throw i.detail=r,i.status=n.status,i}return n.json()}async function Zr(e){return Xr(`${Yr}/files/tree?path=${encodeURIComponent(e)}`)}async function ys(e){return Xr(`${Yr}/files/content?path=${encodeURIComponent(e)}`)}async function Vl(e,t){await Xr(`${Yr}/files/content?path=${encodeURIComponent(e)}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:t})})}let Cn=null;function Yn(){return Cn||(Cn=new Gl,Cn.connect()),Cn}function Yl(){const e=S.useRef(Yn()),{upsertRun:t,addTrace:n,addLog:r,addChatEvent:i,setActiveInterrupt:s,setActiveNode:o,removeActiveNode:l,resetRunGraphState:u,addStateEvent:c,setReloadPending:d}=ke(),{upsertEvalRun:p,updateEvalRunProgress:m,completeEvalRun:f}=Ae();return S.useEffect(()=>e.current.onMessage(y=>{switch(y.type){case"run.updated":t(y.payload);break;case"trace":n(y.payload);break;case"log":r(y.payload);break;case"chat":{const b=y.payload.run_id;i(b,y.payload);break}case"chat.interrupt":{const b=y.payload.run_id;s(b,y.payload);break}case"state":{const b=y.payload.run_id,k=y.payload.node_name,C=y.payload.qualified_node_name??null,j=y.payload.phase??null,L=y.payload.payload;k==="__start__"&&j==="started"&&u(b),j==="started"?o(b,k,C):j==="completed"&&l(b,k),c(b,k,L,C,j);break}case"reload":d(!0);break;case"files.changed":{const b=y.payload.files,k=new Set(b),C=Me.getState();for(const L of C.openTabs)C.dirty[L]||!k.has(L)||ys(L).then(T=>{var O;const B=Me.getState();B.dirty[L]||((O=B.fileCache[L])==null?void 0:O.content)!==T.content&&B.setFileContent(L,T)}).catch(()=>{});const j=new Set;for(const L of b){const T=L.lastIndexOf("/"),B=T===-1?"":L.substring(0,T);B in C.children&&j.add(B)}for(const L of j)Zr(L).then(T=>Me.getState().setChildren(L,T)).catch(()=>{});break}case"eval_run.created":p(y.payload);break;case"eval_run.progress":{const{run_id:b,completed:k,total:C,item_result:j}=y.payload;m(b,k,C,j);break}case"eval_run.completed":{const{run_id:b,overall_score:k,evaluator_scores:C}=y.payload;f(b,k,C);break}case"agent.status":{const{session_id:b,status:k}=y.payload,C=$e.getState();C.sessionId||C.setSessionId(b),C.setStatus(k),(k==="done"||k==="error"||k==="idle")&&C.setActiveQuestion(null);break}case"agent.text":{const{session_id:b,content:k,done:C}=y.payload,j=$e.getState();j.sessionId||j.setSessionId(b),j.appendAssistantText(k,C);break}case"agent.plan":{const{session_id:b,items:k}=y.payload,C=$e.getState();C.sessionId||C.setSessionId(b),C.setPlan(k);break}case"agent.tool_use":{const{session_id:b,tool:k,args:C}=y.payload,j=$e.getState();j.sessionId||j.setSessionId(b),j.addToolUse(k,C);break}case"agent.tool_result":{const{tool:b,result:k,is_error:C}=y.payload;$e.getState().addToolResult(b,k,C);break}case"agent.tool_approval":{const{session_id:b,tool_call_id:k,tool:C,args:j}=y.payload,L=$e.getState();L.sessionId||L.setSessionId(b),L.addToolApprovalRequest(k,C,j);break}case"agent.thinking":{const{content:b}=y.payload;$e.getState().appendThinking(b);break}case"agent.text_delta":{const{session_id:b,delta:k}=y.payload,C=$e.getState();C.sessionId||C.setSessionId(b),C.appendAssistantText(k,!1);break}case"agent.question":{const{session_id:b,question_id:k,question:C,options:j}=y.payload,L=$e.getState();L.sessionId||L.setSessionId(b),L.setActiveQuestion({question_id:k,question:C,options:j});break}case"agent.token_usage":break;case"agent.error":{const{message:b}=y.payload;$e.getState().addError(b);break}}}),[t,n,r,i,s,o,l,u,c,d,p,m,f]),e.current}const Lt="/api";async function jt(e,t){const n=await fetch(e,t);if(!n.ok){let r;try{r=(await n.json()).detail||n.statusText}catch{r=n.statusText}const i=new Error(`HTTP ${n.status}`);throw i.detail=r,i.status=n.status,i}return n.json()}async function vs(){return jt(`${Lt}/entrypoints`)}async function Xl(e){return jt(`${Lt}/entrypoints/${encodeURIComponent(e)}/schema`)}async function Zl(e){return jt(`${Lt}/entrypoints/${encodeURIComponent(e)}/mock-input`)}async function Jl(e){return jt(`${Lt}/entrypoints/${encodeURIComponent(e)}/graph`)}async function Ii(e,t,n="run",r=[]){return jt(`${Lt}/runs`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({entrypoint:e,input_data:t,mode:n,breakpoints:r})})}async function Ql(){return jt(`${Lt}/runs`)}async function cr(e){return jt(`${Lt}/runs/${e}`)}async function ec(){return jt(`${Lt}/reload`,{method:"POST"})}function tc(e){const t=e.replace(/^#\/?/,""),n={section:"debug",view:"new",runId:null,tab:"traces",setupEntrypoint:null,setupMode:null,evalCreating:!1,evalSetId:null,evalRunId:null,evalRunItemName:null,evaluatorId:null,evaluatorCreateType:null,evaluatorFilter:null,explorerFile:null};if(!t||t==="new"||t==="debug"||t==="debug/new")return n;const r=t.match(/^(?:debug\/)?setup\/([^/]+)\/(run|chat)$/);if(r)return{...n,view:"setup",setupEntrypoint:decodeURIComponent(r[1]),setupMode:r[2]};const i=t.match(/^(?:debug\/)?runs\/([^/]+)(?:\/(traces|output))?$/);if(i)return{...n,view:"details",runId:i[1],tab:i[2]??"traces"};if(t==="evals/new")return{...n,section:"evals",evalCreating:!0};const s=t.match(/^evals\/runs\/([^/]+?)(?:\/([^/]+))?$/);if(s)return{...n,section:"evals",evalRunId:s[1],evalRunItemName:s[2]?decodeURIComponent(s[2]):null};const o=t.match(/^evals\/sets\/([^/]+)$/);if(o)return{...n,section:"evals",evalSetId:o[1]};if(t==="evals")return{...n,section:"evals"};const l=t.match(/^evaluators\/new(?:\/(deterministic|llm|tool))?$/);if(l)return{...n,section:"evaluators",evaluatorCreateType:l[1]??"any"};const u=t.match(/^evaluators\/category\/(deterministic|llm|tool)$/);if(u)return{...n,section:"evaluators",evaluatorFilter:u[1]};const c=t.match(/^evaluators\/([^/]+)$/);if(c)return{...n,section:"evaluators",evaluatorId:c[1]};if(t==="evaluators")return{...n,section:"evaluators"};const d=t.match(/^explorer\/file\/(.+)$/);return d?{...n,section:"explorer",explorerFile:decodeURIComponent(d[1])}:t==="explorer"?{...n,section:"explorer"}:n}function nc(){return window.location.hash}function rc(e){return window.addEventListener("hashchange",e),()=>window.removeEventListener("hashchange",e)}function st(){const e=S.useSyncExternalStore(rc,nc),t=tc(e),n=S.useCallback(r=>{window.location.hash=r},[]);return{...t,navigate:n}}const Ri="(max-width: 767px)";function ic(){const[e,t]=S.useState(()=>window.matchMedia(Ri).matches);return S.useEffect(()=>{const n=window.matchMedia(Ri),r=i=>t(i.matches);return n.addEventListener("change",r),()=>n.removeEventListener("change",r)},[]),e}const oc=[{section:"debug",label:"Developer Console",icon:a.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("rect",{x:"8",y:"6",width:"8",height:"14",rx:"4"}),a.jsx("path",{d:"M6 10H4"}),a.jsx("path",{d:"M6 18H4"}),a.jsx("path",{d:"M18 10h2"}),a.jsx("path",{d:"M18 18h2"}),a.jsx("path",{d:"M8 14h8"}),a.jsx("path",{d:"M9 6l-1.5-2"}),a.jsx("path",{d:"M15 6l1.5-2"}),a.jsx("path",{d:"M6 14H4"}),a.jsx("path",{d:"M18 14h2"})]})},{section:"evals",label:"Evals",icon:a.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("path",{d:"M9 3h6"}),a.jsx("path",{d:"M10 3v6.5L5 20a1 1 0 0 0 .9 1.4h12.2a1 1 0 0 0 .9-1.4L14 9.5V3"}),a.jsx("path",{d:"M8.5 14h7"})]})},{section:"evaluators",label:"Evaluators",icon:a.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("path",{d:"M12 2l7 4v5c0 5.25-3.5 9.74-7 11-3.5-1.26-7-5.75-7-11V6l7-4z"}),a.jsx("path",{d:"M9 12l2 2 4-4"})]})},{section:"explorer",label:"Explorer",icon:a.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",children:a.jsx("path",{d:"M7.5 22.5H17.595C17.07 23.4 16.11 24 15 24H7.5C4.185 24 1.5 21.315 1.5 18V6C1.5 4.89 2.1 3.93 3 3.405V18C3 20.475 5.025 22.5 7.5 22.5ZM21 8.121V18C21 19.6545 19.6545 21 18 21H7.5C5.8455 21 4.5 19.6545 4.5 18V3C4.5 1.3455 5.8455 0 7.5 0H12.879C13.4715 0 14.0505 0.24 14.4705 0.6585L20.3415 6.5295C20.766 6.954 21 7.5195 21 8.121ZM13.5 6.75C13.5 7.164 13.8375 7.5 14.25 7.5H19.1895L13.5 1.8105V6.75ZM19.5 18V9H14.25C13.0095 9 12 7.9905 12 6.75V1.5H7.5C6.672 1.5 6 2.1735 6 3V18C6 18.8265 6.672 19.5 7.5 19.5H18C18.828 19.5 19.5 18.8265 19.5 18Z"})})}];function sc({section:e,onSectionChange:t}){return a.jsx("div",{className:"w-12 flex flex-col items-center shrink-0 border-r",style:{background:"var(--activity-bar-bg)",borderColor:"var(--border)"},children:a.jsx("div",{className:"flex flex-col items-center gap-1 pt-2",children:oc.map(n=>{const r=e===n.section;return a.jsxs("button",{onClick:()=>t(n.section),className:"w-10 h-10 flex items-center justify-center rounded cursor-pointer transition-colors relative",style:{color:r?"var(--text-primary)":"var(--text-muted)",background:r?"var(--bg-hover)":"transparent",border:"none"},title:n.label,onMouseEnter:i=>{r||(i.currentTarget.style.color="var(--text-secondary)")},onMouseLeave:i=>{r||(i.currentTarget.style.color="var(--text-muted)")},children:[r&&a.jsx("div",{className:"absolute left-0 top-1.5 bottom-1.5 w-0.5 rounded-r",style:{background:"var(--accent)"}}),n.icon]},n.section)})})})}const tt="/api";async function nt(e,t){const n=await fetch(e,t);if(!n.ok){let r;try{r=(await n.json()).detail||n.statusText}catch{r=n.statusText}const i=new Error(`HTTP ${n.status}`);throw i.detail=r,i.status=n.status,i}return n.json()}async function ac(){return nt(`${tt}/evaluators`)}async function ks(){return nt(`${tt}/eval-sets`)}async function lc(e){return nt(`${tt}/eval-sets`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async function cc(e,t){return nt(`${tt}/eval-sets/${encodeURIComponent(e)}/items`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})}async function uc(e,t){await nt(`${tt}/eval-sets/${encodeURIComponent(e)}/items/${encodeURIComponent(t)}`,{method:"DELETE"})}async function dc(e){return nt(`${tt}/eval-sets/${encodeURIComponent(e)}`)}async function pc(e){return nt(`${tt}/eval-sets/${encodeURIComponent(e)}/runs`,{method:"POST"})}async function fc(){return nt(`${tt}/eval-runs`)}async function Oi(e){return nt(`${tt}/eval-runs/${encodeURIComponent(e)}`)}async function Jr(){return nt(`${tt}/local-evaluators`)}async function mc(e){return nt(`${tt}/local-evaluators`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async function hc(e,t){return nt(`${tt}/eval-sets/${encodeURIComponent(e)}/evaluators`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({evaluator_refs:t})})}async function gc(e,t){return nt(`${tt}/local-evaluators/${encodeURIComponent(e)}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})}const bc={"uipath-exact-match":e=>({expectedOutput:e}),"uipath-json-similarity":e=>({expectedOutput:e}),"uipath-contains":()=>({searchText:""}),"uipath-llm-judge-output-semantic-similarity":e=>({expectedOutput:e}),"uipath-llm-judge-output-strict-json-similarity":e=>({expectedOutput:e}),"uipath-llm-judge-trajectory-similarity":()=>({expectedAgentBehavior:""}),"uipath-llm-judge-trajectory-simulation":()=>({expectedAgentBehavior:""}),"uipath-tool-call-count":()=>({}),"uipath-tool-call-args":()=>({}),"uipath-tool-call-order":()=>({}),"uipath-tool-call-output":()=>({})};function xc(e,t){if(!e)return{};const n=bc[e.evaluator_type_id];return n?n(t):e.type==="tool"?{}:e.evaluator_type_id.includes("trajectory")?{expectedAgentBehavior:""}:{expectedOutput:t}}function Es(e){return e?e.type==="tool"?!0:e.evaluator_type_id.includes("tool-call"):!1}function yc(e){return e?Es(e)?{label:"tools",color:"var(--warning, #e5a00d)"}:e.evaluator_type_id.includes("trajectory")?{label:"quality",color:"var(--info, #3b82f6)"}:{label:"output",color:"var(--success, #22c55e)"}:{label:"output",color:"var(--success, #22c55e)"}}function vc({run:e,onClose:t}){const n=Ae(w=>w.evalSets),r=Ae(w=>w.setEvalSets),i=Ae(w=>w.incrementEvalSetCount),s=Ae(w=>w.localEvaluators),o=Ae(w=>w.setLocalEvaluators),[l,u]=S.useState(`run-${e.id.slice(0,8)}`),[c,d]=S.useState(new Set),[p,m]=S.useState({}),f=S.useRef(new Set),[g,x]=S.useState(!1),[y,b]=S.useState(null),[k,C]=S.useState(!1),j=Object.values(n),L=S.useMemo(()=>Object.fromEntries(s.map(w=>[w.id,w])),[s]),T=S.useMemo(()=>{const w=new Set;for(const _ of c){const M=n[_];M&&M.evaluator_ids.forEach(R=>w.add(R))}return[...w]},[c,n]);S.useEffect(()=>{const w=e.output_data,_=f.current;m(M=>{const R={};for(const D of T)if(_.has(D)&&M[D]!==void 0)R[D]=M[D];else{const N=L[D],E=xc(N,w);R[D]=JSON.stringify(E,null,2)}return R})},[T,L,e.output_data]),S.useEffect(()=>{const w=_=>{_.key==="Escape"&&t()};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[t]),S.useEffect(()=>{j.length===0&&ks().then(r).catch(()=>{}),s.length===0&&Jr().then(o).catch(()=>{})},[]);const B=w=>{d(_=>{const M=new Set(_);return M.has(w)?M.delete(w):M.add(w),M})},O=async()=>{var _;if(!l.trim()||c.size===0)return;b(null),x(!0);const w={};for(const M of T){const R=p[M];if(R!==void 0)try{w[M]=JSON.parse(R)}catch{b(`Invalid JSON for evaluator "${((_=L[M])==null?void 0:_.name)??M}"`),x(!1);return}}try{for(const M of c){const R=n[M],D=new Set((R==null?void 0:R.evaluator_ids)??[]),N={};for(const[E,I]of Object.entries(w))D.has(E)&&(N[E]=I);await cc(M,{name:l.trim(),inputs:e.input_data,expected_output:null,evaluation_criterias:N}),i(M)}C(!0),setTimeout(t,3e3)}catch(M){b(M.detail||M.message||"Failed to add item")}finally{x(!1)}};return a.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center",style:{background:"rgba(0, 0, 0, 0.5)"},onClick:w=>{w.target===w.currentTarget&&t()},children:a.jsxs("div",{className:"w-full max-w-2xl rounded-lg p-6 shadow-xl max-h-[85vh] flex flex-col",style:{background:"var(--bg-primary)",border:"1px solid var(--border)"},children:[a.jsxs("div",{className:"flex items-center justify-between mb-6",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("div",{className:"w-1.5 h-1.5 rounded-full",style:{background:"var(--accent)"}}),a.jsx("span",{className:"text-sm font-semibold",style:{color:"var(--text-muted)"},children:"Add to Eval Set"})]}),a.jsx("button",{onClick:t,className:"w-7 h-7 flex items-center justify-center rounded cursor-pointer transition-colors",style:{color:"var(--text-muted)",background:"transparent",border:"none"},onMouseEnter:w=>{w.currentTarget.style.color="var(--text-primary)"},onMouseLeave:w=>{w.currentTarget.style.color="var(--text-muted)"},"aria-label":"Close",children:a.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[a.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),a.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),a.jsxs("div",{className:"flex-1 overflow-y-auto min-h-0 space-y-4 pr-1",children:[a.jsxs("div",{children:[a.jsx("label",{className:"block text-[11px] font-medium mb-1.5",style:{color:"var(--text-muted)"},children:"Item Name"}),a.jsx("input",{type:"text",value:l,onChange:w=>u(w.target.value),className:"w-full rounded-md px-3 py-2 text-xs",style:{background:"var(--bg-secondary)",border:"1px solid var(--border)",color:"var(--text-primary)"}})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-[11px] font-medium mb-1.5",style:{color:"var(--text-muted)"},children:"Inputs"}),a.jsx("pre",{className:"rounded-md px-3 py-2 text-xs font-mono whitespace-pre-wrap break-words max-h-32 overflow-y-auto",style:{background:"var(--bg-secondary)",border:"1px solid var(--border)",color:"var(--text-secondary)"},children:JSON.stringify(e.input_data,null,2)})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-[11px] font-medium mb-1.5",style:{color:"var(--text-muted)"},children:"Eval Sets"}),j.length===0?a.jsx("p",{className:"text-xs",style:{color:"var(--text-muted)"},children:"No eval sets found. Create one first."}):a.jsx("div",{className:"rounded-md border overflow-hidden max-h-40 overflow-y-auto",style:{borderColor:"var(--border)",background:"var(--bg-secondary)"},children:j.map(w=>a.jsxs("label",{className:"flex items-center gap-2.5 px-3 py-2 text-xs cursor-pointer transition-colors",style:{borderBottom:"1px solid var(--border)"},onMouseEnter:_=>{_.currentTarget.style.background="var(--bg-hover)"},onMouseLeave:_=>{_.currentTarget.style.background="transparent"},children:[a.jsx("input",{type:"checkbox",checked:c.has(w.id),onChange:()=>B(w.id),className:"accent-[var(--accent)]"}),a.jsx("span",{className:"flex-1 truncate",style:{color:"var(--text-primary)"},children:w.name}),a.jsxs("span",{className:"text-[10px]",style:{color:"var(--text-muted)"},children:[w.eval_count," items"]})]},w.id))})]}),T.length>0&&a.jsxs("div",{children:[a.jsx("label",{className:"block text-[11px] font-medium mb-1.5",style:{color:"var(--text-muted)"},children:"Evaluation Criteria"}),a.jsx("div",{className:"space-y-2",children:T.map(w=>{const _=L[w],M=Es(_),R=yc(_);return a.jsxs("div",{className:"rounded-md",style:{border:"1px solid var(--border)",background:"var(--bg-primary)",opacity:M?.6:1},children:[a.jsxs("div",{className:"flex items-center gap-2 px-3 py-2",style:{borderBottom:M?"none":"1px solid var(--border)"},children:[a.jsx("span",{className:"text-xs font-medium truncate flex-1",style:{color:"var(--text-primary)"},children:(_==null?void 0:_.name)??w}),a.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded-full font-medium",style:{color:R.color,background:`color-mix(in srgb, ${R.color} 12%, transparent)`},children:R.label})]}),M?a.jsx("div",{className:"px-3 pb-2",children:a.jsx("span",{className:"text-[10px] italic",style:{color:"var(--text-muted)"},children:"Default criteria — uses evaluator config"})}):a.jsx("div",{className:"px-3 pb-2 pt-1",children:a.jsx("textarea",{value:p[w]??"{}",onChange:D=>{f.current.add(w),m(N=>({...N,[w]:D.target.value}))},rows:8,className:"w-full rounded px-2 py-1.5 text-xs font-mono resize-y",style:{background:"var(--bg-secondary)",border:"1px solid var(--border)",color:"var(--text-primary)"}})})]},w)})})]})]}),a.jsxs("div",{className:"mt-4 space-y-3",children:[y&&a.jsx("p",{className:"text-xs px-3 py-2 rounded",style:{color:"var(--error)",background:"color-mix(in srgb, var(--error) 10%, var(--bg-secondary))"},children:y}),k&&a.jsxs("p",{className:"text-xs px-3 py-2 rounded",style:{color:"var(--success)",background:"color-mix(in srgb, var(--success) 10%, var(--bg-secondary))"},children:["Added to ",c.size," eval set",c.size!==1?"s":"","."]}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx("button",{onClick:t,className:"flex-1 py-2 rounded-md text-xs font-semibold cursor-pointer",style:{background:"var(--bg-secondary)",color:"var(--text-secondary)",border:"1px solid var(--border)"},children:"Cancel"}),a.jsx("button",{onClick:O,disabled:!l.trim()||c.size===0||g||k,className:"flex-1 py-2 rounded-md text-[13px] font-semibold transition-colors cursor-pointer disabled:opacity-40 disabled:cursor-not-allowed",style:{background:"var(--accent)",color:"var(--bg-primary)",border:"none"},children:g?"Adding...":k?"Added":"Add Item"})]})]})]})})}const kc={pending:"var(--text-muted)",running:"var(--warning)",suspended:"var(--info)",completed:"var(--success)",failed:"var(--error)"};function Ec({run:e,isSelected:t,onClick:n}){var p;const r=kc[e.status]??"var(--text-muted)",i=((p=e.entrypoint.split("/").pop())==null?void 0:p.slice(0,16))??e.entrypoint,s=e.start_time?new Date(e.start_time).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):"",[o,l]=S.useState(!1),[u,c]=S.useState(!1),d=S.useRef(null);return S.useEffect(()=>{if(!o)return;const m=f=>{d.current&&!d.current.contains(f.target)&&l(!1)};return document.addEventListener("mousedown",m),()=>document.removeEventListener("mousedown",m)},[o]),a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"group relative w-full text-left px-3 py-1.5 flex items-center gap-2 transition-colors cursor-pointer",style:{background:t?"color-mix(in srgb, var(--accent) 15%, var(--bg-primary))":void 0,borderLeft:t?"3px solid var(--accent)":"3px solid transparent"},onMouseEnter:m=>{t||(m.currentTarget.style.background="var(--bg-hover)")},onMouseLeave:m=>{t||(m.currentTarget.style.background="")},onClick:n,children:[a.jsx("span",{className:"shrink-0 w-2 h-2 rounded-full",style:{background:r}}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("div",{className:"text-xs truncate",style:{color:t?"var(--text-primary)":"var(--text-secondary)"},children:i}),a.jsxs("div",{className:"text-[11px] tabular-nums",style:{color:"var(--text-muted)"},children:[s,e.duration?` · ${e.duration}`:""]})]}),e.status==="completed"&&a.jsxs("div",{ref:d,className:"relative shrink-0",children:[a.jsx("button",{onClick:m=>{m.stopPropagation(),l(f=>!f)},className:"opacity-40 group-hover:opacity-100 focus:opacity-100 w-7 h-7 flex items-center justify-center rounded transition-opacity cursor-pointer",style:{color:"var(--text-muted)"},onMouseEnter:m=>{m.currentTarget.style.color="var(--text-primary)",m.currentTarget.style.background="var(--bg-secondary)"},onMouseLeave:m=>{m.currentTarget.style.color="var(--text-muted)",m.currentTarget.style.background=""},"aria-label":"Actions",title:"Actions",children:a.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"currentColor",children:[a.jsx("circle",{cx:"8",cy:"3",r:"1.5"}),a.jsx("circle",{cx:"8",cy:"8",r:"1.5"}),a.jsx("circle",{cx:"8",cy:"13",r:"1.5"})]})}),o&&a.jsx("div",{className:"absolute right-0 top-full mt-1 z-50 min-w-[140px] rounded-md shadow-lg py-1",style:{background:"var(--bg-primary)",border:"1px solid var(--border)"},children:a.jsx("button",{onClick:m=>{m.stopPropagation(),l(!1),c(!0)},className:"w-full text-left px-3 py-1.5 text-xs cursor-pointer transition-colors",style:{color:"var(--text-secondary)"},onMouseEnter:m=>{m.currentTarget.style.background="var(--bg-hover)",m.currentTarget.style.color="var(--text-primary)"},onMouseLeave:m=>{m.currentTarget.style.background="",m.currentTarget.style.color="var(--text-secondary)"},children:"Add to Eval Set"})})]})]}),u&&a.jsx(vc,{run:e,onClose:()=>c(!1)})]})}function Li({runs:e,selectedRunId:t,onSelectRun:n,onNewRun:r}){const i=[...e].sort((s,o)=>new Date(o.start_time??0).getTime()-new Date(s.start_time??0).getTime());return a.jsxs(a.Fragment,{children:[a.jsx("button",{onClick:r,className:"mx-3 mt-2.5 mb-1 px-3 py-1.5 text-[11px] font-medium rounded border border-[var(--border)] bg-transparent transition-colors cursor-pointer",style:{color:"var(--text-secondary)"},onMouseEnter:s=>{s.currentTarget.style.color="var(--text-primary)",s.currentTarget.style.borderColor="var(--text-muted)"},onMouseLeave:s=>{s.currentTarget.style.color="var(--text-secondary)",s.currentTarget.style.borderColor=""},children:"+ New Run"}),a.jsx("div",{className:"px-3 pt-3 pb-1 text-[11px] uppercase tracking-widest font-semibold",style:{color:"var(--text-muted)"},children:"History"}),a.jsxs("div",{className:"flex-1 overflow-y-auto",children:[i.map(s=>a.jsx(Ec,{run:s,isSelected:s.id===t,onClick:()=>n(s.id)},s.id)),i.length===0&&a.jsx("p",{className:"text-xs px-3 py-4 text-center",style:{color:"var(--text-muted)"},children:"No runs yet"})]})]})}function ws(){const e=localStorage.getItem("uipath-dev-theme");return e==="light"||e==="dark"?e:"dark"}function _s(e){document.documentElement.setAttribute("data-theme",e),localStorage.setItem("uipath-dev-theme",e)}_s(ws());const Ns=Ot(e=>({theme:ws(),toggleTheme:()=>e(t=>{const n=t.theme==="dark"?"light":"dark";return _s(n),{theme:n}})}));function ji(){const{theme:e,toggleTheme:t}=Ns(),{enabled:n,status:r,environment:i,tenants:s,uipathUrl:o,setEnvironment:l,startLogin:u,selectTenant:c,logout:d}=zn(),{projectName:p,projectVersion:m,projectAuthors:f}=xs(),[g,x]=S.useState(!1),[y,b]=S.useState(""),k=S.useRef(null),C=S.useRef(null);S.useEffect(()=>{if(!g)return;const N=E=>{k.current&&!k.current.contains(E.target)&&C.current&&!C.current.contains(E.target)&&x(!1)};return document.addEventListener("mousedown",N),()=>document.removeEventListener("mousedown",N)},[g]);const j=r==="authenticated",L=r==="expired",T=r==="pending",B=r==="needs_tenant";let O="UiPath: Disconnected",w=null,_=!0;j?(O=`UiPath: ${o?o.replace(/^https?:\/\/[^/]+\//,""):""}`,w="var(--success)",_=!1):L?(O=`UiPath: ${o?o.replace(/^https?:\/\/[^/]+\//,""):""} (expired)`,w="var(--error)",_=!1):T?O="UiPath: Signing in…":B&&(O="UiPath: Select Tenant");const M=()=>{T||(L?u():x(N=>!N))},R="flex items-center gap-1 px-1.5 rounded transition-colors",D={onMouseEnter:N=>{N.currentTarget.style.background="var(--bg-hover)",N.currentTarget.style.color="var(--text-primary)"},onMouseLeave:N=>{N.currentTarget.style.background="",N.currentTarget.style.color="var(--text-muted)"}};return a.jsxs("div",{className:"h-6 flex items-center justify-end gap-3 px-2 text-xs border-t shrink-0",style:{background:"var(--bg-secondary)",color:"var(--text-muted)",borderColor:"var(--border)",fontSize:"11px"},children:[n&&a.jsxs("div",{className:"relative flex items-center",children:[a.jsxs("div",{ref:C,className:`${R} cursor-pointer`,onClick:M,...D,title:j?o??"":L?"Token expired — click to re-authenticate":T?"Signing in…":B?"Select a tenant":"Click to sign in",children:[T?a.jsxs("svg",{className:"animate-spin",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[a.jsx("circle",{cx:"12",cy:"12",r:"10",strokeOpacity:"0.25"}),a.jsx("path",{d:"M12 2a10 10 0 0 1 10 10",strokeLinecap:"round"})]}):w?a.jsx("div",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{background:w}}):_?a.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2"}),a.jsx("path",{d:"M7 11V7a5 5 0 0 1 9.9-1"})]}):null,a.jsx("span",{className:"truncate max-w-[200px]",children:O})]}),g&&a.jsx("div",{ref:k,className:"absolute bottom-full right-0 mb-1 rounded border shadow-lg p-1 min-w-[180px]",style:{background:"var(--bg-secondary)",borderColor:"var(--border)"},children:j||L?a.jsxs(a.Fragment,{children:[a.jsxs("button",{onClick:()=>{o&&window.open(o,"_blank","noopener,noreferrer"),x(!1)},className:"w-full flex items-center gap-2 px-2 py-2 text-[11px] rounded cursor-pointer transition-colors text-left",style:{color:"var(--text-muted)",background:"transparent",border:"none"},onMouseEnter:N=>{N.currentTarget.style.background="var(--bg-hover)",N.currentTarget.style.color="var(--text-primary)"},onMouseLeave:N=>{N.currentTarget.style.background="transparent",N.currentTarget.style.color="var(--text-muted)"},children:[a.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),a.jsx("polyline",{points:"15 3 21 3 21 9"}),a.jsx("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]}),"Go to Platform"]}),a.jsxs("button",{onClick:()=>{d(),x(!1)},className:"w-full flex items-center gap-2 px-2 py-2 text-[11px] rounded cursor-pointer transition-colors text-left",style:{color:"var(--text-muted)",background:"transparent",border:"none"},onMouseEnter:N=>{N.currentTarget.style.background="var(--bg-hover)",N.currentTarget.style.color="var(--text-primary)"},onMouseLeave:N=>{N.currentTarget.style.background="transparent",N.currentTarget.style.color="var(--text-muted)"},children:[a.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"}),a.jsx("polyline",{points:"16 17 21 12 16 7"}),a.jsx("line",{x1:"21",y1:"12",x2:"9",y2:"12"})]}),"Sign Out"]})]}):B?a.jsxs("div",{className:"p-1",children:[a.jsx("label",{className:"block text-[10px] font-medium mb-1",style:{color:"var(--text-muted)"},children:"Tenant"}),a.jsxs("select",{value:y,onChange:N=>b(N.target.value),className:"w-full rounded px-1.5 py-1 text-[10px] mb-1.5 appearance-auto",style:{background:"var(--bg-primary)",border:"1px solid var(--border)",color:"var(--text-primary)"},children:[a.jsx("option",{value:"",children:"Select…"}),s.map(N=>a.jsx("option",{value:N,children:N},N))]}),a.jsx("button",{onClick:()=>{y&&(c(y),x(!1))},disabled:!y,className:"w-full px-2 py-1 text-[10px] font-medium rounded border border-[var(--border)] bg-transparent cursor-pointer transition-colors disabled:opacity-30 disabled:cursor-not-allowed",style:{color:"var(--text-muted)"},children:"Confirm"})]}):a.jsxs("div",{className:"p-1",children:[a.jsx("label",{className:"block text-[10px] font-medium mb-1",style:{color:"var(--text-muted)"},children:"Environment"}),a.jsxs("select",{value:i,onChange:N=>l(N.target.value),className:"w-full rounded px-1.5 py-0.5 text-[10px] mb-1.5 appearance-auto",style:{background:"var(--bg-primary)",border:"1px solid var(--border)",color:"var(--text-muted)"},children:[a.jsx("option",{value:"cloud",children:"cloud"}),a.jsx("option",{value:"staging",children:"staging"}),a.jsx("option",{value:"alpha",children:"alpha"})]}),a.jsx("button",{onClick:()=>{u(),x(!1)},className:"w-full px-2 py-1 text-[10px] font-medium rounded border border-[var(--border)] bg-transparent cursor-pointer transition-colors",style:{color:"var(--text-muted)"},onMouseEnter:N=>{N.currentTarget.style.color="var(--text-primary)",N.currentTarget.style.borderColor="var(--text-muted)"},onMouseLeave:N=>{N.currentTarget.style.color="var(--text-muted)",N.currentTarget.style.borderColor="var(--border)"},children:"Sign In"})]})})]}),p&&a.jsxs("span",{className:R,children:["Project: ",p]}),m&&a.jsxs("span",{className:R,children:["Version: v",m]}),f&&a.jsxs("span",{className:R,children:["Author: ",f]}),a.jsxs("a",{href:"https://github.com/UiPath/uipath-dev-python",target:"_blank",rel:"noopener noreferrer",className:`${R} cursor-pointer no-underline`,style:{color:"var(--text-muted)"},...D,title:"View on GitHub",children:[a.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor",children:a.jsx("path",{d:"M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0 0 24 12c0-6.63-5.37-12-12-12z"})}),a.jsx("span",{children:"uipath-dev-python"})]}),a.jsxs("div",{className:`${R} cursor-pointer`,onClick:t,...D,title:`Switch to ${e==="dark"?"light":"dark"} theme`,children:[a.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e==="dark"?a.jsxs(a.Fragment,{children:[a.jsx("circle",{cx:"12",cy:"12",r:"5"}),a.jsx("line",{x1:"12",y1:"1",x2:"12",y2:"3"}),a.jsx("line",{x1:"12",y1:"21",x2:"12",y2:"23"}),a.jsx("line",{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}),a.jsx("line",{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}),a.jsx("line",{x1:"1",y1:"12",x2:"3",y2:"12"}),a.jsx("line",{x1:"21",y1:"12",x2:"23",y2:"12"}),a.jsx("line",{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}),a.jsx("line",{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"})]}):a.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})}),a.jsx("span",{children:e==="dark"?"Dark":"Light"})]})]})}function wc(){const{navigate:e}=st(),t=ke(c=>c.entrypoints),[n,r]=S.useState(""),[i,s]=S.useState(!0),[o,l]=S.useState(null);S.useEffect(()=>{!n&&t.length>0&&r(t[0])},[t,n]),S.useEffect(()=>{n&&(s(!0),l(null),Xl(n).then(c=>{var p;const d=(p=c.input)==null?void 0:p.properties;s(!!(d!=null&&d.messages))}).catch(c=>{const d=c.detail||{};l(d.error||d.message||`Failed to load entrypoint "${n}"`)}))},[n]);const u=c=>{n&&e(`#/setup/${encodeURIComponent(n)}/${c}`)};return a.jsx("div",{className:"flex items-center justify-center h-full",children:a.jsxs("div",{className:"w-full max-w-xl px-6",children:[a.jsxs("div",{className:"mb-8 text-center",children:[a.jsxs("div",{className:"flex items-center justify-center gap-2 mb-2",children:[a.jsx("div",{className:"w-1.5 h-1.5 rounded-full",style:{background:o?"var(--error)":"var(--accent)"}}),a.jsx("span",{className:"text-sm font-semibold",style:{color:"var(--text-muted)"},children:"New Run"})]}),!o&&a.jsx("p",{className:"text-sm",style:{color:"var(--text-muted)"},children:t.length>1?"Select an entrypoint and choose a mode":"Choose a mode"})]}),t.length>1&&a.jsxs("div",{className:"mb-8",children:[a.jsx("label",{className:"block text-[11px] font-medium mb-1.5",style:{color:"var(--text-muted)"},children:"Entrypoint"}),a.jsx("select",{id:"entrypoint-select",value:n,onChange:c=>r(c.target.value),className:"w-full rounded-md px-3 py-2 text-xs font-mono cursor-pointer appearance-auto",style:{background:"var(--bg-secondary)",border:"1px solid var(--border)",color:"var(--text-primary)"},children:t.map(c=>a.jsx("option",{value:c,children:c},c))})]}),o?a.jsxs("div",{className:"rounded-md border overflow-hidden",style:{borderColor:"color-mix(in srgb, var(--error) 25%, var(--border))",background:"var(--bg-secondary)"},children:[a.jsxs("div",{className:"px-3 py-2 flex items-center gap-2",style:{borderBottom:"1px solid color-mix(in srgb, var(--error) 15%, var(--border))",background:"color-mix(in srgb, var(--error) 4%, var(--bg-secondary))"},children:[a.jsx("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",style:{flexShrink:0},children:a.jsx("path",{d:"M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM7.25 4.75h1.5v4h-1.5v-4zm.75 6.75a.75.75 0 110-1.5.75.75 0 010 1.5z",fill:"var(--error)"})}),a.jsx("span",{className:"text-[11px] font-medium",style:{color:"var(--error)"},children:"Failed to load entrypoint"})]}),a.jsx("div",{className:"overflow-auto max-h-48 p-3",children:a.jsx("pre",{className:"text-[11px] font-mono whitespace-pre-wrap break-words leading-relaxed m-0",style:{color:"var(--text-muted)"},children:o})})]}):a.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[a.jsx(Di,{title:"Autonomous",description:"Run the agent end-to-end. Set breakpoints to pause and inspect execution.",icon:a.jsx(_c,{}),color:"var(--success)",onClick:()=>u("run"),disabled:!n}),a.jsx(Di,{title:"Conversational",description:i?"Interactive chat session. Send messages and receive responses in real time.":'Requires a "messages" property in the input schema.',icon:a.jsx(Nc,{}),color:"var(--accent)",onClick:()=>u("chat"),disabled:!n||!i})]})]})})}function Di({title:e,description:t,icon:n,color:r,onClick:i,disabled:s}){return a.jsxs("button",{onClick:i,disabled:s,className:"group flex flex-col items-center text-center p-6 rounded-md border transition-all cursor-pointer disabled:opacity-40 disabled:cursor-not-allowed",style:{background:"var(--bg-secondary)",borderColor:"var(--border)"},onMouseEnter:o=>{s||(o.currentTarget.style.borderColor=r,o.currentTarget.style.background=`color-mix(in srgb, ${r} 5%, var(--bg-secondary))`)},onMouseLeave:o=>{o.currentTarget.style.borderColor="var(--border)",o.currentTarget.style.background="var(--bg-secondary)"},children:[a.jsx("div",{className:"mb-4 p-3 rounded-xl transition-colors",style:{background:`color-mix(in srgb, ${r} 10%, var(--bg-primary))`,color:r},children:n}),a.jsx("h3",{className:"text-sm font-semibold mb-1.5",style:{color:"var(--text-primary)"},children:e}),a.jsx("p",{className:"text-xs leading-relaxed",style:{color:"var(--text-muted)"},children:t})]})}function _c(){return a.jsx("svg",{width:"28",height:"28",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:a.jsx("path",{d:"M23.832 15.166H22.7487C22.7487 10.9735 19.3579 7.58268 15.1654 7.58268H14.082V6.20685C14.732 5.83852 15.1654 5.13435 15.1654 4.33268C15.1654 3.14102 14.2012 2.16602 12.9987 2.16602C11.7962 2.16602 10.832 3.14102 10.832 4.33268C10.832 5.13435 11.2654 5.83852 11.9154 6.20685V7.58268H10.832C6.63953 7.58268 3.2487 10.9735 3.2487 15.166H2.16536C1.56953 15.166 1.08203 15.6535 1.08203 16.2493V19.4993C1.08203 20.0952 1.56953 20.5827 2.16536 20.5827H3.2487V21.666C3.2487 22.8685 4.2237 23.8327 5.41536 23.8327H20.582C21.7845 23.8327 22.7487 22.8685 22.7487 21.666V20.5827H23.832C24.4279 20.5827 24.9154 20.0952 24.9154 19.4993V16.2493C24.9154 15.6535 24.4279 15.166 23.832 15.166ZM22.7487 18.416H20.582V21.666H5.41536V18.416H3.2487V17.3327H5.41536V15.166C5.41536 12.176 7.84203 9.74935 10.832 9.74935H15.1654C18.1554 9.74935 20.582 12.176 20.582 15.166V17.3327H22.7487V18.416ZM9.20703 14.6243L11.7637 17.181L10.4854 18.4594L9.20703 17.181L7.9287 18.4594L6.65036 17.181L9.20703 14.6243ZM16.7904 14.6243L19.347 17.181L18.0687 18.4594L16.7904 17.181L15.512 18.4594L14.2337 17.181L16.7904 14.6243Z",fill:"currentColor"})})}function Nc(){return a.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[a.jsx("path",{d:"M9.20901 13.541L11.7657 16.0977L10.4873 17.376L9.20901 16.0977L7.93068 17.376L6.65234 16.0977L9.20901 13.541ZM16.7923 13.541L19.349 16.0977L18.0707 17.376L16.7923 16.0977L15.514 17.376L14.2357 16.0977L16.7923 13.541Z",fill:"currentColor"}),a.jsx("path",{d:"M5.25 8.58398H20.75C21.3023 8.58398 21.75 9.0317 21.75 9.58398V23.5293L16.874 21.9043C16.5683 21.8024 16.248 21.751 15.9258 21.751H5.25C4.69782 21.751 4.25018 21.3031 4.25 20.751V9.58398C4.25 9.0317 4.69772 8.58398 5.25 8.58398Z",stroke:"currentColor",strokeWidth:"2"}),a.jsx("ellipse",{cx:"12.9987",cy:"4.33268",rx:"2.16667",ry:"2.16667",fill:"currentColor"}),a.jsx("rect",{x:"11.918",y:"5.41602",width:"2.16667",height:"2.16667",fill:"currentColor"}),a.jsx("path",{d:"M1.08203 14C1.08203 13.4477 1.52975 13 2.08203 13H3.2487V18.4167H2.08203C1.52975 18.4167 1.08203 17.969 1.08203 17.4167V14Z",fill:"currentColor"}),a.jsx("rect",{x:"3.25",y:"15.166",width:"2.16667",height:"1.08333",fill:"currentColor"}),a.jsx("path",{d:"M22.75 13H23.9167C24.4689 13 24.9167 13.4477 24.9167 14V17.4167C24.9167 17.969 24.469 18.4167 23.9167 18.4167H22.75V13Z",fill:"currentColor"}),a.jsx("rect",{x:"20.582",y:"15.166",width:"2.16667",height:"1.08333",fill:"currentColor"})]})}const Sc="modulepreload",Tc=function(e){return"/"+e},Pi={},Ss=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){let o=function(c){return Promise.all(c.map(d=>Promise.resolve(d).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),u=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));i=o(n.map(c=>{if(c=Tc(c),c in Pi)return;Pi[c]=!0;const d=c.endsWith(".css"),p=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${p}`))return;const m=document.createElement("link");if(m.rel=d?"stylesheet":Sc,d||(m.as="script"),m.crossOrigin="",m.href=c,u&&m.setAttribute("nonce",u),document.head.appendChild(m),d)return new Promise((f,g)=>{m.addEventListener("load",f),m.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${c}`)))})}))}function s(o){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=o,window.dispatchEvent(l),!l.defaultPrevented)throw o}return i.then(o=>{for(const l of o||[])l.status==="rejected"&&s(l.reason);return t().catch(s)})},Cc={opacity:0,width:1,height:1,minWidth:0,minHeight:0,border:"none",padding:0};function Ac({data:e}){const t=e.status,n=e.nodeWidth,r=e.label??"Start",i=e.hasBreakpoint,s=e.isPausedHere,o=e.isActiveNode,l=e.isExecutingNode,u=s?"var(--error)":l?"var(--success)":o?"var(--accent)":t==="completed"?"var(--success)":t==="running"?"var(--warning)":"var(--node-border)",c=s?"var(--error)":l?"var(--success)":"var(--accent)";return a.jsxs("div",{className:"px-3 py-1.5 rounded-full text-center text-xs overflow-hidden text-ellipsis whitespace-nowrap cursor-pointer relative",style:{width:n,background:"var(--node-bg)",color:"var(--text-primary)",border:`2px solid ${u}`,boxShadow:s||o||l?`0 0 4px ${c}`:void 0,animation:s||o||l?`node-pulse-${s?"red":l?"green":"accent"} 1.5s ease-in-out infinite`:void 0},title:r,children:[i&&a.jsx("div",{className:"absolute",style:{top:2,left:2,width:12,height:12,borderRadius:"50%",background:"var(--error)",border:"2px solid var(--node-bg)",boxShadow:"0 0 4px var(--error)"}}),r,a.jsx(gt,{type:"source",position:bt.Bottom,style:Cc})]})}const Mc={opacity:0,width:1,height:1,minWidth:0,minHeight:0,border:"none",padding:0};function Ic({data:e}){const t=e.status,n=e.nodeWidth,r=e.label??"End",i=e.hasBreakpoint,s=e.isPausedHere,o=e.isActiveNode,l=e.isExecutingNode,u=s?"var(--error)":l?"var(--success)":o?"var(--accent)":t==="completed"?"var(--success)":t==="failed"?"var(--error)":"var(--node-border)",c=s?"var(--error)":l?"var(--success)":"var(--accent)";return a.jsxs("div",{className:"px-3 py-1.5 rounded-full text-center text-xs overflow-hidden text-ellipsis whitespace-nowrap cursor-pointer relative",style:{width:n,background:"var(--node-bg)",color:"var(--text-primary)",border:`2px solid ${u}`,boxShadow:s||o||l?`0 0 4px ${c}`:void 0,animation:s||o||l?`node-pulse-${s?"red":l?"green":"accent"} 1.5s ease-in-out infinite`:void 0},title:r,children:[i&&a.jsx("div",{className:"absolute",style:{top:2,left:2,width:12,height:12,borderRadius:"50%",background:"var(--error)",border:"2px solid var(--node-bg)",boxShadow:"0 0 4px var(--error)"}}),a.jsx(gt,{type:"target",position:bt.Top,style:Mc}),r]})}const Bi={opacity:0,width:1,height:1,minWidth:0,minHeight:0,border:"none",padding:0};function Rc({data:e}){const t=e.status,n=e.nodeWidth,r=e.model_name,i=e.label??"Model",s=e.hasBreakpoint,o=e.isPausedHere,l=e.isActiveNode,u=e.isExecutingNode,c=o?"var(--error)":u?"var(--success)":l?"var(--accent)":t==="completed"?"var(--success)":t==="running"?"var(--warning)":t==="failed"?"var(--error)":"var(--node-border)",d=o?"var(--error)":u?"var(--success)":"var(--accent)";return a.jsxs("div",{className:"px-3 py-1.5 rounded-lg text-center text-xs overflow-hidden cursor-pointer relative",style:{width:n,background:"var(--node-bg)",color:"var(--text-primary)",border:`2px solid ${c}`,boxShadow:o||l||u?`0 0 4px ${d}`:void 0,animation:o||l||u?`node-pulse-${o?"red":u?"green":"accent"} 1.5s ease-in-out infinite`:void 0},title:r?`${i} -${r}`:i,children:[s&&a.jsx("div",{className:"absolute",style:{top:2,left:2,width:12,height:12,borderRadius:"50%",background:"var(--error)",border:"2px solid var(--node-bg)",boxShadow:"0 0 4px var(--error)"}}),a.jsx(gt,{type:"target",position:bt.Top,style:Bi}),a.jsx("div",{style:{color:"var(--info)",fontSize:9,marginBottom:1},children:"model"}),a.jsx("div",{className:"overflow-hidden text-ellipsis whitespace-nowrap",children:i}),r&&a.jsx("div",{className:"overflow-hidden text-ellipsis whitespace-nowrap",style:{color:"var(--text-muted)",fontSize:9,marginTop:1},title:r,children:r}),a.jsx(gt,{type:"source",position:bt.Bottom,style:Bi})]})}const Fi={opacity:0,width:1,height:1,minWidth:0,minHeight:0,border:"none",padding:0},Oc=3;function Lc({data:e}){const t=e.status,n=e.nodeWidth,r=e.tool_names,i=e.tool_count,s=e.label??"Tool",o=e.hasBreakpoint,l=e.isPausedHere,u=e.isActiveNode,c=e.isExecutingNode,d=l?"var(--error)":c?"var(--success)":u?"var(--accent)":t==="completed"?"var(--success)":t==="running"?"var(--warning)":t==="failed"?"var(--error)":"var(--node-border)",p=l?"var(--error)":c?"var(--success)":"var(--accent)",m=(r==null?void 0:r.slice(0,Oc))??[],f=(i??(r==null?void 0:r.length)??0)-m.length;return a.jsxs("div",{className:"px-3 py-1.5 rounded-lg text-center text-xs overflow-hidden cursor-pointer relative",style:{width:n,background:"var(--node-bg)",color:"var(--text-primary)",border:`2px solid ${d}`,boxShadow:l||u||c?`0 0 4px ${p}`:void 0,animation:l||u||c?`node-pulse-${l?"red":c?"green":"accent"} 1.5s ease-in-out infinite`:void 0},title:r!=null&&r.length?`${s} +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vendor-elk-CiLKfHel.js","assets/vendor-react-N5xbSGOh.js","assets/ChatPanel-DR8dCKHB.js","assets/vendor-reactflow-CxoS0d5s.js","assets/vendor-reactflow-B5DZHykP.css"])))=>i.map(i=>d[i]); +var Sl=Object.defineProperty;var Tl=(e,t,n)=>t in e?Sl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var It=(e,t,n)=>Tl(e,typeof t!="symbol"?t+"":t,n);import{W as Tn,a as N,j as a,w as Cl,F as Al,g as Xr,b as Ml}from"./vendor-react-N5xbSGOh.js";import{H as ht,P as bt,B as Il,M as Rl,u as Ol,a as Ll,R as jl,b as Dl,C as Pl,c as Bl,d as Fl}from"./vendor-reactflow-CxoS0d5s.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();const Mi=e=>{let t;const n=new Set,r=(c,d)=>{const p=typeof c=="function"?c(t):c;if(!Object.is(p,t)){const m=t;t=d??(typeof p!="object"||p===null)?p:Object.assign({},t,p),n.forEach(f=>f(t,m))}},i=()=>t,l={setState:r,getState:i,getInitialState:()=>u,subscribe:c=>(n.add(c),()=>n.delete(c))},u=t=e(r,i,l);return l},zl=(e=>e?Mi(e):Mi),$l=e=>e;function Ul(e,t=$l){const n=Tn.useSyncExternalStore(e.subscribe,Tn.useCallback(()=>t(e.getState()),[e,t]),Tn.useCallback(()=>t(e.getInitialState()),[e,t]));return Tn.useDebugValue(n),n}const Ii=e=>{const t=zl(e),n=r=>Ul(t,r);return Object.assign(n,t),n},Ot=(e=>e?Ii(e):Ii),Ee=Ot(e=>({runs:{},selectedRunId:null,traces:{},logs:{},chatMessages:{},entrypoints:[],setRuns:t=>e(n=>{var s;let r=n.breakpoints;for(const o of t)(s=o.breakpoints)!=null&&s.length&&!r[o.id]&&(r={...r,[o.id]:Object.fromEntries(o.breakpoints.map(l=>[l,!0]))});const i={runs:Object.fromEntries(t.map(o=>[o.id,o]))};return r!==n.breakpoints&&(i.breakpoints=r),i}),upsertRun:t=>e(n=>{var i;const r={runs:{...n.runs,[t.id]:t}};if((i=t.breakpoints)!=null&&i.length&&!n.breakpoints[t.id]&&(r.breakpoints={...n.breakpoints,[t.id]:Object.fromEntries(t.breakpoints.map(s=>[s,!0]))}),(t.status==="completed"||t.status==="failed")&&n.activeNodes[t.id]){const{[t.id]:s,...o}=n.activeNodes;r.activeNodes=o}if(t.status!=="suspended"&&n.activeInterrupt[t.id]){const{[t.id]:s,...o}=n.activeInterrupt;r.activeInterrupt=o}return r}),selectRun:t=>e({selectedRunId:t}),addTrace:t=>e(n=>{const r=n.traces[t.run_id]??[],i=r.findIndex(o=>o.span_id===t.span_id),s=i>=0?r.map((o,l)=>l===i?t:o):[...r,t];return{traces:{...n.traces,[t.run_id]:s}}}),setTraces:(t,n)=>e(r=>({traces:{...r.traces,[t]:n}})),addLog:t=>e(n=>{const r=n.logs[t.run_id]??[];return{logs:{...n.logs,[t.run_id]:[...r,t]}}}),setLogs:(t,n)=>e(r=>({logs:{...r.logs,[t]:n}})),addChatEvent:(t,n)=>e(r=>{const i=r.chatMessages[t]??[],s=n.message;if(!s)return r;const o=s.messageId??s.message_id,l=s.role??"assistant",d=(s.contentParts??s.content_parts??[]).filter(b=>{const x=b.mimeType??b.mime_type??"";return x.startsWith("text/")||x==="application/json"}).map(b=>{const x=b.data;return(x==null?void 0:x.inline)??""}).join(` +`).trim(),p=(s.toolCalls??s.tool_calls??[]).map(b=>({name:b.name??"",has_result:!!b.result})),m={message_id:o,role:l,content:d,tool_calls:p.length>0?p:void 0},f=i.findIndex(b=>b.message_id===o);if(f>=0)return{chatMessages:{...r.chatMessages,[t]:i.map((b,x)=>x===f?m:b)}};if(l==="user"){const b=i.findIndex(x=>x.message_id.startsWith("local-")&&x.role==="user"&&x.content===d);if(b>=0)return{chatMessages:{...r.chatMessages,[t]:i.map((x,y)=>y===b?m:x)}}}const h=[...i,m];return{chatMessages:{...r.chatMessages,[t]:h}}}),addLocalChatMessage:(t,n)=>e(r=>{const i=r.chatMessages[t]??[];return{chatMessages:{...r.chatMessages,[t]:[...i,n]}}}),setChatMessages:(t,n)=>e(r=>({chatMessages:{...r.chatMessages,[t]:n}})),setEntrypoints:t=>e({entrypoints:t}),breakpoints:{},toggleBreakpoint:(t,n)=>e(r=>{const i={...r.breakpoints[t]??{}};return i[n]?delete i[n]:i[n]=!0,{breakpoints:{...r.breakpoints,[t]:i}}}),clearBreakpoints:t=>e(n=>{const{[t]:r,...i}=n.breakpoints;return{breakpoints:i}}),activeNodes:{},setActiveNode:(t,n,r)=>e(i=>{const s=i.activeNodes[t]??{executing:{},prev:null};return{activeNodes:{...i.activeNodes,[t]:{executing:{...s.executing,[n]:r??null},prev:s.prev}}}}),removeActiveNode:(t,n)=>e(r=>{const i=r.activeNodes[t];if(!i)return r;const{[n]:s,...o}=i.executing;return{activeNodes:{...r.activeNodes,[t]:{executing:o,prev:n}}}}),resetRunGraphState:t=>e(n=>({stateEvents:{...n.stateEvents,[t]:[]},activeNodes:{...n.activeNodes,[t]:{executing:{},prev:null}}})),stateEvents:{},addStateEvent:(t,n,r,i,s)=>e(o=>{const l=o.stateEvents[t]??[];return{stateEvents:{...o.stateEvents,[t]:[...l,{node_name:n,qualified_node_name:i,phase:s,timestamp:Date.now(),payload:r}]}}}),setStateEvents:(t,n)=>e(r=>({stateEvents:{...r.stateEvents,[t]:n}})),focusedSpan:null,setFocusedSpan:t=>e({focusedSpan:t}),activeInterrupt:{},setActiveInterrupt:(t,n)=>e(r=>({activeInterrupt:{...r.activeInterrupt,[t]:n}})),reloadPending:!1,setReloadPending:t=>e({reloadPending:t}),graphCache:{},setGraphCache:(t,n)=>e(r=>({graphCache:{...r.graphCache,[t]:n}}))})),Yn="/api";async function Hl(e){const t=await fetch(`${Yn}/auth/login`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({environment:e})});if(!t.ok)throw new Error(`Login failed: ${t.status}`);return t.json()}async function cr(){const e=await fetch(`${Yn}/auth/status`);if(!e.ok)throw new Error(`Status check failed: ${e.status}`);return e.json()}async function Wl(e){const t=await fetch(`${Yn}/auth/select-tenant`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({tenant_name:e})});if(!t.ok)throw new Error(`Tenant selection failed: ${t.status}`);return t.json()}async function Kl(){await fetch(`${Yn}/auth/logout`,{method:"POST"})}const ys="uipath-env",Gl=["cloud","staging","alpha"];function ql(){const e=localStorage.getItem(ys);return Gl.includes(e)?e:"cloud"}const zn=Ot((e,t)=>({enabled:!0,status:"unauthenticated",environment:ql(),tenants:[],uipathUrl:null,pollTimer:null,expiryTimer:null,init:async()=>{try{const n=await fetch("/api/config");if(n.ok&&!(await n.json()).auth_enabled){e({enabled:!1});return}const r=await cr();e({status:r.status,tenants:r.tenants??[],uipathUrl:r.uipath_url??null}),r.status==="authenticated"&&t().startExpiryCheck()}catch(n){console.error("Auth init failed",n)}},setEnvironment:n=>{localStorage.setItem(ys,n),e({environment:n})},startLogin:async()=>{const{environment:n}=t();try{const r=await Hl(n);e({status:"pending"}),window.open(r.auth_url,"_blank"),t().pollStatus()}catch(r){console.error("Login failed",r)}},pollStatus:()=>{const{pollTimer:n}=t();if(n)return;const r=setInterval(async()=>{try{const i=await cr();i.status!=="pending"&&(t().stopPolling(),e({status:i.status,tenants:i.tenants??[],uipathUrl:i.uipath_url??null}),i.status==="authenticated"&&t().startExpiryCheck())}catch{}},2e3);e({pollTimer:r})},stopPolling:()=>{const{pollTimer:n}=t();n&&(clearInterval(n),e({pollTimer:null}))},startExpiryCheck:()=>{const{expiryTimer:n}=t();if(n)return;const r=setInterval(async()=>{try{(await cr()).status==="expired"&&(t().stopExpiryCheck(),e({status:"expired"}))}catch{}},3e4);e({expiryTimer:r})},stopExpiryCheck:()=>{const{expiryTimer:n}=t();n&&(clearInterval(n),e({expiryTimer:null}))},selectTenant:async n=>{try{const r=await Wl(n);e({status:"authenticated",uipathUrl:r.uipath_url,tenants:[]}),t().startExpiryCheck()}catch(r){console.error("Tenant selection failed",r)}},logout:async()=>{t().stopPolling(),t().stopExpiryCheck();try{await Kl()}catch{}e({status:"unauthenticated",tenants:[],uipathUrl:null})}})),vs=Ot(e=>({projectName:null,projectVersion:null,projectAuthors:null,init:async()=>{try{const t=await fetch("/api/config");if(t.ok){const n=await t.json();e({projectName:n.project_name??null,projectVersion:n.project_version??null,projectAuthors:n.project_authors??null})}}catch{}}}));class Vl{constructor(t){It(this,"ws",null);It(this,"url");It(this,"handlers",new Set);It(this,"reconnectTimer",null);It(this,"shouldReconnect",!0);It(this,"pendingMessages",[]);It(this,"activeSubscriptions",new Set);const n=window.location.protocol==="https:"?"wss:":"ws:";this.url=t??`${n}//${window.location.host}/ws`}connect(){var t;((t=this.ws)==null?void 0:t.readyState)!==WebSocket.OPEN&&(this.ws=new WebSocket(this.url),this.ws.onopen=()=>{console.log("[ws] connected");for(const n of this.activeSubscriptions)this.sendRaw(JSON.stringify({type:"subscribe",payload:{run_id:n}}));for(const n of this.pendingMessages)this.sendRaw(n);this.pendingMessages=[]},this.ws.onmessage=n=>{let r;try{r=JSON.parse(n.data)}catch{console.warn("[ws] failed to parse message",n.data);return}this.handlers.forEach(i=>{try{i(r)}catch(s){console.error("[ws] handler error",s)}})},this.ws.onclose=()=>{console.log("[ws] disconnected"),this.shouldReconnect&&(this.reconnectTimer=setTimeout(()=>this.connect(),2e3))},this.ws.onerror=()=>{var n;(n=this.ws)==null||n.close()})}disconnect(){var t;this.shouldReconnect=!1,this.reconnectTimer&&clearTimeout(this.reconnectTimer),(t=this.ws)==null||t.close(),this.ws=null}onMessage(t){return this.handlers.add(t),()=>this.handlers.delete(t)}sendRaw(t){var n;((n=this.ws)==null?void 0:n.readyState)===WebSocket.OPEN&&this.ws.send(t)}send(t,n){var i;const r=JSON.stringify({type:t,payload:n});((i=this.ws)==null?void 0:i.readyState)===WebSocket.OPEN?this.ws.send(r):this.pendingMessages.push(r)}subscribe(t){this.activeSubscriptions.add(t),this.send("subscribe",{run_id:t})}unsubscribe(t){this.activeSubscriptions.delete(t),this.send("unsubscribe",{run_id:t})}sendChatMessage(t,n){this.send("chat.message",{run_id:t,text:n})}sendInterruptResponse(t,n){this.send("chat.interrupt_response",{run_id:t,data:n})}debugStep(t){this.send("debug.step",{run_id:t})}debugContinue(t){this.send("debug.continue",{run_id:t})}debugStop(t){this.send("debug.stop",{run_id:t})}setBreakpoints(t,n){this.send("debug.set_breakpoints",{run_id:t,breakpoints:n})}sendAgentMessage(t,n,r,i){this.send("agent.message",{text:t,model:n,session_id:r??void 0,skill_ids:i&&i.length>0?i:void 0})}sendAgentStop(t){this.send("agent.stop",{session_id:t})}sendToolApproval(t,n,r){this.send("agent.tool_response",{session_id:t,tool_call_id:n,approved:r})}sendQuestionResponse(t,n,r){this.send("agent.question_response",{session_id:t,question_id:n,answer:r})}}const Me=Ot(e=>({evaluators:[],localEvaluators:[],evalSets:{},evalRuns:{},setEvaluators:t=>e({evaluators:t}),setLocalEvaluators:t=>e({localEvaluators:t}),addLocalEvaluator:t=>e(n=>({localEvaluators:[...n.localEvaluators,t]})),upsertLocalEvaluator:t=>e(n=>({localEvaluators:n.localEvaluators.some(r=>r.id===t.id)?n.localEvaluators.map(r=>r.id===t.id?t:r):[...n.localEvaluators,t]})),setEvalSets:t=>e({evalSets:Object.fromEntries(t.map(n=>[n.id,n]))}),addEvalSet:t=>e(n=>({evalSets:{...n.evalSets,[t.id]:t}})),updateEvalSetEvaluators:(t,n)=>e(r=>{const i=r.evalSets[t];return i?{evalSets:{...r.evalSets,[t]:{...i,evaluator_ids:n}}}:r}),incrementEvalSetCount:(t,n=1)=>e(r=>{const i=r.evalSets[t];return i?{evalSets:{...r.evalSets,[t]:{...i,eval_count:i.eval_count+n}}}:r}),setEvalRuns:t=>e({evalRuns:Object.fromEntries(t.map(n=>[n.id,n]))}),upsertEvalRun:t=>e(n=>({evalRuns:{...n.evalRuns,[t.id]:t}})),updateEvalRunProgress:(t,n,r)=>e(i=>{const s=i.evalRuns[t];return s?{evalRuns:{...i.evalRuns,[t]:{...s,progress_completed:n,progress_total:r,status:"running"}}}:i}),completeEvalRun:(t,n,r)=>e(i=>{const s=i.evalRuns[t];return s?{evalRuns:{...i.evalRuns,[t]:{...s,status:"completed",overall_score:n,evaluator_scores:r,end_time:new Date().toISOString()}}}:i})}));let Yl=0;function $t(){return`agent-msg-${++Yl}`}const ze=Ot(e=>({sessionId:null,status:"idle",_lastActiveAt:null,messages:[],plan:[],activeQuestion:null,models:[],selectedModel:null,modelsLoading:!1,skills:[],selectedSkillIds:[],skillsLoading:!1,setStatus:t=>e(n=>{const r=n.status==="thinking"||n.status==="planning"||n.status==="executing"||n.status==="awaiting_approval";return{status:t,_lastActiveAt:r&&!(t==="thinking"||t==="planning"||t==="executing"||t==="awaiting_approval")?Date.now():n._lastActiveAt}}),addUserMessage:t=>e(n=>({messages:[...n.messages,{id:$t(),role:"user",content:t,timestamp:Date.now()}]})),appendAssistantText:(t,n)=>e(r=>{const i=[...r.messages],s=i[i.length-1];return s&&s.role==="assistant"&&!s.done?i[i.length-1]={...s,content:s.content+t,done:n}:i.push({id:$t(),role:"assistant",content:t,timestamp:Date.now(),done:n}),{messages:i}}),setPlan:t=>e(n=>{const r=[...n.messages],i=r.findIndex(o=>o.role==="plan"),s={id:i>=0?r[i].id:$t(),role:"plan",content:"",timestamp:Date.now(),planItems:t};return i>=0?r[i]=s:r.push(s),{messages:r,plan:t}}),addToolUse:(t,n)=>e(r=>{const i=[...r.messages],s=i[i.length-1],o={tool:t,args:n};return s&&s.role==="tool"&&s.toolCalls?i[i.length-1]={...s,toolCalls:[...s.toolCalls,o]}:i.push({id:$t(),role:"tool",content:"",timestamp:Date.now(),toolCalls:[o]}),{messages:i}}),addToolResult:(t,n,r)=>e(i=>{const s=[...i.messages];for(let o=s.length-1;o>=0;o--){const l=s[o];if(l.role==="tool"&&l.toolCalls){const u=[...l.toolCalls];for(let c=u.length-1;c>=0;c--)if(u[c].tool===t&&u[c].result===void 0)return u[c]={...u[c],result:n,is_error:r},s[o]={...l,toolCalls:u},{messages:s}}}return{messages:s}}),addToolApprovalRequest:(t,n,r)=>e(i=>{const s=[...i.messages];for(let u=s.length-1;u>=0;u--){const c=s[u];if(c.role==="tool"&&c.toolCalls){const d=[...c.toolCalls];for(let p=d.length-1;p>=0;p--)if(d[p].tool===n&&!d[p].status&&d[p].result===void 0)return d[p]={...d[p],tool_call_id:t,status:"pending"},s[u]={...c,toolCalls:d},{messages:s}}if(c.role!=="tool")break}const o={tool:n,args:r,tool_call_id:t,status:"pending"},l=s[s.length-1];return l&&l.role==="tool"&&l.toolCalls?s[s.length-1]={...l,toolCalls:[...l.toolCalls,o]}:s.push({id:$t(),role:"tool",content:"",timestamp:Date.now(),toolCalls:[o]}),{messages:s}}),resolveToolApproval:(t,n)=>e(r=>{const i=[...r.messages];for(let s=i.length-1;s>=0;s--){const o=i[s];if(o.role==="tool"&&o.toolCalls){const l=[...o.toolCalls];for(let u=l.length-1;u>=0;u--)if(l[u].tool_call_id===t)return l[u]={...l[u],status:n?"approved":"denied"},i[s]={...o,toolCalls:l},{messages:i}}}return{messages:i}}),appendThinking:t=>e(n=>{const r=[...n.messages],i=r[r.length-1];return i&&i.role==="thinking"?r[r.length-1]={...i,content:i.content+t}:r.push({id:$t(),role:"thinking",content:t,timestamp:Date.now()}),{messages:r}}),addError:t=>e(n=>({status:"error",messages:[...n.messages,{id:$t(),role:"assistant",content:`Error: ${t}`,timestamp:Date.now(),done:!0}]})),setActiveQuestion:t=>e({activeQuestion:t}),setSessionId:t=>{sessionStorage.setItem("agent_session_id",t),e({sessionId:t})},setModels:t=>e({models:t}),setSelectedModel:t=>e({selectedModel:t}),setModelsLoading:t=>e({modelsLoading:t}),setSkills:t=>e({skills:t}),setSelectedSkillIds:t=>e({selectedSkillIds:t}),toggleSkill:t=>e(n=>({selectedSkillIds:n.selectedSkillIds.includes(t)?n.selectedSkillIds.filter(i=>i!==t):[...n.selectedSkillIds,t]})),setSkillsLoading:t=>e({skillsLoading:t}),hydrateSession:t=>e({sessionId:t.session_id,status:t.status||"done",messages:t.messages,plan:t.plan,selectedModel:t.model||null}),clearSession:()=>{sessionStorage.removeItem("agent_session_id"),e({sessionId:null,status:"idle",_lastActiveAt:null,messages:[],plan:[],activeQuestion:null})}})),be=Ot(e=>({children:{},expanded:{},selectedFile:null,openTabs:[],fileCache:{},dirty:{},buffers:{},loadingDirs:{},loadingFile:!1,agentChangedFiles:{},diffView:null,setChildren:(t,n)=>e(r=>({children:{...r.children,[t]:n}})),toggleExpanded:t=>e(n=>({expanded:{...n.expanded,[t]:!n.expanded[t]}})),setSelectedFile:t=>e({selectedFile:t}),openTab:t=>e(n=>({selectedFile:t,openTabs:n.openTabs.includes(t)?n.openTabs:[...n.openTabs,t]})),closeTab:t=>e(n=>{const r=n.openTabs.filter(c=>c!==t);let i=n.selectedFile;if(i===t){const c=n.openTabs.indexOf(t);i=r[Math.min(c,r.length-1)]??null}const{[t]:s,...o}=n.dirty,{[t]:l,...u}=n.buffers;return{openTabs:r,selectedFile:i,dirty:o,buffers:u}}),setFileContent:(t,n)=>e(r=>({fileCache:{...r.fileCache,[t]:n}})),updateBuffer:(t,n)=>e(r=>({buffers:{...r.buffers,[t]:n},dirty:{...r.dirty,[t]:!0}})),markClean:t=>e(n=>{const{[t]:r,...i}=n.dirty,{[t]:s,...o}=n.buffers;return{dirty:i,buffers:o}}),setLoadingDir:(t,n)=>e(r=>({loadingDirs:{...r.loadingDirs,[t]:n}})),setLoadingFile:t=>e({loadingFile:t}),markAgentChanged:t=>e(n=>({agentChangedFiles:{...n.agentChangedFiles,[t]:Date.now()}})),clearAgentChanged:t=>e(n=>{const{[t]:r,...i}=n.agentChangedFiles;return{agentChangedFiles:i}}),setDiffView:t=>e({diffView:t}),expandPath:t=>e(n=>{const r=t.split("/"),i={...n.expanded};for(let s=1;se.current.onMessage(x=>{var y,w;switch(x.type){case"run.updated":t(x.payload);break;case"trace":n(x.payload);break;case"log":r(x.payload);break;case"chat":{const T=x.payload.run_id;i(T,x.payload);break}case"chat.interrupt":{const T=x.payload.run_id;s(T,x.payload);break}case"state":{const T=x.payload.run_id,j=x.payload.node_name,O=x.payload.qualified_node_name??null,_=x.payload.phase??null,P=x.payload.payload;j==="__start__"&&_==="started"&&u(T),_==="started"?o(T,j,O):_==="completed"&&l(T,j),c(T,j,P,O,_);break}case"reload":d(!0);break;case"files.changed":{const T=x.payload.files,j=new Set(T),O=be.getState(),_=ze.getState(),P=_.status,D=P==="thinking"||P==="planning"||P==="executing"||P==="awaiting_approval",R=!D&&_._lastActiveAt!=null&&Date.now()-_._lastActiveAt<3e3,S=T.filter(L=>L in O.children?!1:(L.split("/").pop()??"").includes("."));if(console.log("[files.changed]",{all:T,files:S,agentStatus:P,agentIsActive:D,recentlyActive:R}),D||R){let L=!1;for(const C of S){if(O.dirty[C])continue;const v=((y=O.fileCache[C])==null?void 0:y.content)??null,E=((w=O.fileCache[C])==null?void 0:w.language)??null;Lr(C).then(I=>{const H=be.getState();if(H.dirty[C])return;H.setFileContent(C,I),H.expandPath(C);const U=C.split("/");for(let g=1;gbe.getState().setChildren(F,$)).catch(()=>{})}const V=be.getState().openTabs.includes(C);!L&&V&&v!==null&&I.content!==null&&v!==I.content&&(L=!0,be.getState().setSelectedFile(C),H.setDiffView({path:C,original:v,modified:I.content,language:E}),setTimeout(()=>{const g=be.getState().diffView;g&&g.path===C&&g.original===v&&be.getState().setDiffView(null)},5e3)),H.markAgentChanged(C),setTimeout(()=>be.getState().clearAgentChanged(C),1e4)}).catch(()=>{const I=be.getState();I.openTabs.includes(C)&&I.closeTab(C)})}}else for(const L of O.openTabs)O.dirty[L]||!j.has(L)||Lr(L).then(C=>{var E;const v=be.getState();v.dirty[L]||((E=v.fileCache[L])==null?void 0:E.content)!==C.content&&v.setFileContent(L,C)}).catch(()=>{});const M=new Set;for(const L of T){const C=L.lastIndexOf("/"),v=C===-1?"":L.substring(0,C);v in O.children&&M.add(v)}for(const L of M)$n(L).then(C=>be.getState().setChildren(L,C)).catch(()=>{});break}case"eval_run.created":p(x.payload);break;case"eval_run.progress":{const{run_id:T,completed:j,total:O,item_result:_}=x.payload;m(T,j,O,_);break}case"eval_run.completed":{const{run_id:T,overall_score:j,evaluator_scores:O}=x.payload;f(T,j,O);break}case"agent.status":{const{session_id:T,status:j}=x.payload,O=ze.getState();O.sessionId||O.setSessionId(T),O.setStatus(j),(j==="done"||j==="error"||j==="idle")&&O.setActiveQuestion(null);break}case"agent.text":{const{session_id:T,content:j,done:O}=x.payload,_=ze.getState();_.sessionId||_.setSessionId(T),_.appendAssistantText(j,O);break}case"agent.plan":{const{session_id:T,items:j}=x.payload,O=ze.getState();O.sessionId||O.setSessionId(T),O.setPlan(j);break}case"agent.tool_use":{const{session_id:T,tool:j,args:O}=x.payload,_=ze.getState();_.sessionId||_.setSessionId(T),_.addToolUse(j,O);break}case"agent.tool_result":{const{tool:T,result:j,is_error:O}=x.payload;ze.getState().addToolResult(T,j,O);break}case"agent.tool_approval":{const{session_id:T,tool_call_id:j,tool:O,args:_}=x.payload,P=ze.getState();P.sessionId||P.setSessionId(T),P.addToolApprovalRequest(j,O,_);break}case"agent.thinking":{const{content:T}=x.payload;ze.getState().appendThinking(T);break}case"agent.text_delta":{const{session_id:T,delta:j}=x.payload,O=ze.getState();O.sessionId||O.setSessionId(T),O.appendAssistantText(j,!1);break}case"agent.question":{const{session_id:T,question_id:j,question:O,options:_}=x.payload,P=ze.getState();P.sessionId||P.setSessionId(T),P.setActiveQuestion({question_id:j,question:O,options:_});break}case"agent.token_usage":break;case"agent.error":{const{message:T}=x.payload;ze.getState().addError(T);break}}}),[t,n,r,i,s,o,l,u,c,d,p,m,f]),e.current}const Lt="/api";async function jt(e,t){const n=await fetch(e,t);if(!n.ok){let r;try{r=(await n.json()).detail||n.statusText}catch{r=n.statusText}const i=new Error(`HTTP ${n.status}`);throw i.detail=r,i.status=n.status,i}return n.json()}async function ks(){return jt(`${Lt}/entrypoints`)}async function Jl(e){return jt(`${Lt}/entrypoints/${encodeURIComponent(e)}/schema`)}async function Ql(e){return jt(`${Lt}/entrypoints/${encodeURIComponent(e)}/mock-input`)}async function ec(e){return jt(`${Lt}/entrypoints/${encodeURIComponent(e)}/graph`)}async function Ri(e,t,n="run",r=[]){return jt(`${Lt}/runs`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({entrypoint:e,input_data:t,mode:n,breakpoints:r})})}async function tc(){return jt(`${Lt}/runs`)}async function ur(e){return jt(`${Lt}/runs/${e}`)}async function nc(){return jt(`${Lt}/reload`,{method:"POST"})}function rc(e){const t=e.replace(/^#\/?/,""),n={section:"debug",view:"new",runId:null,tab:"traces",setupEntrypoint:null,setupMode:null,evalCreating:!1,evalSetId:null,evalRunId:null,evalRunItemName:null,evaluatorId:null,evaluatorCreateType:null,evaluatorFilter:null,explorerFile:null};if(!t||t==="new"||t==="debug"||t==="debug/new")return n;const r=t.match(/^(?:debug\/)?setup\/([^/]+)\/(run|chat)$/);if(r)return{...n,view:"setup",setupEntrypoint:decodeURIComponent(r[1]),setupMode:r[2]};const i=t.match(/^(?:debug\/)?runs\/([^/]+)(?:\/(traces|output))?$/);if(i)return{...n,view:"details",runId:i[1],tab:i[2]??"traces"};if(t==="evals/new")return{...n,section:"evals",evalCreating:!0};const s=t.match(/^evals\/runs\/([^/]+?)(?:\/([^/]+))?$/);if(s)return{...n,section:"evals",evalRunId:s[1],evalRunItemName:s[2]?decodeURIComponent(s[2]):null};const o=t.match(/^evals\/sets\/([^/]+)$/);if(o)return{...n,section:"evals",evalSetId:o[1]};if(t==="evals")return{...n,section:"evals"};const l=t.match(/^evaluators\/new(?:\/(deterministic|llm|tool))?$/);if(l)return{...n,section:"evaluators",evaluatorCreateType:l[1]??"any"};const u=t.match(/^evaluators\/category\/(deterministic|llm|tool)$/);if(u)return{...n,section:"evaluators",evaluatorFilter:u[1]};const c=t.match(/^evaluators\/([^/]+)$/);if(c)return{...n,section:"evaluators",evaluatorId:c[1]};if(t==="evaluators")return{...n,section:"evaluators"};const d=t.match(/^explorer\/file\/(.+)$/);return d?{...n,section:"explorer",explorerFile:decodeURIComponent(d[1])}:t==="explorer"?{...n,section:"explorer"}:n}function ic(){return window.location.hash}function oc(e){return window.addEventListener("hashchange",e),()=>window.removeEventListener("hashchange",e)}function st(){const e=N.useSyncExternalStore(oc,ic),t=rc(e),n=N.useCallback(r=>{window.location.hash=r},[]);return{...t,navigate:n}}const Oi="(max-width: 767px)";function sc(){const[e,t]=N.useState(()=>window.matchMedia(Oi).matches);return N.useEffect(()=>{const n=window.matchMedia(Oi),r=i=>t(i.matches);return n.addEventListener("change",r),()=>n.removeEventListener("change",r)},[]),e}const ac=[{section:"debug",label:"Developer Console",icon:a.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("rect",{x:"8",y:"6",width:"8",height:"14",rx:"4"}),a.jsx("path",{d:"M6 10H4"}),a.jsx("path",{d:"M6 18H4"}),a.jsx("path",{d:"M18 10h2"}),a.jsx("path",{d:"M18 18h2"}),a.jsx("path",{d:"M8 14h8"}),a.jsx("path",{d:"M9 6l-1.5-2"}),a.jsx("path",{d:"M15 6l1.5-2"}),a.jsx("path",{d:"M6 14H4"}),a.jsx("path",{d:"M18 14h2"})]})},{section:"evals",label:"Evals",icon:a.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("path",{d:"M9 3h6"}),a.jsx("path",{d:"M10 3v6.5L5 20a1 1 0 0 0 .9 1.4h12.2a1 1 0 0 0 .9-1.4L14 9.5V3"}),a.jsx("path",{d:"M8.5 14h7"})]})},{section:"evaluators",label:"Evaluators",icon:a.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("path",{d:"M12 2l7 4v5c0 5.25-3.5 9.74-7 11-3.5-1.26-7-5.75-7-11V6l7-4z"}),a.jsx("path",{d:"M9 12l2 2 4-4"})]})},{section:"explorer",label:"Explorer",icon:a.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",children:a.jsx("path",{d:"M7.5 22.5H17.595C17.07 23.4 16.11 24 15 24H7.5C4.185 24 1.5 21.315 1.5 18V6C1.5 4.89 2.1 3.93 3 3.405V18C3 20.475 5.025 22.5 7.5 22.5ZM21 8.121V18C21 19.6545 19.6545 21 18 21H7.5C5.8455 21 4.5 19.6545 4.5 18V3C4.5 1.3455 5.8455 0 7.5 0H12.879C13.4715 0 14.0505 0.24 14.4705 0.6585L20.3415 6.5295C20.766 6.954 21 7.5195 21 8.121ZM13.5 6.75C13.5 7.164 13.8375 7.5 14.25 7.5H19.1895L13.5 1.8105V6.75ZM19.5 18V9H14.25C13.0095 9 12 7.9905 12 6.75V1.5H7.5C6.672 1.5 6 2.1735 6 3V18C6 18.8265 6.672 19.5 7.5 19.5H18C18.828 19.5 19.5 18.8265 19.5 18Z"})})}];function lc({section:e,onSectionChange:t}){return a.jsx("div",{className:"w-12 flex flex-col items-center shrink-0 border-r",style:{background:"var(--activity-bar-bg)",borderColor:"var(--border)"},children:a.jsx("div",{className:"flex flex-col items-center gap-1 pt-2",children:ac.map(n=>{const r=e===n.section;return a.jsxs("button",{onClick:()=>t(n.section),className:"w-10 h-10 flex items-center justify-center rounded cursor-pointer transition-colors relative",style:{color:r?"var(--text-primary)":"var(--text-muted)",background:r?"var(--bg-hover)":"transparent",border:"none"},title:n.label,onMouseEnter:i=>{r||(i.currentTarget.style.color="var(--text-secondary)")},onMouseLeave:i=>{r||(i.currentTarget.style.color="var(--text-muted)")},children:[r&&a.jsx("div",{className:"absolute left-0 top-1.5 bottom-1.5 w-0.5 rounded-r",style:{background:"var(--accent)"}}),n.icon]},n.section)})})})}const tt="/api";async function nt(e,t){const n=await fetch(e,t);if(!n.ok){let r;try{r=(await n.json()).detail||n.statusText}catch{r=n.statusText}const i=new Error(`HTTP ${n.status}`);throw i.detail=r,i.status=n.status,i}return n.json()}async function cc(){return nt(`${tt}/evaluators`)}async function Es(){return nt(`${tt}/eval-sets`)}async function uc(e){return nt(`${tt}/eval-sets`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async function dc(e,t){return nt(`${tt}/eval-sets/${encodeURIComponent(e)}/items`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})}async function pc(e,t){await nt(`${tt}/eval-sets/${encodeURIComponent(e)}/items/${encodeURIComponent(t)}`,{method:"DELETE"})}async function fc(e){return nt(`${tt}/eval-sets/${encodeURIComponent(e)}`)}async function mc(e){return nt(`${tt}/eval-sets/${encodeURIComponent(e)}/runs`,{method:"POST"})}async function gc(){return nt(`${tt}/eval-runs`)}async function Li(e){return nt(`${tt}/eval-runs/${encodeURIComponent(e)}`)}async function Qr(){return nt(`${tt}/local-evaluators`)}async function hc(e){return nt(`${tt}/local-evaluators`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async function bc(e,t){return nt(`${tt}/eval-sets/${encodeURIComponent(e)}/evaluators`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({evaluator_refs:t})})}async function xc(e,t){return nt(`${tt}/local-evaluators/${encodeURIComponent(e)}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})}const yc={"uipath-exact-match":e=>({expectedOutput:e}),"uipath-json-similarity":e=>({expectedOutput:e}),"uipath-contains":()=>({searchText:""}),"uipath-llm-judge-output-semantic-similarity":e=>({expectedOutput:e}),"uipath-llm-judge-output-strict-json-similarity":e=>({expectedOutput:e}),"uipath-llm-judge-trajectory-similarity":()=>({expectedAgentBehavior:""}),"uipath-llm-judge-trajectory-simulation":()=>({expectedAgentBehavior:""}),"uipath-tool-call-count":()=>({}),"uipath-tool-call-args":()=>({}),"uipath-tool-call-order":()=>({}),"uipath-tool-call-output":()=>({})};function vc(e,t){if(!e)return{};const n=yc[e.evaluator_type_id];return n?n(t):e.type==="tool"?{}:e.evaluator_type_id.includes("trajectory")?{expectedAgentBehavior:""}:{expectedOutput:t}}function ws(e){return e?e.type==="tool"?!0:e.evaluator_type_id.includes("tool-call"):!1}function kc(e){return e?ws(e)?{label:"tools",color:"var(--warning, #e5a00d)"}:e.evaluator_type_id.includes("trajectory")?{label:"quality",color:"var(--info, #3b82f6)"}:{label:"output",color:"var(--success, #22c55e)"}:{label:"output",color:"var(--success, #22c55e)"}}function Ec({run:e,onClose:t}){const n=Me(R=>R.evalSets),r=Me(R=>R.setEvalSets),i=Me(R=>R.incrementEvalSetCount),s=Me(R=>R.localEvaluators),o=Me(R=>R.setLocalEvaluators),[l,u]=N.useState(`run-${e.id.slice(0,8)}`),[c,d]=N.useState(new Set),[p,m]=N.useState({}),f=N.useRef(new Set),[h,b]=N.useState(!1),[x,y]=N.useState(null),[w,T]=N.useState(!1),j=Object.values(n),O=N.useMemo(()=>Object.fromEntries(s.map(R=>[R.id,R])),[s]),_=N.useMemo(()=>{const R=new Set;for(const S of c){const M=n[S];M&&M.evaluator_ids.forEach(L=>R.add(L))}return[...R]},[c,n]);N.useEffect(()=>{const R=e.output_data,S=f.current;m(M=>{const L={};for(const C of _)if(S.has(C)&&M[C]!==void 0)L[C]=M[C];else{const v=O[C],E=vc(v,R);L[C]=JSON.stringify(E,null,2)}return L})},[_,O,e.output_data]),N.useEffect(()=>{const R=S=>{S.key==="Escape"&&t()};return document.addEventListener("keydown",R),()=>document.removeEventListener("keydown",R)},[t]),N.useEffect(()=>{j.length===0&&Es().then(r).catch(()=>{}),s.length===0&&Qr().then(o).catch(()=>{})},[]);const P=R=>{d(S=>{const M=new Set(S);return M.has(R)?M.delete(R):M.add(R),M})},D=async()=>{var S;if(!l.trim()||c.size===0)return;y(null),b(!0);const R={};for(const M of _){const L=p[M];if(L!==void 0)try{R[M]=JSON.parse(L)}catch{y(`Invalid JSON for evaluator "${((S=O[M])==null?void 0:S.name)??M}"`),b(!1);return}}try{for(const M of c){const L=n[M],C=new Set((L==null?void 0:L.evaluator_ids)??[]),v={};for(const[E,I]of Object.entries(R))C.has(E)&&(v[E]=I);await dc(M,{name:l.trim(),inputs:e.input_data,expected_output:null,evaluation_criterias:v}),i(M)}T(!0),setTimeout(t,3e3)}catch(M){y(M.detail||M.message||"Failed to add item")}finally{b(!1)}};return a.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center",style:{background:"rgba(0, 0, 0, 0.5)"},onClick:R=>{R.target===R.currentTarget&&t()},children:a.jsxs("div",{className:"w-full max-w-2xl rounded-lg p-6 shadow-xl max-h-[85vh] flex flex-col",style:{background:"var(--bg-primary)",border:"1px solid var(--border)"},children:[a.jsxs("div",{className:"flex items-center justify-between mb-6",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("div",{className:"w-1.5 h-1.5 rounded-full",style:{background:"var(--accent)"}}),a.jsx("span",{className:"text-sm font-semibold",style:{color:"var(--text-muted)"},children:"Add to Eval Set"})]}),a.jsx("button",{onClick:t,className:"w-7 h-7 flex items-center justify-center rounded cursor-pointer transition-colors",style:{color:"var(--text-muted)",background:"transparent",border:"none"},onMouseEnter:R=>{R.currentTarget.style.color="var(--text-primary)"},onMouseLeave:R=>{R.currentTarget.style.color="var(--text-muted)"},"aria-label":"Close",children:a.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[a.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),a.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),a.jsxs("div",{className:"flex-1 overflow-y-auto min-h-0 space-y-4 pr-1",children:[a.jsxs("div",{children:[a.jsx("label",{className:"block text-[11px] font-medium mb-1.5",style:{color:"var(--text-muted)"},children:"Item Name"}),a.jsx("input",{type:"text",value:l,onChange:R=>u(R.target.value),className:"w-full rounded-md px-3 py-2 text-xs",style:{background:"var(--bg-secondary)",border:"1px solid var(--border)",color:"var(--text-primary)"}})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-[11px] font-medium mb-1.5",style:{color:"var(--text-muted)"},children:"Inputs"}),a.jsx("pre",{className:"rounded-md px-3 py-2 text-xs font-mono whitespace-pre-wrap break-words max-h-32 overflow-y-auto",style:{background:"var(--bg-secondary)",border:"1px solid var(--border)",color:"var(--text-secondary)"},children:JSON.stringify(e.input_data,null,2)})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-[11px] font-medium mb-1.5",style:{color:"var(--text-muted)"},children:"Eval Sets"}),j.length===0?a.jsx("p",{className:"text-xs",style:{color:"var(--text-muted)"},children:"No eval sets found. Create one first."}):a.jsx("div",{className:"rounded-md border overflow-hidden max-h-40 overflow-y-auto",style:{borderColor:"var(--border)",background:"var(--bg-secondary)"},children:j.map(R=>a.jsxs("label",{className:"flex items-center gap-2.5 px-3 py-2 text-xs cursor-pointer transition-colors",style:{borderBottom:"1px solid var(--border)"},onMouseEnter:S=>{S.currentTarget.style.background="var(--bg-hover)"},onMouseLeave:S=>{S.currentTarget.style.background="transparent"},children:[a.jsx("input",{type:"checkbox",checked:c.has(R.id),onChange:()=>P(R.id),className:"accent-[var(--accent)]"}),a.jsx("span",{className:"flex-1 truncate",style:{color:"var(--text-primary)"},children:R.name}),a.jsxs("span",{className:"text-[10px]",style:{color:"var(--text-muted)"},children:[R.eval_count," items"]})]},R.id))})]}),_.length>0&&a.jsxs("div",{children:[a.jsx("label",{className:"block text-[11px] font-medium mb-1.5",style:{color:"var(--text-muted)"},children:"Evaluation Criteria"}),a.jsx("div",{className:"space-y-2",children:_.map(R=>{const S=O[R],M=ws(S),L=kc(S);return a.jsxs("div",{className:"rounded-md",style:{border:"1px solid var(--border)",background:"var(--bg-primary)",opacity:M?.6:1},children:[a.jsxs("div",{className:"flex items-center gap-2 px-3 py-2",style:{borderBottom:M?"none":"1px solid var(--border)"},children:[a.jsx("span",{className:"text-xs font-medium truncate flex-1",style:{color:"var(--text-primary)"},children:(S==null?void 0:S.name)??R}),a.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded-full font-medium",style:{color:L.color,background:`color-mix(in srgb, ${L.color} 12%, transparent)`},children:L.label})]}),M?a.jsx("div",{className:"px-3 pb-2",children:a.jsx("span",{className:"text-[10px] italic",style:{color:"var(--text-muted)"},children:"Default criteria — uses evaluator config"})}):a.jsx("div",{className:"px-3 pb-2 pt-1",children:a.jsx("textarea",{value:p[R]??"{}",onChange:C=>{f.current.add(R),m(v=>({...v,[R]:C.target.value}))},rows:8,className:"w-full rounded px-2 py-1.5 text-xs font-mono resize-y",style:{background:"var(--bg-secondary)",border:"1px solid var(--border)",color:"var(--text-primary)"}})})]},R)})})]})]}),a.jsxs("div",{className:"mt-4 space-y-3",children:[x&&a.jsx("p",{className:"text-xs px-3 py-2 rounded",style:{color:"var(--error)",background:"color-mix(in srgb, var(--error) 10%, var(--bg-secondary))"},children:x}),w&&a.jsxs("p",{className:"text-xs px-3 py-2 rounded",style:{color:"var(--success)",background:"color-mix(in srgb, var(--success) 10%, var(--bg-secondary))"},children:["Added to ",c.size," eval set",c.size!==1?"s":"","."]}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx("button",{onClick:t,className:"flex-1 py-2 rounded-md text-xs font-semibold cursor-pointer",style:{background:"var(--bg-secondary)",color:"var(--text-secondary)",border:"1px solid var(--border)"},children:"Cancel"}),a.jsx("button",{onClick:D,disabled:!l.trim()||c.size===0||h||w,className:"flex-1 py-2 rounded-md text-[13px] font-semibold transition-colors cursor-pointer disabled:opacity-40 disabled:cursor-not-allowed",style:{background:"var(--accent)",color:"var(--bg-primary)",border:"none"},children:h?"Adding...":w?"Added":"Add Item"})]})]})]})})}const wc={pending:"var(--text-muted)",running:"var(--warning)",suspended:"var(--info)",completed:"var(--success)",failed:"var(--error)"};function _c({run:e,isSelected:t,onClick:n}){var p;const r=wc[e.status]??"var(--text-muted)",i=((p=e.entrypoint.split("/").pop())==null?void 0:p.slice(0,16))??e.entrypoint,s=e.start_time?new Date(e.start_time).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):"",[o,l]=N.useState(!1),[u,c]=N.useState(!1),d=N.useRef(null);return N.useEffect(()=>{if(!o)return;const m=f=>{d.current&&!d.current.contains(f.target)&&l(!1)};return document.addEventListener("mousedown",m),()=>document.removeEventListener("mousedown",m)},[o]),a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"group relative w-full text-left px-3 py-1.5 flex items-center gap-2 transition-colors cursor-pointer",style:{background:t?"color-mix(in srgb, var(--accent) 15%, var(--bg-primary))":void 0,borderLeft:t?"3px solid var(--accent)":"3px solid transparent"},onMouseEnter:m=>{t||(m.currentTarget.style.background="var(--bg-hover)")},onMouseLeave:m=>{t||(m.currentTarget.style.background="")},onClick:n,children:[a.jsx("span",{className:"shrink-0 w-2 h-2 rounded-full",style:{background:r}}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("div",{className:"text-xs truncate",style:{color:t?"var(--text-primary)":"var(--text-secondary)"},children:i}),a.jsxs("div",{className:"text-[11px] tabular-nums",style:{color:"var(--text-muted)"},children:[s,e.duration?` · ${e.duration}`:""]})]}),e.status==="completed"&&a.jsxs("div",{ref:d,className:"relative shrink-0",children:[a.jsx("button",{onClick:m=>{m.stopPropagation(),l(f=>!f)},className:"opacity-40 group-hover:opacity-100 focus:opacity-100 w-7 h-7 flex items-center justify-center rounded transition-opacity cursor-pointer",style:{color:"var(--text-muted)"},onMouseEnter:m=>{m.currentTarget.style.color="var(--text-primary)",m.currentTarget.style.background="var(--bg-secondary)"},onMouseLeave:m=>{m.currentTarget.style.color="var(--text-muted)",m.currentTarget.style.background=""},"aria-label":"Actions",title:"Actions",children:a.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"currentColor",children:[a.jsx("circle",{cx:"8",cy:"3",r:"1.5"}),a.jsx("circle",{cx:"8",cy:"8",r:"1.5"}),a.jsx("circle",{cx:"8",cy:"13",r:"1.5"})]})}),o&&a.jsx("div",{className:"absolute right-0 top-full mt-1 z-50 min-w-[140px] rounded-md shadow-lg py-1",style:{background:"var(--bg-primary)",border:"1px solid var(--border)"},children:a.jsx("button",{onClick:m=>{m.stopPropagation(),l(!1),c(!0)},className:"w-full text-left px-3 py-1.5 text-xs cursor-pointer transition-colors",style:{color:"var(--text-secondary)"},onMouseEnter:m=>{m.currentTarget.style.background="var(--bg-hover)",m.currentTarget.style.color="var(--text-primary)"},onMouseLeave:m=>{m.currentTarget.style.background="",m.currentTarget.style.color="var(--text-secondary)"},children:"Add to Eval Set"})})]})]}),u&&a.jsx(Ec,{run:e,onClose:()=>c(!1)})]})}function ji({runs:e,selectedRunId:t,onSelectRun:n,onNewRun:r}){const i=[...e].sort((s,o)=>new Date(o.start_time??0).getTime()-new Date(s.start_time??0).getTime());return a.jsxs(a.Fragment,{children:[a.jsx("button",{onClick:r,className:"mx-3 mt-2.5 mb-1 px-3 py-1.5 text-[11px] font-medium rounded border border-[var(--border)] bg-transparent transition-colors cursor-pointer",style:{color:"var(--text-secondary)"},onMouseEnter:s=>{s.currentTarget.style.color="var(--text-primary)",s.currentTarget.style.borderColor="var(--text-muted)"},onMouseLeave:s=>{s.currentTarget.style.color="var(--text-secondary)",s.currentTarget.style.borderColor=""},children:"+ New Run"}),a.jsx("div",{className:"px-3 pt-3 pb-1 text-[11px] uppercase tracking-widest font-semibold",style:{color:"var(--text-muted)"},children:"History"}),a.jsxs("div",{className:"flex-1 overflow-y-auto",children:[i.map(s=>a.jsx(_c,{run:s,isSelected:s.id===t,onClick:()=>n(s.id)},s.id)),i.length===0&&a.jsx("p",{className:"text-xs px-3 py-4 text-center",style:{color:"var(--text-muted)"},children:"No runs yet"})]})]})}function _s(){const e=localStorage.getItem("uipath-dev-theme");return e==="light"||e==="dark"?e:"dark"}function Ns(e){document.documentElement.setAttribute("data-theme",e),localStorage.setItem("uipath-dev-theme",e)}Ns(_s());const Ss=Ot(e=>({theme:_s(),toggleTheme:()=>e(t=>{const n=t.theme==="dark"?"light":"dark";return Ns(n),{theme:n}})}));function Di(){const{theme:e,toggleTheme:t}=Ss(),{enabled:n,status:r,environment:i,tenants:s,uipathUrl:o,setEnvironment:l,startLogin:u,selectTenant:c,logout:d}=zn(),{projectName:p,projectVersion:m,projectAuthors:f}=vs(),[h,b]=N.useState(!1),[x,y]=N.useState(""),w=N.useRef(null),T=N.useRef(null);N.useEffect(()=>{if(!h)return;const v=E=>{w.current&&!w.current.contains(E.target)&&T.current&&!T.current.contains(E.target)&&b(!1)};return document.addEventListener("mousedown",v),()=>document.removeEventListener("mousedown",v)},[h]);const j=r==="authenticated",O=r==="expired",_=r==="pending",P=r==="needs_tenant";let D="UiPath: Disconnected",R=null,S=!0;j?(D=`UiPath: ${o?o.replace(/^https?:\/\/[^/]+\//,""):""}`,R="var(--success)",S=!1):O?(D=`UiPath: ${o?o.replace(/^https?:\/\/[^/]+\//,""):""} (expired)`,R="var(--error)",S=!1):_?D="UiPath: Signing in…":P&&(D="UiPath: Select Tenant");const M=()=>{_||(O?u():b(v=>!v))},L="flex items-center gap-1 px-1.5 rounded transition-colors",C={onMouseEnter:v=>{v.currentTarget.style.background="var(--bg-hover)",v.currentTarget.style.color="var(--text-primary)"},onMouseLeave:v=>{v.currentTarget.style.background="",v.currentTarget.style.color="var(--text-muted)"}};return a.jsxs("div",{className:"h-6 flex items-center justify-end gap-3 px-2 text-xs border-t shrink-0",style:{background:"var(--bg-secondary)",color:"var(--text-muted)",borderColor:"var(--border)",fontSize:"11px"},children:[n&&a.jsxs("div",{className:"relative flex items-center",children:[a.jsxs("div",{ref:T,className:`${L} cursor-pointer`,onClick:M,...C,title:j?o??"":O?"Token expired — click to re-authenticate":_?"Signing in…":P?"Select a tenant":"Click to sign in",children:[_?a.jsxs("svg",{className:"animate-spin",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[a.jsx("circle",{cx:"12",cy:"12",r:"10",strokeOpacity:"0.25"}),a.jsx("path",{d:"M12 2a10 10 0 0 1 10 10",strokeLinecap:"round"})]}):R?a.jsx("div",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{background:R}}):S?a.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2"}),a.jsx("path",{d:"M7 11V7a5 5 0 0 1 9.9-1"})]}):null,a.jsx("span",{className:"truncate max-w-[200px]",children:D})]}),h&&a.jsx("div",{ref:w,className:"absolute bottom-full right-0 mb-1 rounded border shadow-lg p-1 min-w-[180px]",style:{background:"var(--bg-secondary)",borderColor:"var(--border)"},children:j||O?a.jsxs(a.Fragment,{children:[a.jsxs("button",{onClick:()=>{o&&window.open(o,"_blank","noopener,noreferrer"),b(!1)},className:"w-full flex items-center gap-2 px-2 py-2 text-[11px] rounded cursor-pointer transition-colors text-left",style:{color:"var(--text-muted)",background:"transparent",border:"none"},onMouseEnter:v=>{v.currentTarget.style.background="var(--bg-hover)",v.currentTarget.style.color="var(--text-primary)"},onMouseLeave:v=>{v.currentTarget.style.background="transparent",v.currentTarget.style.color="var(--text-muted)"},children:[a.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),a.jsx("polyline",{points:"15 3 21 3 21 9"}),a.jsx("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]}),"Go to Platform"]}),a.jsxs("button",{onClick:()=>{d(),b(!1)},className:"w-full flex items-center gap-2 px-2 py-2 text-[11px] rounded cursor-pointer transition-colors text-left",style:{color:"var(--text-muted)",background:"transparent",border:"none"},onMouseEnter:v=>{v.currentTarget.style.background="var(--bg-hover)",v.currentTarget.style.color="var(--text-primary)"},onMouseLeave:v=>{v.currentTarget.style.background="transparent",v.currentTarget.style.color="var(--text-muted)"},children:[a.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"}),a.jsx("polyline",{points:"16 17 21 12 16 7"}),a.jsx("line",{x1:"21",y1:"12",x2:"9",y2:"12"})]}),"Sign Out"]})]}):P?a.jsxs("div",{className:"p-1",children:[a.jsx("label",{className:"block text-[10px] font-medium mb-1",style:{color:"var(--text-muted)"},children:"Tenant"}),a.jsxs("select",{value:x,onChange:v=>y(v.target.value),className:"w-full rounded px-1.5 py-1 text-[10px] mb-1.5 appearance-auto",style:{background:"var(--bg-primary)",border:"1px solid var(--border)",color:"var(--text-primary)"},children:[a.jsx("option",{value:"",children:"Select…"}),s.map(v=>a.jsx("option",{value:v,children:v},v))]}),a.jsx("button",{onClick:()=>{x&&(c(x),b(!1))},disabled:!x,className:"w-full px-2 py-1 text-[10px] font-medium rounded border border-[var(--border)] bg-transparent cursor-pointer transition-colors disabled:opacity-30 disabled:cursor-not-allowed",style:{color:"var(--text-muted)"},children:"Confirm"})]}):a.jsxs("div",{className:"p-1",children:[a.jsx("label",{className:"block text-[10px] font-medium mb-1",style:{color:"var(--text-muted)"},children:"Environment"}),a.jsxs("select",{value:i,onChange:v=>l(v.target.value),className:"w-full rounded px-1.5 py-0.5 text-[10px] mb-1.5 appearance-auto",style:{background:"var(--bg-primary)",border:"1px solid var(--border)",color:"var(--text-muted)"},children:[a.jsx("option",{value:"cloud",children:"cloud"}),a.jsx("option",{value:"staging",children:"staging"}),a.jsx("option",{value:"alpha",children:"alpha"})]}),a.jsx("button",{onClick:()=>{u(),b(!1)},className:"w-full px-2 py-1 text-[10px] font-medium rounded border border-[var(--border)] bg-transparent cursor-pointer transition-colors",style:{color:"var(--text-muted)"},onMouseEnter:v=>{v.currentTarget.style.color="var(--text-primary)",v.currentTarget.style.borderColor="var(--text-muted)"},onMouseLeave:v=>{v.currentTarget.style.color="var(--text-muted)",v.currentTarget.style.borderColor="var(--border)"},children:"Sign In"})]})})]}),p&&a.jsxs("span",{className:L,children:["Project: ",p]}),m&&a.jsxs("span",{className:L,children:["Version: v",m]}),f&&a.jsxs("span",{className:L,children:["Author: ",f]}),a.jsxs("a",{href:"https://github.com/UiPath/uipath-dev-python",target:"_blank",rel:"noopener noreferrer",className:`${L} cursor-pointer no-underline`,style:{color:"var(--text-muted)"},...C,title:"View on GitHub",children:[a.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor",children:a.jsx("path",{d:"M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0 0 24 12c0-6.63-5.37-12-12-12z"})}),a.jsx("span",{children:"uipath-dev-python"})]}),a.jsxs("div",{className:`${L} cursor-pointer`,onClick:t,...C,title:`Switch to ${e==="dark"?"light":"dark"} theme`,children:[a.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e==="dark"?a.jsxs(a.Fragment,{children:[a.jsx("circle",{cx:"12",cy:"12",r:"5"}),a.jsx("line",{x1:"12",y1:"1",x2:"12",y2:"3"}),a.jsx("line",{x1:"12",y1:"21",x2:"12",y2:"23"}),a.jsx("line",{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}),a.jsx("line",{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}),a.jsx("line",{x1:"1",y1:"12",x2:"3",y2:"12"}),a.jsx("line",{x1:"21",y1:"12",x2:"23",y2:"12"}),a.jsx("line",{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}),a.jsx("line",{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"})]}):a.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})}),a.jsx("span",{children:e==="dark"?"Dark":"Light"})]})]})}function Nc(){const{navigate:e}=st(),t=Ee(c=>c.entrypoints),[n,r]=N.useState(""),[i,s]=N.useState(!0),[o,l]=N.useState(null);N.useEffect(()=>{!n&&t.length>0&&r(t[0])},[t,n]),N.useEffect(()=>{n&&(s(!0),l(null),Jl(n).then(c=>{var p;const d=(p=c.input)==null?void 0:p.properties;s(!!(d!=null&&d.messages))}).catch(c=>{const d=c.detail||{};l(d.error||d.message||`Failed to load entrypoint "${n}"`)}))},[n]);const u=c=>{n&&e(`#/setup/${encodeURIComponent(n)}/${c}`)};return a.jsx("div",{className:"flex items-center justify-center h-full",children:a.jsxs("div",{className:"w-full max-w-xl px-6",children:[a.jsxs("div",{className:"mb-8 text-center",children:[a.jsxs("div",{className:"flex items-center justify-center gap-2 mb-2",children:[a.jsx("div",{className:"w-1.5 h-1.5 rounded-full",style:{background:o?"var(--error)":"var(--accent)"}}),a.jsx("span",{className:"text-sm font-semibold",style:{color:"var(--text-muted)"},children:"New Run"})]}),!o&&a.jsx("p",{className:"text-sm",style:{color:"var(--text-muted)"},children:t.length>1?"Select an entrypoint and choose a mode":"Choose a mode"})]}),t.length>1&&a.jsxs("div",{className:"mb-8",children:[a.jsx("label",{className:"block text-[11px] font-medium mb-1.5",style:{color:"var(--text-muted)"},children:"Entrypoint"}),a.jsx("select",{id:"entrypoint-select",value:n,onChange:c=>r(c.target.value),className:"w-full rounded-md px-3 py-2 text-xs font-mono cursor-pointer appearance-auto",style:{background:"var(--bg-secondary)",border:"1px solid var(--border)",color:"var(--text-primary)"},children:t.map(c=>a.jsx("option",{value:c,children:c},c))})]}),o?a.jsxs("div",{className:"rounded-md border overflow-hidden",style:{borderColor:"color-mix(in srgb, var(--error) 25%, var(--border))",background:"var(--bg-secondary)"},children:[a.jsxs("div",{className:"px-3 py-2 flex items-center gap-2",style:{borderBottom:"1px solid color-mix(in srgb, var(--error) 15%, var(--border))",background:"color-mix(in srgb, var(--error) 4%, var(--bg-secondary))"},children:[a.jsx("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",style:{flexShrink:0},children:a.jsx("path",{d:"M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM7.25 4.75h1.5v4h-1.5v-4zm.75 6.75a.75.75 0 110-1.5.75.75 0 010 1.5z",fill:"var(--error)"})}),a.jsx("span",{className:"text-[11px] font-medium",style:{color:"var(--error)"},children:"Failed to load entrypoint"})]}),a.jsx("div",{className:"overflow-auto max-h-48 p-3",children:a.jsx("pre",{className:"text-[11px] font-mono whitespace-pre-wrap break-words leading-relaxed m-0",style:{color:"var(--text-muted)"},children:o})})]}):a.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[a.jsx(Pi,{title:"Autonomous",description:"Run the agent end-to-end. Set breakpoints to pause and inspect execution.",icon:a.jsx(Sc,{}),color:"var(--success)",onClick:()=>u("run"),disabled:!n}),a.jsx(Pi,{title:"Conversational",description:i?"Interactive chat session. Send messages and receive responses in real time.":'Requires a "messages" property in the input schema.',icon:a.jsx(Tc,{}),color:"var(--accent)",onClick:()=>u("chat"),disabled:!n||!i})]})]})})}function Pi({title:e,description:t,icon:n,color:r,onClick:i,disabled:s}){return a.jsxs("button",{onClick:i,disabled:s,className:"group flex flex-col items-center text-center p-6 rounded-md border transition-all cursor-pointer disabled:opacity-40 disabled:cursor-not-allowed",style:{background:"var(--bg-secondary)",borderColor:"var(--border)"},onMouseEnter:o=>{s||(o.currentTarget.style.borderColor=r,o.currentTarget.style.background=`color-mix(in srgb, ${r} 5%, var(--bg-secondary))`)},onMouseLeave:o=>{o.currentTarget.style.borderColor="var(--border)",o.currentTarget.style.background="var(--bg-secondary)"},children:[a.jsx("div",{className:"mb-4 p-3 rounded-xl transition-colors",style:{background:`color-mix(in srgb, ${r} 10%, var(--bg-primary))`,color:r},children:n}),a.jsx("h3",{className:"text-sm font-semibold mb-1.5",style:{color:"var(--text-primary)"},children:e}),a.jsx("p",{className:"text-xs leading-relaxed",style:{color:"var(--text-muted)"},children:t})]})}function Sc(){return a.jsx("svg",{width:"28",height:"28",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:a.jsx("path",{d:"M23.832 15.166H22.7487C22.7487 10.9735 19.3579 7.58268 15.1654 7.58268H14.082V6.20685C14.732 5.83852 15.1654 5.13435 15.1654 4.33268C15.1654 3.14102 14.2012 2.16602 12.9987 2.16602C11.7962 2.16602 10.832 3.14102 10.832 4.33268C10.832 5.13435 11.2654 5.83852 11.9154 6.20685V7.58268H10.832C6.63953 7.58268 3.2487 10.9735 3.2487 15.166H2.16536C1.56953 15.166 1.08203 15.6535 1.08203 16.2493V19.4993C1.08203 20.0952 1.56953 20.5827 2.16536 20.5827H3.2487V21.666C3.2487 22.8685 4.2237 23.8327 5.41536 23.8327H20.582C21.7845 23.8327 22.7487 22.8685 22.7487 21.666V20.5827H23.832C24.4279 20.5827 24.9154 20.0952 24.9154 19.4993V16.2493C24.9154 15.6535 24.4279 15.166 23.832 15.166ZM22.7487 18.416H20.582V21.666H5.41536V18.416H3.2487V17.3327H5.41536V15.166C5.41536 12.176 7.84203 9.74935 10.832 9.74935H15.1654C18.1554 9.74935 20.582 12.176 20.582 15.166V17.3327H22.7487V18.416ZM9.20703 14.6243L11.7637 17.181L10.4854 18.4594L9.20703 17.181L7.9287 18.4594L6.65036 17.181L9.20703 14.6243ZM16.7904 14.6243L19.347 17.181L18.0687 18.4594L16.7904 17.181L15.512 18.4594L14.2337 17.181L16.7904 14.6243Z",fill:"currentColor"})})}function Tc(){return a.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[a.jsx("path",{d:"M9.20901 13.541L11.7657 16.0977L10.4873 17.376L9.20901 16.0977L7.93068 17.376L6.65234 16.0977L9.20901 13.541ZM16.7923 13.541L19.349 16.0977L18.0707 17.376L16.7923 16.0977L15.514 17.376L14.2357 16.0977L16.7923 13.541Z",fill:"currentColor"}),a.jsx("path",{d:"M5.25 8.58398H20.75C21.3023 8.58398 21.75 9.0317 21.75 9.58398V23.5293L16.874 21.9043C16.5683 21.8024 16.248 21.751 15.9258 21.751H5.25C4.69782 21.751 4.25018 21.3031 4.25 20.751V9.58398C4.25 9.0317 4.69772 8.58398 5.25 8.58398Z",stroke:"currentColor",strokeWidth:"2"}),a.jsx("ellipse",{cx:"12.9987",cy:"4.33268",rx:"2.16667",ry:"2.16667",fill:"currentColor"}),a.jsx("rect",{x:"11.918",y:"5.41602",width:"2.16667",height:"2.16667",fill:"currentColor"}),a.jsx("path",{d:"M1.08203 14C1.08203 13.4477 1.52975 13 2.08203 13H3.2487V18.4167H2.08203C1.52975 18.4167 1.08203 17.969 1.08203 17.4167V14Z",fill:"currentColor"}),a.jsx("rect",{x:"3.25",y:"15.166",width:"2.16667",height:"1.08333",fill:"currentColor"}),a.jsx("path",{d:"M22.75 13H23.9167C24.4689 13 24.9167 13.4477 24.9167 14V17.4167C24.9167 17.969 24.469 18.4167 23.9167 18.4167H22.75V13Z",fill:"currentColor"}),a.jsx("rect",{x:"20.582",y:"15.166",width:"2.16667",height:"1.08333",fill:"currentColor"})]})}const Cc="modulepreload",Ac=function(e){return"/"+e},Bi={},Ts=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){let o=function(c){return Promise.all(c.map(d=>Promise.resolve(d).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),u=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));i=o(n.map(c=>{if(c=Ac(c),c in Bi)return;Bi[c]=!0;const d=c.endsWith(".css"),p=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${p}`))return;const m=document.createElement("link");if(m.rel=d?"stylesheet":Cc,d||(m.as="script"),m.crossOrigin="",m.href=c,u&&m.setAttribute("nonce",u),document.head.appendChild(m),d)return new Promise((f,h)=>{m.addEventListener("load",f),m.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${c}`)))})}))}function s(o){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=o,window.dispatchEvent(l),!l.defaultPrevented)throw o}return i.then(o=>{for(const l of o||[])l.status==="rejected"&&s(l.reason);return t().catch(s)})},Mc={opacity:0,width:1,height:1,minWidth:0,minHeight:0,border:"none",padding:0};function Ic({data:e}){const t=e.status,n=e.nodeWidth,r=e.label??"Start",i=e.hasBreakpoint,s=e.isPausedHere,o=e.isActiveNode,l=e.isExecutingNode,u=s?"var(--error)":l?"var(--success)":o?"var(--accent)":t==="completed"?"var(--success)":t==="running"?"var(--warning)":"var(--node-border)",c=s?"var(--error)":l?"var(--success)":"var(--accent)";return a.jsxs("div",{className:"px-3 py-1.5 rounded-full text-center text-xs overflow-hidden text-ellipsis whitespace-nowrap cursor-pointer relative",style:{width:n,background:"var(--node-bg)",color:"var(--text-primary)",border:`2px solid ${u}`,boxShadow:s||o||l?`0 0 4px ${c}`:void 0,animation:s||o||l?`node-pulse-${s?"red":l?"green":"accent"} 1.5s ease-in-out infinite`:void 0},title:r,children:[i&&a.jsx("div",{className:"absolute",style:{top:2,left:2,width:12,height:12,borderRadius:"50%",background:"var(--error)",border:"2px solid var(--node-bg)",boxShadow:"0 0 4px var(--error)"}}),r,a.jsx(ht,{type:"source",position:bt.Bottom,style:Mc})]})}const Rc={opacity:0,width:1,height:1,minWidth:0,minHeight:0,border:"none",padding:0};function Oc({data:e}){const t=e.status,n=e.nodeWidth,r=e.label??"End",i=e.hasBreakpoint,s=e.isPausedHere,o=e.isActiveNode,l=e.isExecutingNode,u=s?"var(--error)":l?"var(--success)":o?"var(--accent)":t==="completed"?"var(--success)":t==="failed"?"var(--error)":"var(--node-border)",c=s?"var(--error)":l?"var(--success)":"var(--accent)";return a.jsxs("div",{className:"px-3 py-1.5 rounded-full text-center text-xs overflow-hidden text-ellipsis whitespace-nowrap cursor-pointer relative",style:{width:n,background:"var(--node-bg)",color:"var(--text-primary)",border:`2px solid ${u}`,boxShadow:s||o||l?`0 0 4px ${c}`:void 0,animation:s||o||l?`node-pulse-${s?"red":l?"green":"accent"} 1.5s ease-in-out infinite`:void 0},title:r,children:[i&&a.jsx("div",{className:"absolute",style:{top:2,left:2,width:12,height:12,borderRadius:"50%",background:"var(--error)",border:"2px solid var(--node-bg)",boxShadow:"0 0 4px var(--error)"}}),a.jsx(ht,{type:"target",position:bt.Top,style:Rc}),r]})}const Fi={opacity:0,width:1,height:1,minWidth:0,minHeight:0,border:"none",padding:0};function Lc({data:e}){const t=e.status,n=e.nodeWidth,r=e.model_name,i=e.label??"Model",s=e.hasBreakpoint,o=e.isPausedHere,l=e.isActiveNode,u=e.isExecutingNode,c=o?"var(--error)":u?"var(--success)":l?"var(--accent)":t==="completed"?"var(--success)":t==="running"?"var(--warning)":t==="failed"?"var(--error)":"var(--node-border)",d=o?"var(--error)":u?"var(--success)":"var(--accent)";return a.jsxs("div",{className:"px-3 py-1.5 rounded-lg text-center text-xs overflow-hidden cursor-pointer relative",style:{width:n,background:"var(--node-bg)",color:"var(--text-primary)",border:`2px solid ${c}`,boxShadow:o||l||u?`0 0 4px ${d}`:void 0,animation:o||l||u?`node-pulse-${o?"red":u?"green":"accent"} 1.5s ease-in-out infinite`:void 0},title:r?`${i} +${r}`:i,children:[s&&a.jsx("div",{className:"absolute",style:{top:2,left:2,width:12,height:12,borderRadius:"50%",background:"var(--error)",border:"2px solid var(--node-bg)",boxShadow:"0 0 4px var(--error)"}}),a.jsx(ht,{type:"target",position:bt.Top,style:Fi}),a.jsx("div",{style:{color:"var(--info)",fontSize:9,marginBottom:1},children:"model"}),a.jsx("div",{className:"overflow-hidden text-ellipsis whitespace-nowrap",children:i}),r&&a.jsx("div",{className:"overflow-hidden text-ellipsis whitespace-nowrap",style:{color:"var(--text-muted)",fontSize:9,marginTop:1},title:r,children:r}),a.jsx(ht,{type:"source",position:bt.Bottom,style:Fi})]})}const zi={opacity:0,width:1,height:1,minWidth:0,minHeight:0,border:"none",padding:0},jc=3;function Dc({data:e}){const t=e.status,n=e.nodeWidth,r=e.tool_names,i=e.tool_count,s=e.label??"Tool",o=e.hasBreakpoint,l=e.isPausedHere,u=e.isActiveNode,c=e.isExecutingNode,d=l?"var(--error)":c?"var(--success)":u?"var(--accent)":t==="completed"?"var(--success)":t==="running"?"var(--warning)":t==="failed"?"var(--error)":"var(--node-border)",p=l?"var(--error)":c?"var(--success)":"var(--accent)",m=(r==null?void 0:r.slice(0,jc))??[],f=(i??(r==null?void 0:r.length)??0)-m.length;return a.jsxs("div",{className:"px-3 py-1.5 rounded-lg text-center text-xs overflow-hidden cursor-pointer relative",style:{width:n,background:"var(--node-bg)",color:"var(--text-primary)",border:`2px solid ${d}`,boxShadow:l||u||c?`0 0 4px ${p}`:void 0,animation:l||u||c?`node-pulse-${l?"red":c?"green":"accent"} 1.5s ease-in-out infinite`:void 0},title:r!=null&&r.length?`${s} ${r.join(` -`)}`:s,children:[o&&a.jsx("div",{className:"absolute",style:{top:2,left:2,width:12,height:12,borderRadius:"50%",background:"var(--error)",border:"2px solid var(--node-bg)",boxShadow:"0 0 4px var(--error)"}}),a.jsx(gt,{type:"target",position:bt.Top,style:Fi}),a.jsxs("div",{style:{color:"var(--warning)",fontSize:9,marginBottom:1},children:["tools",i?` (${i})`:""]}),a.jsx("div",{className:"overflow-hidden text-ellipsis whitespace-nowrap",children:s}),m.length>0&&a.jsxs("div",{style:{marginTop:3,fontSize:9,color:"var(--text-muted)",textAlign:"left"},children:[m.map(g=>a.jsx("div",{className:"truncate",children:g},g)),f>0&&a.jsxs("div",{style:{fontStyle:"italic"},children:["+",f," more"]})]}),a.jsx(gt,{type:"source",position:bt.Bottom,style:Fi})]})}const zi={opacity:0,width:1,height:1,minWidth:0,minHeight:0,border:"none",padding:0};function jc({data:e}){const t=e.label??"",n=e.status,r=e.hasBreakpoint,i=e.isPausedHere,s=e.isActiveNode,o=e.isExecutingNode,l=i?"var(--error)":o?"var(--success)":s?"var(--accent)":n==="completed"?"var(--success)":n==="running"?"var(--warning)":n==="failed"?"var(--error)":"var(--bg-tertiary)",u=i?"var(--error)":o?"var(--success)":"var(--accent)";return a.jsxs("div",{className:"relative cursor-pointer",style:{width:"100%",height:"100%",background:"var(--bg-secondary)",border:`1.5px ${i||s||o?"solid":"dashed"} ${l}`,borderRadius:8,boxShadow:i||s||o?`0 0 4px ${u}`:void 0,animation:i||s||o?`node-pulse-${i?"red":o?"green":"accent"} 1.5s ease-in-out infinite`:void 0},children:[r&&a.jsx("div",{className:"absolute",style:{top:4,left:4,width:12,height:12,borderRadius:"50%",background:"var(--error)",border:"2px solid var(--bg-tertiary)",boxShadow:"0 0 4px var(--error)",zIndex:1}}),a.jsx(gt,{type:"target",position:bt.Top,style:zi}),a.jsx("div",{style:{padding:"4px 10px",fontSize:10,color:"var(--text-muted)",fontWeight:600,textAlign:"center",borderBottom:`1px solid ${l}`,background:"var(--bg-tertiary)",borderRadius:"8px 8px 0 0"},children:t}),a.jsx(gt,{type:"source",position:bt.Bottom,style:zi})]})}function Dc({data:e}){const t=e.status,n=e.nodeWidth,r=e.label??"",i=e.hasBreakpoint,s=e.isPausedHere,o=e.isActiveNode,l=e.isExecutingNode,u=s?"var(--error)":l?"var(--success)":o?"var(--accent)":t==="completed"?"var(--success)":t==="running"?"var(--warning)":t==="failed"?"var(--error)":"var(--node-border)",c=s?"var(--error)":l?"var(--success)":"var(--accent)";return a.jsxs("div",{className:"px-3 py-1.5 rounded-lg text-center text-xs overflow-hidden cursor-pointer relative",style:{width:n,background:"var(--node-bg)",color:"var(--text-primary)",border:`2px solid ${u}`,boxShadow:s||o||l?`0 0 4px ${c}`:void 0,animation:s||o||l?`node-pulse-${s?"red":l?"green":"accent"} 1.5s ease-in-out infinite`:void 0},title:r,children:[i&&a.jsx("div",{className:"absolute",style:{top:2,left:2,width:12,height:12,borderRadius:"50%",background:"var(--error)",border:"2px solid var(--node-bg)",boxShadow:"0 0 4px var(--error)"}}),a.jsx(gt,{type:"target",position:bt.Top}),a.jsx("div",{className:"overflow-hidden text-ellipsis whitespace-nowrap",children:r}),a.jsx(gt,{type:"source",position:bt.Bottom})]})}function Pc(e,t=8){if(e.length<2)return"";if(e.length===2)return`M ${e[0].x} ${e[0].y} L ${e[1].x} ${e[1].y}`;let n=`M ${e[0].x} ${e[0].y}`;for(let i=1;i0&&(n+=Math.min(r.length,3)*12+(r.length>3?12:0)+4),e!=null&&e.model_name&&(n+=14),n}let ur=null;async function Wc(){if(!ur){const{default:e}=await Ss(async()=>{const{default:t}=await import("./vendor-elk-CzxJ-xdZ.js").then(n=>n.e);return{default:t}},__vite__mapDeps([0,1]));ur=new e}return ur}const Hi={"elk.algorithm":"layered","elk.direction":"DOWN","elk.edgeRouting":"ORTHOGONAL","elk.layered.crossingMinimization.strategy":"LAYER_SWEEP","elk.layered.nodePlacement.strategy":"NETWORK_SIMPLEX","elk.spacing.nodeNode":"25","elk.layered.spacing.nodeNodeBetweenLayers":"50","elk.spacing.edgeNode":"30","elk.spacing.edgeEdge":"15","elk.layered.spacing.edgeNodeBetweenLayers":"25","elk.layered.spacing.edgeEdgeBetweenLayers":"15","elk.portAlignment.default":"CENTER","elk.layered.considerModelOrder.strategy":"NODES_AND_EDGES"},Kc="[top=35,left=15,bottom=15,right=15]";function Gc(e){const t=[],n=[];for(const r of e.nodes){const i=r.data,s={id:r.id,width:$i(i),height:Ui(i,r.type)};if(r.data.subgraph){const o=r.data.subgraph;delete s.width,delete s.height,s.layoutOptions={...Hi,"elk.padding":Kc},s.children=o.nodes.map(l=>({id:`${r.id}/${l.id}`,width:$i(l.data),height:Ui(l.data,l.type)})),s.edges=o.edges.map(l=>({id:`${r.id}/${l.id}`,sources:[`${r.id}/${l.source}`],targets:[`${r.id}/${l.target}`]}))}t.push(s)}for(const r of e.edges)n.push({id:r.id,sources:[r.source],targets:[r.target]});return{id:"root",layoutOptions:Hi,children:t,edges:n}}const Or={type:Ml.ArrowClosed,width:12,height:12,color:"var(--node-border)"};function Ts(e){return{stroke:"var(--node-border)",strokeWidth:1.5,...e?{strokeDasharray:"6 3"}:{}}}function Wi(e,t,n,r,i){var c;const s=(c=e.sections)==null?void 0:c[0],o=(i==null?void 0:i.x)??0,l=(i==null?void 0:i.y)??0;let u;if(s)u={sourcePoint:{x:s.startPoint.x+o,y:s.startPoint.y+l},targetPoint:{x:s.endPoint.x+o,y:s.endPoint.y+l},bendPoints:(s.bendPoints??[]).map(d=>({x:d.x+o,y:d.y+l}))};else{const d=t.get(e.sources[0]),p=t.get(e.targets[0]);d&&p&&(u={sourcePoint:{x:d.x+d.width/2,y:d.y+d.height},targetPoint:{x:p.x+p.width/2,y:p.y},bendPoints:[]})}return{id:e.id,source:e.sources[0],target:e.targets[0],type:"elk",data:u,style:Ts(r),markerEnd:Or,...n?{label:n,labelStyle:{fill:"var(--text-muted)",fontSize:10},labelBgStyle:{fill:"var(--bg-primary)",fillOpacity:.8}}:{}}}async function qc(e){var u,c;const t=Gc(e),r=await(await Wc()).layout(t),i=new Map;for(const d of e.nodes)if(i.set(d.id,{type:d.type,data:d.data}),d.data.subgraph)for(const p of d.data.subgraph.nodes)i.set(`${d.id}/${p.id}`,{type:p.type,data:p.data});const s=[],o=[],l=new Map;for(const d of r.children??[]){const p=d.x??0,m=d.y??0;l.set(d.id,{x:p,y:m,width:d.width??0,height:d.height??0});for(const f of d.children??[])l.set(f.id,{x:p+(f.x??0),y:m+(f.y??0),width:f.width??0,height:f.height??0})}for(const d of r.children??[]){const p=i.get(d.id);if((((u=d.children)==null?void 0:u.length)??0)>0){s.push({id:d.id,type:"groupNode",data:{...(p==null?void 0:p.data)??{},nodeWidth:d.width,nodeHeight:d.height},position:{x:d.x??0,y:d.y??0},style:{width:d.width,height:d.height}});for(const x of d.children??[]){const y=i.get(x.id);s.push({id:x.id,type:(y==null?void 0:y.type)??"defaultNode",data:{...(y==null?void 0:y.data)??{},nodeWidth:x.width},position:{x:x.x??0,y:x.y??0},parentNode:d.id,extent:"parent"})}const f=d.x??0,g=d.y??0;for(const x of d.edges??[]){const y=e.nodes.find(k=>k.id===d.id),b=(c=y==null?void 0:y.data.subgraph)==null?void 0:c.edges.find(k=>`${d.id}/${k.id}`===x.id);o.push(Wi(x,l,b==null?void 0:b.label,b==null?void 0:b.conditional,{x:f,y:g}))}}else s.push({id:d.id,type:(p==null?void 0:p.type)??"defaultNode",data:{...(p==null?void 0:p.data)??{},nodeWidth:d.width},position:{x:d.x??0,y:d.y??0}})}for(const d of r.edges??[]){const p=e.edges.find(m=>m.id===d.id);o.push(Wi(d,l,p==null?void 0:p.label,p==null?void 0:p.conditional))}return{nodes:s,edges:o}}function $n({entrypoint:e,runId:t,breakpointNode:n,breakpointNextNodes:r,onBreakpointChange:i}){const[s,o,l]=Il([]),[u,c,d]=Rl([]),[p,m]=S.useState(!0),[f,g]=S.useState(!1),[x,y]=S.useState(0),b=S.useRef(0),k=S.useRef(null),C=ke(N=>N.breakpoints[t]),j=ke(N=>N.toggleBreakpoint),L=ke(N=>N.clearBreakpoints),T=ke(N=>N.activeNodes[t]),B=ke(N=>{var E;return(E=N.runs[t])==null?void 0:E.status}),O=S.useCallback((N,E)=>{if(E.type==="startNode"||E.type==="endNode")return;const I=E.type==="groupNode"?E.id:E.id.includes("/")?E.id.split("/").pop():E.id;j(t,I);const G=ke.getState().breakpoints[t]??{};i==null||i(Object.keys(G))},[t,j,i]),w=C&&Object.keys(C).length>0,_=S.useCallback(()=>{if(w)L(t),i==null||i([]);else{const N=[];for(const I of s){if(I.type==="startNode"||I.type==="endNode"||I.parentNode)continue;const G=I.type==="groupNode"?I.id:I.id.includes("/")?I.id.split("/").pop():I.id;N.push(G)}for(const I of N)C!=null&&C[I]||j(t,I);const E=ke.getState().breakpoints[t]??{};i==null||i(Object.keys(E))}},[t,w,C,s,L,j,i]);S.useEffect(()=>{o(N=>N.map(E=>{var H;if(E.type==="startNode"||E.type==="endNode")return E;const I=E.type==="groupNode"?E.id:E.id.includes("/")?E.id.split("/").pop():E.id,G=!!(C&&C[I]);return G!==!!((H=E.data)!=null&&H.hasBreakpoint)?{...E,data:{...E.data,hasBreakpoint:G}}:E}))},[C,o]),S.useEffect(()=>{const N=n?new Set(n.split(",").map(E=>E.trim()).filter(Boolean)):null;o(E=>E.map(I=>{var h,F;if(I.type==="startNode"||I.type==="endNode")return I;const G=I.type==="groupNode"?I.id:I.id.includes("/")?I.id.split("/").pop():I.id,H=(h=I.data)==null?void 0:h.label,V=N!=null&&(N.has(G)||H!=null&&N.has(H));return V!==!!((F=I.data)!=null&&F.isPausedHere)?{...I,data:{...I.data,isPausedHere:V}}:I}))},[n,x,o]);const M=ke(N=>N.stateEvents[t]);S.useEffect(()=>{const N=!!n;let E=new Set;const I=new Set,G=new Set,H=new Set,V=new Map,h=new Map;if(M)for(const F of M)F.phase==="started"?h.set(F.node_name,F.qualified_node_name??null):F.phase==="completed"&&h.delete(F.node_name);o(F=>{var v;for(const ie of F)ie.type&&V.set(ie.id,ie.type);const $=ie=>{var U;const W=[];for(const re of F){const de=re.type==="groupNode"?re.id:re.id.includes("/")?re.id.split("/").pop():re.id,be=(U=re.data)==null?void 0:U.label;(de===ie||be!=null&&be===ie)&&W.push(re.id)}return W};if(N&&n){const ie=n.split(",").map(W=>W.trim()).filter(Boolean);for(const W of ie)$(W).forEach(U=>E.add(U));if(r!=null&&r.length)for(const W of r)$(W).forEach(U=>G.add(U));T!=null&&T.prev&&$(T.prev).forEach(W=>I.add(W))}else if(h.size>0){const ie=new Map;for(const W of F){const U=(v=W.data)==null?void 0:v.label;if(!U)continue;const re=W.id.includes("/")?W.id.split("/").pop():W.id;for(const de of[re,U]){let be=ie.get(de);be||(be=new Set,ie.set(de,be)),be.add(W.id)}}for(const[W,U]of h){let re=!1;if(U){const de=U.replace(/:/g,"/");for(const be of F)be.id===de&&(E.add(be.id),re=!0)}if(!re){const de=ie.get(W);de&&de.forEach(be=>E.add(be))}}}return F}),c(F=>{const $=I.size===0||F.some(v=>E.has(v.target)&&I.has(v.source));return F.map(v=>{var W,U;let ie;return N?ie=E.has(v.target)&&(I.size===0||!$||I.has(v.source))||E.has(v.source)&&G.has(v.target):(ie=E.has(v.source),!ie&&V.get(v.target)==="endNode"&&E.has(v.target)&&(ie=!0)),ie?(N||H.add(v.target),{...v,style:{stroke:"var(--accent)",strokeWidth:2.5},markerEnd:{...Or,color:"var(--accent)"},data:{...v.data,highlighted:!0},animated:!0}):(W=v.data)!=null&&W.highlighted?{...v,style:Ts((U=v.data)==null?void 0:U.conditional),markerEnd:Or,data:{...v.data,highlighted:!1},animated:!1}:v})}),o(F=>F.map($=>{var W,U,re,de;const v=!N&&E.has($.id);if($.type==="startNode"||$.type==="endNode"){const be=H.has($.id)||!N&&E.has($.id);return be!==!!((W=$.data)!=null&&W.isActiveNode)||v!==!!((U=$.data)!=null&&U.isExecutingNode)?{...$,data:{...$.data,isActiveNode:be,isExecutingNode:v}}:$}const ie=N?G.has($.id):H.has($.id);return ie!==!!((re=$.data)!=null&&re.isActiveNode)||v!==!!((de=$.data)!=null&&de.isExecutingNode)?{...$,data:{...$.data,isActiveNode:ie,isExecutingNode:v}}:$}))},[M,T,n,r,B,x,o,c]);const R=ke(N=>N.graphCache[t]);S.useEffect(()=>{if(!R&&t!=="__setup__")return;const N=R?Promise.resolve(R):Jl(e),E=++b.current;m(!0),g(!1),N.then(async I=>{if(b.current!==E)return;if(!I.nodes.length){g(!0);return}const{nodes:G,edges:H}=await qc(I);if(b.current!==E)return;const V=ke.getState().breakpoints[t],h=V?G.map(F=>{if(F.type==="startNode"||F.type==="endNode")return F;const $=F.type==="groupNode"?F.id:F.id.includes("/")?F.id.split("/").pop():F.id;return V[$]?{...F,data:{...F.data,hasBreakpoint:!0}}:F}):G;o(h),c(H),y(F=>F+1),setTimeout(()=>{var F;(F=k.current)==null||F.fitView({padding:.1,duration:200})},100)}).catch(()=>{b.current===E&&g(!0)}).finally(()=>{b.current===E&&m(!1)})},[e,t,R,o,c]),S.useEffect(()=>{const N=setTimeout(()=>{var E;(E=k.current)==null||E.fitView({padding:.1,duration:200})},100);return()=>clearTimeout(N)},[t]);const D=S.useRef(null);return S.useEffect(()=>{const N=D.current;if(!N)return;const E=new ResizeObserver(()=>{var I;(I=k.current)==null||I.fitView({padding:.1,duration:200})});return E.observe(N),()=>E.disconnect()},[p,f]),S.useEffect(()=>{o(N=>{var v,ie,W;const E=!!(M!=null&&M.length),I=B==="completed"||B==="failed",G=new Set,H=new Set(N.map(U=>U.id)),V=new Map;for(const U of N){const re=(v=U.data)==null?void 0:v.label;if(!re)continue;const de=U.id.includes("/")?U.id.split("/").pop():U.id;for(const be of[de,re]){let Oe=V.get(be);Oe||(Oe=new Set,V.set(be,Oe)),Oe.add(U.id)}}if(E)for(const U of M){let re=!1;if(U.qualified_node_name){const de=U.qualified_node_name.replace(/:/g,"/");H.has(de)&&(G.add(de),re=!0)}if(!re){const de=V.get(U.node_name);de&&de.forEach(be=>G.add(be))}}const h=new Set;for(const U of N)U.parentNode&&G.has(U.id)&&h.add(U.parentNode);let F;B==="failed"&&G.size===0&&(F=(ie=N.find(U=>!U.parentNode&&U.type!=="startNode"&&U.type!=="endNode"&&U.type!=="groupNode"))==null?void 0:ie.id);let $;if(B==="completed"){const U=(W=N.find(re=>!re.parentNode&&re.type!=="startNode"&&re.type!=="endNode"&&re.type!=="groupNode"))==null?void 0:W.id;U&&!G.has(U)&&($=U)}return N.map(U=>{var de;let re;return U.id===F?re="failed":U.id===$||G.has(U.id)?re="completed":U.type==="startNode"?(!U.parentNode&&E||U.parentNode&&h.has(U.parentNode))&&(re="completed"):U.type==="endNode"?!U.parentNode&&I?re=B==="failed"?"failed":"completed":U.parentNode&&h.has(U.parentNode)&&(re="completed"):U.type==="groupNode"&&h.has(U.id)&&(re="completed"),re!==((de=U.data)==null?void 0:de.status)?{...U,data:{...U.data,status:re}}:U})})},[M,B,x,o]),p?a.jsx("div",{className:"flex items-center justify-center h-full",style:{color:"var(--text-muted)"},children:"Loading graph..."}):f?a.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-4",style:{color:"var(--text-muted)"},children:[a.jsxs("svg",{width:"120",height:"120",viewBox:"0 0 120 120",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[a.jsx("rect",{x:"38",y:"10",width:"44",height:"24",rx:"6",stroke:"currentColor",strokeWidth:"1.5",strokeDasharray:"4 3",opacity:"0.4"}),a.jsx("line",{x1:"60",y1:"34",x2:"60",y2:"46",stroke:"currentColor",strokeWidth:"1.5",strokeDasharray:"4 3",opacity:"0.3"}),a.jsx("rect",{x:"12",y:"46",width:"44",height:"24",rx:"6",stroke:"currentColor",strokeWidth:"1.5",strokeDasharray:"4 3",opacity:"0.3"}),a.jsx("rect",{x:"64",y:"46",width:"44",height:"24",rx:"6",stroke:"currentColor",strokeWidth:"1.5",strokeDasharray:"4 3",opacity:"0.3"}),a.jsx("line",{x1:"60",y1:"46",x2:"34",y2:"46",stroke:"currentColor",strokeWidth:"1.5",strokeDasharray:"4 3",opacity:"0.3"}),a.jsx("line",{x1:"60",y1:"46",x2:"86",y2:"46",stroke:"currentColor",strokeWidth:"1.5",strokeDasharray:"4 3",opacity:"0.3"}),a.jsx("line",{x1:"34",y1:"70",x2:"34",y2:"82",stroke:"currentColor",strokeWidth:"1.5",strokeDasharray:"4 3",opacity:"0.3"}),a.jsx("line",{x1:"86",y1:"70",x2:"86",y2:"82",stroke:"currentColor",strokeWidth:"1.5",strokeDasharray:"4 3",opacity:"0.3"}),a.jsx("line",{x1:"34",y1:"82",x2:"60",y2:"82",stroke:"currentColor",strokeWidth:"1.5",strokeDasharray:"4 3",opacity:"0.3"}),a.jsx("line",{x1:"86",y1:"82",x2:"60",y2:"82",stroke:"currentColor",strokeWidth:"1.5",strokeDasharray:"4 3",opacity:"0.3"}),a.jsx("line",{x1:"60",y1:"82",x2:"60",y2:"86",stroke:"currentColor",strokeWidth:"1.5",strokeDasharray:"4 3",opacity:"0.3"}),a.jsx("rect",{x:"38",y:"86",width:"44",height:"24",rx:"6",stroke:"currentColor",strokeWidth:"1.5",strokeDasharray:"4 3",opacity:"0.4"})]}),a.jsx("span",{className:"text-xs",children:"No graph schema available"})]}):a.jsxs("div",{ref:D,className:"h-full graph-panel",children:[a.jsx("style",{children:` +`)}`:s,children:[o&&a.jsx("div",{className:"absolute",style:{top:2,left:2,width:12,height:12,borderRadius:"50%",background:"var(--error)",border:"2px solid var(--node-bg)",boxShadow:"0 0 4px var(--error)"}}),a.jsx(ht,{type:"target",position:bt.Top,style:zi}),a.jsxs("div",{style:{color:"var(--warning)",fontSize:9,marginBottom:1},children:["tools",i?` (${i})`:""]}),a.jsx("div",{className:"overflow-hidden text-ellipsis whitespace-nowrap",children:s}),m.length>0&&a.jsxs("div",{style:{marginTop:3,fontSize:9,color:"var(--text-muted)",textAlign:"left"},children:[m.map(h=>a.jsx("div",{className:"truncate",children:h},h)),f>0&&a.jsxs("div",{style:{fontStyle:"italic"},children:["+",f," more"]})]}),a.jsx(ht,{type:"source",position:bt.Bottom,style:zi})]})}const $i={opacity:0,width:1,height:1,minWidth:0,minHeight:0,border:"none",padding:0};function Pc({data:e}){const t=e.label??"",n=e.status,r=e.hasBreakpoint,i=e.isPausedHere,s=e.isActiveNode,o=e.isExecutingNode,l=i?"var(--error)":o?"var(--success)":s?"var(--accent)":n==="completed"?"var(--success)":n==="running"?"var(--warning)":n==="failed"?"var(--error)":"var(--bg-tertiary)",u=i?"var(--error)":o?"var(--success)":"var(--accent)";return a.jsxs("div",{className:"relative cursor-pointer",style:{width:"100%",height:"100%",background:"var(--bg-secondary)",border:`1.5px ${i||s||o?"solid":"dashed"} ${l}`,borderRadius:8,boxShadow:i||s||o?`0 0 4px ${u}`:void 0,animation:i||s||o?`node-pulse-${i?"red":o?"green":"accent"} 1.5s ease-in-out infinite`:void 0},children:[r&&a.jsx("div",{className:"absolute",style:{top:4,left:4,width:12,height:12,borderRadius:"50%",background:"var(--error)",border:"2px solid var(--bg-tertiary)",boxShadow:"0 0 4px var(--error)",zIndex:1}}),a.jsx(ht,{type:"target",position:bt.Top,style:$i}),a.jsx("div",{style:{padding:"4px 10px",fontSize:10,color:"var(--text-muted)",fontWeight:600,textAlign:"center",borderBottom:`1px solid ${l}`,background:"var(--bg-tertiary)",borderRadius:"8px 8px 0 0"},children:t}),a.jsx(ht,{type:"source",position:bt.Bottom,style:$i})]})}function Bc({data:e}){const t=e.status,n=e.nodeWidth,r=e.label??"",i=e.hasBreakpoint,s=e.isPausedHere,o=e.isActiveNode,l=e.isExecutingNode,u=s?"var(--error)":l?"var(--success)":o?"var(--accent)":t==="completed"?"var(--success)":t==="running"?"var(--warning)":t==="failed"?"var(--error)":"var(--node-border)",c=s?"var(--error)":l?"var(--success)":"var(--accent)";return a.jsxs("div",{className:"px-3 py-1.5 rounded-lg text-center text-xs overflow-hidden cursor-pointer relative",style:{width:n,background:"var(--node-bg)",color:"var(--text-primary)",border:`2px solid ${u}`,boxShadow:s||o||l?`0 0 4px ${c}`:void 0,animation:s||o||l?`node-pulse-${s?"red":l?"green":"accent"} 1.5s ease-in-out infinite`:void 0},title:r,children:[i&&a.jsx("div",{className:"absolute",style:{top:2,left:2,width:12,height:12,borderRadius:"50%",background:"var(--error)",border:"2px solid var(--node-bg)",boxShadow:"0 0 4px var(--error)"}}),a.jsx(ht,{type:"target",position:bt.Top}),a.jsx("div",{className:"overflow-hidden text-ellipsis whitespace-nowrap",children:r}),a.jsx(ht,{type:"source",position:bt.Bottom})]})}function Fc(e,t=8){if(e.length<2)return"";if(e.length===2)return`M ${e[0].x} ${e[0].y} L ${e[1].x} ${e[1].y}`;let n=`M ${e[0].x} ${e[0].y}`;for(let i=1;i0&&(n+=Math.min(r.length,3)*12+(r.length>3?12:0)+4),e!=null&&e.model_name&&(n+=14),n}let dr=null;async function Gc(){if(!dr){const{default:e}=await Ts(async()=>{const{default:t}=await import("./vendor-elk-CiLKfHel.js").then(n=>n.e);return{default:t}},__vite__mapDeps([0,1]));dr=new e}return dr}const Wi={"elk.algorithm":"layered","elk.direction":"DOWN","elk.edgeRouting":"ORTHOGONAL","elk.layered.crossingMinimization.strategy":"LAYER_SWEEP","elk.layered.nodePlacement.strategy":"NETWORK_SIMPLEX","elk.spacing.nodeNode":"25","elk.layered.spacing.nodeNodeBetweenLayers":"50","elk.spacing.edgeNode":"30","elk.spacing.edgeEdge":"15","elk.layered.spacing.edgeNodeBetweenLayers":"25","elk.layered.spacing.edgeEdgeBetweenLayers":"15","elk.portAlignment.default":"CENTER","elk.layered.considerModelOrder.strategy":"NODES_AND_EDGES"},qc="[top=35,left=15,bottom=15,right=15]";function Vc(e){const t=[],n=[];for(const r of e.nodes){const i=r.data,s={id:r.id,width:Ui(i),height:Hi(i,r.type)};if(r.data.subgraph){const o=r.data.subgraph;delete s.width,delete s.height,s.layoutOptions={...Wi,"elk.padding":qc},s.children=o.nodes.map(l=>({id:`${r.id}/${l.id}`,width:Ui(l.data),height:Hi(l.data,l.type)})),s.edges=o.edges.map(l=>({id:`${r.id}/${l.id}`,sources:[`${r.id}/${l.source}`],targets:[`${r.id}/${l.target}`]}))}t.push(s)}for(const r of e.edges)n.push({id:r.id,sources:[r.source],targets:[r.target]});return{id:"root",layoutOptions:Wi,children:t,edges:n}}const jr={type:Rl.ArrowClosed,width:12,height:12,color:"var(--node-border)"};function Cs(e){return{stroke:"var(--node-border)",strokeWidth:1.5,...e?{strokeDasharray:"6 3"}:{}}}function Ki(e,t,n,r,i){var c;const s=(c=e.sections)==null?void 0:c[0],o=(i==null?void 0:i.x)??0,l=(i==null?void 0:i.y)??0;let u;if(s)u={sourcePoint:{x:s.startPoint.x+o,y:s.startPoint.y+l},targetPoint:{x:s.endPoint.x+o,y:s.endPoint.y+l},bendPoints:(s.bendPoints??[]).map(d=>({x:d.x+o,y:d.y+l}))};else{const d=t.get(e.sources[0]),p=t.get(e.targets[0]);d&&p&&(u={sourcePoint:{x:d.x+d.width/2,y:d.y+d.height},targetPoint:{x:p.x+p.width/2,y:p.y},bendPoints:[]})}return{id:e.id,source:e.sources[0],target:e.targets[0],type:"elk",data:u,style:Cs(r),markerEnd:jr,...n?{label:n,labelStyle:{fill:"var(--text-muted)",fontSize:10},labelBgStyle:{fill:"var(--bg-primary)",fillOpacity:.8}}:{}}}async function Yc(e){var u,c;const t=Vc(e),r=await(await Gc()).layout(t),i=new Map;for(const d of e.nodes)if(i.set(d.id,{type:d.type,data:d.data}),d.data.subgraph)for(const p of d.data.subgraph.nodes)i.set(`${d.id}/${p.id}`,{type:p.type,data:p.data});const s=[],o=[],l=new Map;for(const d of r.children??[]){const p=d.x??0,m=d.y??0;l.set(d.id,{x:p,y:m,width:d.width??0,height:d.height??0});for(const f of d.children??[])l.set(f.id,{x:p+(f.x??0),y:m+(f.y??0),width:f.width??0,height:f.height??0})}for(const d of r.children??[]){const p=i.get(d.id);if((((u=d.children)==null?void 0:u.length)??0)>0){s.push({id:d.id,type:"groupNode",data:{...(p==null?void 0:p.data)??{},nodeWidth:d.width,nodeHeight:d.height},position:{x:d.x??0,y:d.y??0},style:{width:d.width,height:d.height}});for(const b of d.children??[]){const x=i.get(b.id);s.push({id:b.id,type:(x==null?void 0:x.type)??"defaultNode",data:{...(x==null?void 0:x.data)??{},nodeWidth:b.width},position:{x:b.x??0,y:b.y??0},parentNode:d.id,extent:"parent"})}const f=d.x??0,h=d.y??0;for(const b of d.edges??[]){const x=e.nodes.find(w=>w.id===d.id),y=(c=x==null?void 0:x.data.subgraph)==null?void 0:c.edges.find(w=>`${d.id}/${w.id}`===b.id);o.push(Ki(b,l,y==null?void 0:y.label,y==null?void 0:y.conditional,{x:f,y:h}))}}else s.push({id:d.id,type:(p==null?void 0:p.type)??"defaultNode",data:{...(p==null?void 0:p.data)??{},nodeWidth:d.width},position:{x:d.x??0,y:d.y??0}})}for(const d of r.edges??[]){const p=e.edges.find(m=>m.id===d.id);o.push(Ki(d,l,p==null?void 0:p.label,p==null?void 0:p.conditional))}return{nodes:s,edges:o}}function Un({entrypoint:e,runId:t,breakpointNode:n,breakpointNextNodes:r,onBreakpointChange:i}){const[s,o,l]=Ol([]),[u,c,d]=Ll([]),[p,m]=N.useState(!0),[f,h]=N.useState(!1),[b,x]=N.useState(0),y=N.useRef(0),w=N.useRef(null),T=Ee(v=>v.breakpoints[t]),j=Ee(v=>v.toggleBreakpoint),O=Ee(v=>v.clearBreakpoints),_=Ee(v=>v.activeNodes[t]),P=Ee(v=>{var E;return(E=v.runs[t])==null?void 0:E.status}),D=N.useCallback((v,E)=>{if(E.type==="startNode"||E.type==="endNode")return;const I=E.type==="groupNode"?E.id:E.id.includes("/")?E.id.split("/").pop():E.id;j(t,I);const H=Ee.getState().breakpoints[t]??{};i==null||i(Object.keys(H))},[t,j,i]),R=T&&Object.keys(T).length>0,S=N.useCallback(()=>{if(R)O(t),i==null||i([]);else{const v=[];for(const I of s){if(I.type==="startNode"||I.type==="endNode"||I.parentNode)continue;const H=I.type==="groupNode"?I.id:I.id.includes("/")?I.id.split("/").pop():I.id;v.push(H)}for(const I of v)T!=null&&T[I]||j(t,I);const E=Ee.getState().breakpoints[t]??{};i==null||i(Object.keys(E))}},[t,R,T,s,O,j,i]);N.useEffect(()=>{o(v=>v.map(E=>{var U;if(E.type==="startNode"||E.type==="endNode")return E;const I=E.type==="groupNode"?E.id:E.id.includes("/")?E.id.split("/").pop():E.id,H=!!(T&&T[I]);return H!==!!((U=E.data)!=null&&U.hasBreakpoint)?{...E,data:{...E.data,hasBreakpoint:H}}:E}))},[T,o]),N.useEffect(()=>{const v=n?new Set(n.split(",").map(E=>E.trim()).filter(Boolean)):null;o(E=>E.map(I=>{var g,F;if(I.type==="startNode"||I.type==="endNode")return I;const H=I.type==="groupNode"?I.id:I.id.includes("/")?I.id.split("/").pop():I.id,U=(g=I.data)==null?void 0:g.label,V=v!=null&&(v.has(H)||U!=null&&v.has(U));return V!==!!((F=I.data)!=null&&F.isPausedHere)?{...I,data:{...I.data,isPausedHere:V}}:I}))},[n,b,o]);const M=Ee(v=>v.stateEvents[t]);N.useEffect(()=>{const v=!!n;let E=new Set;const I=new Set,H=new Set,U=new Set,V=new Map,g=new Map;if(M)for(const F of M)F.phase==="started"?g.set(F.node_name,F.qualified_node_name??null):F.phase==="completed"&&g.delete(F.node_name);o(F=>{var k;for(const ie of F)ie.type&&V.set(ie.id,ie.type);const $=ie=>{var W;const K=[];for(const re of F){const de=re.type==="groupNode"?re.id:re.id.includes("/")?re.id.split("/").pop():re.id,xe=(W=re.data)==null?void 0:W.label;(de===ie||xe!=null&&xe===ie)&&K.push(re.id)}return K};if(v&&n){const ie=n.split(",").map(K=>K.trim()).filter(Boolean);for(const K of ie)$(K).forEach(W=>E.add(W));if(r!=null&&r.length)for(const K of r)$(K).forEach(W=>H.add(W));_!=null&&_.prev&&$(_.prev).forEach(K=>I.add(K))}else if(g.size>0){const ie=new Map;for(const K of F){const W=(k=K.data)==null?void 0:k.label;if(!W)continue;const re=K.id.includes("/")?K.id.split("/").pop():K.id;for(const de of[re,W]){let xe=ie.get(de);xe||(xe=new Set,ie.set(de,xe)),xe.add(K.id)}}for(const[K,W]of g){let re=!1;if(W){const de=W.replace(/:/g,"/");for(const xe of F)xe.id===de&&(E.add(xe.id),re=!0)}if(!re){const de=ie.get(K);de&&de.forEach(xe=>E.add(xe))}}}return F}),c(F=>{const $=I.size===0||F.some(k=>E.has(k.target)&&I.has(k.source));return F.map(k=>{var K,W;let ie;return v?ie=E.has(k.target)&&(I.size===0||!$||I.has(k.source))||E.has(k.source)&&H.has(k.target):(ie=E.has(k.source),!ie&&V.get(k.target)==="endNode"&&E.has(k.target)&&(ie=!0)),ie?(v||U.add(k.target),{...k,style:{stroke:"var(--accent)",strokeWidth:2.5},markerEnd:{...jr,color:"var(--accent)"},data:{...k.data,highlighted:!0},animated:!0}):(K=k.data)!=null&&K.highlighted?{...k,style:Cs((W=k.data)==null?void 0:W.conditional),markerEnd:jr,data:{...k.data,highlighted:!1},animated:!1}:k})}),o(F=>F.map($=>{var K,W,re,de;const k=!v&&E.has($.id);if($.type==="startNode"||$.type==="endNode"){const xe=U.has($.id)||!v&&E.has($.id);return xe!==!!((K=$.data)!=null&&K.isActiveNode)||k!==!!((W=$.data)!=null&&W.isExecutingNode)?{...$,data:{...$.data,isActiveNode:xe,isExecutingNode:k}}:$}const ie=v?H.has($.id):U.has($.id);return ie!==!!((re=$.data)!=null&&re.isActiveNode)||k!==!!((de=$.data)!=null&&de.isExecutingNode)?{...$,data:{...$.data,isActiveNode:ie,isExecutingNode:k}}:$}))},[M,_,n,r,P,b,o,c]);const L=Ee(v=>v.graphCache[t]);N.useEffect(()=>{if(!L&&t!=="__setup__")return;const v=L?Promise.resolve(L):ec(e),E=++y.current;m(!0),h(!1),v.then(async I=>{if(y.current!==E)return;if(!I.nodes.length){h(!0);return}const{nodes:H,edges:U}=await Yc(I);if(y.current!==E)return;const V=Ee.getState().breakpoints[t],g=V?H.map(F=>{if(F.type==="startNode"||F.type==="endNode")return F;const $=F.type==="groupNode"?F.id:F.id.includes("/")?F.id.split("/").pop():F.id;return V[$]?{...F,data:{...F.data,hasBreakpoint:!0}}:F}):H;o(g),c(U),x(F=>F+1),setTimeout(()=>{var F;(F=w.current)==null||F.fitView({padding:.1,duration:200})},100)}).catch(()=>{y.current===E&&h(!0)}).finally(()=>{y.current===E&&m(!1)})},[e,t,L,o,c]),N.useEffect(()=>{const v=setTimeout(()=>{var E;(E=w.current)==null||E.fitView({padding:.1,duration:200})},100);return()=>clearTimeout(v)},[t]);const C=N.useRef(null);return N.useEffect(()=>{const v=C.current;if(!v)return;const E=new ResizeObserver(()=>{var I;(I=w.current)==null||I.fitView({padding:.1,duration:200})});return E.observe(v),()=>E.disconnect()},[p,f]),N.useEffect(()=>{o(v=>{var k,ie,K;const E=!!(M!=null&&M.length),I=P==="completed"||P==="failed",H=new Set,U=new Set(v.map(W=>W.id)),V=new Map;for(const W of v){const re=(k=W.data)==null?void 0:k.label;if(!re)continue;const de=W.id.includes("/")?W.id.split("/").pop():W.id;for(const xe of[de,re]){let Oe=V.get(xe);Oe||(Oe=new Set,V.set(xe,Oe)),Oe.add(W.id)}}if(E)for(const W of M){let re=!1;if(W.qualified_node_name){const de=W.qualified_node_name.replace(/:/g,"/");U.has(de)&&(H.add(de),re=!0)}if(!re){const de=V.get(W.node_name);de&&de.forEach(xe=>H.add(xe))}}const g=new Set;for(const W of v)W.parentNode&&H.has(W.id)&&g.add(W.parentNode);let F;P==="failed"&&H.size===0&&(F=(ie=v.find(W=>!W.parentNode&&W.type!=="startNode"&&W.type!=="endNode"&&W.type!=="groupNode"))==null?void 0:ie.id);let $;if(P==="completed"){const W=(K=v.find(re=>!re.parentNode&&re.type!=="startNode"&&re.type!=="endNode"&&re.type!=="groupNode"))==null?void 0:K.id;W&&!H.has(W)&&($=W)}return v.map(W=>{var de;let re;return W.id===F?re="failed":W.id===$||H.has(W.id)?re="completed":W.type==="startNode"?(!W.parentNode&&E||W.parentNode&&g.has(W.parentNode))&&(re="completed"):W.type==="endNode"?!W.parentNode&&I?re=P==="failed"?"failed":"completed":W.parentNode&&g.has(W.parentNode)&&(re="completed"):W.type==="groupNode"&&g.has(W.id)&&(re="completed"),re!==((de=W.data)==null?void 0:de.status)?{...W,data:{...W.data,status:re}}:W})})},[M,P,b,o]),p?a.jsx("div",{className:"flex items-center justify-center h-full",style:{color:"var(--text-muted)"},children:"Loading graph..."}):f?a.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-4",style:{color:"var(--text-muted)"},children:[a.jsxs("svg",{width:"120",height:"120",viewBox:"0 0 120 120",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[a.jsx("rect",{x:"38",y:"10",width:"44",height:"24",rx:"6",stroke:"currentColor",strokeWidth:"1.5",strokeDasharray:"4 3",opacity:"0.4"}),a.jsx("line",{x1:"60",y1:"34",x2:"60",y2:"46",stroke:"currentColor",strokeWidth:"1.5",strokeDasharray:"4 3",opacity:"0.3"}),a.jsx("rect",{x:"12",y:"46",width:"44",height:"24",rx:"6",stroke:"currentColor",strokeWidth:"1.5",strokeDasharray:"4 3",opacity:"0.3"}),a.jsx("rect",{x:"64",y:"46",width:"44",height:"24",rx:"6",stroke:"currentColor",strokeWidth:"1.5",strokeDasharray:"4 3",opacity:"0.3"}),a.jsx("line",{x1:"60",y1:"46",x2:"34",y2:"46",stroke:"currentColor",strokeWidth:"1.5",strokeDasharray:"4 3",opacity:"0.3"}),a.jsx("line",{x1:"60",y1:"46",x2:"86",y2:"46",stroke:"currentColor",strokeWidth:"1.5",strokeDasharray:"4 3",opacity:"0.3"}),a.jsx("line",{x1:"34",y1:"70",x2:"34",y2:"82",stroke:"currentColor",strokeWidth:"1.5",strokeDasharray:"4 3",opacity:"0.3"}),a.jsx("line",{x1:"86",y1:"70",x2:"86",y2:"82",stroke:"currentColor",strokeWidth:"1.5",strokeDasharray:"4 3",opacity:"0.3"}),a.jsx("line",{x1:"34",y1:"82",x2:"60",y2:"82",stroke:"currentColor",strokeWidth:"1.5",strokeDasharray:"4 3",opacity:"0.3"}),a.jsx("line",{x1:"86",y1:"82",x2:"60",y2:"82",stroke:"currentColor",strokeWidth:"1.5",strokeDasharray:"4 3",opacity:"0.3"}),a.jsx("line",{x1:"60",y1:"82",x2:"60",y2:"86",stroke:"currentColor",strokeWidth:"1.5",strokeDasharray:"4 3",opacity:"0.3"}),a.jsx("rect",{x:"38",y:"86",width:"44",height:"24",rx:"6",stroke:"currentColor",strokeWidth:"1.5",strokeDasharray:"4 3",opacity:"0.4"})]}),a.jsx("span",{className:"text-xs",children:"No graph schema available"})]}):a.jsxs("div",{ref:C,className:"h-full graph-panel",children:[a.jsx("style",{children:` .graph-panel .react-flow__handle { opacity: 0 !important; width: 0 !important; @@ -37,8 +37,8 @@ ${r.join(` 0%, 100% { box-shadow: 0 0 4px var(--error); } 50% { box-shadow: 0 0 10px var(--error); } } - `}),a.jsxs(Ol,{nodes:s,edges:u,onNodesChange:l,onEdgesChange:d,nodeTypes:Fc,edgeTypes:zc,onInit:N=>{k.current=N},onNodeClick:O,fitView:!0,proOptions:{hideAttribution:!0},nodesDraggable:!1,nodesConnectable:!1,elementsSelectable:!1,children:[a.jsx(Ll,{color:"var(--bg-tertiary)",gap:16}),a.jsx(jl,{showInteractive:!1}),a.jsx(Dl,{position:"top-right",children:a.jsxs("button",{onClick:_,title:w?"Remove all breakpoints":"Set breakpoints on all nodes",style:{background:"var(--bg-secondary)",color:w?"var(--error)":"var(--text-muted)",border:`1px solid ${w?"var(--error)":"var(--node-border)"}`,borderRadius:6,padding:"4px 10px",fontSize:12,cursor:"pointer",display:"flex",alignItems:"center",gap:4},children:[a.jsx("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",background:w?"var(--error)":"var(--node-border)"}}),w?"Clear all":"Break all"]})}),a.jsx(Pl,{nodeColor:N=>{var I;if(N.type==="groupNode")return"var(--bg-tertiary)";const E=(I=N.data)==null?void 0:I.status;return E==="completed"?"var(--success)":E==="running"?"var(--warning)":E==="failed"?"var(--error)":"var(--node-border)"},nodeStrokeWidth:0,style:{background:"var(--bg-secondary)",width:120,height:80}})]})]})}const Ut="__setup__";function Vc({entrypoint:e,mode:t,ws:n,onRunCreated:r,isMobile:i}){const[s,o]=S.useState("{}"),[l,u]=S.useState({}),[c,d]=S.useState(!1),[p,m]=S.useState(!0),[f,g]=S.useState(null),[x,y]=S.useState(""),[b,k]=S.useState(!0),[C,j]=S.useState(()=>{const I=localStorage.getItem("setupTextareaHeight");return I?parseInt(I,10):140}),L=S.useRef(null),[T,B]=S.useState(()=>{const I=localStorage.getItem("setupPanelWidth");return I?parseInt(I,10):380}),O=t==="run";S.useEffect(()=>{m(!0),g(null),Zl(e).then(I=>{u(I.mock_input),o(JSON.stringify(I.mock_input,null,2))}).catch(I=>{console.error("Failed to load mock input:",I);const G=I.detail||{};g(G.message||`Failed to load schema for "${e}"`),o("{}")}).finally(()=>m(!1))},[e]),S.useEffect(()=>{ke.getState().clearBreakpoints(Ut)},[]);const w=async()=>{let I;try{I=JSON.parse(s)}catch{alert("Invalid JSON input");return}d(!0);try{const G=ke.getState().breakpoints[Ut]??{},H=Object.keys(G),V=await Ii(e,I,t,H);ke.getState().clearBreakpoints(Ut),ke.getState().upsertRun(V),r(V.id)}catch(G){console.error("Failed to create run:",G)}finally{d(!1)}},_=async()=>{const I=x.trim();if(I){d(!0);try{const G=ke.getState().breakpoints[Ut]??{},H=Object.keys(G),V=await Ii(e,l,"chat",H);ke.getState().clearBreakpoints(Ut),ke.getState().upsertRun(V),ke.getState().addLocalChatMessage(V.id,{message_id:`local-${Date.now()}`,role:"user",content:I}),n.sendChatMessage(V.id,I),r(V.id)}catch(G){console.error("Failed to create chat run:",G)}finally{d(!1)}}};S.useEffect(()=>{try{JSON.parse(s),k(!0)}catch{k(!1)}},[s]);const M=S.useCallback(I=>{I.preventDefault();const G="touches"in I?I.touches[0].clientY:I.clientY,H=C,V=F=>{const $="touches"in F?F.touches[0].clientY:F.clientY,v=Math.max(60,H+(G-$));j(v)},h=()=>{document.removeEventListener("mousemove",V),document.removeEventListener("mouseup",h),document.removeEventListener("touchmove",V),document.removeEventListener("touchend",h),document.body.style.cursor="",document.body.style.userSelect="",localStorage.setItem("setupTextareaHeight",String(C))};document.body.style.cursor="row-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",V),document.addEventListener("mouseup",h),document.addEventListener("touchmove",V,{passive:!1}),document.addEventListener("touchend",h)},[C]),R=S.useCallback(I=>{I.preventDefault();const G="touches"in I?I.touches[0].clientX:I.clientX,H=T,V=F=>{const $=L.current;if(!$)return;const v="touches"in F?F.touches[0].clientX:F.clientX,ie=$.clientWidth-300,W=Math.max(280,Math.min(ie,H+(G-v)));B(W)},h=()=>{document.removeEventListener("mousemove",V),document.removeEventListener("mouseup",h),document.removeEventListener("touchmove",V),document.removeEventListener("touchend",h),document.body.style.cursor="",document.body.style.userSelect="",localStorage.setItem("setupPanelWidth",String(T))};document.body.style.cursor="col-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",V),document.addEventListener("mouseup",h),document.addEventListener("touchmove",V,{passive:!1}),document.addEventListener("touchend",h)},[T]),D=O?"Autonomous":"Conversational",N=O?"var(--success)":"var(--accent)",E=a.jsxs("div",{className:"shrink-0 flex flex-col",style:i?{background:"var(--bg-primary)"}:{width:T,background:"var(--bg-primary)"},children:[a.jsxs("div",{className:"px-4 text-xs font-semibold border-b flex items-center gap-2 h-10",style:{color:"var(--text-muted)",borderColor:"var(--border)",background:"var(--bg-secondary)"},children:[a.jsx("span",{style:{color:N},children:"●"}),D]}),a.jsxs("div",{className:"flex-1 overflow-y-auto flex flex-col items-center justify-center gap-4 px-6",children:[a.jsx("svg",{width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round",style:{color:"var(--text-muted)",opacity:.5},children:O?a.jsxs(a.Fragment,{children:[a.jsx("circle",{cx:"12",cy:"12",r:"10"}),a.jsx("polyline",{points:"12 6 12 12 16 14"})]}):a.jsx("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})}),a.jsxs("div",{className:"text-center space-y-1.5",children:[a.jsx("p",{className:"text-sm font-medium",style:{color:"var(--text-secondary)"},children:O?"Ready to execute":"Ready to chat"}),a.jsxs("p",{className:"text-xs leading-relaxed",style:{color:"var(--text-muted)"},children:["Click nodes to set breakpoints",O?a.jsxs(a.Fragment,{children:[",",a.jsx("br",{}),"configure input below, then run"]}):a.jsxs(a.Fragment,{children:[",",a.jsx("br",{}),"then send your first message"]})]})]})]}),O?a.jsxs("div",{className:"flex flex-col",style:{background:"var(--bg-primary)"},children:[!i&&a.jsx("div",{onMouseDown:M,onTouchStart:M,className:"shrink-0 drag-handle-row"}),a.jsxs("div",{className:"px-4 py-3",children:[f?a.jsx("div",{className:"text-xs mb-3 px-3 py-2 rounded",style:{color:"var(--error)",background:"color-mix(in srgb, var(--error) 10%, var(--bg-secondary))"},children:f}):a.jsxs(a.Fragment,{children:[a.jsxs("label",{className:"block text-[11px] font-medium mb-1.5",style:{color:"var(--text-muted)"},children:["Input",p&&a.jsx("span",{className:"ml-2 font-normal",children:"Loading..."})]}),a.jsx("textarea",{value:s,onChange:I=>o(I.target.value),spellCheck:!1,className:"w-full rounded-md px-3 py-2 text-xs font-mono leading-relaxed resize-none mb-3",style:{height:i?120:C,background:"var(--bg-secondary)",border:`1px solid ${b?"var(--border)":"#b91c1c"}`,color:"var(--text-primary)"}})]}),a.jsx("button",{onClick:w,disabled:c||p||!!f,className:"w-full py-2 text-sm font-semibold rounded-md border cursor-pointer disabled:opacity-30 disabled:cursor-not-allowed transition-colors flex items-center justify-center gap-2",style:{background:"transparent",borderColor:N,color:N},onMouseEnter:I=>{c||(I.currentTarget.style.background=`color-mix(in srgb, ${N} 10%, transparent)`)},onMouseLeave:I=>{I.currentTarget.style.background="transparent"},children:c?"Starting...":a.jsxs(a.Fragment,{children:[a.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",stroke:"none",children:a.jsx("polygon",{points:"5,3 19,12 5,21"})}),"Execute"]})})]})]}):a.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 border-t",style:{borderColor:"var(--border)"},children:[a.jsx("input",{value:x,onChange:I=>y(I.target.value),onKeyDown:I=>{I.key==="Enter"&&!I.shiftKey&&(I.preventDefault(),_())},disabled:c||p,placeholder:c?"Starting...":"Message...",className:"flex-1 bg-transparent text-sm py-1 disabled:opacity-40 placeholder:text-[var(--text-muted)]",style:{color:"var(--text-primary)"}}),a.jsx("button",{onClick:_,disabled:c||p||!x.trim(),className:"text-xs font-semibold px-3 py-1.5 rounded transition-colors cursor-pointer disabled:opacity-30 disabled:cursor-not-allowed",style:{color:!c&&x.trim()?"var(--accent)":"var(--text-muted)",background:"transparent"},onMouseEnter:I=>{!c&&x.trim()&&(I.currentTarget.style.background="color-mix(in srgb, var(--accent) 10%, transparent)")},onMouseLeave:I=>{I.currentTarget.style.background="transparent"},children:"Send"})]})]});return i?a.jsxs("div",{className:"flex flex-col h-full",children:[a.jsx("div",{className:"shrink-0",style:{height:"40vh"},children:a.jsx($n,{entrypoint:e,traces:[],runId:Ut})}),a.jsx("div",{className:"flex-1 overflow-y-auto flex flex-col min-h-0",children:E})]}):a.jsxs("div",{ref:L,className:"flex h-full",children:[a.jsx("div",{className:"flex-1 min-w-0",children:a.jsx($n,{entrypoint:e,traces:[],runId:Ut})}),a.jsx("div",{onMouseDown:R,onTouchStart:R,className:"shrink-0 drag-handle-col"}),E]})}const Yc={key:"var(--info)",string:"var(--success)",number:"var(--warning)",boolean:"var(--accent)",null:"var(--accent)",punctuation:"var(--text-muted)"};function Xc(e){const t=[],n=/("(?:[^"\\]|\\.)*")\s*:|("(?:[^"\\]|\\.)*")|(-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?)\b|(true|false)\b|(null)\b|([{}[\]:,])/g;let r=0,i;for(;(i=n.exec(e))!==null;){if(i.index>r&&t.push({type:"punctuation",text:e.slice(r,i.index)}),i[1]!==void 0){t.push({type:"key",text:i[1]});const s=e.indexOf(":",i.index+i[1].length);s!==-1&&(s>i.index+i[1].length&&t.push({type:"punctuation",text:e.slice(i.index+i[1].length,s)}),t.push({type:"punctuation",text:":"}),n.lastIndex=s+1)}else i[2]!==void 0?t.push({type:"string",text:i[2]}):i[3]!==void 0?t.push({type:"number",text:i[3]}):i[4]!==void 0?t.push({type:"boolean",text:i[4]}):i[5]!==void 0?t.push({type:"null",text:i[5]}):i[6]!==void 0&&t.push({type:"punctuation",text:i[6]});r=n.lastIndex}return rXc(e),[e]);return a.jsx("pre",{className:t,style:n,children:r.map((i,s)=>a.jsx("span",{style:{color:Yc[i.type]},children:i.text},s))})}const Zc={started:{color:"var(--info)",label:"Started"},running:{color:"var(--warning)",label:"Running"},completed:{color:"var(--success)",label:"Completed"},failed:{color:"var(--error)",label:"Failed"},error:{color:"var(--error)",label:"Error"}},Jc={color:"var(--text-muted)",label:"Unknown"};function Qc(e){if(typeof e!="string")return null;const t=e.trim();if(t.startsWith("{")&&t.endsWith("}")||t.startsWith("[")&&t.endsWith("]"))try{return JSON.stringify(JSON.parse(t),null,2)}catch{return null}return null}const Ki=200;function eu(e){if(typeof e=="string")return e;if(e==null)return String(e);try{return JSON.stringify(e,null,2)}catch{return String(e)}}function tu({value:e}){const[t,n]=S.useState(!1),r=eu(e),i=S.useMemo(()=>Qc(e),[e]),s=i!==null,o=i??r,l=o.length>Ki||o.includes(` -`),u=S.useCallback(()=>n(c=>!c),[]);return l?a.jsxs("div",{children:[t?s?a.jsx(ot,{json:o,className:"font-mono text-[11px] whitespace-pre-wrap break-all",style:{}}):a.jsx("pre",{className:"font-mono text-[11px] whitespace-pre-wrap break-all",style:{color:"var(--text-primary)"},children:o}):a.jsxs("span",{className:"font-mono text-[11px] break-all",style:{color:"var(--text-primary)"},children:[o.slice(0,Ki),"..."]}),a.jsx("button",{onClick:u,className:"text-[11px] cursor-pointer ml-1 px-1",style:{color:"var(--info)"},children:t?"[less]":"[more]"})]}):s?a.jsx(ot,{json:o,className:"font-mono text-[11px] break-all whitespace-pre-wrap",style:{}}):a.jsx("span",{className:"font-mono text-[11px] break-all",style:{color:"var(--text-primary)"},children:o})}function nu({span:e}){const[t,n]=S.useState(!0),[r,i]=S.useState(!1),[s,o]=S.useState("table"),[l,u]=S.useState(!1),c=Zc[e.status.toLowerCase()]??{...Jc,label:e.status},d=S.useMemo(()=>JSON.stringify(e,null,2),[e]),p=S.useCallback(()=>{navigator.clipboard.writeText(d).then(()=>{u(!0),setTimeout(()=>u(!1),1500)})},[d]),m=Object.entries(e.attributes),f=[{label:"Span",value:e.span_id},...e.trace_id?[{label:"Trace",value:e.trace_id}]:[],{label:"Run",value:e.run_id},...e.parent_span_id?[{label:"Parent",value:e.parent_span_id}]:[]];return a.jsxs("div",{className:"flex flex-col h-full text-xs leading-normal",children:[a.jsxs("div",{className:"px-2 border-b flex items-center gap-1 shrink-0",style:{borderColor:"var(--border)",background:"var(--bg-secondary)",height:"32px"},children:[a.jsx("button",{onClick:()=>o("table"),className:"px-2.5 h-6 text-[11px] font-semibold rounded transition-colors cursor-pointer inline-flex items-center",style:{color:s==="table"?"var(--accent)":"var(--text-muted)",background:s==="table"?"color-mix(in srgb, var(--accent) 10%, transparent)":"transparent"},onMouseEnter:g=>{s!=="table"&&(g.currentTarget.style.color="var(--text-primary)")},onMouseLeave:g=>{s!=="table"&&(g.currentTarget.style.color="var(--text-muted)")},children:"Table"}),a.jsx("button",{onClick:()=>o("json"),className:"px-2.5 h-6 text-[11px] font-semibold rounded transition-colors cursor-pointer inline-flex items-center",style:{color:s==="json"?"var(--accent)":"var(--text-muted)",background:s==="json"?"color-mix(in srgb, var(--accent) 10%, transparent)":"transparent"},onMouseEnter:g=>{s!=="json"&&(g.currentTarget.style.color="var(--text-primary)")},onMouseLeave:g=>{s!=="json"&&(g.currentTarget.style.color="var(--text-muted)")},children:"JSON"}),a.jsxs("span",{className:"ml-auto shrink-0 inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-[11px] font-bold uppercase tracking-wider",style:{background:`color-mix(in srgb, ${c.color} 15%, var(--bg-secondary))`,color:c.color},children:[a.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full",style:{background:c.color}}),c.label]})]}),a.jsx("div",{className:"overflow-y-auto flex-1 p-0.5 pr-0 pt-0 mr-0.5 mt-0.5",children:s==="table"?a.jsxs(a.Fragment,{children:[m.length>0&&a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"px-2 py-1 text-[11px] uppercase font-bold tracking-wider border-b cursor-pointer flex items-center",style:{color:"var(--success)",borderColor:"var(--border)",background:"var(--bg-secondary)"},onClick:()=>n(g=>!g),children:[a.jsxs("span",{className:"flex-1",children:["Attributes (",m.length,")"]}),a.jsx("span",{style:{color:"var(--text-muted)",transform:t?"rotate(0deg)":"rotate(-90deg)"},children:"▾"})]}),t&&m.map(([g,x],y)=>a.jsxs("div",{className:"flex gap-2 px-2 py-1 items-start border-b",style:{borderColor:"var(--border)",background:y%2===0?"var(--bg-primary)":"var(--bg-secondary)"},children:[a.jsx("span",{className:"font-mono font-semibold shrink-0 pt-px truncate text-[11px]",style:{color:"var(--info)",width:"35%"},title:g,children:g}),a.jsx("span",{className:"flex-1 min-w-0",children:a.jsx(tu,{value:x})})]},g))]}),a.jsxs("div",{className:"px-2 py-1 text-[11px] uppercase font-bold tracking-wider border-b cursor-pointer flex items-center",style:{color:"var(--success)",borderColor:"var(--border)",background:"var(--bg-secondary)"},onClick:()=>i(g=>!g),children:[a.jsxs("span",{className:"flex-1",children:["Identifiers (",f.length,")"]}),a.jsx("span",{style:{color:"var(--text-muted)",transform:r?"rotate(0deg)":"rotate(-90deg)"},children:"▾"})]}),r&&f.map((g,x)=>a.jsxs("div",{className:"flex gap-2 px-2 py-1 items-start border-b",style:{borderColor:"var(--border)",background:x%2===0?"var(--bg-primary)":"var(--bg-secondary)"},children:[a.jsx("span",{className:"font-mono font-semibold shrink-0 pt-px truncate text-[11px]",style:{color:"var(--info)",width:"35%"},title:g.label,children:g.label}),a.jsx("span",{className:"flex-1 min-w-0",children:a.jsx("span",{className:"font-mono text-[11px] break-all",style:{color:"var(--text-primary)"},children:g.value})})]},g.label))]}):a.jsxs("div",{className:"relative",children:[a.jsx("button",{onClick:p,className:"absolute top-1 right-1 z-10 text-[11px] cursor-pointer px-2 py-1 rounded transition-colors",style:{color:l?"var(--success)":"var(--text-muted)",background:"var(--bg-secondary)",border:"1px solid var(--border)"},onMouseEnter:g=>{l||(g.currentTarget.style.color="var(--text-primary)")},onMouseLeave:g=>{g.currentTarget.style.color=l?"var(--success)":"var(--text-muted)"},children:l?"Copied!":"Copy"}),a.jsx(ot,{json:d,className:"font-mono text-[11px] whitespace-pre-wrap p-2",style:{}})]})})]})}function ru(e){const t=[];function n(r,i){t.push({span:r.span,depth:i});for(const s of r.children)n(s,i+1)}for(const r of e)n(r,0);return t}function iu({tree:e,selectedSpan:t,onSelect:n}){const r=S.useMemo(()=>ru(e),[e]),{globalStart:i,totalDuration:s}=S.useMemo(()=>{if(r.length===0)return{globalStart:0,totalDuration:1};let o=1/0,l=-1/0;for(const{span:u}of r){const c=new Date(u.timestamp).getTime();o=Math.min(o,c),l=Math.max(l,c+(u.duration_ms??0))}return{globalStart:o,totalDuration:Math.max(l-o,1)}},[r]);return r.length===0?null:a.jsx(a.Fragment,{children:r.map(({span:o,depth:l})=>{var x;const u=new Date(o.timestamp).getTime()-i,c=o.duration_ms??0,d=u/s*100,p=Math.max(c/s*100,.3),m=Cs[o.status.toLowerCase()]??"var(--text-muted)",f=o.span_id===(t==null?void 0:t.span_id),g=(x=o.attributes)==null?void 0:x["openinference.span.kind"];return a.jsxs("button",{"data-span-id":o.span_id,onClick:()=>n(o),className:"w-full text-left text-xs leading-normal py-1 flex items-center transition-colors",style:{background:f?"color-mix(in srgb, var(--accent) 10%, var(--bg-primary))":void 0,borderLeft:f?"2px solid var(--accent)":"2px solid transparent"},onMouseEnter:y=>{f||(y.currentTarget.style.background="var(--bg-hover)")},onMouseLeave:y=>{f||(y.currentTarget.style.background="")},children:[a.jsxs("div",{className:"shrink-0 flex items-center gap-1 overflow-hidden",style:{width:"35%",minWidth:"80px",paddingLeft:`${l*12+4}px`},children:[a.jsx("span",{className:"shrink-0 flex items-center justify-center w-3.5 h-3.5",children:a.jsx(As,{kind:g,statusColor:m})}),a.jsx("span",{className:"text-[var(--text-primary)] truncate",children:o.span_name})]}),a.jsx("div",{className:"flex-1 relative h-[14px] mx-1 rounded-sm",style:{background:"var(--bg-secondary)"},children:a.jsx("div",{className:"absolute rounded-sm",style:{left:`${d}%`,width:`${p}%`,top:"2px",bottom:"2px",background:m,opacity:.8,minWidth:"2px"}})}),a.jsx("span",{className:"shrink-0 text-[10px] tabular-nums pr-2",style:{width:"52px",textAlign:"right",color:"var(--text-muted)"},children:Ms(o.duration_ms)})]},o.span_id)})})}const Cs={started:"var(--info)",running:"var(--warning)",completed:"var(--success)",failed:"var(--error)",error:"var(--error)"};function As({kind:e,statusColor:t}){const n=t,r=14,i={width:r,height:r,viewBox:"0 0 16 16",fill:"none",stroke:n,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"};switch(e){case"LLM":return a.jsx("svg",{...i,children:a.jsx("path",{d:"M8 2L9 5L12 4L10 7L14 8L10 9L12 12L9 11L8 14L7 11L4 12L6 9L2 8L6 7L4 4L7 5Z",fill:n,stroke:"none"})});case"TOOL":return a.jsx("svg",{...i,children:a.jsx("path",{d:"M10.5 2.5a3.5 3.5 0 0 0-3.17 4.93L3.5 11.27a1 1 0 0 0 0 1.41l.82.82a1 1 0 0 0 1.41 0l3.84-3.83A3.5 3.5 0 1 0 10.5 2.5z"})});case"AGENT":return a.jsxs("svg",{...i,children:[a.jsx("rect",{x:"3",y:"5",width:"10",height:"8",rx:"2"}),a.jsx("circle",{cx:"6",cy:"9",r:"1",fill:n,stroke:"none"}),a.jsx("circle",{cx:"10",cy:"9",r:"1",fill:n,stroke:"none"}),a.jsx("path",{d:"M8 2v3"}),a.jsx("path",{d:"M6 2h4"})]});case"CHAIN":return a.jsxs("svg",{...i,children:[a.jsx("path",{d:"M6.5 9.5L9.5 6.5"}),a.jsx("path",{d:"M4.5 8.5l-1 1a2 2 0 0 0 2.83 2.83l1-1"}),a.jsx("path",{d:"M11.5 7.5l1-1a2 2 0 0 0-2.83-2.83l-1 1"})]});case"RETRIEVER":return a.jsxs("svg",{...i,children:[a.jsx("circle",{cx:"7",cy:"7",r:"4"}),a.jsx("path",{d:"M10 10l3.5 3.5"})]});case"EMBEDDING":return a.jsxs("svg",{...i,children:[a.jsx("rect",{x:"2",y:"2",width:"4",height:"4",rx:"0.5"}),a.jsx("rect",{x:"10",y:"2",width:"4",height:"4",rx:"0.5"}),a.jsx("rect",{x:"2",y:"10",width:"4",height:"4",rx:"0.5"}),a.jsx("rect",{x:"10",y:"10",width:"4",height:"4",rx:"0.5"})]});default:return a.jsx("span",{className:"shrink-0 w-2 h-2 rounded-full",style:{background:t}})}}function ou(e){const t=new Map(e.map(o=>[o.span_id,o])),n=new Map;for(const o of e)if(o.parent_span_id){const l=n.get(o.parent_span_id)??[];l.push(o),n.set(o.parent_span_id,l)}const r=e.filter(o=>o.parent_span_id===null||!t.has(o.parent_span_id));function i(o){const l=(n.get(o.span_id)??[]).sort((u,c)=>u.timestamp.localeCompare(c.timestamp));return{span:o,children:l.map(i)}}return r.sort((o,l)=>o.timestamp.localeCompare(l.timestamp)).map(i).flatMap(o=>o.span.span_name==="root"?o.children:[o])}function Ms(e){return e==null?"":e<1e3?`${e.toFixed(0)}ms`:`${(e/1e3).toFixed(2)}s`}function Is(e){return e.map(t=>{const{span:n}=t;return t.children.length>0?{name:n.span_name,children:Is(t.children)}:{name:n.span_name}})}function Lr({traces:e}){const[t,n]=S.useState(null),[r,i]=S.useState(new Set),[s,o]=S.useState(()=>{const O=localStorage.getItem("traceTreeSplitWidth");return O?parseFloat(O):50}),[l,u]=S.useState(!1),[c,d]=S.useState(!1),[p,m]=S.useState(()=>localStorage.getItem("traceViewMode")||"tree"),f=ou(e),g=S.useMemo(()=>JSON.stringify(Is(f),null,2),[e]),x=S.useCallback(()=>{navigator.clipboard.writeText(g).then(()=>{d(!0),setTimeout(()=>d(!1),1500)})},[g]),y=ke(O=>O.focusedSpan),b=ke(O=>O.setFocusedSpan),[k,C]=S.useState(null),j=S.useRef(null),L=S.useCallback(O=>{i(w=>{const _=new Set(w);return _.has(O)?_.delete(O):_.add(O),_})},[]),T=S.useRef(null);S.useEffect(()=>{const O=f.length>0?f[0].span.span_id:null,w=T.current;if(T.current=O,O&&O!==w)n(f[0].span);else if(t===null)f.length>0&&n(f[0].span);else{const _=e.find(M=>M.span_id===t.span_id);_&&_!==t&&n(_)}},[e]),S.useEffect(()=>{if(!y)return;const w=e.filter(_=>_.span_name===y.name).sort((_,M)=>_.timestamp.localeCompare(M.timestamp))[y.index];if(w){n(w),C(w.span_id);const _=new Map(e.map(M=>[M.span_id,M.parent_span_id]));i(M=>{const R=new Set(M);let D=w.parent_span_id;for(;D;)R.delete(D),D=_.get(D)??null;return R})}b(null)},[y,e,b]),S.useEffect(()=>{if(!k)return;const O=k;C(null),requestAnimationFrame(()=>{const w=j.current,_=w==null?void 0:w.querySelector(`[data-span-id="${O}"]`);w&&_&&_.scrollIntoView({block:"center",behavior:"smooth"})})},[k]),S.useEffect(()=>{if(!l)return;const O=_=>{const M=document.querySelector(".trace-tree-container");if(!M)return;const R=M.getBoundingClientRect(),D=(_.clientX-R.left)/R.width*100,N=Math.max(20,Math.min(80,D));o(N),localStorage.setItem("traceTreeSplitWidth",String(N))},w=()=>{u(!1)};return window.addEventListener("mousemove",O),window.addEventListener("mouseup",w),()=>{window.removeEventListener("mousemove",O),window.removeEventListener("mouseup",w)}},[l]);const B=O=>{O.preventDefault(),u(!0)};return a.jsxs("div",{className:"flex h-full trace-tree-container",style:{cursor:l?"col-resize":void 0},children:[a.jsxs("div",{className:"flex flex-col",style:{width:`${s}%`},children:[e.length>0&&a.jsxs("div",{className:"flex items-center gap-1 px-2 border-b shrink-0",style:{borderColor:"var(--border)",background:"var(--bg-secondary)",height:"32px"},children:[a.jsx("button",{onClick:()=>{m("tree"),localStorage.setItem("traceViewMode","tree")},className:"px-2.5 h-6 text-[11px] font-semibold rounded transition-colors cursor-pointer inline-flex items-center",style:{color:p==="tree"?"var(--accent)":"var(--text-muted)",background:p==="tree"?"color-mix(in srgb, var(--accent) 10%, transparent)":"transparent"},onMouseEnter:O=>{p!=="tree"&&(O.currentTarget.style.color="var(--text-primary)")},onMouseLeave:O=>{p!=="tree"&&(O.currentTarget.style.color="var(--text-muted)")},children:"Tree"}),a.jsx("button",{onClick:()=>{m("timeline"),localStorage.setItem("traceViewMode","timeline")},className:"px-2.5 h-6 text-[11px] font-semibold rounded transition-colors cursor-pointer inline-flex items-center",style:{color:p==="timeline"?"var(--accent)":"var(--text-muted)",background:p==="timeline"?"color-mix(in srgb, var(--accent) 10%, transparent)":"transparent"},onMouseEnter:O=>{p!=="timeline"&&(O.currentTarget.style.color="var(--text-primary)")},onMouseLeave:O=>{p!=="timeline"&&(O.currentTarget.style.color="var(--text-muted)")},children:"Timeline"}),a.jsx("button",{onClick:()=>{m("json"),localStorage.setItem("traceViewMode","json")},className:"px-2.5 h-6 text-[11px] font-semibold rounded transition-colors cursor-pointer inline-flex items-center",style:{color:p==="json"?"var(--accent)":"var(--text-muted)",background:p==="json"?"color-mix(in srgb, var(--accent) 10%, transparent)":"transparent"},onMouseEnter:O=>{p!=="json"&&(O.currentTarget.style.color="var(--text-primary)")},onMouseLeave:O=>{p!=="json"&&(O.currentTarget.style.color="var(--text-muted)")},children:"JSON"})]}),a.jsx("div",{ref:j,className:"overflow-y-auto flex-1 p-0.5 pr-0 pt-0 mr-0.5 mt-0.5",children:f.length===0?a.jsx("div",{className:"flex items-center justify-center h-full",children:a.jsx("p",{className:"text-[var(--text-muted)] text-sm",children:"No traces yet"})}):p==="tree"?f.map((O,w)=>a.jsx(Rs,{node:O,depth:0,selectedId:(t==null?void 0:t.span_id)??null,onSelect:n,isLast:w===f.length-1,collapsedIds:r,toggleExpanded:L},O.span.span_id)):p==="timeline"?a.jsx(iu,{tree:f,selectedSpan:t,onSelect:n}):a.jsxs("div",{className:"relative",children:[a.jsx("button",{onClick:x,className:"absolute top-1 right-1 z-10 text-[11px] cursor-pointer px-2 py-1 rounded transition-colors",style:{color:c?"var(--success)":"var(--text-muted)",background:"var(--bg-secondary)",border:"1px solid var(--border)"},onMouseEnter:O=>{c||(O.currentTarget.style.color="var(--text-primary)")},onMouseLeave:O=>{O.currentTarget.style.color=c?"var(--success)":"var(--text-muted)"},children:c?"Copied!":"Copy"}),a.jsx(ot,{json:g,className:"font-mono text-[11px] whitespace-pre-wrap p-2",style:{}})]})})]}),a.jsx("div",{onMouseDown:B,className:"shrink-0 drag-handle-col",style:l?{background:"var(--accent)"}:void 0}),a.jsx("div",{className:"flex-1 overflow-hidden",children:t?a.jsx(nu,{span:t}):a.jsx("div",{className:"flex items-center justify-center h-full",children:a.jsx("p",{className:"text-[var(--text-muted)] text-sm",children:"Select a span to view details"})})})]})}function Rs({node:e,depth:t,selectedId:n,onSelect:r,isLast:i,collapsedIds:s,toggleExpanded:o}){var x;const{span:l}=e,u=!s.has(l.span_id),c=Cs[l.status.toLowerCase()]??"var(--text-muted)",d=Ms(l.duration_ms),p=l.span_id===n,m=e.children.length>0,f=t*20,g=(x=l.attributes)==null?void 0:x["openinference.span.kind"];return a.jsxs("div",{className:"relative",children:[t>0&&a.jsx("div",{className:"absolute top-0 z-10 pointer-events-none",style:{left:`${f-10}px`,width:"1px",height:i?"16px":"100%",background:"var(--border)"}}),a.jsxs("button",{"data-span-id":l.span_id,onClick:()=>r(l),className:"w-full text-left text-xs leading-normal py-1.5 pr-2 flex items-center gap-1.5 transition-colors relative",style:{paddingLeft:`${f+4}px`,background:p?"color-mix(in srgb, var(--accent) 15%, var(--bg-primary))":void 0,borderLeft:p?"3px solid var(--accent)":"3px solid transparent"},onMouseEnter:y=>{p||(y.currentTarget.style.background="var(--bg-hover)")},onMouseLeave:y=>{p||(y.currentTarget.style.background="")},children:[t>0&&a.jsx("div",{className:"absolute z-10 pointer-events-none",style:{left:`${f-10}px`,top:"50%",width:"10px",height:"1px",background:"var(--border)"}}),m?a.jsx("span",{onClick:y=>{y.stopPropagation(),o(l.span_id)},className:"shrink-0 w-5 h-5 flex items-center justify-center cursor-pointer rounded hover:bg-[var(--bg-hover)]",style:{color:"var(--text-muted)"},children:a.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",style:{transform:u?"rotate(90deg)":"rotate(0deg)"},children:a.jsx("path",{d:"M3 1.5L7 5L3 8.5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"})})}):a.jsx("span",{className:"shrink-0 w-4"}),a.jsx("span",{className:"shrink-0 flex items-center justify-center w-4 h-4",children:a.jsx(As,{kind:g,statusColor:c})}),a.jsx("span",{className:"text-[var(--text-primary)] truncate min-w-0 flex-1",children:l.span_name}),d&&a.jsx("span",{className:"text-[var(--text-muted)] shrink-0 ml-auto pl-2 tabular-nums",children:d})]}),u&&e.children.map((y,b)=>a.jsx(Rs,{node:y,depth:t+1,selectedId:n,onSelect:r,isLast:b===e.children.length-1,collapsedIds:s,toggleExpanded:o},y.span.span_id))]})}const su={DEBUG:{color:"var(--text-muted)",bg:"color-mix(in srgb, var(--text-muted) 15%, var(--bg-secondary))",border:"var(--text-muted)"},INFO:{color:"var(--info)",bg:"color-mix(in srgb, var(--info) 15%, var(--bg-secondary))",border:"var(--info)"},WARN:{color:"var(--warning)",bg:"color-mix(in srgb, var(--warning) 15%, var(--bg-secondary))",border:"var(--warning)"},WARNING:{color:"var(--warning)",bg:"color-mix(in srgb, var(--warning) 15%, var(--bg-secondary))",border:"var(--warning)"},ERROR:{color:"var(--error)",bg:"color-mix(in srgb, var(--error) 15%, var(--bg-secondary))",border:"var(--error)"},CRITICAL:{color:"var(--error)",bg:"color-mix(in srgb, var(--error) 15%, var(--bg-secondary))",border:"var(--error)"}},au={color:"var(--text-muted)",bg:"transparent"};function Gi({logs:e}){const t=S.useRef(null),n=S.useRef(null),[r,i]=S.useState(!1);S.useEffect(()=>{var o;(o=n.current)==null||o.scrollIntoView({behavior:"smooth"})},[e.length]);const s=()=>{const o=t.current;o&&i(o.scrollTop>100)};return e.length===0?a.jsx("div",{className:"h-full flex items-center justify-center",children:a.jsx("p",{className:"text-[var(--text-muted)] text-sm",children:"No logs yet"})}):a.jsxs("div",{className:"h-full relative",children:[a.jsxs("div",{ref:t,onScroll:s,className:"h-full overflow-y-auto font-mono text-xs leading-normal",children:[e.map((o,l)=>{const u=new Date(o.timestamp).toLocaleTimeString(void 0,{hour12:!1}),c=o.level.toUpperCase(),d=c.slice(0,4),p=su[c]??au,m=l%2===0;return a.jsxs("div",{className:"flex gap-3 px-3 py-1.5",style:{background:m?"var(--bg-primary)":"var(--bg-secondary)"},children:[a.jsx("span",{className:"text-[var(--text-muted)] shrink-0",children:u}),a.jsx("span",{className:"shrink-0 self-start px-1.5 py-0.5 rounded text-[10px] font-semibold leading-none inline-flex items-center",style:{color:p.color,background:p.bg},children:d}),a.jsx("span",{className:"text-[var(--text-primary)] whitespace-pre-wrap break-all",children:o.message})]},l)}),a.jsx("div",{ref:n})]}),r&&a.jsx("button",{onClick:()=>{var o;return(o=t.current)==null?void 0:o.scrollTo({top:0,behavior:"smooth"})},className:"absolute top-2 right-3 w-6 h-6 flex items-center justify-center rounded-full cursor-pointer transition-opacity opacity-70 hover:opacity-100",style:{background:"var(--bg-tertiary)",color:"var(--text-primary)"},title:"Scroll to top",children:a.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:a.jsx("polyline",{points:"18 15 12 9 6 15"})})})]})}const lu={started:{color:"var(--accent)",label:"started"},updated:{color:"var(--info)",label:"updated"},completed:{color:"var(--success)",label:"completed"},faulted:{color:"var(--error)",label:"faulted"}},qi={color:"var(--text-muted)",label:""};function An({events:e,runStatus:t}){const n=S.useRef(null),r=S.useRef(!0),[i,s]=S.useState(null),o=()=>{const l=n.current;l&&(r.current=l.scrollHeight-l.scrollTop-l.clientHeight<40)};return S.useEffect(()=>{r.current&&n.current&&(n.current.scrollTop=n.current.scrollHeight)}),e.length===0?a.jsx("div",{className:"flex-1 flex items-center justify-center h-full",children:a.jsx("p",{className:"text-xs",style:{color:"var(--text-muted)"},children:t==="running"?"Waiting for events...":"No events yet"})}):a.jsx("div",{ref:n,onScroll:o,className:"h-full overflow-y-auto font-mono text-xs leading-normal",children:e.map((l,u)=>{const c=new Date(l.timestamp).toLocaleTimeString(void 0,{hour12:!1}),d=l.payload&&Object.keys(l.payload).length>0,p=i===u,m=l.phase?lu[l.phase]??qi:qi;return a.jsxs("div",{children:[a.jsxs("div",{onClick:()=>{d&&s(p?null:u)},className:"flex items-center gap-2 px-3 py-1.5",style:{background:u%2===0?"var(--bg-primary)":"var(--bg-secondary)",cursor:d?"pointer":"default"},children:[a.jsx("span",{className:"shrink-0",style:{color:"var(--text-muted)"},children:c}),a.jsx("span",{className:"shrink-0",style:{color:m.color},children:"●"}),a.jsx("span",{className:"flex-1 truncate",style:{color:"var(--text-primary)"},children:l.node_name}),m.label&&a.jsx("span",{className:"shrink-0 text-[10px]",style:{color:"var(--text-muted)"},children:m.label}),d&&a.jsx("span",{className:"shrink-0 text-[9px] transition-transform",style:{color:"var(--text-muted)",transform:p?"rotate(90deg)":"rotate(0deg)"},children:"▸"})]}),p&&d&&a.jsx("div",{className:"px-3 py-2 border-t border-b",style:{borderColor:"var(--border)",background:"color-mix(in srgb, var(--bg-secondary) 80%, var(--bg-primary))"},children:a.jsx(ot,{json:JSON.stringify(l.payload,null,2),className:"text-[11px] font-mono whitespace-pre-wrap break-words"})})]},u)})})}function _t({title:e,copyText:t,trailing:n,children:r}){const[i,s]=S.useState(!1),o=S.useCallback(()=>{t&&navigator.clipboard.writeText(t).then(()=>{s(!0),setTimeout(()=>s(!1),1500)})},[t]);return a.jsxs("div",{className:"overflow-hidden",style:{border:"1px solid var(--border)"},children:[a.jsxs("div",{className:"px-3 py-2 flex items-center gap-2",style:{background:"var(--bg-secondary)"},children:[a.jsx("span",{className:"text-[11px] font-semibold",style:{color:"var(--text-primary)"},children:e}),n,t&&a.jsx("button",{onClick:o,className:`${n?"":"ml-auto "}text-[10px] cursor-pointer px-1.5 py-0.5 rounded transition-colors`,style:{color:i?"var(--success)":"var(--text-muted)",background:"var(--bg-tertiary)",border:"none"},onMouseEnter:l=>{i||(l.currentTarget.style.color="var(--text-primary)")},onMouseLeave:l=>{l.currentTarget.style.color=i?"var(--success)":"var(--text-muted)"},children:i?"Copied":"Copy"})]}),r]})}function Vi({runId:e,status:t,ws:n,breakpointNode:r}){const i=t==="suspended",s=o=>{const l=ke.getState().breakpoints[e]??{};n.setBreakpoints(e,Object.keys(l)),o==="step"?n.debugStep(e):o==="continue"?n.debugContinue(e):n.debugStop(e)};return a.jsxs("div",{className:"flex items-center gap-1 px-4 h-10 border-b shrink-0",style:{borderColor:"var(--border)",background:"var(--bg-secondary)"},children:[a.jsx("span",{className:"text-[11px] font-semibold mr-1",style:{color:"var(--text-muted)"},children:"Debug"}),a.jsx(dr,{label:"Step",onClick:()=>s("step"),disabled:!i,color:"var(--info)",active:i}),a.jsx(dr,{label:"Continue",onClick:()=>s("continue"),disabled:!i,color:"var(--success)",active:i}),a.jsx(dr,{label:"Stop",onClick:()=>s("stop"),disabled:!i,color:"var(--error)",active:i}),a.jsx("span",{className:"text-[11px] ml-auto truncate",style:{color:i?"var(--accent)":"var(--text-muted)"},children:i?r?`Paused at ${r}`:"Paused":t})]})}function dr({label:e,onClick:t,disabled:n,color:r,active:i}){return a.jsx("button",{onClick:t,disabled:n,className:"px-3 py-1 h-7 text-[11px] font-semibold rounded transition-colors cursor-pointer disabled:opacity-30 disabled:cursor-not-allowed",style:{color:i?r:"var(--text-muted)",background:i?`color-mix(in srgb, ${r} 10%, transparent)`:"transparent"},onMouseEnter:s=>{n||(s.currentTarget.style.background=`color-mix(in srgb, ${r} 20%, transparent)`)},onMouseLeave:s=>{s.currentTarget.style.background=i?`color-mix(in srgb, ${r} 10%, transparent)`:"transparent"},children:e})}const Yi=S.lazy(()=>Ss(()=>import("./ChatPanel-C97Mws6P.js"),__vite__mapDeps([2,1,3,4]))),cu=[],uu=[],du=[],pu=[];function fu({run:e,ws:t,isMobile:n}){const r=e.mode==="chat",[i,s]=S.useState(280),[o,l]=S.useState(()=>{const D=localStorage.getItem("chatPanelWidth");return D?parseInt(D,10):380}),[u,c]=S.useState("primary"),[d,p]=S.useState(r?"primary":"traces"),m=S.useRef(null),f=S.useRef(null),g=S.useRef(!1),x=ke(D=>D.traces[e.id]||cu),y=ke(D=>D.logs[e.id]||uu),b=ke(D=>D.chatMessages[e.id]||du),k=ke(D=>D.stateEvents[e.id]||pu),C=ke(D=>D.breakpoints[e.id]);S.useEffect(()=>{t.setBreakpoints(e.id,C?Object.keys(C):[])},[e.id]);const j=S.useCallback(D=>{t.setBreakpoints(e.id,D)},[e.id,t]),L=S.useCallback(D=>{D.preventDefault(),g.current=!0;const N="touches"in D?D.touches[0].clientY:D.clientY,E=i,I=H=>{if(!g.current)return;const V=m.current;if(!V)return;const h="touches"in H?H.touches[0].clientY:H.clientY,F=V.clientHeight-100,$=Math.max(80,Math.min(F,E+(h-N)));s($)},G=()=>{g.current=!1,document.removeEventListener("mousemove",I),document.removeEventListener("mouseup",G),document.removeEventListener("touchmove",I),document.removeEventListener("touchend",G),document.body.style.cursor="",document.body.style.userSelect=""};document.body.style.cursor="row-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",I),document.addEventListener("mouseup",G),document.addEventListener("touchmove",I,{passive:!1}),document.addEventListener("touchend",G)},[i]),T=S.useCallback(D=>{D.preventDefault();const N="touches"in D?D.touches[0].clientX:D.clientX,E=o,I=H=>{const V=f.current;if(!V)return;const h="touches"in H?H.touches[0].clientX:H.clientX,F=V.clientWidth-300,$=Math.max(280,Math.min(F,E+(N-h)));l($)},G=()=>{document.removeEventListener("mousemove",I),document.removeEventListener("mouseup",G),document.removeEventListener("touchmove",I),document.removeEventListener("touchend",G),document.body.style.cursor="",document.body.style.userSelect="",localStorage.setItem("chatPanelWidth",String(o))};document.body.style.cursor="col-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",I),document.addEventListener("mouseup",G),document.addEventListener("touchmove",I,{passive:!1}),document.addEventListener("touchend",G)},[o]),B=r?"Chat":"Events",O=r?"var(--accent)":"var(--success)",w=D=>D==="primary"?O:D==="events"?"var(--success)":"var(--accent)",_=ke(D=>D.activeInterrupt[e.id]??null),M=e.status==="running"?a.jsx("span",{className:"ml-auto text-[11px] px-2 py-0.5 rounded-full shrink-0",style:{background:"color-mix(in srgb, var(--warning) 15%, var(--bg-secondary))",color:"var(--warning)"},children:r?"Thinking...":"Running..."}):r&&e.status==="suspended"&&_?a.jsx("span",{className:"ml-auto text-[11px] px-2 py-0.5 rounded-full shrink-0",style:{background:"color-mix(in srgb, var(--warning) 15%, var(--bg-secondary))",color:"var(--warning)"},children:"Action Required"}):null;if(n){const D=[{id:"traces",label:"Traces",count:x.length},{id:"primary",label:B},...r?[{id:"events",label:"Events",count:k.length}]:[],{id:"io",label:"I/O"},{id:"logs",label:"Logs",count:y.length}];return a.jsxs("div",{className:"flex flex-col h-full",children:[(e.mode==="debug"||e.status==="suspended"&&!_||C&&Object.keys(C).length>0)&&a.jsx(Vi,{runId:e.id,status:e.status,ws:t,breakpointNode:e.breakpoint_node}),a.jsx("div",{className:"shrink-0",style:{height:"40vh"},children:a.jsx($n,{entrypoint:e.entrypoint,traces:x,runId:e.id,breakpointNode:e.breakpoint_node,breakpointNextNodes:e.breakpoint_next_nodes,onBreakpointChange:j})}),a.jsxs("div",{className:"flex items-center gap-1 px-2 h-10 border-y shrink-0",style:{borderColor:"var(--border)",background:"var(--bg-secondary)"},children:[D.map(N=>a.jsxs("button",{onClick:()=>p(N.id),className:"px-2.5 py-1 h-7 text-xs font-semibold rounded transition-colors cursor-pointer",style:{color:d===N.id?w(N.id):"var(--text-muted)",background:d===N.id?`color-mix(in srgb, ${w(N.id)} 10%, transparent)`:"transparent"},children:[N.label,N.count!==void 0&&N.count>0&&a.jsx("span",{className:"ml-1 font-normal",style:{color:"var(--text-muted)"},children:N.count})]},N.id)),M]}),a.jsxs("div",{className:"flex-1 overflow-hidden",children:[d==="traces"&&a.jsx(Lr,{traces:x}),d==="primary"&&(r?a.jsx(S.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center h-full",style:{color:"var(--text-muted)"},children:a.jsx("span",{className:"text-xs",children:"Loading chat..."})}),children:a.jsx(Yi,{messages:b,runId:e.id,runStatus:e.status,ws:t})}):a.jsx(An,{events:k,runStatus:e.status})),d==="events"&&a.jsx(An,{events:k,runStatus:e.status}),d==="io"&&a.jsx(Xi,{run:e}),d==="logs"&&a.jsx(Gi,{logs:y})]})]})}const R=[{id:"primary",label:B},...r?[{id:"events",label:"Events",count:k.length}]:[],{id:"io",label:"I/O"},{id:"logs",label:"Logs",count:y.length}];return a.jsxs("div",{ref:f,className:"flex h-full",children:[a.jsxs("div",{ref:m,className:"flex flex-col flex-1 min-w-0",children:[(e.mode==="debug"||e.status==="suspended"&&!_||C&&Object.keys(C).length>0)&&a.jsx(Vi,{runId:e.id,status:e.status,ws:t,breakpointNode:e.breakpoint_node}),a.jsx("div",{className:"shrink-0 overflow-hidden",style:{height:i},children:a.jsx($n,{entrypoint:e.entrypoint,traces:x,runId:e.id,breakpointNode:e.breakpoint_node,breakpointNextNodes:e.breakpoint_next_nodes,onBreakpointChange:j})}),a.jsx("div",{onMouseDown:L,onTouchStart:L,className:"shrink-0 drag-handle-row"}),a.jsx("div",{className:"flex-1 overflow-hidden",children:a.jsx(Lr,{traces:x})})]}),a.jsx("div",{onMouseDown:T,onTouchStart:T,className:"shrink-0 drag-handle-col"}),a.jsxs("div",{className:"shrink-0 flex flex-col",style:{width:o,background:"var(--bg-primary)"},children:[a.jsxs("div",{className:"flex items-center gap-1 px-2 h-10 border-b shrink-0",style:{borderColor:"var(--border)",background:"var(--bg-secondary)"},children:[R.map(D=>a.jsxs("button",{onClick:()=>c(D.id),className:"px-2.5 py-1 h-7 text-xs font-semibold rounded transition-colors cursor-pointer",style:{color:u===D.id?w(D.id):"var(--text-muted)",background:u===D.id?`color-mix(in srgb, ${w(D.id)} 10%, transparent)`:"transparent"},onMouseEnter:N=>{u!==D.id&&(N.currentTarget.style.color="var(--text-primary)")},onMouseLeave:N=>{u!==D.id&&(N.currentTarget.style.color="var(--text-muted)")},children:[D.label,D.count!==void 0&&D.count>0&&a.jsx("span",{className:"ml-1 font-normal",style:{color:"var(--text-muted)"},children:D.count})]},D.id)),M]}),a.jsxs("div",{className:"flex-1 overflow-hidden",children:[u==="primary"&&(r?a.jsx(S.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center h-full",style:{color:"var(--text-muted)"},children:a.jsx("span",{className:"text-xs",children:"Loading chat..."})}),children:a.jsx(Yi,{messages:b,runId:e.id,runStatus:e.status,ws:t})}):a.jsx(An,{events:k,runStatus:e.status})),u==="events"&&a.jsx(An,{events:k,runStatus:e.status}),u==="io"&&a.jsx(Xi,{run:e}),u==="logs"&&a.jsx(Gi,{logs:y})]})]})]})}function Xi({run:e}){return a.jsxs("div",{className:"p-2 overflow-y-auto h-full space-y-1.5",children:[a.jsx(_t,{title:"Input",copyText:JSON.stringify(e.input_data,null,2),children:a.jsx(ot,{json:JSON.stringify(e.input_data,null,2),className:"px-3 py-2 text-xs font-mono whitespace-pre-wrap break-words"})}),e.output_data&&a.jsx(_t,{title:"Output",copyText:typeof e.output_data=="string"?e.output_data:JSON.stringify(e.output_data,null,2),children:a.jsx(ot,{json:typeof e.output_data=="string"?e.output_data:JSON.stringify(e.output_data,null,2),className:"px-3 py-2 text-xs font-mono whitespace-pre-wrap break-words"})}),e.error&&a.jsxs("div",{className:"overflow-hidden",style:{border:"1px solid color-mix(in srgb, var(--error) 40%, var(--border))"},children:[a.jsxs("div",{className:"px-3 py-2 text-xs font-semibold flex items-center gap-2",style:{background:"color-mix(in srgb, var(--error) 15%, var(--bg-secondary))",color:"var(--error)"},children:[a.jsx("span",{children:"Error"}),a.jsx("span",{className:"px-1.5 py-0.5 rounded text-[10px] font-mono",style:{background:"color-mix(in srgb, var(--error) 20%, var(--bg-secondary))"},children:e.error.code}),a.jsx("span",{className:"px-1.5 py-0.5 rounded text-[10px] font-mono",style:{background:"color-mix(in srgb, var(--error) 20%, var(--bg-secondary))"},children:e.error.category})]}),a.jsxs("div",{className:"px-3 py-2 text-xs leading-normal",children:[a.jsx("div",{className:"font-semibold mb-2",style:{color:"var(--text-primary)"},children:e.error.title}),a.jsx("pre",{className:"whitespace-pre-wrap font-mono text-[11px] max-w-prose",style:{color:"var(--text-secondary)"},children:e.error.detail})]})]})]})}function Zi(){const{reloadPending:e,setReloadPending:t,setEntrypoints:n}=ke(),[r,i]=S.useState(!1);if(!e)return null;const s=async()=>{i(!0);try{await ec();const o=await vs();n(o.map(l=>l.name)),t(!1)}catch(o){console.error("Reload failed:",o)}finally{i(!1)}};return a.jsxs("div",{className:"fixed top-4 left-1/2 -translate-x-1/2 z-50 flex items-center justify-between px-5 py-2.5 rounded-lg shadow-lg min-w-[400px]",style:{background:"var(--bg-secondary)",border:"1px solid var(--bg-tertiary)"},children:[a.jsx("span",{className:"text-sm",style:{color:"var(--text-secondary)"},children:"Files changed, reload to apply"}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("button",{onClick:s,disabled:r,className:"px-3 py-1 text-sm font-medium rounded cursor-pointer",style:{background:"var(--accent)",color:"#fff",opacity:r?.6:1},children:r?"Reloading...":"Reload"}),a.jsx("button",{onClick:()=>t(!1),className:"text-sm cursor-pointer px-1",style:{color:"var(--text-muted)",background:"none",border:"none"},children:"✕"})]})]})}let mu=0;const Ji=Ot(e=>({toasts:[],addToast:(t,n)=>{const r=String(++mu);e(s=>({toasts:[...s.toasts,{id:r,type:t,message:n}]})),setTimeout(()=>{e(s=>({toasts:s.toasts.filter(o=>o.id!==r)}))},t==="error"?8e3:5e3)},removeToast:t=>{e(n=>({toasts:n.toasts.filter(r=>r.id!==t)}))}})),Qi={success:{color:"var(--success)",bg:"color-mix(in srgb, var(--success) 10%, var(--bg-elevated))",border:"color-mix(in srgb, var(--success) 30%, var(--border))"},error:{color:"var(--error)",bg:"color-mix(in srgb, var(--error) 10%, var(--bg-elevated))",border:"color-mix(in srgb, var(--error) 30%, var(--border))"},info:{color:"var(--info)",bg:"color-mix(in srgb, var(--info) 10%, var(--bg-elevated))",border:"color-mix(in srgb, var(--info) 30%, var(--border))"}};function eo(){const e=Ji(n=>n.toasts),t=Ji(n=>n.removeToast);return e.length===0?null:a.jsx("div",{className:"fixed bottom-8 right-4 z-[100] flex flex-col gap-2 pointer-events-none",children:e.map(n=>{const r=Qi[n.type]??Qi.info;return a.jsxs("div",{className:"pointer-events-auto flex items-center gap-2 px-4 py-2.5 rounded-lg shadow-lg text-xs font-medium max-w-xs animate-[slideIn_0.2s_ease-out]",style:{background:r.bg,border:`1px solid ${r.border}`,color:r.color},children:[a.jsx("span",{className:"flex-1",children:n.message}),a.jsx("button",{onClick:()=>t(n.id),className:"shrink-0 w-5 h-5 flex items-center justify-center rounded cursor-pointer transition-opacity opacity-60 hover:opacity-100",style:{color:r.color,background:"transparent",border:"none"},"aria-label":"Dismiss",children:a.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",children:[a.jsx("line",{x1:"1",y1:"1",x2:"9",y2:"9"}),a.jsx("line",{x1:"9",y1:"1",x2:"1",y2:"9"})]})})]},n.id)})})}function hu(e){return e===null?"-":`${Math.round(e*100)}%`}function gu(e){if(e===null)return"var(--text-muted)";const t=e*100;return t>=80?"var(--success)":t>=50?"var(--warning)":"var(--error)"}const to={pending:{color:"var(--text-muted)",label:"Pending"},running:{color:"var(--info)",label:"Running"},completed:{color:"var(--success)",label:"Completed"},failed:{color:"var(--error)",label:"Failed"}};function no(){const e=Ae(l=>l.evalSets),t=Ae(l=>l.evalRuns),{evalSetId:n,evalRunId:r,navigate:i}=st(),s=Object.values(e),o=Object.values(t).sort((l,u)=>new Date(u.start_time??0).getTime()-new Date(l.start_time??0).getTime());return a.jsxs("div",{className:"flex-1 overflow-y-auto",children:[a.jsx("button",{onClick:()=>i("#/evals/new"),className:"w-[calc(100%-24px)] mx-3 mt-2.5 mb-1 px-3 py-1.5 text-[11px] text-center font-medium rounded border border-[var(--border)] bg-transparent transition-colors cursor-pointer",style:{color:"var(--text-secondary)"},onMouseEnter:l=>{l.currentTarget.style.color="var(--text-primary)",l.currentTarget.style.borderColor="var(--text-muted)"},onMouseLeave:l=>{l.currentTarget.style.color="var(--text-secondary)",l.currentTarget.style.borderColor=""},children:"+ New Eval Set"}),a.jsx("div",{className:"px-3 pt-3 pb-1 text-[11px] uppercase tracking-widest font-semibold",style:{color:"var(--text-muted)"},children:"Eval Sets"}),s.map(l=>{const u=n===l.id;return a.jsxs("button",{onClick:()=>i(`#/evals/sets/${l.id}`),className:"w-full text-left px-3 py-1.5 text-xs cursor-pointer transition-colors",style:{background:u?"color-mix(in srgb, var(--accent) 15%, var(--bg-primary))":"transparent",color:u?"var(--text-primary)":"var(--text-secondary)",borderLeft:u?"3px solid var(--accent)":"3px solid transparent"},onMouseEnter:c=>{u||(c.currentTarget.style.background="var(--bg-hover)")},onMouseLeave:c=>{u||(c.currentTarget.style.background="transparent")},children:[a.jsx("div",{className:"truncate font-medium",children:l.name}),a.jsxs("div",{className:"text-[11px] mt-0.5",style:{color:"var(--text-muted)"},children:[l.eval_count," items · ",l.evaluator_ids.length," evaluator",l.evaluator_ids.length!==1?"s":""]})]},l.id)}),s.length===0&&a.jsx("p",{className:"text-[11px] px-3 py-2",style:{color:"var(--text-muted)"},children:"No eval sets yet"}),a.jsx("div",{className:"px-3 pt-4 pb-1 text-[11px] uppercase tracking-widest font-semibold",style:{color:"var(--text-muted)"},children:"History"}),o.map(l=>{const u=r===l.id,c=to[l.status]??to.pending;return a.jsx("button",{onClick:()=>i(`#/evals/runs/${l.id}`),className:"w-full text-left px-3 py-1.5 text-xs cursor-pointer transition-colors",style:{background:u?"color-mix(in srgb, var(--accent) 15%, var(--bg-primary))":"transparent",color:u?"var(--text-primary)":"var(--text-secondary)",borderLeft:u?"3px solid var(--accent)":"3px solid transparent"},onMouseEnter:d=>{u||(d.currentTarget.style.background="var(--bg-hover)")},onMouseLeave:d=>{u||(d.currentTarget.style.background="transparent")},children:a.jsxs("div",{className:"flex items-center gap-1.5",children:[a.jsx("div",{className:"w-2 h-2 rounded-full shrink-0",style:{background:c.color}}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("div",{className:"truncate font-medium",children:l.eval_set_name}),a.jsx("div",{className:"text-[11px] mt-0.5",style:{color:"var(--text-muted)"},children:l.start_time?new Date(l.start_time).toLocaleString():c.label})]}),a.jsx("span",{className:"font-mono shrink-0",style:{color:gu(l.overall_score)},children:hu(l.overall_score)})]})},l.id)}),o.length===0&&a.jsx("p",{className:"text-[11px] px-3 py-2",style:{color:"var(--text-muted)"},children:"No eval runs yet"})]})}function ro(e,t=60){const n=typeof e=="string"?e:JSON.stringify(e);return!n||n==="null"?"-":n.length>t?n.slice(0,t)+"...":n}function bu({evalSetId:e}){const[t,n]=S.useState(null),[r,i]=S.useState(!0),[s,o]=S.useState(null),[l,u]=S.useState(!1),[c,d]=S.useState("io"),p=Ae(h=>h.evaluators),m=Ae(h=>h.localEvaluators),f=Ae(h=>h.updateEvalSetEvaluators),g=Ae(h=>h.incrementEvalSetCount),x=Ae(h=>h.upsertEvalRun),{navigate:y}=st(),[b,k]=S.useState(!1),[C,j]=S.useState(new Set),[L,T]=S.useState(!1),B=S.useRef(null),[O,w]=S.useState(()=>{const h=localStorage.getItem("evalSetSidebarWidth");return h?parseInt(h,10):320}),[_,M]=S.useState(!1),R=S.useRef(null);S.useEffect(()=>{localStorage.setItem("evalSetSidebarWidth",String(O))},[O]),S.useEffect(()=>{i(!0),o(null),dc(e).then(h=>{n(h),h.items.length>0&&o(h.items[0].name)}).catch(console.error).finally(()=>i(!1))},[e]);const D=async()=>{u(!0);try{const h=await pc(e);x(h),y(`#/evals/runs/${h.id}`)}catch(h){console.error(h)}finally{u(!1)}},N=async h=>{if(t)try{await uc(e,h),n(F=>{if(!F)return F;const $=F.items.filter(v=>v.name!==h);return{...F,items:$,eval_count:$.length}}),g(e,-1),s===h&&o(null)}catch(F){console.error(F)}},E=S.useCallback(()=>{t&&j(new Set(t.evaluator_ids)),k(!0)},[t]),I=h=>{j(F=>{const $=new Set(F);return $.has(h)?$.delete(h):$.add(h),$})},G=async()=>{if(t){T(!0);try{const h=await hc(e,Array.from(C));n(h),f(e,h.evaluator_ids),k(!1)}catch(h){console.error(h)}finally{T(!1)}}};S.useEffect(()=>{if(!b)return;const h=F=>{B.current&&!B.current.contains(F.target)&&k(!1)};return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[b]);const H=S.useCallback(h=>{h.preventDefault(),M(!0);const F="touches"in h?h.touches[0].clientX:h.clientX,$=O,v=W=>{const U=R.current;if(!U)return;const re="touches"in W?W.touches[0].clientX:W.clientX,de=U.clientWidth-300,be=Math.max(280,Math.min(de,$+(F-re)));w(be)},ie=()=>{M(!1),document.removeEventListener("mousemove",v),document.removeEventListener("mouseup",ie),document.removeEventListener("touchmove",v),document.removeEventListener("touchend",ie),document.body.style.cursor="",document.body.style.userSelect=""};document.body.style.cursor="col-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",v),document.addEventListener("mouseup",ie),document.addEventListener("touchmove",v,{passive:!1}),document.addEventListener("touchend",ie)},[O]);if(r)return a.jsx("div",{className:"flex items-center justify-center h-full text-[var(--text-muted)] text-sm",children:"Loading..."});if(!t)return a.jsx("div",{className:"flex items-center justify-center h-full text-[var(--text-muted)]",children:"Eval set not found"});const V=t.items.find(h=>h.name===s)??null;return a.jsxs("div",{ref:R,className:"flex h-full",children:[a.jsxs("div",{className:"flex flex-col flex-1 min-w-0",children:[a.jsxs("div",{className:"px-4 h-10 border-b shrink-0 flex items-center gap-4",style:{borderColor:"var(--border)"},children:[a.jsx("h1",{className:"text-base font-semibold",style:{color:"var(--text-primary)"},children:t.name}),a.jsxs("span",{className:"text-[11px]",style:{color:"var(--text-muted)"},children:[t.eval_count," items"]}),a.jsxs("div",{className:"flex gap-1 items-center ml-auto relative",children:[a.jsx("button",{onClick:E,className:"w-7 h-7 flex items-center justify-center rounded cursor-pointer transition-colors",style:{color:"var(--text-muted)",background:"transparent",border:"none"},onMouseEnter:h=>{h.currentTarget.style.color="var(--text-primary)",h.currentTarget.style.background="var(--bg-secondary)"},onMouseLeave:h=>{h.currentTarget.style.color="var(--text-muted)",h.currentTarget.style.background="transparent"},title:"Edit evaluators","aria-label":"Edit evaluators",children:a.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("path",{d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"}),a.jsx("path",{d:"m15 5 4 4"})]})}),t.evaluator_ids.map(h=>{const F=p.find($=>$.id===h);return a.jsx("span",{className:"px-1.5 py-0.5 rounded text-[11px] font-medium",style:{background:"var(--bg-tertiary)",color:"var(--text-secondary)"},children:(F==null?void 0:F.name)??h},h)}),b&&a.jsxs("div",{ref:B,className:"absolute top-full right-0 mt-1 z-50 rounded-md border shadow-lg",style:{background:"var(--bg-primary)",borderColor:"var(--border)",minWidth:220},children:[a.jsx("div",{className:"px-3 py-2 border-b text-[10px] uppercase tracking-wide font-semibold",style:{color:"var(--text-muted)",borderColor:"var(--border)"},children:"Evaluators"}),a.jsx("div",{className:"max-h-48 overflow-y-auto",children:m.length===0?a.jsx("div",{className:"px-3 py-3 text-xs",style:{color:"var(--text-muted)"},children:"No evaluators available"}):m.map(h=>a.jsxs("label",{className:"flex items-center gap-2 px-3 py-1.5 text-xs cursor-pointer transition-colors",style:{borderBottom:"1px solid var(--border)"},onMouseEnter:F=>{F.currentTarget.style.background="var(--bg-hover)"},onMouseLeave:F=>{F.currentTarget.style.background="transparent"},children:[a.jsx("input",{type:"checkbox",checked:C.has(h.id),onChange:()=>I(h.id),className:"accent-[var(--accent)]"}),a.jsx("span",{className:"flex-1 truncate",style:{color:"var(--text-primary)"},children:h.name})]},h.id))}),a.jsx("div",{className:"px-3 py-2 border-t flex justify-end",style:{borderColor:"var(--border)"},children:a.jsx("button",{onClick:G,disabled:L,className:"px-3 py-1 text-[11px] font-semibold rounded cursor-pointer transition-colors disabled:opacity-50",style:{background:"var(--accent)",color:"var(--bg-primary)",border:"none"},onMouseEnter:h=>{h.currentTarget.style.background="var(--accent-hover)"},onMouseLeave:h=>{h.currentTarget.style.background="var(--accent)"},children:L?"Saving...":"Update"})})]})]}),a.jsxs("button",{onClick:D,disabled:l,className:"ml-2 px-3 py-1 h-7 text-xs font-semibold rounded border flex items-center gap-1.5 cursor-pointer transition-colors disabled:opacity-30 disabled:cursor-not-allowed",style:{color:"var(--success)",borderColor:"var(--success)",background:"transparent"},onMouseEnter:h=>{l||(h.currentTarget.style.background="color-mix(in srgb, var(--success) 10%, transparent)")},onMouseLeave:h=>{h.currentTarget.style.background="transparent"},title:"Run eval set","aria-label":"Run eval set",children:[a.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor",stroke:"none",children:a.jsx("polygon",{points:"5,3 19,12 5,21"})}),l?"Running...":"Run"]})]}),a.jsxs("div",{className:"flex items-center px-3 h-7 text-[11px] font-semibold shrink-0 border-b",style:{color:"var(--text-muted)",background:"var(--bg-secondary)",borderColor:"var(--border)"},children:[a.jsx("span",{className:"w-56 shrink-0",children:"Name"}),a.jsx("span",{className:"flex-1 min-w-0",children:"Input"}),a.jsx("span",{className:"w-32 shrink-0 pl-2",children:"Expected Behavior"}),a.jsx("span",{className:"w-32 shrink-0 pl-2",children:"Expected Output"}),a.jsx("span",{className:"w-32 shrink-0 pl-2",children:"Simulation Instr."}),a.jsx("span",{className:"w-8 shrink-0"})]}),a.jsxs("div",{className:"flex-1 overflow-y-auto",children:[t.items.map(h=>{const F=h.name===s;return a.jsxs("button",{onClick:()=>o(F?null:h.name),className:"group w-full text-left px-3 py-1.5 flex items-center text-xs border-b transition-colors cursor-pointer",style:{borderColor:"var(--border)",background:F?"color-mix(in srgb, var(--accent) 10%, var(--bg-primary))":void 0,borderLeft:F?"3px solid var(--accent)":"3px solid transparent"},onMouseEnter:$=>{F||($.currentTarget.style.background="var(--bg-hover)")},onMouseLeave:$=>{F||($.currentTarget.style.background="")},children:[a.jsx("span",{className:"w-56 shrink-0 truncate",style:{color:"var(--text-primary)"},children:h.name}),a.jsx("span",{className:"flex-1 min-w-0 truncate font-mono text-[11px]",style:{color:"var(--text-muted)"},children:ro(h.inputs)}),a.jsx("span",{className:"w-32 shrink-0 truncate pl-2 text-[11px]",style:{color:"var(--text-muted)"},children:h.expected_behavior||"-"}),a.jsx("span",{className:"w-32 shrink-0 truncate pl-2 font-mono text-[11px]",style:{color:"var(--text-muted)"},children:ro(h.expected_output,40)}),a.jsx("span",{className:"w-32 shrink-0 truncate pl-2 text-[11px]",style:{color:"var(--text-muted)"},children:h.simulation_instructions||"-"}),a.jsx("span",{role:"button",tabIndex:0,className:"w-8 shrink-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity",onClick:$=>{$.stopPropagation(),N(h.name)},onKeyDown:$=>{$.key==="Enter"&&($.stopPropagation(),N(h.name))},style:{color:"var(--text-muted)"},onMouseEnter:$=>{$.currentTarget.style.color="var(--error)"},onMouseLeave:$=>{$.currentTarget.style.color="var(--text-muted)"},title:"Delete item",children:a.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[a.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),a.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]},h.name)}),t.items.length===0&&a.jsx("div",{className:"flex items-center justify-center py-8 text-[var(--text-muted)] text-xs",children:"No items in this eval set"})]})]}),a.jsx("div",{onMouseDown:H,onTouchStart:H,className:`shrink-0 drag-handle-col${_?"":" transition-all"}`,style:{width:V?3:0,opacity:V?1:0}}),a.jsxs("div",{className:`shrink-0 flex flex-col overflow-hidden${_?"":" transition-[width] duration-200 ease-in-out"}`,style:{width:V?O:0,background:"var(--bg-primary)"},children:[a.jsx("div",{className:"flex items-center gap-1 px-2 h-10 border-b shrink-0",style:{borderColor:"var(--border)",background:"var(--bg-secondary)",minWidth:O},children:["io","evaluators"].map(h=>{const F=c===h,$=h==="io"?"I/O":"Evaluators";return a.jsx("button",{onClick:()=>d(h),className:"px-2.5 py-1 h-7 text-xs font-semibold rounded inline-flex items-center cursor-pointer transition-colors",style:{color:F?"var(--accent)":"var(--text-muted)",background:F?"color-mix(in srgb, var(--accent) 10%, transparent)":"transparent",border:"none"},children:$},h)})}),a.jsx("div",{className:"flex-1 overflow-hidden",style:{minWidth:O},children:V?c==="io"?a.jsx(xu,{item:V}):a.jsx(yu,{item:V,evaluators:p}):null})]})]})}function xu({item:e}){const t=JSON.stringify(e.inputs,null,2),n=e.expected_output!=null?typeof e.expected_output=="string"?e.expected_output:JSON.stringify(e.expected_output,null,2):null;return a.jsxs("div",{className:"p-2 overflow-y-auto h-full space-y-1.5",children:[a.jsx(_t,{title:"Input",copyText:t,children:a.jsx(ot,{json:t,className:"px-3 py-2 text-xs font-mono whitespace-pre-wrap break-words"})}),e.expected_behavior&&a.jsx(_t,{title:"Expected Behavior",copyText:e.expected_behavior,children:a.jsx("div",{className:"px-3 py-2 text-xs leading-relaxed whitespace-pre-wrap",style:{color:"var(--text-secondary)"},children:e.expected_behavior})}),n&&a.jsx(_t,{title:"Expected Output",copyText:n,children:a.jsx(ot,{json:n,className:"px-3 py-2 text-xs font-mono whitespace-pre-wrap break-words"})}),e.simulation_instructions&&a.jsx(_t,{title:"Simulation Instructions",copyText:e.simulation_instructions,children:a.jsx("div",{className:"px-3 py-2 text-xs leading-relaxed whitespace-pre-wrap",style:{color:"var(--text-secondary)"},children:e.simulation_instructions})})]})}function yu({item:e,evaluators:t}){return a.jsx("div",{className:"p-2 overflow-y-auto h-full space-y-1.5",children:e.evaluator_ids.length>0?a.jsx(a.Fragment,{children:e.evaluator_ids.map(n=>{var s;const r=t.find(o=>o.id===n),i=(s=e.evaluation_criterias)==null?void 0:s[n];return a.jsxs("div",{className:"overflow-hidden",style:{border:"1px solid var(--border)"},children:[a.jsxs("div",{className:"px-3 py-2 flex items-center gap-2",style:{background:"var(--bg-secondary)"},children:[a.jsx("span",{className:"text-[11px] font-semibold",style:{color:"var(--text-primary)"},children:(r==null?void 0:r.name)??n}),a.jsx("span",{className:"ml-auto text-[10px]",style:{color:"var(--text-muted)"},children:i?"Custom criteria":"Default criteria"})]}),i&&a.jsx("pre",{className:"px-3 py-2 border-t text-[11px] font-mono overflow-x-auto max-h-32 whitespace-pre-wrap break-words",style:{borderColor:"var(--border)",color:"var(--text-secondary)"},children:JSON.stringify(i,null,2)})]},n)})}):a.jsx("div",{className:"flex items-center justify-center h-full text-[var(--text-muted)] text-xs",children:"No evaluators configured for this item"})})}function en(e){return e===null?"-":`${Math.round(e*100)}%`}function wt(e){if(e===null)return"var(--text-muted)";const t=e*100;return t>=80?"var(--success)":t>=50?"var(--warning)":"var(--error)"}function vu(e,t){if(!e)return"-";const n=new Date(e).getTime(),r=t?new Date(t).getTime():Date.now(),i=Math.round((r-n)/1e3);return i<60?`${i}s`:`${Math.floor(i/60)}m ${i%60}s`}function io(e){return e.replace(/\s*Evaluator$/i,"")}const oo={pending:{color:"var(--text-muted)",bg:"var(--bg-tertiary)",label:"Pending"},running:{color:"var(--info)",bg:"rgba(59,130,246,0.1)",label:"Running"},completed:{color:"var(--success)",bg:"rgba(34,197,94,0.1)",label:"Completed"},failed:{color:"var(--error)",bg:"rgba(239,68,68,0.1)",label:"Failed"}};function ku({evalRunId:e,itemName:t}){const[n,r]=S.useState(null),[i,s]=S.useState(!0),{navigate:o}=st(),l=t??null,[u,c]=S.useState(220),d=S.useRef(null),p=S.useRef(!1),[m,f]=S.useState(()=>{const M=localStorage.getItem("evalSidebarWidth");return M?parseInt(M,10):320}),[g,x]=S.useState(!1),y=S.useRef(null);S.useEffect(()=>{localStorage.setItem("evalSidebarWidth",String(m))},[m]);const b=Ae(M=>M.evalRuns[e]),k=Ae(M=>M.evaluators);S.useEffect(()=>{s(!0),Oi(e).then(M=>{if(r(M),!t){const R=M.results.find(D=>D.status==="completed")??M.results[0];R&&o(`#/evals/runs/${e}/${encodeURIComponent(R.name)}`)}}).catch(console.error).finally(()=>s(!1))},[e]),S.useEffect(()=>{((b==null?void 0:b.status)==="completed"||(b==null?void 0:b.status)==="failed")&&Oi(e).then(r).catch(console.error)},[b==null?void 0:b.status,e]),S.useEffect(()=>{if(t||!(n!=null&&n.results))return;const M=n.results.find(R=>R.status==="completed")??n.results[0];M&&o(`#/evals/runs/${e}/${encodeURIComponent(M.name)}`)},[n==null?void 0:n.results]);const C=S.useCallback(M=>{M.preventDefault(),p.current=!0;const R="touches"in M?M.touches[0].clientY:M.clientY,D=u,N=I=>{if(!p.current)return;const G=d.current;if(!G)return;const H="touches"in I?I.touches[0].clientY:I.clientY,V=G.clientHeight-100,h=Math.max(80,Math.min(V,D+(H-R)));c(h)},E=()=>{p.current=!1,document.removeEventListener("mousemove",N),document.removeEventListener("mouseup",E),document.removeEventListener("touchmove",N),document.removeEventListener("touchend",E),document.body.style.cursor="",document.body.style.userSelect=""};document.body.style.cursor="row-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",N),document.addEventListener("mouseup",E),document.addEventListener("touchmove",N,{passive:!1}),document.addEventListener("touchend",E)},[u]),j=S.useCallback(M=>{M.preventDefault(),x(!0);const R="touches"in M?M.touches[0].clientX:M.clientX,D=m,N=I=>{const G=y.current;if(!G)return;const H="touches"in I?I.touches[0].clientX:I.clientX,V=G.clientWidth-300,h=Math.max(280,Math.min(V,D+(R-H)));f(h)},E=()=>{x(!1),document.removeEventListener("mousemove",N),document.removeEventListener("mouseup",E),document.removeEventListener("touchmove",N),document.removeEventListener("touchend",E),document.body.style.cursor="",document.body.style.userSelect=""};document.body.style.cursor="col-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",N),document.addEventListener("mouseup",E),document.addEventListener("touchmove",N,{passive:!1}),document.addEventListener("touchend",E)},[m]);if(i)return a.jsx("div",{className:"flex items-center justify-center h-full text-[var(--text-muted)] text-sm",children:"Loading..."});if(!n)return a.jsx("div",{className:"flex items-center justify-center h-full text-[var(--text-muted)]",children:"Eval run not found"});const L=b??n,T=oo[L.status]??oo.pending,B=L.status==="running",O=Object.keys(L.evaluator_scores??{}),w=n.results.find(M=>M.name===l)??null,_=((w==null?void 0:w.traces)??[]).map(M=>({...M,run_id:""}));return a.jsxs("div",{ref:y,className:"flex h-full",children:[a.jsxs("div",{ref:d,className:"flex flex-col flex-1 min-w-0",children:[a.jsxs("div",{className:"px-4 h-10 border-b shrink-0 flex items-center gap-4",style:{borderColor:"var(--border)"},children:[a.jsx("h1",{className:"text-base font-semibold truncate min-w-0",style:{color:"var(--text-primary)"},children:L.eval_set_name}),a.jsx("span",{className:"px-2 py-0.5 rounded text-[11px] font-semibold uppercase tracking-wide",style:{color:T.color,background:T.bg},children:T.label}),a.jsx("span",{className:"text-sm font-bold font-mono",style:{color:wt(L.overall_score)},children:en(L.overall_score)}),a.jsx("span",{className:"text-[11px]",style:{color:"var(--text-muted)"},children:vu(L.start_time,L.end_time)}),B&&a.jsxs("div",{className:"flex items-center gap-2 max-w-[160px]",children:[a.jsx("div",{className:"flex-1 h-2 rounded-full overflow-hidden",style:{background:"var(--bg-tertiary)"},children:a.jsx("div",{className:"h-full rounded-full transition-all",style:{width:`${L.progress_total>0?L.progress_completed/L.progress_total*100:0}%`,background:"var(--info)"}})}),a.jsxs("span",{className:"text-[11px] shrink-0",style:{color:"var(--text-muted)"},children:[L.progress_completed,"/",L.progress_total]})]}),O.length>0&&a.jsx("div",{className:"flex gap-3 ml-auto",children:O.map(M=>{const R=k.find(N=>N.id===M),D=L.evaluator_scores[M];return a.jsxs("div",{className:"flex items-center gap-1.5",children:[a.jsx("span",{className:"text-[11px]",style:{color:"var(--text-muted)"},children:io((R==null?void 0:R.name)??M)}),a.jsx("div",{className:"w-12 h-2 rounded-full overflow-hidden",style:{background:"var(--bg-tertiary)"},children:a.jsx("div",{className:"h-full rounded-full",style:{width:`${D*100}%`,background:wt(D)}})}),a.jsx("span",{className:"text-[11px] font-mono",style:{color:wt(D)},children:en(D)})]},M)})})]}),a.jsxs("div",{className:"shrink-0 overflow-hidden flex flex-col",style:{height:u},children:[a.jsxs("div",{className:"flex items-center px-3 h-7 text-[11px] font-semibold shrink-0 border-b",style:{color:"var(--text-muted)",background:"var(--bg-secondary)",borderColor:"var(--border)"},children:[a.jsx("span",{className:"w-5 shrink-0"}),a.jsx("span",{className:"flex-1 min-w-0",children:"Name"}),a.jsx("span",{className:"w-14 shrink-0 text-right",children:"Score"}),O.map(M=>{const R=k.find(D=>D.id===M);return a.jsx("span",{className:"w-36 shrink-0 text-right truncate pl-2",title:(R==null?void 0:R.name)??M,children:io((R==null?void 0:R.name)??M)},M)}),a.jsx("span",{className:"w-14 shrink-0 text-right",children:"Time"})]}),a.jsxs("div",{className:"flex-1 overflow-y-auto",children:[n.results.map(M=>{const R=M.status==="pending",D=M.status==="failed",N=M.name===l;return a.jsxs("button",{onClick:()=>{o(N?`#/evals/runs/${e}`:`#/evals/runs/${e}/${encodeURIComponent(M.name)}`)},className:"w-full text-left px-3 py-1.5 flex items-center text-xs border-b transition-colors cursor-pointer",style:{borderColor:"var(--border)",background:N?"color-mix(in srgb, var(--accent) 10%, var(--bg-primary))":void 0,borderLeft:N?"2px solid var(--accent)":"2px solid transparent",opacity:R?.5:1},onMouseEnter:E=>{N||(E.currentTarget.style.background="var(--bg-hover)")},onMouseLeave:E=>{N||(E.currentTarget.style.background="")},children:[a.jsx("span",{className:"w-5 shrink-0 flex justify-center",children:a.jsx("span",{className:"w-2 h-2 rounded-full",style:{background:R?"var(--text-muted)":D?"var(--error)":M.overall_score>=.8?"var(--success)":M.overall_score>=.5?"var(--warning)":"var(--error)"}})}),a.jsx("span",{className:"flex-1 min-w-0 truncate",style:{color:"var(--text-primary)"},children:M.name}),a.jsx("span",{className:"w-14 shrink-0 text-right font-mono font-semibold",style:{color:wt(R?null:M.overall_score)},children:R?"-":en(M.overall_score)}),O.map(E=>a.jsx("span",{className:"w-36 shrink-0 text-right font-mono pl-2",style:{color:wt(R?null:M.scores[E]??null)},children:R?"-":en(M.scores[E]??null)},E)),a.jsx("span",{className:"w-14 shrink-0 text-right",style:{color:"var(--text-muted)"},children:M.duration_ms!==null?`${(M.duration_ms/1e3).toFixed(1)}s`:"-"})]},M.name)}),n.results.length===0&&a.jsx("div",{className:"flex items-center justify-center py-8 text-[var(--text-muted)] text-xs",children:B?"Waiting for results...":"No results"})]})]}),a.jsx("div",{onMouseDown:C,onTouchStart:C,className:"shrink-0 drag-handle-row"}),a.jsx("div",{className:"flex-1 overflow-hidden",children:w&&_.length>0?a.jsx(Lr,{traces:_}):a.jsx("div",{className:"flex items-center justify-center h-full text-[var(--text-muted)] text-xs",children:(w==null?void 0:w.status)==="pending"?"Pending...":"No traces available"})})]}),a.jsx("div",{onMouseDown:j,onTouchStart:j,className:`shrink-0 drag-handle-col${g?"":" transition-all"}`,style:{width:w?3:0,opacity:w?1:0}}),a.jsx(wu,{width:m,item:w,evaluators:k,isRunning:B,isDragging:g})]})}const Eu=[{id:"score",label:"Score"},{id:"io",label:"I/O"},{id:"logs",label:"Logs"}];function wu({width:e,item:t,evaluators:n,isRunning:r,isDragging:i}){const[s,o]=S.useState("score"),l=!!t;return a.jsxs("div",{className:`shrink-0 flex flex-col overflow-hidden${i?"":" transition-[width] duration-200 ease-in-out"}`,style:{width:l?e:0,background:"var(--bg-primary)"},children:[a.jsxs("div",{className:"flex items-center gap-1 px-2 h-10 border-b shrink-0",style:{borderColor:"var(--border)",background:"var(--bg-secondary)",minWidth:e},children:[Eu.map(u=>a.jsx("button",{onClick:()=>o(u.id),className:"px-2.5 py-1 h-7 text-xs font-semibold rounded transition-colors cursor-pointer",style:{color:s===u.id?"var(--accent)":"var(--text-muted)",background:s===u.id?"color-mix(in srgb, var(--accent) 10%, transparent)":"transparent",border:"none"},onMouseEnter:c=>{s!==u.id&&(c.currentTarget.style.color="var(--text-primary)")},onMouseLeave:c=>{s!==u.id&&(c.currentTarget.style.color="var(--text-muted)")},children:u.label},u.id)),r&&a.jsx("span",{className:"ml-auto text-[11px] px-2 py-0.5 rounded-full shrink-0",style:{background:"color-mix(in srgb, var(--warning) 15%, var(--bg-secondary))",color:"var(--warning)"},children:"Running..."})]}),a.jsx("div",{className:"flex-1 overflow-y-auto",style:{minWidth:e},children:t?t.status==="pending"?a.jsx("div",{className:"flex items-center justify-center h-full text-[var(--text-muted)] text-xs",children:"Pending..."}):a.jsxs(a.Fragment,{children:[t.status==="failed"&&a.jsxs("div",{className:"mx-2 mt-2 px-3 py-2 rounded text-xs",style:{background:"rgba(239,68,68,0.1)",color:"var(--error)"},children:[a.jsxs("div",{className:"flex items-center gap-2 font-semibold",children:[a.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",children:[a.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),a.jsx("path",{d:"M8 4.5v4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),a.jsx("circle",{cx:"8",cy:"11",r:"0.75",fill:"currentColor"})]}),a.jsx("span",{children:"Evaluator error"})]}),t.error&&a.jsx("div",{className:"mt-1 pl-[22px] text-[11px] opacity-80 break-words",style:{color:"var(--text-secondary)"},children:t.error})]}),s==="score"?a.jsx(_u,{item:t,evaluators:n}):s==="io"?a.jsx(Nu,{item:t}):a.jsx("div",{className:"flex items-center justify-center h-full text-[var(--text-muted)] text-xs",children:"Logs coming soon"})]}):null})]})}function _u({item:e,evaluators:t}){const n=Object.keys(e.scores);return a.jsxs("div",{className:"p-2 overflow-y-auto h-full space-y-1.5",children:[a.jsx("div",{className:"overflow-hidden",style:{border:"1px solid var(--border)"},children:a.jsxs("div",{className:"px-3 py-2 flex items-center gap-2",style:{background:"var(--bg-secondary)"},children:[a.jsx("span",{className:"truncate text-[11px] font-semibold",style:{color:"var(--text-primary)"},children:"Overall"}),a.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[a.jsx("div",{className:"w-24 h-2.5 rounded-full overflow-hidden",style:{background:"var(--bg-tertiary)"},children:a.jsx("div",{className:"h-full rounded-full",style:{width:`${e.overall_score*100}%`,background:wt(e.overall_score)}})}),a.jsx("span",{className:"text-xs font-mono font-bold shrink-0 w-10 text-right",style:{color:wt(e.overall_score)},children:en(e.overall_score)})]})]})}),e.status==="failed"&&n.length===0&&a.jsx("div",{className:"px-3 py-3 text-xs text-center",style:{color:"var(--text-muted)"},children:"All evaluators failed — no scores available"}),n.map(r=>{const i=t.find(l=>l.id===r),s=e.scores[r],o=e.justifications[r];return a.jsxs("div",{className:"overflow-hidden",style:{border:"1px solid var(--border)"},children:[a.jsxs("div",{className:"px-3 py-2 flex items-center gap-2",style:{background:"var(--bg-secondary)"},children:[a.jsx("span",{className:"truncate text-[11px] font-semibold",style:{color:"var(--text-primary)"},title:(i==null?void 0:i.name)??r,children:(i==null?void 0:i.name)??r}),a.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[a.jsx("div",{className:"w-24 h-2.5 rounded-full overflow-hidden",style:{background:"var(--bg-tertiary)"},children:a.jsx("div",{className:"h-full rounded-full",style:{width:`${s*100}%`,background:wt(s)}})}),a.jsx("span",{className:"text-xs font-mono font-bold shrink-0 w-10 text-right",style:{color:wt(s)},children:en(s)})]})]}),o&&a.jsx(Tu,{text:o})]},r)})]})}function Nu({item:e}){const t=JSON.stringify(e.inputs,null,2),n=typeof e.output=="string"?e.output:JSON.stringify(e.output,null,2),r=e.expected_output!=null?typeof e.expected_output=="string"?e.expected_output:JSON.stringify(e.expected_output,null,2):null;return a.jsxs("div",{className:"p-2 overflow-y-auto h-full space-y-1.5",children:[a.jsx(_t,{title:"Input",copyText:t,children:a.jsx(ot,{json:t,className:"px-3 py-2 text-xs font-mono whitespace-pre-wrap break-words"})}),r&&a.jsx(_t,{title:"Expected Output",copyText:r,children:a.jsx(ot,{json:r,className:"px-3 py-2 text-xs font-mono whitespace-pre-wrap break-words"})}),a.jsx(_t,{title:"Output",copyText:n,trailing:e.duration_ms!==null?a.jsxs("span",{className:"ml-auto text-[10px]",style:{color:"var(--text-muted)"},children:[(e.duration_ms/1e3).toFixed(2),"s"]}):void 0,children:a.jsx(ot,{json:n,className:"px-3 py-2 text-xs font-mono whitespace-pre-wrap break-words"})})]})}function Su(e){var i;const t=e.match(/expected="(.+?)"\s+actual="(.+?)"(.*)/s);if(!t)return null;const n={},r=((i=t[3])==null?void 0:i.trim())??"";if(r)for(const s of r.match(/(\w+)=([\S]+)/g)??[]){const o=s.indexOf("=");n[s.slice(0,o)]=s.slice(o+1)}return{expected:t[1],actual:t[2],meta:n}}function so(e){try{const t=e.replace(/'/g,'"').replace(/\bTrue\b/g,"true").replace(/\bFalse\b/g,"false").replace(/\bNone\b/g,"null"),n=JSON.parse(t);return JSON.stringify(n,null,2)}catch{return e}}function Tu({text:e}){const t=Su(e);if(!t)return a.jsx("div",{className:"px-3 py-2 border-t",style:{borderColor:"var(--border)"},children:a.jsx("div",{className:"text-xs leading-relaxed",style:{color:"var(--text-secondary)"},children:e})});const n=so(t.expected),r=so(t.actual),i=n===r;return a.jsxs("div",{className:"border-t",style:{borderColor:"var(--border)"},children:[a.jsxs("div",{className:"grid grid-cols-2 gap-0",children:[a.jsxs("div",{className:"px-3 py-2 border-r",style:{borderColor:"var(--border)"},children:[a.jsx("div",{className:"text-[10px] font-semibold mb-1",style:{color:"var(--text-muted)"},children:"Expected"}),a.jsx("pre",{className:"text-[11px] font-mono whitespace-pre-wrap break-words",style:{color:"var(--text-secondary)"},children:n})]}),a.jsxs("div",{className:"px-3 py-2",children:[a.jsxs("div",{className:"flex items-center gap-1.5 mb-1",children:[a.jsx("span",{className:"text-[10px] font-semibold",style:{color:"var(--text-muted)"},children:"Actual"}),a.jsx("span",{className:"w-1.5 h-1.5 rounded-full",style:{background:i?"var(--success)":"var(--error)"}})]}),a.jsx("pre",{className:"text-[11px] font-mono whitespace-pre-wrap break-words",style:{color:i?"var(--success)":"var(--error)"},children:r})]})]}),Object.keys(t.meta).length>0&&a.jsx("div",{className:"px-3 py-1.5 border-t flex items-center gap-3",style:{borderColor:"var(--border)"},children:Object.entries(t.meta).map(([s,o])=>a.jsxs("span",{className:"text-[10px]",style:{color:"var(--text-muted)"},children:[a.jsx("span",{className:"font-medium",children:s.replace(/_/g," ")})," ",a.jsx("span",{className:"font-mono",children:o})]},s))})]})}const ao={deterministic:"var(--success)",llm:"#a78bfa",tool:"var(--info)"};function lo(){const e=Ae(f=>f.localEvaluators),t=Ae(f=>f.addEvalSet),{navigate:n}=st(),[r,i]=S.useState(""),[s,o]=S.useState(new Set),[l,u]=S.useState(null),[c,d]=S.useState(!1),p=f=>{o(g=>{const x=new Set(g);return x.has(f)?x.delete(f):x.add(f),x})},m=async()=>{if(r.trim()){u(null),d(!0);try{const f=await lc({name:r.trim(),evaluator_refs:Array.from(s)});t(f),n(`#/evals/sets/${f.id}`)}catch(f){u(f.detail||f.message||"Failed to create eval set")}finally{d(!1)}}};return a.jsx("div",{className:"flex items-center justify-center h-full",children:a.jsxs("div",{className:"w-full max-w-xl px-6",children:[a.jsxs("div",{className:"mb-8 text-center",children:[a.jsxs("div",{className:"flex items-center justify-center gap-2 mb-2",children:[a.jsx("div",{className:"w-1.5 h-1.5 rounded-full",style:{background:"var(--accent)"}}),a.jsx("span",{className:"text-sm font-semibold",style:{color:"var(--text-muted)"},children:"New Eval Set"})]}),a.jsx("p",{className:"text-sm",style:{color:"var(--text-muted)"},children:"Create an evaluation set with a name and evaluators"})]}),a.jsxs("div",{className:"mb-6",children:[a.jsx("label",{className:"block text-[11px] font-medium mb-1.5",style:{color:"var(--text-muted)"},children:"Name"}),a.jsx("input",{type:"text",value:r,onChange:f=>i(f.target.value),placeholder:"e.g. Basic QA Tests",className:"w-full rounded-md px-3 py-2 text-xs",style:{background:"var(--bg-secondary)",border:"1px solid var(--border)",color:"var(--text-primary)"},onKeyDown:f=>{f.key==="Enter"&&r.trim()&&m()}})]}),a.jsxs("div",{className:"mb-6",children:[a.jsx("label",{className:"block text-[11px] font-medium mb-1.5",style:{color:"var(--text-muted)"},children:"Evaluators"}),e.length===0?a.jsxs("p",{className:"text-xs",style:{color:"var(--text-muted)"},children:["No evaluators configured."," ",a.jsx("button",{onClick:()=>n("#/evaluators/new"),className:"underline cursor-pointer",style:{color:"var(--accent)",background:"none",border:"none",padding:0,font:"inherit"},children:"Create one first"})]}):a.jsx("div",{className:"rounded-md border overflow-hidden",style:{borderColor:"var(--border)",background:"var(--bg-secondary)"},children:e.map(f=>a.jsxs("label",{className:"flex items-center gap-2.5 px-3 py-2 text-xs cursor-pointer transition-colors",style:{borderBottom:"1px solid var(--border)"},onMouseEnter:g=>{g.currentTarget.style.background="var(--bg-hover)"},onMouseLeave:g=>{g.currentTarget.style.background="transparent"},children:[a.jsx("input",{type:"checkbox",checked:s.has(f.id),onChange:()=>p(f.id),className:"accent-[var(--accent)]"}),a.jsx("span",{className:"flex-1 truncate",style:{color:"var(--text-primary)"},children:f.name}),a.jsx("span",{className:"text-[11px] font-medium px-1.5 py-0.5 rounded",style:{background:`color-mix(in srgb, ${ao[f.type]??"var(--text-muted)"} 15%, transparent)`,color:ao[f.type]??"var(--text-muted)"},children:f.type})]},f.id))})]}),l&&a.jsx("p",{className:"text-xs mb-4 px-3 py-2 rounded",style:{color:"var(--error)",background:"color-mix(in srgb, var(--error) 10%, var(--bg-secondary))"},children:l}),a.jsx("button",{onClick:m,disabled:!r.trim()||c,className:"w-full py-2 rounded-md text-[13px] font-semibold transition-colors cursor-pointer disabled:opacity-40 disabled:cursor-not-allowed",style:{background:"var(--accent)",color:"var(--bg-primary)",border:"none"},children:c?"Creating...":"Create Eval Set"})]})})}const Cu=[{type:"deterministic",label:"Deterministic",badgeColor:"var(--success)"},{type:"llm",label:"LLM Judge",badgeColor:"#a78bfa"},{type:"tool",label:"Tool-Based",badgeColor:"var(--info)"}];function co(){const e=Ae(s=>s.localEvaluators),{evaluatorFilter:t,evaluatorCreateType:n,navigate:r}=st(),i=!t&&!n;return a.jsxs(a.Fragment,{children:[a.jsx("button",{onClick:()=>r("#/evaluators/new"),className:"mx-3 mt-2.5 mb-1 px-3 py-1.5 text-[11px] font-medium rounded border border-[var(--border)] bg-transparent transition-colors cursor-pointer",style:{color:"var(--text-secondary)"},onMouseEnter:s=>{s.currentTarget.style.color="var(--text-primary)",s.currentTarget.style.borderColor="var(--text-muted)"},onMouseLeave:s=>{s.currentTarget.style.color="var(--text-secondary)",s.currentTarget.style.borderColor=""},children:"+ New Evaluator"}),a.jsx("div",{className:"px-3 pt-3 pb-1 text-[11px] uppercase tracking-widest font-semibold",style:{color:"var(--text-muted)"},children:"Categories"}),a.jsxs("div",{className:"flex-1 overflow-y-auto",children:[a.jsxs("button",{onClick:()=>r("#/evaluators"),className:"w-full text-left px-3 py-2 text-xs flex items-center gap-2 cursor-pointer transition-colors",style:{background:i?"color-mix(in srgb, var(--accent) 15%, var(--bg-primary))":"transparent",color:i?"var(--text-primary)":"var(--text-secondary)",borderLeft:i?"3px solid var(--accent)":"3px solid transparent"},onMouseEnter:s=>{i||(s.currentTarget.style.background="var(--bg-hover)")},onMouseLeave:s=>{i||(s.currentTarget.style.background="transparent")},children:[a.jsx("div",{className:"w-2 h-2 rounded-full shrink-0",style:{background:"var(--text-muted)"}}),a.jsx("span",{className:"flex-1 truncate",children:"All"}),e.length>0&&a.jsx("span",{className:"text-[10px] px-1.5 rounded-full",style:{background:"var(--bg-tertiary)",color:"var(--text-muted)"},children:e.length})]}),Cu.map(s=>{const o=e.filter(u=>u.type===s.type).length,l=t===s.type;return a.jsxs("button",{onClick:()=>r(l?"#/evaluators":`#/evaluators/category/${s.type}`),className:"w-full text-left px-3 py-2 text-xs flex items-center gap-2 cursor-pointer transition-colors",style:{background:l?"color-mix(in srgb, var(--accent) 15%, var(--bg-primary))":"transparent",color:l?"var(--text-primary)":"var(--text-secondary)",borderLeft:l?"3px solid var(--accent)":"3px solid transparent"},onMouseEnter:u=>{l||(u.currentTarget.style.background="var(--bg-hover)")},onMouseLeave:u=>{l||(u.currentTarget.style.background="transparent")},children:[a.jsx("div",{className:"w-2 h-2 rounded-full shrink-0",style:{background:s.badgeColor}}),a.jsx("span",{className:"flex-1 truncate",children:s.label}),o>0&&a.jsx("span",{className:"text-[10px] px-1.5 rounded-full",style:{background:"var(--bg-tertiary)",color:"var(--text-muted)"},children:o})]},s.type)})]})]})}const uo={deterministic:{label:"Deterministic",color:"var(--success)",bg:"rgba(34,197,94,0.1)"},llm:{label:"LLM Judge",color:"#a78bfa",bg:"rgba(167,139,250,0.1)"},tool:{label:"Tool-Based",color:"var(--info)",bg:"rgba(59,130,246,0.1)"}},jr={deterministic:"Deterministic",llm:"LLM Judge",tool:"Tool-Based"},pn={deterministic:[{id:"uipath-exact-match",name:"Exact Match"},{id:"uipath-contains",name:"Contains"},{id:"uipath-json-similarity",name:"JSON Similarity"}],llm:[{id:"uipath-llm-judge-output-semantic-similarity",name:"LLM Judge Output"},{id:"uipath-llm-judge-output-strict-json-similarity",name:"LLM Judge Strict JSON"},{id:"uipath-llm-judge-trajectory-similarity",name:"LLM Judge Trajectory"},{id:"uipath-llm-judge-trajectory-simulation",name:"LLM Judge Trajectory Simulation"}],tool:[{id:"uipath-tool-call-order",name:"Tool Call Order"},{id:"uipath-tool-call-args",name:"Tool Call Args"},{id:"uipath-tool-call-count",name:"Tool Call Count"},{id:"uipath-tool-call-output",name:"Tool Call Output"}]};function Os(e){return e.includes("trajectory")?{targetOutputKey:!1,prompt:!0}:e.includes("llm-judge")?{targetOutputKey:!0,prompt:!0}:e.includes("tool-call-output")?{targetOutputKey:!0,prompt:!1}:e.includes("exact-match")||e.includes("contains")||e.includes("json-similarity")?{targetOutputKey:!0,prompt:!1}:{targetOutputKey:!1,prompt:!1}}const pr={"uipath-exact-match":{description:"Checks whether the agent output exactly matches the expected output.",prompt:""},"uipath-contains":{description:"Checks whether the agent output contains the expected substring.",prompt:""},"uipath-json-similarity":{description:"Compares JSON structures for semantic similarity, ignoring key ordering and whitespace.",prompt:""},"uipath-llm-judge-output-semantic-similarity":{description:"Uses an LLM to score semantic similarity between the agent's actual output and the expected output, accounting for synonyms, paraphrases, and equivalent expressions.",prompt:`As an expert evaluator, analyze the semantic similarity between the expected and actual outputs and determine a score from 0 to 100. Focus on comparing meaning and contextual equivalence of corresponding fields, accounting for alternative valid expressions, synonyms, and reasonable variations in language while maintaining high standards for accuracy and completeness. Provide your score with a brief justification. + `}),a.jsxs(jl,{nodes:s,edges:u,onNodesChange:l,onEdgesChange:d,nodeTypes:$c,edgeTypes:Uc,onInit:v=>{w.current=v},onNodeClick:D,fitView:!0,proOptions:{hideAttribution:!0},nodesDraggable:!1,nodesConnectable:!1,elementsSelectable:!1,children:[a.jsx(Dl,{color:"var(--bg-tertiary)",gap:16}),a.jsx(Pl,{showInteractive:!1}),a.jsx(Bl,{position:"top-right",children:a.jsxs("button",{onClick:S,title:R?"Remove all breakpoints":"Set breakpoints on all nodes",style:{background:"var(--bg-secondary)",color:R?"var(--error)":"var(--text-muted)",border:`1px solid ${R?"var(--error)":"var(--node-border)"}`,borderRadius:6,padding:"4px 10px",fontSize:12,cursor:"pointer",display:"flex",alignItems:"center",gap:4},children:[a.jsx("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",background:R?"var(--error)":"var(--node-border)"}}),R?"Clear all":"Break all"]})}),a.jsx(Fl,{nodeColor:v=>{var I;if(v.type==="groupNode")return"var(--bg-tertiary)";const E=(I=v.data)==null?void 0:I.status;return E==="completed"?"var(--success)":E==="running"?"var(--warning)":E==="failed"?"var(--error)":"var(--node-border)"},nodeStrokeWidth:0,style:{background:"var(--bg-secondary)",width:120,height:80}})]})]})}const Ut="__setup__";function Xc({entrypoint:e,mode:t,ws:n,onRunCreated:r,isMobile:i}){const[s,o]=N.useState("{}"),[l,u]=N.useState({}),[c,d]=N.useState(!1),[p,m]=N.useState(!0),[f,h]=N.useState(null),[b,x]=N.useState(""),[y,w]=N.useState(!0),[T,j]=N.useState(()=>{const I=localStorage.getItem("setupTextareaHeight");return I?parseInt(I,10):140}),O=N.useRef(null),[_,P]=N.useState(()=>{const I=localStorage.getItem("setupPanelWidth");return I?parseInt(I,10):380}),D=t==="run";N.useEffect(()=>{m(!0),h(null),Ql(e).then(I=>{u(I.mock_input),o(JSON.stringify(I.mock_input,null,2))}).catch(I=>{console.error("Failed to load mock input:",I);const H=I.detail||{};h(H.message||`Failed to load schema for "${e}"`),o("{}")}).finally(()=>m(!1))},[e]),N.useEffect(()=>{Ee.getState().clearBreakpoints(Ut)},[]);const R=async()=>{let I;try{I=JSON.parse(s)}catch{alert("Invalid JSON input");return}d(!0);try{const H=Ee.getState().breakpoints[Ut]??{},U=Object.keys(H),V=await Ri(e,I,t,U);Ee.getState().clearBreakpoints(Ut),Ee.getState().upsertRun(V),r(V.id)}catch(H){console.error("Failed to create run:",H)}finally{d(!1)}},S=async()=>{const I=b.trim();if(I){d(!0);try{const H=Ee.getState().breakpoints[Ut]??{},U=Object.keys(H),V=await Ri(e,l,"chat",U);Ee.getState().clearBreakpoints(Ut),Ee.getState().upsertRun(V),Ee.getState().addLocalChatMessage(V.id,{message_id:`local-${Date.now()}`,role:"user",content:I}),n.sendChatMessage(V.id,I),r(V.id)}catch(H){console.error("Failed to create chat run:",H)}finally{d(!1)}}};N.useEffect(()=>{try{JSON.parse(s),w(!0)}catch{w(!1)}},[s]);const M=N.useCallback(I=>{I.preventDefault();const H="touches"in I?I.touches[0].clientY:I.clientY,U=T,V=F=>{const $="touches"in F?F.touches[0].clientY:F.clientY,k=Math.max(60,U+(H-$));j(k)},g=()=>{document.removeEventListener("mousemove",V),document.removeEventListener("mouseup",g),document.removeEventListener("touchmove",V),document.removeEventListener("touchend",g),document.body.style.cursor="",document.body.style.userSelect="",localStorage.setItem("setupTextareaHeight",String(T))};document.body.style.cursor="row-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",V),document.addEventListener("mouseup",g),document.addEventListener("touchmove",V,{passive:!1}),document.addEventListener("touchend",g)},[T]),L=N.useCallback(I=>{I.preventDefault();const H="touches"in I?I.touches[0].clientX:I.clientX,U=_,V=F=>{const $=O.current;if(!$)return;const k="touches"in F?F.touches[0].clientX:F.clientX,ie=$.clientWidth-300,K=Math.max(280,Math.min(ie,U+(H-k)));P(K)},g=()=>{document.removeEventListener("mousemove",V),document.removeEventListener("mouseup",g),document.removeEventListener("touchmove",V),document.removeEventListener("touchend",g),document.body.style.cursor="",document.body.style.userSelect="",localStorage.setItem("setupPanelWidth",String(_))};document.body.style.cursor="col-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",V),document.addEventListener("mouseup",g),document.addEventListener("touchmove",V,{passive:!1}),document.addEventListener("touchend",g)},[_]),C=D?"Autonomous":"Conversational",v=D?"var(--success)":"var(--accent)",E=a.jsxs("div",{className:"shrink-0 flex flex-col",style:i?{background:"var(--bg-primary)"}:{width:_,background:"var(--bg-primary)"},children:[a.jsxs("div",{className:"px-4 text-xs font-semibold border-b flex items-center gap-2 h-10",style:{color:"var(--text-muted)",borderColor:"var(--border)",background:"var(--bg-secondary)"},children:[a.jsx("span",{style:{color:v},children:"●"}),C]}),a.jsxs("div",{className:"flex-1 overflow-y-auto flex flex-col items-center justify-center gap-4 px-6",children:[a.jsx("svg",{width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round",style:{color:"var(--text-muted)",opacity:.5},children:D?a.jsxs(a.Fragment,{children:[a.jsx("circle",{cx:"12",cy:"12",r:"10"}),a.jsx("polyline",{points:"12 6 12 12 16 14"})]}):a.jsx("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})}),a.jsxs("div",{className:"text-center space-y-1.5",children:[a.jsx("p",{className:"text-sm font-medium",style:{color:"var(--text-secondary)"},children:D?"Ready to execute":"Ready to chat"}),a.jsxs("p",{className:"text-xs leading-relaxed",style:{color:"var(--text-muted)"},children:["Click nodes to set breakpoints",D?a.jsxs(a.Fragment,{children:[",",a.jsx("br",{}),"configure input below, then run"]}):a.jsxs(a.Fragment,{children:[",",a.jsx("br",{}),"then send your first message"]})]})]})]}),D?a.jsxs("div",{className:"flex flex-col",style:{background:"var(--bg-primary)"},children:[!i&&a.jsx("div",{onMouseDown:M,onTouchStart:M,className:"shrink-0 drag-handle-row"}),a.jsxs("div",{className:"px-4 py-3",children:[f?a.jsx("div",{className:"text-xs mb-3 px-3 py-2 rounded",style:{color:"var(--error)",background:"color-mix(in srgb, var(--error) 10%, var(--bg-secondary))"},children:f}):a.jsxs(a.Fragment,{children:[a.jsxs("label",{className:"block text-[11px] font-medium mb-1.5",style:{color:"var(--text-muted)"},children:["Input",p&&a.jsx("span",{className:"ml-2 font-normal",children:"Loading..."})]}),a.jsx("textarea",{value:s,onChange:I=>o(I.target.value),spellCheck:!1,className:"w-full rounded-md px-3 py-2 text-xs font-mono leading-relaxed resize-none mb-3",style:{height:i?120:T,background:"var(--bg-secondary)",border:`1px solid ${y?"var(--border)":"#b91c1c"}`,color:"var(--text-primary)"}})]}),a.jsx("button",{onClick:R,disabled:c||p||!!f,className:"w-full py-2 text-sm font-semibold rounded-md border cursor-pointer disabled:opacity-30 disabled:cursor-not-allowed transition-colors flex items-center justify-center gap-2",style:{background:"transparent",borderColor:v,color:v},onMouseEnter:I=>{c||(I.currentTarget.style.background=`color-mix(in srgb, ${v} 10%, transparent)`)},onMouseLeave:I=>{I.currentTarget.style.background="transparent"},children:c?"Starting...":a.jsxs(a.Fragment,{children:[a.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",stroke:"none",children:a.jsx("polygon",{points:"5,3 19,12 5,21"})}),"Execute"]})})]})]}):a.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 border-t",style:{borderColor:"var(--border)"},children:[a.jsx("input",{value:b,onChange:I=>x(I.target.value),onKeyDown:I=>{I.key==="Enter"&&!I.shiftKey&&(I.preventDefault(),S())},disabled:c||p,placeholder:c?"Starting...":"Message...",className:"flex-1 bg-transparent text-sm py-1 disabled:opacity-40 placeholder:text-[var(--text-muted)]",style:{color:"var(--text-primary)"}}),a.jsx("button",{onClick:S,disabled:c||p||!b.trim(),className:"text-xs font-semibold px-3 py-1.5 rounded transition-colors cursor-pointer disabled:opacity-30 disabled:cursor-not-allowed",style:{color:!c&&b.trim()?"var(--accent)":"var(--text-muted)",background:"transparent"},onMouseEnter:I=>{!c&&b.trim()&&(I.currentTarget.style.background="color-mix(in srgb, var(--accent) 10%, transparent)")},onMouseLeave:I=>{I.currentTarget.style.background="transparent"},children:"Send"})]})]});return i?a.jsxs("div",{className:"flex flex-col h-full",children:[a.jsx("div",{className:"shrink-0",style:{height:"40vh"},children:a.jsx(Un,{entrypoint:e,traces:[],runId:Ut})}),a.jsx("div",{className:"flex-1 overflow-y-auto flex flex-col min-h-0",children:E})]}):a.jsxs("div",{ref:O,className:"flex h-full",children:[a.jsx("div",{className:"flex-1 min-w-0",children:a.jsx(Un,{entrypoint:e,traces:[],runId:Ut})}),a.jsx("div",{onMouseDown:L,onTouchStart:L,className:"shrink-0 drag-handle-col"}),E]})}const Zc={key:"var(--info)",string:"var(--success)",number:"var(--warning)",boolean:"var(--accent)",null:"var(--accent)",punctuation:"var(--text-muted)"};function Jc(e){const t=[],n=/("(?:[^"\\]|\\.)*")\s*:|("(?:[^"\\]|\\.)*")|(-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?)\b|(true|false)\b|(null)\b|([{}[\]:,])/g;let r=0,i;for(;(i=n.exec(e))!==null;){if(i.index>r&&t.push({type:"punctuation",text:e.slice(r,i.index)}),i[1]!==void 0){t.push({type:"key",text:i[1]});const s=e.indexOf(":",i.index+i[1].length);s!==-1&&(s>i.index+i[1].length&&t.push({type:"punctuation",text:e.slice(i.index+i[1].length,s)}),t.push({type:"punctuation",text:":"}),n.lastIndex=s+1)}else i[2]!==void 0?t.push({type:"string",text:i[2]}):i[3]!==void 0?t.push({type:"number",text:i[3]}):i[4]!==void 0?t.push({type:"boolean",text:i[4]}):i[5]!==void 0?t.push({type:"null",text:i[5]}):i[6]!==void 0&&t.push({type:"punctuation",text:i[6]});r=n.lastIndex}return rJc(e),[e]);return a.jsx("pre",{className:t,style:n,children:r.map((i,s)=>a.jsx("span",{style:{color:Zc[i.type]},children:i.text},s))})}const Qc={started:{color:"var(--info)",label:"Started"},running:{color:"var(--warning)",label:"Running"},completed:{color:"var(--success)",label:"Completed"},failed:{color:"var(--error)",label:"Failed"},error:{color:"var(--error)",label:"Error"}},eu={color:"var(--text-muted)",label:"Unknown"};function tu(e){if(typeof e!="string")return null;const t=e.trim();if(t.startsWith("{")&&t.endsWith("}")||t.startsWith("[")&&t.endsWith("]"))try{return JSON.stringify(JSON.parse(t),null,2)}catch{return null}return null}const Gi=200;function nu(e){if(typeof e=="string")return e;if(e==null)return String(e);try{return JSON.stringify(e,null,2)}catch{return String(e)}}function ru({value:e}){const[t,n]=N.useState(!1),r=nu(e),i=N.useMemo(()=>tu(e),[e]),s=i!==null,o=i??r,l=o.length>Gi||o.includes(` +`),u=N.useCallback(()=>n(c=>!c),[]);return l?a.jsxs("div",{children:[t?s?a.jsx(ot,{json:o,className:"font-mono text-[11px] whitespace-pre-wrap break-all",style:{}}):a.jsx("pre",{className:"font-mono text-[11px] whitespace-pre-wrap break-all",style:{color:"var(--text-primary)"},children:o}):a.jsxs("span",{className:"font-mono text-[11px] break-all",style:{color:"var(--text-primary)"},children:[o.slice(0,Gi),"..."]}),a.jsx("button",{onClick:u,className:"text-[11px] cursor-pointer ml-1 px-1",style:{color:"var(--info)"},children:t?"[less]":"[more]"})]}):s?a.jsx(ot,{json:o,className:"font-mono text-[11px] break-all whitespace-pre-wrap",style:{}}):a.jsx("span",{className:"font-mono text-[11px] break-all",style:{color:"var(--text-primary)"},children:o})}function iu({span:e}){const[t,n]=N.useState(!0),[r,i]=N.useState(!1),[s,o]=N.useState("table"),[l,u]=N.useState(!1),c=Qc[e.status.toLowerCase()]??{...eu,label:e.status},d=N.useMemo(()=>JSON.stringify(e,null,2),[e]),p=N.useCallback(()=>{navigator.clipboard.writeText(d).then(()=>{u(!0),setTimeout(()=>u(!1),1500)})},[d]),m=Object.entries(e.attributes),f=[{label:"Span",value:e.span_id},...e.trace_id?[{label:"Trace",value:e.trace_id}]:[],{label:"Run",value:e.run_id},...e.parent_span_id?[{label:"Parent",value:e.parent_span_id}]:[]];return a.jsxs("div",{className:"flex flex-col h-full text-xs leading-normal",children:[a.jsxs("div",{className:"px-2 border-b flex items-center gap-1 shrink-0",style:{borderColor:"var(--border)",background:"var(--bg-secondary)",height:"32px"},children:[a.jsx("button",{onClick:()=>o("table"),className:"px-2.5 h-6 text-[11px] font-semibold rounded transition-colors cursor-pointer inline-flex items-center",style:{color:s==="table"?"var(--accent)":"var(--text-muted)",background:s==="table"?"color-mix(in srgb, var(--accent) 10%, transparent)":"transparent"},onMouseEnter:h=>{s!=="table"&&(h.currentTarget.style.color="var(--text-primary)")},onMouseLeave:h=>{s!=="table"&&(h.currentTarget.style.color="var(--text-muted)")},children:"Table"}),a.jsx("button",{onClick:()=>o("json"),className:"px-2.5 h-6 text-[11px] font-semibold rounded transition-colors cursor-pointer inline-flex items-center",style:{color:s==="json"?"var(--accent)":"var(--text-muted)",background:s==="json"?"color-mix(in srgb, var(--accent) 10%, transparent)":"transparent"},onMouseEnter:h=>{s!=="json"&&(h.currentTarget.style.color="var(--text-primary)")},onMouseLeave:h=>{s!=="json"&&(h.currentTarget.style.color="var(--text-muted)")},children:"JSON"}),a.jsxs("span",{className:"ml-auto shrink-0 inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-[11px] font-bold uppercase tracking-wider",style:{background:`color-mix(in srgb, ${c.color} 15%, var(--bg-secondary))`,color:c.color},children:[a.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full",style:{background:c.color}}),c.label]})]}),a.jsx("div",{className:"overflow-y-auto flex-1 p-0.5 pr-0 pt-0 mr-0.5 mt-0.5",children:s==="table"?a.jsxs(a.Fragment,{children:[m.length>0&&a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"px-2 py-1 text-[11px] uppercase font-bold tracking-wider border-b cursor-pointer flex items-center",style:{color:"var(--success)",borderColor:"var(--border)",background:"var(--bg-secondary)"},onClick:()=>n(h=>!h),children:[a.jsxs("span",{className:"flex-1",children:["Attributes (",m.length,")"]}),a.jsx("span",{style:{color:"var(--text-muted)",transform:t?"rotate(0deg)":"rotate(-90deg)"},children:"▾"})]}),t&&m.map(([h,b],x)=>a.jsxs("div",{className:"flex gap-2 px-2 py-1 items-start border-b",style:{borderColor:"var(--border)",background:x%2===0?"var(--bg-primary)":"var(--bg-secondary)"},children:[a.jsx("span",{className:"font-mono font-semibold shrink-0 pt-px truncate text-[11px]",style:{color:"var(--info)",width:"35%"},title:h,children:h}),a.jsx("span",{className:"flex-1 min-w-0",children:a.jsx(ru,{value:b})})]},h))]}),a.jsxs("div",{className:"px-2 py-1 text-[11px] uppercase font-bold tracking-wider border-b cursor-pointer flex items-center",style:{color:"var(--success)",borderColor:"var(--border)",background:"var(--bg-secondary)"},onClick:()=>i(h=>!h),children:[a.jsxs("span",{className:"flex-1",children:["Identifiers (",f.length,")"]}),a.jsx("span",{style:{color:"var(--text-muted)",transform:r?"rotate(0deg)":"rotate(-90deg)"},children:"▾"})]}),r&&f.map((h,b)=>a.jsxs("div",{className:"flex gap-2 px-2 py-1 items-start border-b",style:{borderColor:"var(--border)",background:b%2===0?"var(--bg-primary)":"var(--bg-secondary)"},children:[a.jsx("span",{className:"font-mono font-semibold shrink-0 pt-px truncate text-[11px]",style:{color:"var(--info)",width:"35%"},title:h.label,children:h.label}),a.jsx("span",{className:"flex-1 min-w-0",children:a.jsx("span",{className:"font-mono text-[11px] break-all",style:{color:"var(--text-primary)"},children:h.value})})]},h.label))]}):a.jsxs("div",{className:"relative",children:[a.jsx("button",{onClick:p,className:"absolute top-1 right-1 z-10 text-[11px] cursor-pointer px-2 py-1 rounded transition-colors",style:{color:l?"var(--success)":"var(--text-muted)",background:"var(--bg-secondary)",border:"1px solid var(--border)"},onMouseEnter:h=>{l||(h.currentTarget.style.color="var(--text-primary)")},onMouseLeave:h=>{h.currentTarget.style.color=l?"var(--success)":"var(--text-muted)"},children:l?"Copied!":"Copy"}),a.jsx(ot,{json:d,className:"font-mono text-[11px] whitespace-pre-wrap p-2",style:{}})]})})]})}function ou(e){const t=[];function n(r,i){t.push({span:r.span,depth:i});for(const s of r.children)n(s,i+1)}for(const r of e)n(r,0);return t}function su({tree:e,selectedSpan:t,onSelect:n}){const r=N.useMemo(()=>ou(e),[e]),{globalStart:i,totalDuration:s}=N.useMemo(()=>{if(r.length===0)return{globalStart:0,totalDuration:1};let o=1/0,l=-1/0;for(const{span:u}of r){const c=new Date(u.timestamp).getTime();o=Math.min(o,c),l=Math.max(l,c+(u.duration_ms??0))}return{globalStart:o,totalDuration:Math.max(l-o,1)}},[r]);return r.length===0?null:a.jsx(a.Fragment,{children:r.map(({span:o,depth:l})=>{var b;const u=new Date(o.timestamp).getTime()-i,c=o.duration_ms??0,d=u/s*100,p=Math.max(c/s*100,.3),m=As[o.status.toLowerCase()]??"var(--text-muted)",f=o.span_id===(t==null?void 0:t.span_id),h=(b=o.attributes)==null?void 0:b["openinference.span.kind"];return a.jsxs("button",{"data-span-id":o.span_id,onClick:()=>n(o),className:"w-full text-left text-xs leading-normal py-1 flex items-center transition-colors",style:{background:f?"color-mix(in srgb, var(--accent) 10%, var(--bg-primary))":void 0,borderLeft:f?"2px solid var(--accent)":"2px solid transparent"},onMouseEnter:x=>{f||(x.currentTarget.style.background="var(--bg-hover)")},onMouseLeave:x=>{f||(x.currentTarget.style.background="")},children:[a.jsxs("div",{className:"shrink-0 flex items-center gap-1 overflow-hidden",style:{width:"35%",minWidth:"80px",paddingLeft:`${l*12+4}px`},children:[a.jsx("span",{className:"shrink-0 flex items-center justify-center w-3.5 h-3.5",children:a.jsx(Ms,{kind:h,statusColor:m})}),a.jsx("span",{className:"text-[var(--text-primary)] truncate",children:o.span_name})]}),a.jsx("div",{className:"flex-1 relative h-[14px] mx-1 rounded-sm",style:{background:"var(--bg-secondary)"},children:a.jsx("div",{className:"absolute rounded-sm",style:{left:`${d}%`,width:`${p}%`,top:"2px",bottom:"2px",background:m,opacity:.8,minWidth:"2px"}})}),a.jsx("span",{className:"shrink-0 text-[10px] tabular-nums pr-2",style:{width:"52px",textAlign:"right",color:"var(--text-muted)"},children:Is(o.duration_ms)})]},o.span_id)})})}const As={started:"var(--info)",running:"var(--warning)",completed:"var(--success)",failed:"var(--error)",error:"var(--error)"};function Ms({kind:e,statusColor:t}){const n=t,r=14,i={width:r,height:r,viewBox:"0 0 16 16",fill:"none",stroke:n,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"};switch(e){case"LLM":return a.jsx("svg",{...i,children:a.jsx("path",{d:"M8 2L9 5L12 4L10 7L14 8L10 9L12 12L9 11L8 14L7 11L4 12L6 9L2 8L6 7L4 4L7 5Z",fill:n,stroke:"none"})});case"TOOL":return a.jsx("svg",{...i,children:a.jsx("path",{d:"M10.5 2.5a3.5 3.5 0 0 0-3.17 4.93L3.5 11.27a1 1 0 0 0 0 1.41l.82.82a1 1 0 0 0 1.41 0l3.84-3.83A3.5 3.5 0 1 0 10.5 2.5z"})});case"AGENT":return a.jsxs("svg",{...i,children:[a.jsx("rect",{x:"3",y:"5",width:"10",height:"8",rx:"2"}),a.jsx("circle",{cx:"6",cy:"9",r:"1",fill:n,stroke:"none"}),a.jsx("circle",{cx:"10",cy:"9",r:"1",fill:n,stroke:"none"}),a.jsx("path",{d:"M8 2v3"}),a.jsx("path",{d:"M6 2h4"})]});case"CHAIN":return a.jsxs("svg",{...i,children:[a.jsx("path",{d:"M6.5 9.5L9.5 6.5"}),a.jsx("path",{d:"M4.5 8.5l-1 1a2 2 0 0 0 2.83 2.83l1-1"}),a.jsx("path",{d:"M11.5 7.5l1-1a2 2 0 0 0-2.83-2.83l-1 1"})]});case"RETRIEVER":return a.jsxs("svg",{...i,children:[a.jsx("circle",{cx:"7",cy:"7",r:"4"}),a.jsx("path",{d:"M10 10l3.5 3.5"})]});case"EMBEDDING":return a.jsxs("svg",{...i,children:[a.jsx("rect",{x:"2",y:"2",width:"4",height:"4",rx:"0.5"}),a.jsx("rect",{x:"10",y:"2",width:"4",height:"4",rx:"0.5"}),a.jsx("rect",{x:"2",y:"10",width:"4",height:"4",rx:"0.5"}),a.jsx("rect",{x:"10",y:"10",width:"4",height:"4",rx:"0.5"})]});default:return a.jsx("span",{className:"shrink-0 w-2 h-2 rounded-full",style:{background:t}})}}function au(e){const t=new Map(e.map(o=>[o.span_id,o])),n=new Map;for(const o of e)if(o.parent_span_id){const l=n.get(o.parent_span_id)??[];l.push(o),n.set(o.parent_span_id,l)}const r=e.filter(o=>o.parent_span_id===null||!t.has(o.parent_span_id));function i(o){const l=(n.get(o.span_id)??[]).sort((u,c)=>u.timestamp.localeCompare(c.timestamp));return{span:o,children:l.map(i)}}return r.sort((o,l)=>o.timestamp.localeCompare(l.timestamp)).map(i).flatMap(o=>o.span.span_name==="root"?o.children:[o])}function Is(e){return e==null?"":e<1e3?`${e.toFixed(0)}ms`:`${(e/1e3).toFixed(2)}s`}function Rs(e){return e.map(t=>{const{span:n}=t;return t.children.length>0?{name:n.span_name,children:Rs(t.children)}:{name:n.span_name}})}function Dr({traces:e}){const[t,n]=N.useState(null),[r,i]=N.useState(new Set),[s,o]=N.useState(()=>{const D=localStorage.getItem("traceTreeSplitWidth");return D?parseFloat(D):50}),[l,u]=N.useState(!1),[c,d]=N.useState(!1),[p,m]=N.useState(()=>localStorage.getItem("traceViewMode")||"tree"),f=au(e),h=N.useMemo(()=>JSON.stringify(Rs(f),null,2),[e]),b=N.useCallback(()=>{navigator.clipboard.writeText(h).then(()=>{d(!0),setTimeout(()=>d(!1),1500)})},[h]),x=Ee(D=>D.focusedSpan),y=Ee(D=>D.setFocusedSpan),[w,T]=N.useState(null),j=N.useRef(null),O=N.useCallback(D=>{i(R=>{const S=new Set(R);return S.has(D)?S.delete(D):S.add(D),S})},[]),_=N.useRef(null);N.useEffect(()=>{const D=f.length>0?f[0].span.span_id:null,R=_.current;if(_.current=D,D&&D!==R)n(f[0].span);else if(t===null)f.length>0&&n(f[0].span);else{const S=e.find(M=>M.span_id===t.span_id);S&&S!==t&&n(S)}},[e]),N.useEffect(()=>{if(!x)return;const R=e.filter(S=>S.span_name===x.name).sort((S,M)=>S.timestamp.localeCompare(M.timestamp))[x.index];if(R){n(R),T(R.span_id);const S=new Map(e.map(M=>[M.span_id,M.parent_span_id]));i(M=>{const L=new Set(M);let C=R.parent_span_id;for(;C;)L.delete(C),C=S.get(C)??null;return L})}y(null)},[x,e,y]),N.useEffect(()=>{if(!w)return;const D=w;T(null),requestAnimationFrame(()=>{const R=j.current,S=R==null?void 0:R.querySelector(`[data-span-id="${D}"]`);R&&S&&S.scrollIntoView({block:"center",behavior:"smooth"})})},[w]),N.useEffect(()=>{if(!l)return;const D=S=>{const M=document.querySelector(".trace-tree-container");if(!M)return;const L=M.getBoundingClientRect(),C=(S.clientX-L.left)/L.width*100,v=Math.max(20,Math.min(80,C));o(v),localStorage.setItem("traceTreeSplitWidth",String(v))},R=()=>{u(!1)};return window.addEventListener("mousemove",D),window.addEventListener("mouseup",R),()=>{window.removeEventListener("mousemove",D),window.removeEventListener("mouseup",R)}},[l]);const P=D=>{D.preventDefault(),u(!0)};return a.jsxs("div",{className:"flex h-full trace-tree-container",style:{cursor:l?"col-resize":void 0},children:[a.jsxs("div",{className:"flex flex-col",style:{width:`${s}%`},children:[e.length>0&&a.jsxs("div",{className:"flex items-center gap-1 px-2 border-b shrink-0",style:{borderColor:"var(--border)",background:"var(--bg-secondary)",height:"32px"},children:[a.jsx("button",{onClick:()=>{m("tree"),localStorage.setItem("traceViewMode","tree")},className:"px-2.5 h-6 text-[11px] font-semibold rounded transition-colors cursor-pointer inline-flex items-center",style:{color:p==="tree"?"var(--accent)":"var(--text-muted)",background:p==="tree"?"color-mix(in srgb, var(--accent) 10%, transparent)":"transparent"},onMouseEnter:D=>{p!=="tree"&&(D.currentTarget.style.color="var(--text-primary)")},onMouseLeave:D=>{p!=="tree"&&(D.currentTarget.style.color="var(--text-muted)")},children:"Tree"}),a.jsx("button",{onClick:()=>{m("timeline"),localStorage.setItem("traceViewMode","timeline")},className:"px-2.5 h-6 text-[11px] font-semibold rounded transition-colors cursor-pointer inline-flex items-center",style:{color:p==="timeline"?"var(--accent)":"var(--text-muted)",background:p==="timeline"?"color-mix(in srgb, var(--accent) 10%, transparent)":"transparent"},onMouseEnter:D=>{p!=="timeline"&&(D.currentTarget.style.color="var(--text-primary)")},onMouseLeave:D=>{p!=="timeline"&&(D.currentTarget.style.color="var(--text-muted)")},children:"Timeline"}),a.jsx("button",{onClick:()=>{m("json"),localStorage.setItem("traceViewMode","json")},className:"px-2.5 h-6 text-[11px] font-semibold rounded transition-colors cursor-pointer inline-flex items-center",style:{color:p==="json"?"var(--accent)":"var(--text-muted)",background:p==="json"?"color-mix(in srgb, var(--accent) 10%, transparent)":"transparent"},onMouseEnter:D=>{p!=="json"&&(D.currentTarget.style.color="var(--text-primary)")},onMouseLeave:D=>{p!=="json"&&(D.currentTarget.style.color="var(--text-muted)")},children:"JSON"})]}),a.jsx("div",{ref:j,className:"overflow-y-auto flex-1 p-0.5 pr-0 pt-0 mr-0.5 mt-0.5",children:f.length===0?a.jsx("div",{className:"flex items-center justify-center h-full",children:a.jsx("p",{className:"text-[var(--text-muted)] text-sm",children:"No traces yet"})}):p==="tree"?f.map((D,R)=>a.jsx(Os,{node:D,depth:0,selectedId:(t==null?void 0:t.span_id)??null,onSelect:n,isLast:R===f.length-1,collapsedIds:r,toggleExpanded:O},D.span.span_id)):p==="timeline"?a.jsx(su,{tree:f,selectedSpan:t,onSelect:n}):a.jsxs("div",{className:"relative",children:[a.jsx("button",{onClick:b,className:"absolute top-1 right-1 z-10 text-[11px] cursor-pointer px-2 py-1 rounded transition-colors",style:{color:c?"var(--success)":"var(--text-muted)",background:"var(--bg-secondary)",border:"1px solid var(--border)"},onMouseEnter:D=>{c||(D.currentTarget.style.color="var(--text-primary)")},onMouseLeave:D=>{D.currentTarget.style.color=c?"var(--success)":"var(--text-muted)"},children:c?"Copied!":"Copy"}),a.jsx(ot,{json:h,className:"font-mono text-[11px] whitespace-pre-wrap p-2",style:{}})]})})]}),a.jsx("div",{onMouseDown:P,className:"shrink-0 drag-handle-col",style:l?{background:"var(--accent)"}:void 0}),a.jsx("div",{className:"flex-1 overflow-hidden",children:t?a.jsx(iu,{span:t}):a.jsx("div",{className:"flex items-center justify-center h-full",children:a.jsx("p",{className:"text-[var(--text-muted)] text-sm",children:"Select a span to view details"})})})]})}function Os({node:e,depth:t,selectedId:n,onSelect:r,isLast:i,collapsedIds:s,toggleExpanded:o}){var b;const{span:l}=e,u=!s.has(l.span_id),c=As[l.status.toLowerCase()]??"var(--text-muted)",d=Is(l.duration_ms),p=l.span_id===n,m=e.children.length>0,f=t*20,h=(b=l.attributes)==null?void 0:b["openinference.span.kind"];return a.jsxs("div",{className:"relative",children:[t>0&&a.jsx("div",{className:"absolute top-0 z-10 pointer-events-none",style:{left:`${f-10}px`,width:"1px",height:i?"16px":"100%",background:"var(--border)"}}),a.jsxs("button",{"data-span-id":l.span_id,onClick:()=>r(l),className:"w-full text-left text-xs leading-normal py-1.5 pr-2 flex items-center gap-1.5 transition-colors relative",style:{paddingLeft:`${f+4}px`,background:p?"color-mix(in srgb, var(--accent) 15%, var(--bg-primary))":void 0,borderLeft:p?"3px solid var(--accent)":"3px solid transparent"},onMouseEnter:x=>{p||(x.currentTarget.style.background="var(--bg-hover)")},onMouseLeave:x=>{p||(x.currentTarget.style.background="")},children:[t>0&&a.jsx("div",{className:"absolute z-10 pointer-events-none",style:{left:`${f-10}px`,top:"50%",width:"10px",height:"1px",background:"var(--border)"}}),m?a.jsx("span",{onClick:x=>{x.stopPropagation(),o(l.span_id)},className:"shrink-0 w-5 h-5 flex items-center justify-center cursor-pointer rounded hover:bg-[var(--bg-hover)]",style:{color:"var(--text-muted)"},children:a.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",style:{transform:u?"rotate(90deg)":"rotate(0deg)"},children:a.jsx("path",{d:"M3 1.5L7 5L3 8.5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"})})}):a.jsx("span",{className:"shrink-0 w-4"}),a.jsx("span",{className:"shrink-0 flex items-center justify-center w-4 h-4",children:a.jsx(Ms,{kind:h,statusColor:c})}),a.jsx("span",{className:"text-[var(--text-primary)] truncate min-w-0 flex-1",children:l.span_name}),d&&a.jsx("span",{className:"text-[var(--text-muted)] shrink-0 ml-auto pl-2 tabular-nums",children:d})]}),u&&e.children.map((x,y)=>a.jsx(Os,{node:x,depth:t+1,selectedId:n,onSelect:r,isLast:y===e.children.length-1,collapsedIds:s,toggleExpanded:o},x.span.span_id))]})}const lu={DEBUG:{color:"var(--text-muted)",bg:"color-mix(in srgb, var(--text-muted) 15%, var(--bg-secondary))",border:"var(--text-muted)"},INFO:{color:"var(--info)",bg:"color-mix(in srgb, var(--info) 15%, var(--bg-secondary))",border:"var(--info)"},WARN:{color:"var(--warning)",bg:"color-mix(in srgb, var(--warning) 15%, var(--bg-secondary))",border:"var(--warning)"},WARNING:{color:"var(--warning)",bg:"color-mix(in srgb, var(--warning) 15%, var(--bg-secondary))",border:"var(--warning)"},ERROR:{color:"var(--error)",bg:"color-mix(in srgb, var(--error) 15%, var(--bg-secondary))",border:"var(--error)"},CRITICAL:{color:"var(--error)",bg:"color-mix(in srgb, var(--error) 15%, var(--bg-secondary))",border:"var(--error)"}},cu={color:"var(--text-muted)",bg:"transparent"};function qi({logs:e}){const t=N.useRef(null),n=N.useRef(null),[r,i]=N.useState(!1);N.useEffect(()=>{var o;(o=n.current)==null||o.scrollIntoView({behavior:"smooth"})},[e.length]);const s=()=>{const o=t.current;o&&i(o.scrollTop>100)};return e.length===0?a.jsx("div",{className:"h-full flex items-center justify-center",children:a.jsx("p",{className:"text-[var(--text-muted)] text-sm",children:"No logs yet"})}):a.jsxs("div",{className:"h-full relative",children:[a.jsxs("div",{ref:t,onScroll:s,className:"h-full overflow-y-auto font-mono text-xs leading-normal",children:[e.map((o,l)=>{const u=new Date(o.timestamp).toLocaleTimeString(void 0,{hour12:!1}),c=o.level.toUpperCase(),d=c.slice(0,4),p=lu[c]??cu,m=l%2===0;return a.jsxs("div",{className:"flex gap-3 px-3 py-1.5",style:{background:m?"var(--bg-primary)":"var(--bg-secondary)"},children:[a.jsx("span",{className:"text-[var(--text-muted)] shrink-0",children:u}),a.jsx("span",{className:"shrink-0 self-start px-1.5 py-0.5 rounded text-[10px] font-semibold leading-none inline-flex items-center",style:{color:p.color,background:p.bg},children:d}),a.jsx("span",{className:"text-[var(--text-primary)] whitespace-pre-wrap break-all",children:o.message})]},l)}),a.jsx("div",{ref:n})]}),r&&a.jsx("button",{onClick:()=>{var o;return(o=t.current)==null?void 0:o.scrollTo({top:0,behavior:"smooth"})},className:"absolute top-2 right-3 w-6 h-6 flex items-center justify-center rounded-full cursor-pointer transition-opacity opacity-70 hover:opacity-100",style:{background:"var(--bg-tertiary)",color:"var(--text-primary)"},title:"Scroll to top",children:a.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:a.jsx("polyline",{points:"18 15 12 9 6 15"})})})]})}const uu={started:{color:"var(--accent)",label:"started"},updated:{color:"var(--info)",label:"updated"},completed:{color:"var(--success)",label:"completed"},faulted:{color:"var(--error)",label:"faulted"}},Vi={color:"var(--text-muted)",label:""};function An({events:e,runStatus:t}){const n=N.useRef(null),r=N.useRef(!0),[i,s]=N.useState(null),o=()=>{const l=n.current;l&&(r.current=l.scrollHeight-l.scrollTop-l.clientHeight<40)};return N.useEffect(()=>{r.current&&n.current&&(n.current.scrollTop=n.current.scrollHeight)}),e.length===0?a.jsx("div",{className:"flex-1 flex items-center justify-center h-full",children:a.jsx("p",{className:"text-xs",style:{color:"var(--text-muted)"},children:t==="running"?"Waiting for events...":"No events yet"})}):a.jsx("div",{ref:n,onScroll:o,className:"h-full overflow-y-auto font-mono text-xs leading-normal",children:e.map((l,u)=>{const c=new Date(l.timestamp).toLocaleTimeString(void 0,{hour12:!1}),d=l.payload&&Object.keys(l.payload).length>0,p=i===u,m=l.phase?uu[l.phase]??Vi:Vi;return a.jsxs("div",{children:[a.jsxs("div",{onClick:()=>{d&&s(p?null:u)},className:"flex items-center gap-2 px-3 py-1.5",style:{background:u%2===0?"var(--bg-primary)":"var(--bg-secondary)",cursor:d?"pointer":"default"},children:[a.jsx("span",{className:"shrink-0",style:{color:"var(--text-muted)"},children:c}),a.jsx("span",{className:"shrink-0",style:{color:m.color},children:"●"}),a.jsx("span",{className:"flex-1 truncate",style:{color:"var(--text-primary)"},children:l.node_name}),m.label&&a.jsx("span",{className:"shrink-0 text-[10px]",style:{color:"var(--text-muted)"},children:m.label}),d&&a.jsx("span",{className:"shrink-0 text-[9px] transition-transform",style:{color:"var(--text-muted)",transform:p?"rotate(90deg)":"rotate(0deg)"},children:"▸"})]}),p&&d&&a.jsx("div",{className:"px-3 py-2 border-t border-b",style:{borderColor:"var(--border)",background:"color-mix(in srgb, var(--bg-secondary) 80%, var(--bg-primary))"},children:a.jsx(ot,{json:JSON.stringify(l.payload,null,2),className:"text-[11px] font-mono whitespace-pre-wrap break-words"})})]},u)})})}function _t({title:e,copyText:t,trailing:n,children:r}){const[i,s]=N.useState(!1),o=N.useCallback(()=>{t&&navigator.clipboard.writeText(t).then(()=>{s(!0),setTimeout(()=>s(!1),1500)})},[t]);return a.jsxs("div",{className:"overflow-hidden",style:{border:"1px solid var(--border)"},children:[a.jsxs("div",{className:"px-3 py-2 flex items-center gap-2",style:{background:"var(--bg-secondary)"},children:[a.jsx("span",{className:"text-[11px] font-semibold",style:{color:"var(--text-primary)"},children:e}),n,t&&a.jsx("button",{onClick:o,className:`${n?"":"ml-auto "}text-[10px] cursor-pointer px-1.5 py-0.5 rounded transition-colors`,style:{color:i?"var(--success)":"var(--text-muted)",background:"var(--bg-tertiary)",border:"none"},onMouseEnter:l=>{i||(l.currentTarget.style.color="var(--text-primary)")},onMouseLeave:l=>{l.currentTarget.style.color=i?"var(--success)":"var(--text-muted)"},children:i?"Copied":"Copy"})]}),r]})}function Yi({runId:e,status:t,ws:n,breakpointNode:r}){const i=t==="suspended",s=o=>{const l=Ee.getState().breakpoints[e]??{};n.setBreakpoints(e,Object.keys(l)),o==="step"?n.debugStep(e):o==="continue"?n.debugContinue(e):n.debugStop(e)};return a.jsxs("div",{className:"flex items-center gap-1 px-4 h-10 border-b shrink-0",style:{borderColor:"var(--border)",background:"var(--bg-secondary)"},children:[a.jsx("span",{className:"text-[11px] font-semibold mr-1",style:{color:"var(--text-muted)"},children:"Debug"}),a.jsx(pr,{label:"Step",onClick:()=>s("step"),disabled:!i,color:"var(--info)",active:i}),a.jsx(pr,{label:"Continue",onClick:()=>s("continue"),disabled:!i,color:"var(--success)",active:i}),a.jsx(pr,{label:"Stop",onClick:()=>s("stop"),disabled:!i,color:"var(--error)",active:i}),a.jsx("span",{className:"text-[11px] ml-auto truncate",style:{color:i?"var(--accent)":"var(--text-muted)"},children:i?r?`Paused at ${r}`:"Paused":t})]})}function pr({label:e,onClick:t,disabled:n,color:r,active:i}){return a.jsx("button",{onClick:t,disabled:n,className:"px-3 py-1 h-7 text-[11px] font-semibold rounded transition-colors cursor-pointer disabled:opacity-30 disabled:cursor-not-allowed",style:{color:i?r:"var(--text-muted)",background:i?`color-mix(in srgb, ${r} 10%, transparent)`:"transparent"},onMouseEnter:s=>{n||(s.currentTarget.style.background=`color-mix(in srgb, ${r} 20%, transparent)`)},onMouseLeave:s=>{s.currentTarget.style.background=i?`color-mix(in srgb, ${r} 10%, transparent)`:"transparent"},children:e})}const Xi=N.lazy(()=>Ts(()=>import("./ChatPanel-DR8dCKHB.js"),__vite__mapDeps([2,1,3,4]))),du=[],pu=[],fu=[],mu=[];function gu({run:e,ws:t,isMobile:n}){const r=e.mode==="chat",[i,s]=N.useState(280),[o,l]=N.useState(()=>{const C=localStorage.getItem("chatPanelWidth");return C?parseInt(C,10):380}),[u,c]=N.useState("primary"),[d,p]=N.useState(r?"primary":"traces"),m=N.useRef(null),f=N.useRef(null),h=N.useRef(!1),b=Ee(C=>C.traces[e.id]||du),x=Ee(C=>C.logs[e.id]||pu),y=Ee(C=>C.chatMessages[e.id]||fu),w=Ee(C=>C.stateEvents[e.id]||mu),T=Ee(C=>C.breakpoints[e.id]);N.useEffect(()=>{t.setBreakpoints(e.id,T?Object.keys(T):[])},[e.id]);const j=N.useCallback(C=>{t.setBreakpoints(e.id,C)},[e.id,t]),O=N.useCallback(C=>{C.preventDefault(),h.current=!0;const v="touches"in C?C.touches[0].clientY:C.clientY,E=i,I=U=>{if(!h.current)return;const V=m.current;if(!V)return;const g="touches"in U?U.touches[0].clientY:U.clientY,F=V.clientHeight-100,$=Math.max(80,Math.min(F,E+(g-v)));s($)},H=()=>{h.current=!1,document.removeEventListener("mousemove",I),document.removeEventListener("mouseup",H),document.removeEventListener("touchmove",I),document.removeEventListener("touchend",H),document.body.style.cursor="",document.body.style.userSelect=""};document.body.style.cursor="row-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",I),document.addEventListener("mouseup",H),document.addEventListener("touchmove",I,{passive:!1}),document.addEventListener("touchend",H)},[i]),_=N.useCallback(C=>{C.preventDefault();const v="touches"in C?C.touches[0].clientX:C.clientX,E=o,I=U=>{const V=f.current;if(!V)return;const g="touches"in U?U.touches[0].clientX:U.clientX,F=V.clientWidth-300,$=Math.max(280,Math.min(F,E+(v-g)));l($)},H=()=>{document.removeEventListener("mousemove",I),document.removeEventListener("mouseup",H),document.removeEventListener("touchmove",I),document.removeEventListener("touchend",H),document.body.style.cursor="",document.body.style.userSelect="",localStorage.setItem("chatPanelWidth",String(o))};document.body.style.cursor="col-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",I),document.addEventListener("mouseup",H),document.addEventListener("touchmove",I,{passive:!1}),document.addEventListener("touchend",H)},[o]),P=r?"Chat":"Events",D=r?"var(--accent)":"var(--success)",R=C=>C==="primary"?D:C==="events"?"var(--success)":"var(--accent)",S=Ee(C=>C.activeInterrupt[e.id]??null),M=e.status==="running"?a.jsx("span",{className:"ml-auto text-[11px] px-2 py-0.5 rounded-full shrink-0",style:{background:"color-mix(in srgb, var(--warning) 15%, var(--bg-secondary))",color:"var(--warning)"},children:r?"Thinking...":"Running..."}):r&&e.status==="suspended"&&S?a.jsx("span",{className:"ml-auto text-[11px] px-2 py-0.5 rounded-full shrink-0",style:{background:"color-mix(in srgb, var(--warning) 15%, var(--bg-secondary))",color:"var(--warning)"},children:"Action Required"}):null;if(n){const C=[{id:"traces",label:"Traces",count:b.length},{id:"primary",label:P},...r?[{id:"events",label:"Events",count:w.length}]:[],{id:"io",label:"I/O"},{id:"logs",label:"Logs",count:x.length}];return a.jsxs("div",{className:"flex flex-col h-full",children:[(e.mode==="debug"||e.status==="suspended"&&!S||T&&Object.keys(T).length>0)&&a.jsx(Yi,{runId:e.id,status:e.status,ws:t,breakpointNode:e.breakpoint_node}),a.jsx("div",{className:"shrink-0",style:{height:"40vh"},children:a.jsx(Un,{entrypoint:e.entrypoint,traces:b,runId:e.id,breakpointNode:e.breakpoint_node,breakpointNextNodes:e.breakpoint_next_nodes,onBreakpointChange:j})}),a.jsxs("div",{className:"flex items-center gap-1 px-2 h-10 border-y shrink-0",style:{borderColor:"var(--border)",background:"var(--bg-secondary)"},children:[C.map(v=>a.jsxs("button",{onClick:()=>p(v.id),className:"px-2.5 py-1 h-7 text-xs font-semibold rounded transition-colors cursor-pointer",style:{color:d===v.id?R(v.id):"var(--text-muted)",background:d===v.id?`color-mix(in srgb, ${R(v.id)} 10%, transparent)`:"transparent"},children:[v.label,v.count!==void 0&&v.count>0&&a.jsx("span",{className:"ml-1 font-normal",style:{color:"var(--text-muted)"},children:v.count})]},v.id)),M]}),a.jsxs("div",{className:"flex-1 overflow-hidden",children:[d==="traces"&&a.jsx(Dr,{traces:b}),d==="primary"&&(r?a.jsx(N.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center h-full",style:{color:"var(--text-muted)"},children:a.jsx("span",{className:"text-xs",children:"Loading chat..."})}),children:a.jsx(Xi,{messages:y,runId:e.id,runStatus:e.status,ws:t})}):a.jsx(An,{events:w,runStatus:e.status})),d==="events"&&a.jsx(An,{events:w,runStatus:e.status}),d==="io"&&a.jsx(Zi,{run:e}),d==="logs"&&a.jsx(qi,{logs:x})]})]})}const L=[{id:"primary",label:P},...r?[{id:"events",label:"Events",count:w.length}]:[],{id:"io",label:"I/O"},{id:"logs",label:"Logs",count:x.length}];return a.jsxs("div",{ref:f,className:"flex h-full",children:[a.jsxs("div",{ref:m,className:"flex flex-col flex-1 min-w-0",children:[(e.mode==="debug"||e.status==="suspended"&&!S||T&&Object.keys(T).length>0)&&a.jsx(Yi,{runId:e.id,status:e.status,ws:t,breakpointNode:e.breakpoint_node}),a.jsx("div",{className:"shrink-0 overflow-hidden",style:{height:i},children:a.jsx(Un,{entrypoint:e.entrypoint,traces:b,runId:e.id,breakpointNode:e.breakpoint_node,breakpointNextNodes:e.breakpoint_next_nodes,onBreakpointChange:j})}),a.jsx("div",{onMouseDown:O,onTouchStart:O,className:"shrink-0 drag-handle-row"}),a.jsx("div",{className:"flex-1 overflow-hidden",children:a.jsx(Dr,{traces:b})})]}),a.jsx("div",{onMouseDown:_,onTouchStart:_,className:"shrink-0 drag-handle-col"}),a.jsxs("div",{className:"shrink-0 flex flex-col",style:{width:o,background:"var(--bg-primary)"},children:[a.jsxs("div",{className:"flex items-center gap-1 px-2 h-10 border-b shrink-0",style:{borderColor:"var(--border)",background:"var(--bg-secondary)"},children:[L.map(C=>a.jsxs("button",{onClick:()=>c(C.id),className:"px-2.5 py-1 h-7 text-xs font-semibold rounded transition-colors cursor-pointer",style:{color:u===C.id?R(C.id):"var(--text-muted)",background:u===C.id?`color-mix(in srgb, ${R(C.id)} 10%, transparent)`:"transparent"},onMouseEnter:v=>{u!==C.id&&(v.currentTarget.style.color="var(--text-primary)")},onMouseLeave:v=>{u!==C.id&&(v.currentTarget.style.color="var(--text-muted)")},children:[C.label,C.count!==void 0&&C.count>0&&a.jsx("span",{className:"ml-1 font-normal",style:{color:"var(--text-muted)"},children:C.count})]},C.id)),M]}),a.jsxs("div",{className:"flex-1 overflow-hidden",children:[u==="primary"&&(r?a.jsx(N.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center h-full",style:{color:"var(--text-muted)"},children:a.jsx("span",{className:"text-xs",children:"Loading chat..."})}),children:a.jsx(Xi,{messages:y,runId:e.id,runStatus:e.status,ws:t})}):a.jsx(An,{events:w,runStatus:e.status})),u==="events"&&a.jsx(An,{events:w,runStatus:e.status}),u==="io"&&a.jsx(Zi,{run:e}),u==="logs"&&a.jsx(qi,{logs:x})]})]})]})}function Zi({run:e}){return a.jsxs("div",{className:"p-2 overflow-y-auto h-full space-y-1.5",children:[a.jsx(_t,{title:"Input",copyText:JSON.stringify(e.input_data,null,2),children:a.jsx(ot,{json:JSON.stringify(e.input_data,null,2),className:"px-3 py-2 text-xs font-mono whitespace-pre-wrap break-words"})}),e.output_data&&a.jsx(_t,{title:"Output",copyText:typeof e.output_data=="string"?e.output_data:JSON.stringify(e.output_data,null,2),children:a.jsx(ot,{json:typeof e.output_data=="string"?e.output_data:JSON.stringify(e.output_data,null,2),className:"px-3 py-2 text-xs font-mono whitespace-pre-wrap break-words"})}),e.error&&a.jsxs("div",{className:"overflow-hidden",style:{border:"1px solid color-mix(in srgb, var(--error) 40%, var(--border))"},children:[a.jsxs("div",{className:"px-3 py-2 text-xs font-semibold flex items-center gap-2",style:{background:"color-mix(in srgb, var(--error) 15%, var(--bg-secondary))",color:"var(--error)"},children:[a.jsx("span",{children:"Error"}),a.jsx("span",{className:"px-1.5 py-0.5 rounded text-[10px] font-mono",style:{background:"color-mix(in srgb, var(--error) 20%, var(--bg-secondary))"},children:e.error.code}),a.jsx("span",{className:"px-1.5 py-0.5 rounded text-[10px] font-mono",style:{background:"color-mix(in srgb, var(--error) 20%, var(--bg-secondary))"},children:e.error.category})]}),a.jsxs("div",{className:"px-3 py-2 text-xs leading-normal",children:[a.jsx("div",{className:"font-semibold mb-2",style:{color:"var(--text-primary)"},children:e.error.title}),a.jsx("pre",{className:"whitespace-pre-wrap font-mono text-[11px] max-w-prose",style:{color:"var(--text-secondary)"},children:e.error.detail})]})]})]})}function Ji(){const{reloadPending:e,setReloadPending:t,setEntrypoints:n}=Ee(),[r,i]=N.useState(!1);if(!e)return null;const s=async()=>{i(!0);try{await nc();const o=await ks();n(o.map(l=>l.name)),t(!1)}catch(o){console.error("Reload failed:",o)}finally{i(!1)}};return a.jsxs("div",{className:"fixed top-4 left-1/2 -translate-x-1/2 z-50 flex items-center justify-between px-5 py-2.5 rounded-lg shadow-lg min-w-[400px]",style:{background:"var(--bg-secondary)",border:"1px solid var(--bg-tertiary)"},children:[a.jsx("span",{className:"text-sm",style:{color:"var(--text-secondary)"},children:"Files changed, reload to apply"}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("button",{onClick:s,disabled:r,className:"px-3 py-1 text-sm font-medium rounded cursor-pointer",style:{background:"var(--accent)",color:"#fff",opacity:r?.6:1},children:r?"Reloading...":"Reload"}),a.jsx("button",{onClick:()=>t(!1),className:"text-sm cursor-pointer px-1",style:{color:"var(--text-muted)",background:"none",border:"none"},children:"✕"})]})]})}let hu=0;const Qi=Ot(e=>({toasts:[],addToast:(t,n)=>{const r=String(++hu);e(s=>({toasts:[...s.toasts,{id:r,type:t,message:n}]})),setTimeout(()=>{e(s=>({toasts:s.toasts.filter(o=>o.id!==r)}))},t==="error"?8e3:5e3)},removeToast:t=>{e(n=>({toasts:n.toasts.filter(r=>r.id!==t)}))}})),eo={success:{color:"var(--success)",bg:"color-mix(in srgb, var(--success) 10%, var(--bg-elevated))",border:"color-mix(in srgb, var(--success) 30%, var(--border))"},error:{color:"var(--error)",bg:"color-mix(in srgb, var(--error) 10%, var(--bg-elevated))",border:"color-mix(in srgb, var(--error) 30%, var(--border))"},info:{color:"var(--info)",bg:"color-mix(in srgb, var(--info) 10%, var(--bg-elevated))",border:"color-mix(in srgb, var(--info) 30%, var(--border))"}};function to(){const e=Qi(n=>n.toasts),t=Qi(n=>n.removeToast);return e.length===0?null:a.jsx("div",{className:"fixed bottom-8 right-4 z-[100] flex flex-col gap-2 pointer-events-none",children:e.map(n=>{const r=eo[n.type]??eo.info;return a.jsxs("div",{className:"pointer-events-auto flex items-center gap-2 px-4 py-2.5 rounded-lg shadow-lg text-xs font-medium max-w-xs animate-[slideIn_0.2s_ease-out]",style:{background:r.bg,border:`1px solid ${r.border}`,color:r.color},children:[a.jsx("span",{className:"flex-1",children:n.message}),a.jsx("button",{onClick:()=>t(n.id),className:"shrink-0 w-5 h-5 flex items-center justify-center rounded cursor-pointer transition-opacity opacity-60 hover:opacity-100",style:{color:r.color,background:"transparent",border:"none"},"aria-label":"Dismiss",children:a.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",children:[a.jsx("line",{x1:"1",y1:"1",x2:"9",y2:"9"}),a.jsx("line",{x1:"9",y1:"1",x2:"1",y2:"9"})]})})]},n.id)})})}function bu(e){return e===null?"-":`${Math.round(e*100)}%`}function xu(e){if(e===null)return"var(--text-muted)";const t=e*100;return t>=80?"var(--success)":t>=50?"var(--warning)":"var(--error)"}const no={pending:{color:"var(--text-muted)",label:"Pending"},running:{color:"var(--info)",label:"Running"},completed:{color:"var(--success)",label:"Completed"},failed:{color:"var(--error)",label:"Failed"}};function ro(){const e=Me(l=>l.evalSets),t=Me(l=>l.evalRuns),{evalSetId:n,evalRunId:r,navigate:i}=st(),s=Object.values(e),o=Object.values(t).sort((l,u)=>new Date(u.start_time??0).getTime()-new Date(l.start_time??0).getTime());return a.jsxs("div",{className:"flex-1 overflow-y-auto",children:[a.jsx("button",{onClick:()=>i("#/evals/new"),className:"w-[calc(100%-24px)] mx-3 mt-2.5 mb-1 px-3 py-1.5 text-[11px] text-center font-medium rounded border border-[var(--border)] bg-transparent transition-colors cursor-pointer",style:{color:"var(--text-secondary)"},onMouseEnter:l=>{l.currentTarget.style.color="var(--text-primary)",l.currentTarget.style.borderColor="var(--text-muted)"},onMouseLeave:l=>{l.currentTarget.style.color="var(--text-secondary)",l.currentTarget.style.borderColor=""},children:"+ New Eval Set"}),a.jsx("div",{className:"px-3 pt-3 pb-1 text-[11px] uppercase tracking-widest font-semibold",style:{color:"var(--text-muted)"},children:"Eval Sets"}),s.map(l=>{const u=n===l.id;return a.jsxs("button",{onClick:()=>i(`#/evals/sets/${l.id}`),className:"w-full text-left px-3 py-1.5 text-xs cursor-pointer transition-colors",style:{background:u?"color-mix(in srgb, var(--accent) 15%, var(--bg-primary))":"transparent",color:u?"var(--text-primary)":"var(--text-secondary)",borderLeft:u?"3px solid var(--accent)":"3px solid transparent"},onMouseEnter:c=>{u||(c.currentTarget.style.background="var(--bg-hover)")},onMouseLeave:c=>{u||(c.currentTarget.style.background="transparent")},children:[a.jsx("div",{className:"truncate font-medium",children:l.name}),a.jsxs("div",{className:"text-[11px] mt-0.5",style:{color:"var(--text-muted)"},children:[l.eval_count," items · ",l.evaluator_ids.length," evaluator",l.evaluator_ids.length!==1?"s":""]})]},l.id)}),s.length===0&&a.jsx("p",{className:"text-[11px] px-3 py-2",style:{color:"var(--text-muted)"},children:"No eval sets yet"}),a.jsx("div",{className:"px-3 pt-4 pb-1 text-[11px] uppercase tracking-widest font-semibold",style:{color:"var(--text-muted)"},children:"History"}),o.map(l=>{const u=r===l.id,c=no[l.status]??no.pending;return a.jsx("button",{onClick:()=>i(`#/evals/runs/${l.id}`),className:"w-full text-left px-3 py-1.5 text-xs cursor-pointer transition-colors",style:{background:u?"color-mix(in srgb, var(--accent) 15%, var(--bg-primary))":"transparent",color:u?"var(--text-primary)":"var(--text-secondary)",borderLeft:u?"3px solid var(--accent)":"3px solid transparent"},onMouseEnter:d=>{u||(d.currentTarget.style.background="var(--bg-hover)")},onMouseLeave:d=>{u||(d.currentTarget.style.background="transparent")},children:a.jsxs("div",{className:"flex items-center gap-1.5",children:[a.jsx("div",{className:"w-2 h-2 rounded-full shrink-0",style:{background:c.color}}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("div",{className:"truncate font-medium",children:l.eval_set_name}),a.jsx("div",{className:"text-[11px] mt-0.5",style:{color:"var(--text-muted)"},children:l.start_time?new Date(l.start_time).toLocaleString():c.label})]}),a.jsx("span",{className:"font-mono shrink-0",style:{color:xu(l.overall_score)},children:bu(l.overall_score)})]})},l.id)}),o.length===0&&a.jsx("p",{className:"text-[11px] px-3 py-2",style:{color:"var(--text-muted)"},children:"No eval runs yet"})]})}function io(e,t=60){const n=typeof e=="string"?e:JSON.stringify(e);return!n||n==="null"?"-":n.length>t?n.slice(0,t)+"...":n}function yu({evalSetId:e}){const[t,n]=N.useState(null),[r,i]=N.useState(!0),[s,o]=N.useState(null),[l,u]=N.useState(!1),[c,d]=N.useState("io"),p=Me(g=>g.evaluators),m=Me(g=>g.localEvaluators),f=Me(g=>g.updateEvalSetEvaluators),h=Me(g=>g.incrementEvalSetCount),b=Me(g=>g.upsertEvalRun),{navigate:x}=st(),[y,w]=N.useState(!1),[T,j]=N.useState(new Set),[O,_]=N.useState(!1),P=N.useRef(null),[D,R]=N.useState(()=>{const g=localStorage.getItem("evalSetSidebarWidth");return g?parseInt(g,10):320}),[S,M]=N.useState(!1),L=N.useRef(null);N.useEffect(()=>{localStorage.setItem("evalSetSidebarWidth",String(D))},[D]),N.useEffect(()=>{i(!0),o(null),fc(e).then(g=>{n(g),g.items.length>0&&o(g.items[0].name)}).catch(console.error).finally(()=>i(!1))},[e]);const C=async()=>{u(!0);try{const g=await mc(e);b(g),x(`#/evals/runs/${g.id}`)}catch(g){console.error(g)}finally{u(!1)}},v=async g=>{if(t)try{await pc(e,g),n(F=>{if(!F)return F;const $=F.items.filter(k=>k.name!==g);return{...F,items:$,eval_count:$.length}}),h(e,-1),s===g&&o(null)}catch(F){console.error(F)}},E=N.useCallback(()=>{t&&j(new Set(t.evaluator_ids)),w(!0)},[t]),I=g=>{j(F=>{const $=new Set(F);return $.has(g)?$.delete(g):$.add(g),$})},H=async()=>{if(t){_(!0);try{const g=await bc(e,Array.from(T));n(g),f(e,g.evaluator_ids),w(!1)}catch(g){console.error(g)}finally{_(!1)}}};N.useEffect(()=>{if(!y)return;const g=F=>{P.current&&!P.current.contains(F.target)&&w(!1)};return document.addEventListener("mousedown",g),()=>document.removeEventListener("mousedown",g)},[y]);const U=N.useCallback(g=>{g.preventDefault(),M(!0);const F="touches"in g?g.touches[0].clientX:g.clientX,$=D,k=K=>{const W=L.current;if(!W)return;const re="touches"in K?K.touches[0].clientX:K.clientX,de=W.clientWidth-300,xe=Math.max(280,Math.min(de,$+(F-re)));R(xe)},ie=()=>{M(!1),document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",ie),document.removeEventListener("touchmove",k),document.removeEventListener("touchend",ie),document.body.style.cursor="",document.body.style.userSelect=""};document.body.style.cursor="col-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",k),document.addEventListener("mouseup",ie),document.addEventListener("touchmove",k,{passive:!1}),document.addEventListener("touchend",ie)},[D]);if(r)return a.jsx("div",{className:"flex items-center justify-center h-full text-[var(--text-muted)] text-sm",children:"Loading..."});if(!t)return a.jsx("div",{className:"flex items-center justify-center h-full text-[var(--text-muted)]",children:"Eval set not found"});const V=t.items.find(g=>g.name===s)??null;return a.jsxs("div",{ref:L,className:"flex h-full",children:[a.jsxs("div",{className:"flex flex-col flex-1 min-w-0",children:[a.jsxs("div",{className:"px-4 h-10 border-b shrink-0 flex items-center gap-4",style:{borderColor:"var(--border)"},children:[a.jsx("h1",{className:"text-base font-semibold",style:{color:"var(--text-primary)"},children:t.name}),a.jsxs("span",{className:"text-[11px]",style:{color:"var(--text-muted)"},children:[t.eval_count," items"]}),a.jsxs("div",{className:"flex gap-1 items-center ml-auto relative",children:[a.jsx("button",{onClick:E,className:"w-7 h-7 flex items-center justify-center rounded cursor-pointer transition-colors",style:{color:"var(--text-muted)",background:"transparent",border:"none"},onMouseEnter:g=>{g.currentTarget.style.color="var(--text-primary)",g.currentTarget.style.background="var(--bg-secondary)"},onMouseLeave:g=>{g.currentTarget.style.color="var(--text-muted)",g.currentTarget.style.background="transparent"},title:"Edit evaluators","aria-label":"Edit evaluators",children:a.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("path",{d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"}),a.jsx("path",{d:"m15 5 4 4"})]})}),t.evaluator_ids.map(g=>{const F=p.find($=>$.id===g);return a.jsx("span",{className:"px-1.5 py-0.5 rounded text-[11px] font-medium",style:{background:"var(--bg-tertiary)",color:"var(--text-secondary)"},children:(F==null?void 0:F.name)??g},g)}),y&&a.jsxs("div",{ref:P,className:"absolute top-full right-0 mt-1 z-50 rounded-md border shadow-lg",style:{background:"var(--bg-primary)",borderColor:"var(--border)",minWidth:220},children:[a.jsx("div",{className:"px-3 py-2 border-b text-[10px] uppercase tracking-wide font-semibold",style:{color:"var(--text-muted)",borderColor:"var(--border)"},children:"Evaluators"}),a.jsx("div",{className:"max-h-48 overflow-y-auto",children:m.length===0?a.jsx("div",{className:"px-3 py-3 text-xs",style:{color:"var(--text-muted)"},children:"No evaluators available"}):m.map(g=>a.jsxs("label",{className:"flex items-center gap-2 px-3 py-1.5 text-xs cursor-pointer transition-colors",style:{borderBottom:"1px solid var(--border)"},onMouseEnter:F=>{F.currentTarget.style.background="var(--bg-hover)"},onMouseLeave:F=>{F.currentTarget.style.background="transparent"},children:[a.jsx("input",{type:"checkbox",checked:T.has(g.id),onChange:()=>I(g.id),className:"accent-[var(--accent)]"}),a.jsx("span",{className:"flex-1 truncate",style:{color:"var(--text-primary)"},children:g.name})]},g.id))}),a.jsx("div",{className:"px-3 py-2 border-t flex justify-end",style:{borderColor:"var(--border)"},children:a.jsx("button",{onClick:H,disabled:O,className:"px-3 py-1 text-[11px] font-semibold rounded cursor-pointer transition-colors disabled:opacity-50",style:{background:"var(--accent)",color:"var(--bg-primary)",border:"none"},onMouseEnter:g=>{g.currentTarget.style.background="var(--accent-hover)"},onMouseLeave:g=>{g.currentTarget.style.background="var(--accent)"},children:O?"Saving...":"Update"})})]})]}),a.jsxs("button",{onClick:C,disabled:l,className:"ml-2 px-3 py-1 h-7 text-xs font-semibold rounded border flex items-center gap-1.5 cursor-pointer transition-colors disabled:opacity-30 disabled:cursor-not-allowed",style:{color:"var(--success)",borderColor:"var(--success)",background:"transparent"},onMouseEnter:g=>{l||(g.currentTarget.style.background="color-mix(in srgb, var(--success) 10%, transparent)")},onMouseLeave:g=>{g.currentTarget.style.background="transparent"},title:"Run eval set","aria-label":"Run eval set",children:[a.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor",stroke:"none",children:a.jsx("polygon",{points:"5,3 19,12 5,21"})}),l?"Running...":"Run"]})]}),a.jsxs("div",{className:"flex items-center px-3 h-7 text-[11px] font-semibold shrink-0 border-b",style:{color:"var(--text-muted)",background:"var(--bg-secondary)",borderColor:"var(--border)"},children:[a.jsx("span",{className:"w-56 shrink-0",children:"Name"}),a.jsx("span",{className:"flex-1 min-w-0",children:"Input"}),a.jsx("span",{className:"w-32 shrink-0 pl-2",children:"Expected Behavior"}),a.jsx("span",{className:"w-32 shrink-0 pl-2",children:"Expected Output"}),a.jsx("span",{className:"w-32 shrink-0 pl-2",children:"Simulation Instr."}),a.jsx("span",{className:"w-8 shrink-0"})]}),a.jsxs("div",{className:"flex-1 overflow-y-auto",children:[t.items.map(g=>{const F=g.name===s;return a.jsxs("button",{onClick:()=>o(F?null:g.name),className:"group w-full text-left px-3 py-1.5 flex items-center text-xs border-b transition-colors cursor-pointer",style:{borderColor:"var(--border)",background:F?"color-mix(in srgb, var(--accent) 10%, var(--bg-primary))":void 0,borderLeft:F?"3px solid var(--accent)":"3px solid transparent"},onMouseEnter:$=>{F||($.currentTarget.style.background="var(--bg-hover)")},onMouseLeave:$=>{F||($.currentTarget.style.background="")},children:[a.jsx("span",{className:"w-56 shrink-0 truncate",style:{color:"var(--text-primary)"},children:g.name}),a.jsx("span",{className:"flex-1 min-w-0 truncate font-mono text-[11px]",style:{color:"var(--text-muted)"},children:io(g.inputs)}),a.jsx("span",{className:"w-32 shrink-0 truncate pl-2 text-[11px]",style:{color:"var(--text-muted)"},children:g.expected_behavior||"-"}),a.jsx("span",{className:"w-32 shrink-0 truncate pl-2 font-mono text-[11px]",style:{color:"var(--text-muted)"},children:io(g.expected_output,40)}),a.jsx("span",{className:"w-32 shrink-0 truncate pl-2 text-[11px]",style:{color:"var(--text-muted)"},children:g.simulation_instructions||"-"}),a.jsx("span",{role:"button",tabIndex:0,className:"w-8 shrink-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity",onClick:$=>{$.stopPropagation(),v(g.name)},onKeyDown:$=>{$.key==="Enter"&&($.stopPropagation(),v(g.name))},style:{color:"var(--text-muted)"},onMouseEnter:$=>{$.currentTarget.style.color="var(--error)"},onMouseLeave:$=>{$.currentTarget.style.color="var(--text-muted)"},title:"Delete item",children:a.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[a.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),a.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]},g.name)}),t.items.length===0&&a.jsx("div",{className:"flex items-center justify-center py-8 text-[var(--text-muted)] text-xs",children:"No items in this eval set"})]})]}),a.jsx("div",{onMouseDown:U,onTouchStart:U,className:`shrink-0 drag-handle-col${S?"":" transition-all"}`,style:{width:V?3:0,opacity:V?1:0}}),a.jsxs("div",{className:`shrink-0 flex flex-col overflow-hidden${S?"":" transition-[width] duration-200 ease-in-out"}`,style:{width:V?D:0,background:"var(--bg-primary)"},children:[a.jsx("div",{className:"flex items-center gap-1 px-2 h-10 border-b shrink-0",style:{borderColor:"var(--border)",background:"var(--bg-secondary)",minWidth:D},children:["io","evaluators"].map(g=>{const F=c===g,$=g==="io"?"I/O":"Evaluators";return a.jsx("button",{onClick:()=>d(g),className:"px-2.5 py-1 h-7 text-xs font-semibold rounded inline-flex items-center cursor-pointer transition-colors",style:{color:F?"var(--accent)":"var(--text-muted)",background:F?"color-mix(in srgb, var(--accent) 10%, transparent)":"transparent",border:"none"},children:$},g)})}),a.jsx("div",{className:"flex-1 overflow-hidden",style:{minWidth:D},children:V?c==="io"?a.jsx(vu,{item:V}):a.jsx(ku,{item:V,evaluators:p}):null})]})]})}function vu({item:e}){const t=JSON.stringify(e.inputs,null,2),n=e.expected_output!=null?typeof e.expected_output=="string"?e.expected_output:JSON.stringify(e.expected_output,null,2):null;return a.jsxs("div",{className:"p-2 overflow-y-auto h-full space-y-1.5",children:[a.jsx(_t,{title:"Input",copyText:t,children:a.jsx(ot,{json:t,className:"px-3 py-2 text-xs font-mono whitespace-pre-wrap break-words"})}),e.expected_behavior&&a.jsx(_t,{title:"Expected Behavior",copyText:e.expected_behavior,children:a.jsx("div",{className:"px-3 py-2 text-xs leading-relaxed whitespace-pre-wrap",style:{color:"var(--text-secondary)"},children:e.expected_behavior})}),n&&a.jsx(_t,{title:"Expected Output",copyText:n,children:a.jsx(ot,{json:n,className:"px-3 py-2 text-xs font-mono whitespace-pre-wrap break-words"})}),e.simulation_instructions&&a.jsx(_t,{title:"Simulation Instructions",copyText:e.simulation_instructions,children:a.jsx("div",{className:"px-3 py-2 text-xs leading-relaxed whitespace-pre-wrap",style:{color:"var(--text-secondary)"},children:e.simulation_instructions})})]})}function ku({item:e,evaluators:t}){return a.jsx("div",{className:"p-2 overflow-y-auto h-full space-y-1.5",children:e.evaluator_ids.length>0?a.jsx(a.Fragment,{children:e.evaluator_ids.map(n=>{var s;const r=t.find(o=>o.id===n),i=(s=e.evaluation_criterias)==null?void 0:s[n];return a.jsxs("div",{className:"overflow-hidden",style:{border:"1px solid var(--border)"},children:[a.jsxs("div",{className:"px-3 py-2 flex items-center gap-2",style:{background:"var(--bg-secondary)"},children:[a.jsx("span",{className:"text-[11px] font-semibold",style:{color:"var(--text-primary)"},children:(r==null?void 0:r.name)??n}),a.jsx("span",{className:"ml-auto text-[10px]",style:{color:"var(--text-muted)"},children:i?"Custom criteria":"Default criteria"})]}),i&&a.jsx("pre",{className:"px-3 py-2 border-t text-[11px] font-mono overflow-x-auto max-h-32 whitespace-pre-wrap break-words",style:{borderColor:"var(--border)",color:"var(--text-secondary)"},children:JSON.stringify(i,null,2)})]},n)})}):a.jsx("div",{className:"flex items-center justify-center h-full text-[var(--text-muted)] text-xs",children:"No evaluators configured for this item"})})}function en(e){return e===null?"-":`${Math.round(e*100)}%`}function wt(e){if(e===null)return"var(--text-muted)";const t=e*100;return t>=80?"var(--success)":t>=50?"var(--warning)":"var(--error)"}function Eu(e,t){if(!e)return"-";const n=new Date(e).getTime(),r=t?new Date(t).getTime():Date.now(),i=Math.round((r-n)/1e3);return i<60?`${i}s`:`${Math.floor(i/60)}m ${i%60}s`}function oo(e){return e.replace(/\s*Evaluator$/i,"")}const so={pending:{color:"var(--text-muted)",bg:"var(--bg-tertiary)",label:"Pending"},running:{color:"var(--info)",bg:"rgba(59,130,246,0.1)",label:"Running"},completed:{color:"var(--success)",bg:"rgba(34,197,94,0.1)",label:"Completed"},failed:{color:"var(--error)",bg:"rgba(239,68,68,0.1)",label:"Failed"}};function wu({evalRunId:e,itemName:t}){const[n,r]=N.useState(null),[i,s]=N.useState(!0),{navigate:o}=st(),l=t??null,[u,c]=N.useState(220),d=N.useRef(null),p=N.useRef(!1),[m,f]=N.useState(()=>{const M=localStorage.getItem("evalSidebarWidth");return M?parseInt(M,10):320}),[h,b]=N.useState(!1),x=N.useRef(null);N.useEffect(()=>{localStorage.setItem("evalSidebarWidth",String(m))},[m]);const y=Me(M=>M.evalRuns[e]),w=Me(M=>M.evaluators);N.useEffect(()=>{s(!0),Li(e).then(M=>{if(r(M),!t){const L=M.results.find(C=>C.status==="completed")??M.results[0];L&&o(`#/evals/runs/${e}/${encodeURIComponent(L.name)}`)}}).catch(console.error).finally(()=>s(!1))},[e]),N.useEffect(()=>{((y==null?void 0:y.status)==="completed"||(y==null?void 0:y.status)==="failed")&&Li(e).then(r).catch(console.error)},[y==null?void 0:y.status,e]),N.useEffect(()=>{if(t||!(n!=null&&n.results))return;const M=n.results.find(L=>L.status==="completed")??n.results[0];M&&o(`#/evals/runs/${e}/${encodeURIComponent(M.name)}`)},[n==null?void 0:n.results]);const T=N.useCallback(M=>{M.preventDefault(),p.current=!0;const L="touches"in M?M.touches[0].clientY:M.clientY,C=u,v=I=>{if(!p.current)return;const H=d.current;if(!H)return;const U="touches"in I?I.touches[0].clientY:I.clientY,V=H.clientHeight-100,g=Math.max(80,Math.min(V,C+(U-L)));c(g)},E=()=>{p.current=!1,document.removeEventListener("mousemove",v),document.removeEventListener("mouseup",E),document.removeEventListener("touchmove",v),document.removeEventListener("touchend",E),document.body.style.cursor="",document.body.style.userSelect=""};document.body.style.cursor="row-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",v),document.addEventListener("mouseup",E),document.addEventListener("touchmove",v,{passive:!1}),document.addEventListener("touchend",E)},[u]),j=N.useCallback(M=>{M.preventDefault(),b(!0);const L="touches"in M?M.touches[0].clientX:M.clientX,C=m,v=I=>{const H=x.current;if(!H)return;const U="touches"in I?I.touches[0].clientX:I.clientX,V=H.clientWidth-300,g=Math.max(280,Math.min(V,C+(L-U)));f(g)},E=()=>{b(!1),document.removeEventListener("mousemove",v),document.removeEventListener("mouseup",E),document.removeEventListener("touchmove",v),document.removeEventListener("touchend",E),document.body.style.cursor="",document.body.style.userSelect=""};document.body.style.cursor="col-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",v),document.addEventListener("mouseup",E),document.addEventListener("touchmove",v,{passive:!1}),document.addEventListener("touchend",E)},[m]);if(i)return a.jsx("div",{className:"flex items-center justify-center h-full text-[var(--text-muted)] text-sm",children:"Loading..."});if(!n)return a.jsx("div",{className:"flex items-center justify-center h-full text-[var(--text-muted)]",children:"Eval run not found"});const O=y??n,_=so[O.status]??so.pending,P=O.status==="running",D=Object.keys(O.evaluator_scores??{}),R=n.results.find(M=>M.name===l)??null,S=((R==null?void 0:R.traces)??[]).map(M=>({...M,run_id:""}));return a.jsxs("div",{ref:x,className:"flex h-full",children:[a.jsxs("div",{ref:d,className:"flex flex-col flex-1 min-w-0",children:[a.jsxs("div",{className:"px-4 h-10 border-b shrink-0 flex items-center gap-4",style:{borderColor:"var(--border)"},children:[a.jsx("h1",{className:"text-base font-semibold truncate min-w-0",style:{color:"var(--text-primary)"},children:O.eval_set_name}),a.jsx("span",{className:"px-2 py-0.5 rounded text-[11px] font-semibold uppercase tracking-wide",style:{color:_.color,background:_.bg},children:_.label}),a.jsx("span",{className:"text-sm font-bold font-mono",style:{color:wt(O.overall_score)},children:en(O.overall_score)}),a.jsx("span",{className:"text-[11px]",style:{color:"var(--text-muted)"},children:Eu(O.start_time,O.end_time)}),P&&a.jsxs("div",{className:"flex items-center gap-2 max-w-[160px]",children:[a.jsx("div",{className:"flex-1 h-2 rounded-full overflow-hidden",style:{background:"var(--bg-tertiary)"},children:a.jsx("div",{className:"h-full rounded-full transition-all",style:{width:`${O.progress_total>0?O.progress_completed/O.progress_total*100:0}%`,background:"var(--info)"}})}),a.jsxs("span",{className:"text-[11px] shrink-0",style:{color:"var(--text-muted)"},children:[O.progress_completed,"/",O.progress_total]})]}),D.length>0&&a.jsx("div",{className:"flex gap-3 ml-auto",children:D.map(M=>{const L=w.find(v=>v.id===M),C=O.evaluator_scores[M];return a.jsxs("div",{className:"flex items-center gap-1.5",children:[a.jsx("span",{className:"text-[11px]",style:{color:"var(--text-muted)"},children:oo((L==null?void 0:L.name)??M)}),a.jsx("div",{className:"w-12 h-2 rounded-full overflow-hidden",style:{background:"var(--bg-tertiary)"},children:a.jsx("div",{className:"h-full rounded-full",style:{width:`${C*100}%`,background:wt(C)}})}),a.jsx("span",{className:"text-[11px] font-mono",style:{color:wt(C)},children:en(C)})]},M)})})]}),a.jsxs("div",{className:"shrink-0 overflow-hidden flex flex-col",style:{height:u},children:[a.jsxs("div",{className:"flex items-center px-3 h-7 text-[11px] font-semibold shrink-0 border-b",style:{color:"var(--text-muted)",background:"var(--bg-secondary)",borderColor:"var(--border)"},children:[a.jsx("span",{className:"w-5 shrink-0"}),a.jsx("span",{className:"flex-1 min-w-0",children:"Name"}),a.jsx("span",{className:"w-14 shrink-0 text-right",children:"Score"}),D.map(M=>{const L=w.find(C=>C.id===M);return a.jsx("span",{className:"w-36 shrink-0 text-right truncate pl-2",title:(L==null?void 0:L.name)??M,children:oo((L==null?void 0:L.name)??M)},M)}),a.jsx("span",{className:"w-14 shrink-0 text-right",children:"Time"})]}),a.jsxs("div",{className:"flex-1 overflow-y-auto",children:[n.results.map(M=>{const L=M.status==="pending",C=M.status==="failed",v=M.name===l;return a.jsxs("button",{onClick:()=>{o(v?`#/evals/runs/${e}`:`#/evals/runs/${e}/${encodeURIComponent(M.name)}`)},className:"w-full text-left px-3 py-1.5 flex items-center text-xs border-b transition-colors cursor-pointer",style:{borderColor:"var(--border)",background:v?"color-mix(in srgb, var(--accent) 10%, var(--bg-primary))":void 0,borderLeft:v?"2px solid var(--accent)":"2px solid transparent",opacity:L?.5:1},onMouseEnter:E=>{v||(E.currentTarget.style.background="var(--bg-hover)")},onMouseLeave:E=>{v||(E.currentTarget.style.background="")},children:[a.jsx("span",{className:"w-5 shrink-0 flex justify-center",children:a.jsx("span",{className:"w-2 h-2 rounded-full",style:{background:L?"var(--text-muted)":C?"var(--error)":M.overall_score>=.8?"var(--success)":M.overall_score>=.5?"var(--warning)":"var(--error)"}})}),a.jsx("span",{className:"flex-1 min-w-0 truncate",style:{color:"var(--text-primary)"},children:M.name}),a.jsx("span",{className:"w-14 shrink-0 text-right font-mono font-semibold",style:{color:wt(L?null:M.overall_score)},children:L?"-":en(M.overall_score)}),D.map(E=>a.jsx("span",{className:"w-36 shrink-0 text-right font-mono pl-2",style:{color:wt(L?null:M.scores[E]??null)},children:L?"-":en(M.scores[E]??null)},E)),a.jsx("span",{className:"w-14 shrink-0 text-right",style:{color:"var(--text-muted)"},children:M.duration_ms!==null?`${(M.duration_ms/1e3).toFixed(1)}s`:"-"})]},M.name)}),n.results.length===0&&a.jsx("div",{className:"flex items-center justify-center py-8 text-[var(--text-muted)] text-xs",children:P?"Waiting for results...":"No results"})]})]}),a.jsx("div",{onMouseDown:T,onTouchStart:T,className:"shrink-0 drag-handle-row"}),a.jsx("div",{className:"flex-1 overflow-hidden",children:R&&S.length>0?a.jsx(Dr,{traces:S}):a.jsx("div",{className:"flex items-center justify-center h-full text-[var(--text-muted)] text-xs",children:(R==null?void 0:R.status)==="pending"?"Pending...":"No traces available"})})]}),a.jsx("div",{onMouseDown:j,onTouchStart:j,className:`shrink-0 drag-handle-col${h?"":" transition-all"}`,style:{width:R?3:0,opacity:R?1:0}}),a.jsx(Nu,{width:m,item:R,evaluators:w,isRunning:P,isDragging:h})]})}const _u=[{id:"score",label:"Score"},{id:"io",label:"I/O"},{id:"logs",label:"Logs"}];function Nu({width:e,item:t,evaluators:n,isRunning:r,isDragging:i}){const[s,o]=N.useState("score"),l=!!t;return a.jsxs("div",{className:`shrink-0 flex flex-col overflow-hidden${i?"":" transition-[width] duration-200 ease-in-out"}`,style:{width:l?e:0,background:"var(--bg-primary)"},children:[a.jsxs("div",{className:"flex items-center gap-1 px-2 h-10 border-b shrink-0",style:{borderColor:"var(--border)",background:"var(--bg-secondary)",minWidth:e},children:[_u.map(u=>a.jsx("button",{onClick:()=>o(u.id),className:"px-2.5 py-1 h-7 text-xs font-semibold rounded transition-colors cursor-pointer",style:{color:s===u.id?"var(--accent)":"var(--text-muted)",background:s===u.id?"color-mix(in srgb, var(--accent) 10%, transparent)":"transparent",border:"none"},onMouseEnter:c=>{s!==u.id&&(c.currentTarget.style.color="var(--text-primary)")},onMouseLeave:c=>{s!==u.id&&(c.currentTarget.style.color="var(--text-muted)")},children:u.label},u.id)),r&&a.jsx("span",{className:"ml-auto text-[11px] px-2 py-0.5 rounded-full shrink-0",style:{background:"color-mix(in srgb, var(--warning) 15%, var(--bg-secondary))",color:"var(--warning)"},children:"Running..."})]}),a.jsx("div",{className:"flex-1 overflow-y-auto",style:{minWidth:e},children:t?t.status==="pending"?a.jsx("div",{className:"flex items-center justify-center h-full text-[var(--text-muted)] text-xs",children:"Pending..."}):a.jsxs(a.Fragment,{children:[t.status==="failed"&&a.jsxs("div",{className:"mx-2 mt-2 px-3 py-2 rounded text-xs",style:{background:"rgba(239,68,68,0.1)",color:"var(--error)"},children:[a.jsxs("div",{className:"flex items-center gap-2 font-semibold",children:[a.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",children:[a.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),a.jsx("path",{d:"M8 4.5v4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),a.jsx("circle",{cx:"8",cy:"11",r:"0.75",fill:"currentColor"})]}),a.jsx("span",{children:"Evaluator error"})]}),t.error&&a.jsx("div",{className:"mt-1 pl-[22px] text-[11px] opacity-80 break-words",style:{color:"var(--text-secondary)"},children:t.error})]}),s==="score"?a.jsx(Su,{item:t,evaluators:n}):s==="io"?a.jsx(Tu,{item:t}):a.jsx("div",{className:"flex items-center justify-center h-full text-[var(--text-muted)] text-xs",children:"Logs coming soon"})]}):null})]})}function Su({item:e,evaluators:t}){const n=Object.keys(e.scores);return a.jsxs("div",{className:"p-2 overflow-y-auto h-full space-y-1.5",children:[a.jsx("div",{className:"overflow-hidden",style:{border:"1px solid var(--border)"},children:a.jsxs("div",{className:"px-3 py-2 flex items-center gap-2",style:{background:"var(--bg-secondary)"},children:[a.jsx("span",{className:"truncate text-[11px] font-semibold",style:{color:"var(--text-primary)"},children:"Overall"}),a.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[a.jsx("div",{className:"w-24 h-2.5 rounded-full overflow-hidden",style:{background:"var(--bg-tertiary)"},children:a.jsx("div",{className:"h-full rounded-full",style:{width:`${e.overall_score*100}%`,background:wt(e.overall_score)}})}),a.jsx("span",{className:"text-xs font-mono font-bold shrink-0 w-10 text-right",style:{color:wt(e.overall_score)},children:en(e.overall_score)})]})]})}),e.status==="failed"&&n.length===0&&a.jsx("div",{className:"px-3 py-3 text-xs text-center",style:{color:"var(--text-muted)"},children:"All evaluators failed — no scores available"}),n.map(r=>{const i=t.find(l=>l.id===r),s=e.scores[r],o=e.justifications[r];return a.jsxs("div",{className:"overflow-hidden",style:{border:"1px solid var(--border)"},children:[a.jsxs("div",{className:"px-3 py-2 flex items-center gap-2",style:{background:"var(--bg-secondary)"},children:[a.jsx("span",{className:"truncate text-[11px] font-semibold",style:{color:"var(--text-primary)"},title:(i==null?void 0:i.name)??r,children:(i==null?void 0:i.name)??r}),a.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[a.jsx("div",{className:"w-24 h-2.5 rounded-full overflow-hidden",style:{background:"var(--bg-tertiary)"},children:a.jsx("div",{className:"h-full rounded-full",style:{width:`${s*100}%`,background:wt(s)}})}),a.jsx("span",{className:"text-xs font-mono font-bold shrink-0 w-10 text-right",style:{color:wt(s)},children:en(s)})]})]}),o&&a.jsx(Au,{text:o})]},r)})]})}function Tu({item:e}){const t=JSON.stringify(e.inputs,null,2),n=typeof e.output=="string"?e.output:JSON.stringify(e.output,null,2),r=e.expected_output!=null?typeof e.expected_output=="string"?e.expected_output:JSON.stringify(e.expected_output,null,2):null;return a.jsxs("div",{className:"p-2 overflow-y-auto h-full space-y-1.5",children:[a.jsx(_t,{title:"Input",copyText:t,children:a.jsx(ot,{json:t,className:"px-3 py-2 text-xs font-mono whitespace-pre-wrap break-words"})}),r&&a.jsx(_t,{title:"Expected Output",copyText:r,children:a.jsx(ot,{json:r,className:"px-3 py-2 text-xs font-mono whitespace-pre-wrap break-words"})}),a.jsx(_t,{title:"Output",copyText:n,trailing:e.duration_ms!==null?a.jsxs("span",{className:"ml-auto text-[10px]",style:{color:"var(--text-muted)"},children:[(e.duration_ms/1e3).toFixed(2),"s"]}):void 0,children:a.jsx(ot,{json:n,className:"px-3 py-2 text-xs font-mono whitespace-pre-wrap break-words"})})]})}function Cu(e){var i;const t=e.match(/expected="(.+?)"\s+actual="(.+?)"(.*)/s);if(!t)return null;const n={},r=((i=t[3])==null?void 0:i.trim())??"";if(r)for(const s of r.match(/(\w+)=([\S]+)/g)??[]){const o=s.indexOf("=");n[s.slice(0,o)]=s.slice(o+1)}return{expected:t[1],actual:t[2],meta:n}}function ao(e){try{const t=e.replace(/'/g,'"').replace(/\bTrue\b/g,"true").replace(/\bFalse\b/g,"false").replace(/\bNone\b/g,"null"),n=JSON.parse(t);return JSON.stringify(n,null,2)}catch{return e}}function Au({text:e}){const t=Cu(e);if(!t)return a.jsx("div",{className:"px-3 py-2 border-t",style:{borderColor:"var(--border)"},children:a.jsx("div",{className:"text-xs leading-relaxed",style:{color:"var(--text-secondary)"},children:e})});const n=ao(t.expected),r=ao(t.actual),i=n===r;return a.jsxs("div",{className:"border-t",style:{borderColor:"var(--border)"},children:[a.jsxs("div",{className:"grid grid-cols-2 gap-0",children:[a.jsxs("div",{className:"px-3 py-2 border-r",style:{borderColor:"var(--border)"},children:[a.jsx("div",{className:"text-[10px] font-semibold mb-1",style:{color:"var(--text-muted)"},children:"Expected"}),a.jsx("pre",{className:"text-[11px] font-mono whitespace-pre-wrap break-words",style:{color:"var(--text-secondary)"},children:n})]}),a.jsxs("div",{className:"px-3 py-2",children:[a.jsxs("div",{className:"flex items-center gap-1.5 mb-1",children:[a.jsx("span",{className:"text-[10px] font-semibold",style:{color:"var(--text-muted)"},children:"Actual"}),a.jsx("span",{className:"w-1.5 h-1.5 rounded-full",style:{background:i?"var(--success)":"var(--error)"}})]}),a.jsx("pre",{className:"text-[11px] font-mono whitespace-pre-wrap break-words",style:{color:i?"var(--success)":"var(--error)"},children:r})]})]}),Object.keys(t.meta).length>0&&a.jsx("div",{className:"px-3 py-1.5 border-t flex items-center gap-3",style:{borderColor:"var(--border)"},children:Object.entries(t.meta).map(([s,o])=>a.jsxs("span",{className:"text-[10px]",style:{color:"var(--text-muted)"},children:[a.jsx("span",{className:"font-medium",children:s.replace(/_/g," ")})," ",a.jsx("span",{className:"font-mono",children:o})]},s))})]})}const lo={deterministic:"var(--success)",llm:"#a78bfa",tool:"var(--info)"};function co(){const e=Me(f=>f.localEvaluators),t=Me(f=>f.addEvalSet),{navigate:n}=st(),[r,i]=N.useState(""),[s,o]=N.useState(new Set),[l,u]=N.useState(null),[c,d]=N.useState(!1),p=f=>{o(h=>{const b=new Set(h);return b.has(f)?b.delete(f):b.add(f),b})},m=async()=>{if(r.trim()){u(null),d(!0);try{const f=await uc({name:r.trim(),evaluator_refs:Array.from(s)});t(f),n(`#/evals/sets/${f.id}`)}catch(f){u(f.detail||f.message||"Failed to create eval set")}finally{d(!1)}}};return a.jsx("div",{className:"flex items-center justify-center h-full",children:a.jsxs("div",{className:"w-full max-w-xl px-6",children:[a.jsxs("div",{className:"mb-8 text-center",children:[a.jsxs("div",{className:"flex items-center justify-center gap-2 mb-2",children:[a.jsx("div",{className:"w-1.5 h-1.5 rounded-full",style:{background:"var(--accent)"}}),a.jsx("span",{className:"text-sm font-semibold",style:{color:"var(--text-muted)"},children:"New Eval Set"})]}),a.jsx("p",{className:"text-sm",style:{color:"var(--text-muted)"},children:"Create an evaluation set with a name and evaluators"})]}),a.jsxs("div",{className:"mb-6",children:[a.jsx("label",{className:"block text-[11px] font-medium mb-1.5",style:{color:"var(--text-muted)"},children:"Name"}),a.jsx("input",{type:"text",value:r,onChange:f=>i(f.target.value),placeholder:"e.g. Basic QA Tests",className:"w-full rounded-md px-3 py-2 text-xs",style:{background:"var(--bg-secondary)",border:"1px solid var(--border)",color:"var(--text-primary)"},onKeyDown:f=>{f.key==="Enter"&&r.trim()&&m()}})]}),a.jsxs("div",{className:"mb-6",children:[a.jsx("label",{className:"block text-[11px] font-medium mb-1.5",style:{color:"var(--text-muted)"},children:"Evaluators"}),e.length===0?a.jsxs("p",{className:"text-xs",style:{color:"var(--text-muted)"},children:["No evaluators configured."," ",a.jsx("button",{onClick:()=>n("#/evaluators/new"),className:"underline cursor-pointer",style:{color:"var(--accent)",background:"none",border:"none",padding:0,font:"inherit"},children:"Create one first"})]}):a.jsx("div",{className:"rounded-md border overflow-hidden",style:{borderColor:"var(--border)",background:"var(--bg-secondary)"},children:e.map(f=>a.jsxs("label",{className:"flex items-center gap-2.5 px-3 py-2 text-xs cursor-pointer transition-colors",style:{borderBottom:"1px solid var(--border)"},onMouseEnter:h=>{h.currentTarget.style.background="var(--bg-hover)"},onMouseLeave:h=>{h.currentTarget.style.background="transparent"},children:[a.jsx("input",{type:"checkbox",checked:s.has(f.id),onChange:()=>p(f.id),className:"accent-[var(--accent)]"}),a.jsx("span",{className:"flex-1 truncate",style:{color:"var(--text-primary)"},children:f.name}),a.jsx("span",{className:"text-[11px] font-medium px-1.5 py-0.5 rounded",style:{background:`color-mix(in srgb, ${lo[f.type]??"var(--text-muted)"} 15%, transparent)`,color:lo[f.type]??"var(--text-muted)"},children:f.type})]},f.id))})]}),l&&a.jsx("p",{className:"text-xs mb-4 px-3 py-2 rounded",style:{color:"var(--error)",background:"color-mix(in srgb, var(--error) 10%, var(--bg-secondary))"},children:l}),a.jsx("button",{onClick:m,disabled:!r.trim()||c,className:"w-full py-2 rounded-md text-[13px] font-semibold transition-colors cursor-pointer disabled:opacity-40 disabled:cursor-not-allowed",style:{background:"var(--accent)",color:"var(--bg-primary)",border:"none"},children:c?"Creating...":"Create Eval Set"})]})})}const Mu=[{type:"deterministic",label:"Deterministic",badgeColor:"var(--success)"},{type:"llm",label:"LLM Judge",badgeColor:"#a78bfa"},{type:"tool",label:"Tool-Based",badgeColor:"var(--info)"}];function uo(){const e=Me(s=>s.localEvaluators),{evaluatorFilter:t,evaluatorCreateType:n,navigate:r}=st(),i=!t&&!n;return a.jsxs(a.Fragment,{children:[a.jsx("button",{onClick:()=>r("#/evaluators/new"),className:"mx-3 mt-2.5 mb-1 px-3 py-1.5 text-[11px] font-medium rounded border border-[var(--border)] bg-transparent transition-colors cursor-pointer",style:{color:"var(--text-secondary)"},onMouseEnter:s=>{s.currentTarget.style.color="var(--text-primary)",s.currentTarget.style.borderColor="var(--text-muted)"},onMouseLeave:s=>{s.currentTarget.style.color="var(--text-secondary)",s.currentTarget.style.borderColor=""},children:"+ New Evaluator"}),a.jsx("div",{className:"px-3 pt-3 pb-1 text-[11px] uppercase tracking-widest font-semibold",style:{color:"var(--text-muted)"},children:"Categories"}),a.jsxs("div",{className:"flex-1 overflow-y-auto",children:[a.jsxs("button",{onClick:()=>r("#/evaluators"),className:"w-full text-left px-3 py-2 text-xs flex items-center gap-2 cursor-pointer transition-colors",style:{background:i?"color-mix(in srgb, var(--accent) 15%, var(--bg-primary))":"transparent",color:i?"var(--text-primary)":"var(--text-secondary)",borderLeft:i?"3px solid var(--accent)":"3px solid transparent"},onMouseEnter:s=>{i||(s.currentTarget.style.background="var(--bg-hover)")},onMouseLeave:s=>{i||(s.currentTarget.style.background="transparent")},children:[a.jsx("div",{className:"w-2 h-2 rounded-full shrink-0",style:{background:"var(--text-muted)"}}),a.jsx("span",{className:"flex-1 truncate",children:"All"}),e.length>0&&a.jsx("span",{className:"text-[10px] px-1.5 rounded-full",style:{background:"var(--bg-tertiary)",color:"var(--text-muted)"},children:e.length})]}),Mu.map(s=>{const o=e.filter(u=>u.type===s.type).length,l=t===s.type;return a.jsxs("button",{onClick:()=>r(l?"#/evaluators":`#/evaluators/category/${s.type}`),className:"w-full text-left px-3 py-2 text-xs flex items-center gap-2 cursor-pointer transition-colors",style:{background:l?"color-mix(in srgb, var(--accent) 15%, var(--bg-primary))":"transparent",color:l?"var(--text-primary)":"var(--text-secondary)",borderLeft:l?"3px solid var(--accent)":"3px solid transparent"},onMouseEnter:u=>{l||(u.currentTarget.style.background="var(--bg-hover)")},onMouseLeave:u=>{l||(u.currentTarget.style.background="transparent")},children:[a.jsx("div",{className:"w-2 h-2 rounded-full shrink-0",style:{background:s.badgeColor}}),a.jsx("span",{className:"flex-1 truncate",children:s.label}),o>0&&a.jsx("span",{className:"text-[10px] px-1.5 rounded-full",style:{background:"var(--bg-tertiary)",color:"var(--text-muted)"},children:o})]},s.type)})]})]})}const po={deterministic:{label:"Deterministic",color:"var(--success)",bg:"rgba(34,197,94,0.1)"},llm:{label:"LLM Judge",color:"#a78bfa",bg:"rgba(167,139,250,0.1)"},tool:{label:"Tool-Based",color:"var(--info)",bg:"rgba(59,130,246,0.1)"}},Pr={deterministic:"Deterministic",llm:"LLM Judge",tool:"Tool-Based"},pn={deterministic:[{id:"uipath-exact-match",name:"Exact Match"},{id:"uipath-contains",name:"Contains"},{id:"uipath-json-similarity",name:"JSON Similarity"}],llm:[{id:"uipath-llm-judge-output-semantic-similarity",name:"LLM Judge Output"},{id:"uipath-llm-judge-output-strict-json-similarity",name:"LLM Judge Strict JSON"},{id:"uipath-llm-judge-trajectory-similarity",name:"LLM Judge Trajectory"},{id:"uipath-llm-judge-trajectory-simulation",name:"LLM Judge Trajectory Simulation"}],tool:[{id:"uipath-tool-call-order",name:"Tool Call Order"},{id:"uipath-tool-call-args",name:"Tool Call Args"},{id:"uipath-tool-call-count",name:"Tool Call Count"},{id:"uipath-tool-call-output",name:"Tool Call Output"}]};function Ls(e){return e.includes("trajectory")?{targetOutputKey:!1,prompt:!0}:e.includes("llm-judge")?{targetOutputKey:!0,prompt:!0}:e.includes("tool-call-output")?{targetOutputKey:!0,prompt:!1}:e.includes("exact-match")||e.includes("contains")||e.includes("json-similarity")?{targetOutputKey:!0,prompt:!1}:{targetOutputKey:!1,prompt:!1}}const fr={"uipath-exact-match":{description:"Checks whether the agent output exactly matches the expected output.",prompt:""},"uipath-contains":{description:"Checks whether the agent output contains the expected substring.",prompt:""},"uipath-json-similarity":{description:"Compares JSON structures for semantic similarity, ignoring key ordering and whitespace.",prompt:""},"uipath-llm-judge-output-semantic-similarity":{description:"Uses an LLM to score semantic similarity between the agent's actual output and the expected output, accounting for synonyms, paraphrases, and equivalent expressions.",prompt:`As an expert evaluator, analyze the semantic similarity between the expected and actual outputs and determine a score from 0 to 100. Focus on comparing meaning and contextual equivalence of corresponding fields, accounting for alternative valid expressions, synonyms, and reasonable variations in language while maintaining high standards for accuracy and completeness. Provide your score with a brief justification. ---- ExpectedOutput: {{ExpectedOutput}} @@ -68,41 +68,41 @@ ExpectedAgentBehavior: {{ExpectedAgentBehavior}} ---- AgentRunHistory: -{{AgentRunHistory}}`},"uipath-tool-call-order":{description:"Validates that the agent called tools in the expected sequence.",prompt:""},"uipath-tool-call-args":{description:"Checks whether the agent called tools with the expected arguments.",prompt:""},"uipath-tool-call-count":{description:"Validates that the agent made the expected number of tool calls.",prompt:""},"uipath-tool-call-output":{description:"Validates the output returned by the agent's tool calls.",prompt:""}};function Au(e){for(const[t,n]of Object.entries(pn))if(n.some(r=>r.id===e))return t;return"deterministic"}function Mu({evaluatorId:e,evaluatorFilter:t}){const n=Ae(k=>k.localEvaluators),r=Ae(k=>k.setLocalEvaluators),i=Ae(k=>k.upsertLocalEvaluator),s=Ae(k=>k.evaluators),{navigate:o}=st(),l=e?n.find(k=>k.id===e)??null:null,u=!!l,c=t?n.filter(k=>k.type===t):n,[d,p]=S.useState(()=>{const k=localStorage.getItem("evaluatorSidebarWidth");return k?parseInt(k,10):320}),[m,f]=S.useState(!1),g=S.useRef(null);S.useEffect(()=>{localStorage.setItem("evaluatorSidebarWidth",String(d))},[d]),S.useEffect(()=>{Jr().then(r).catch(console.error)},[r]);const x=S.useCallback(k=>{k.preventDefault(),f(!0);const C="touches"in k?k.touches[0].clientX:k.clientX,j=d,L=B=>{const O=g.current;if(!O)return;const w="touches"in B?B.touches[0].clientX:B.clientX,_=O.clientWidth-300,M=Math.max(280,Math.min(_,j+(C-w)));p(M)},T=()=>{f(!1),document.removeEventListener("mousemove",L),document.removeEventListener("mouseup",T),document.removeEventListener("touchmove",L),document.removeEventListener("touchend",T),document.body.style.cursor="",document.body.style.userSelect=""};document.body.style.cursor="col-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",L),document.addEventListener("mouseup",T),document.addEventListener("touchmove",L,{passive:!1}),document.addEventListener("touchend",T)},[d]),y=k=>{i(k)},b=()=>{o("#/evaluators")};return a.jsxs("div",{ref:g,className:"flex h-full",children:[a.jsxs("div",{className:"flex flex-col flex-1 min-w-0",children:[a.jsxs("div",{className:"px-4 h-10 border-b shrink-0 flex items-center gap-4",style:{borderColor:"var(--border)"},children:[a.jsx("h1",{className:"text-base font-semibold",style:{color:"var(--text-primary)"},children:"Evaluators"}),a.jsxs("span",{className:"text-[11px]",style:{color:"var(--text-muted)"},children:[c.length,t?` / ${n.length}`:""," configured"]})]}),a.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:c.length===0?a.jsx("div",{className:"flex items-center justify-center h-full text-[var(--text-muted)] text-xs",children:n.length===0?"No evaluators configured yet.":"No evaluators in this category."}):a.jsx("div",{className:"grid gap-3",style:{gridTemplateColumns:"repeat(auto-fill, minmax(320px, 1fr))"},children:c.map(k=>a.jsx(Iu,{evaluator:k,evaluators:s,selected:k.id===e,onClick:()=>o(k.id===e?"#/evaluators":`#/evaluators/${encodeURIComponent(k.id)}`)},k.id))})})]}),a.jsx("div",{onMouseDown:x,onTouchStart:x,className:`shrink-0 drag-handle-col${m?"":" transition-all"}`,style:{width:u?3:0,opacity:u?1:0}}),a.jsxs("div",{className:`shrink-0 flex flex-col overflow-hidden${m?"":" transition-[width] duration-200 ease-in-out"}`,style:{width:u?d:0,background:"var(--bg-primary)"},children:[a.jsxs("div",{className:"flex items-center gap-1 px-2 h-10 border-b shrink-0",style:{borderColor:"var(--border)",background:"var(--bg-secondary)",minWidth:d},children:[a.jsx("span",{className:"px-2 py-0.5 h-7 text-xs font-semibold rounded inline-flex items-center",style:{color:"var(--accent)",background:"color-mix(in srgb, var(--accent) 10%, transparent)"},children:"Edit Evaluator"}),a.jsx("button",{onClick:b,"aria-label":"Close editor",className:"ml-auto w-7 h-7 flex items-center justify-center rounded cursor-pointer transition-colors",style:{color:"var(--text-muted)",background:"transparent",border:"none"},onMouseEnter:k=>{k.currentTarget.style.color="var(--text-primary)"},onMouseLeave:k=>{k.currentTarget.style.color="var(--text-muted)"},children:a.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[a.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),a.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),a.jsx("div",{className:"flex-1 overflow-hidden",style:{minWidth:d},children:l&&a.jsx(Ru,{evaluator:l,onUpdated:y})})]})]})}function Iu({evaluator:e,evaluators:t,selected:n,onClick:r}){const i=uo[e.type]??uo.deterministic,s=t.find(l=>l.id===e.evaluator_type_id),o=e.evaluator_type_id.startsWith("file://");return a.jsxs("div",{className:"rounded-md p-4 flex flex-col cursor-pointer transition-colors",style:{border:n?"1px solid var(--accent)":"1px solid var(--border)",background:n?"color-mix(in srgb, var(--accent) 5%, var(--card-bg))":"var(--card-bg)"},onClick:r,onMouseEnter:l=>{n||(l.currentTarget.style.borderColor="var(--text-muted)")},onMouseLeave:l=>{n||(l.currentTarget.style.borderColor="var(--border)")},children:[a.jsx("div",{className:"text-sm font-semibold",style:{color:"var(--text-primary)"},children:e.name}),e.description&&a.jsx("div",{className:"text-xs leading-relaxed mt-2",style:{color:"var(--text-secondary)"},children:e.description}),a.jsxs("div",{className:"flex flex-wrap gap-1.5 mt-auto pt-3",children:[a.jsxs("span",{className:"px-2 py-0.5 rounded text-[10px] font-medium",style:{color:i.color,background:i.bg},children:["Category: ",i.label]}),a.jsxs("span",{className:"px-2 py-0.5 rounded text-[10px] font-medium",style:{background:"var(--bg-tertiary)",color:"var(--text-secondary)"},children:["Type: ",o?"Custom":(s==null?void 0:s.name)??e.evaluator_type_id]}),a.jsxs("span",{className:"px-2 py-0.5 rounded text-[10px] font-medium font-mono",style:{background:"var(--bg-tertiary)",color:"var(--text-secondary)"},children:["Target: ",e.target_output_key||"*"]})]})]})}function Ru({evaluator:e,onUpdated:t}){var L,T;const n=Au(e.evaluator_type_id),r=pn[n]??[],[i,s]=S.useState(e.description),[o,l]=S.useState(e.evaluator_type_id),[u,c]=S.useState(((L=e.config)==null?void 0:L.targetOutputKey)??"*"),[d,p]=S.useState(((T=e.config)==null?void 0:T.prompt)??""),[m,f]=S.useState(!1),[g,x]=S.useState(null),[y,b]=S.useState(!1);S.useEffect(()=>{var B,O;s(e.description),l(e.evaluator_type_id),c(((B=e.config)==null?void 0:B.targetOutputKey)??"*"),p(((O=e.config)==null?void 0:O.prompt)??""),x(null),b(!1)},[e.id]);const k=Os(o),C=async()=>{f(!0),x(null),b(!1);try{const B={};k.targetOutputKey&&(B.targetOutputKey=u),k.prompt&&d.trim()&&(B.prompt=d);const O=await gc(e.id,{description:i.trim(),evaluator_type_id:o,config:B});t(O),b(!0),setTimeout(()=>b(!1),2e3)}catch(B){const O=B==null?void 0:B.detail;x(O??"Failed to update evaluator")}finally{f(!1)}},j={background:"var(--bg-secondary)",color:"var(--text-primary)",border:"1px solid var(--border)"};return a.jsxs("div",{className:"flex flex-col h-full",children:[a.jsxs("div",{className:"p-4 overflow-y-auto flex-1 space-y-4",children:[a.jsxs("div",{children:[a.jsx("label",{className:"text-[11px] font-medium block mb-1",style:{color:"var(--text-muted)"},children:"Name"}),a.jsx("div",{className:"px-3 py-2 rounded-lg text-xs",style:{background:"var(--bg-tertiary)",color:"var(--text-secondary)"},children:e.name})]}),a.jsxs("div",{children:[a.jsx("label",{className:"text-[11px] font-medium block mb-1",style:{color:"var(--text-muted)"},children:"Category"}),a.jsx("div",{className:"px-3 py-2 rounded-lg text-xs",style:{background:"var(--bg-tertiary)",color:"var(--text-secondary)"},children:jr[n]??n})]}),a.jsxs("div",{children:[a.jsx("label",{className:"text-[11px] font-medium block mb-1",style:{color:"var(--text-muted)"},children:"Type"}),a.jsx("select",{value:o,onChange:B=>l(B.target.value),className:"w-full px-3 py-2 rounded-lg text-xs outline-none cursor-pointer",style:j,children:r.map(B=>a.jsx("option",{value:B.id,children:B.name},B.id))})]}),a.jsxs("div",{children:[a.jsx("label",{className:"text-[11px] font-medium block mb-1",style:{color:"var(--text-muted)"},children:"Description"}),a.jsx("textarea",{value:i,onChange:B=>s(B.target.value),placeholder:"What does this evaluator check?",rows:4,className:"w-full px-3 py-2 rounded-lg text-xs leading-relaxed outline-none resize-y",style:j})]}),k.targetOutputKey&&a.jsxs("div",{children:[a.jsx("label",{className:"text-[11px] font-medium block mb-1",style:{color:"var(--text-muted)"},children:"Target Output Key"}),a.jsx("input",{type:"text",value:u,onChange:B=>c(B.target.value),placeholder:"*",className:"w-full px-3 py-2 rounded-lg text-xs outline-none",style:j}),a.jsx("div",{className:"text-[11px] mt-0.5",style:{color:"var(--text-muted)"},children:"Use * for entire output or a specific key name"})]}),k.prompt&&a.jsxs("div",{children:[a.jsx("label",{className:"text-[11px] font-medium block mb-1",style:{color:"var(--text-muted)"},children:"Prompt"}),a.jsx("textarea",{value:d,onChange:B=>p(B.target.value),placeholder:"Evaluation prompt for the LLM judge...",rows:8,className:"w-full px-3 py-2 rounded-lg text-xs font-mono leading-relaxed outline-none resize-y",style:j})]})]}),a.jsxs("div",{className:"shrink-0 p-4 space-y-2",children:[g&&a.jsx("div",{className:"text-xs px-3 py-2 rounded-lg",style:{background:"rgba(239,68,68,0.1)",color:"var(--error)"},children:g}),y&&a.jsx("div",{className:"text-xs px-3 py-2 rounded-lg",style:{background:"rgba(34,197,94,0.1)",color:"var(--success)"},children:"Saved successfully"}),a.jsx("button",{onClick:C,disabled:m,className:"w-full py-2.5 text-xs font-semibold rounded-md border cursor-pointer disabled:opacity-30 disabled:cursor-not-allowed transition-colors",style:{background:"transparent",borderColor:"var(--accent)",color:"var(--accent)"},onMouseEnter:B=>{B.currentTarget.style.background="color-mix(in srgb, var(--accent) 15%, transparent)"},onMouseLeave:B=>{B.currentTarget.style.background="transparent"},children:m?"Saving...":"Save Changes"})]})]})}const Ou=["deterministic","llm","tool"];function Lu({category:e}){var N;const t=Ae(E=>E.addLocalEvaluator),{navigate:n}=st(),r=e!=="any",[i,s]=S.useState(r?e:"deterministic"),o=pn[i]??[],[l,u]=S.useState(""),[c,d]=S.useState(""),[p,m]=S.useState(((N=o[0])==null?void 0:N.id)??""),[f,g]=S.useState("*"),[x,y]=S.useState(""),[b,k]=S.useState(!1),[C,j]=S.useState(null),[L,T]=S.useState(!1),[B,O]=S.useState(!1);S.useEffect(()=>{var V;const E=r?e:"deterministic";s(E);const G=((V=(pn[E]??[])[0])==null?void 0:V.id)??"",H=pr[G];u(""),d((H==null?void 0:H.description)??""),m(G),g("*"),y((H==null?void 0:H.prompt)??""),j(null),T(!1),O(!1)},[e,r]);const w=E=>{var V;s(E);const G=((V=(pn[E]??[])[0])==null?void 0:V.id)??"",H=pr[G];m(G),L||d((H==null?void 0:H.description)??""),B||y((H==null?void 0:H.prompt)??"")},_=E=>{m(E);const I=pr[E];I&&(L||d(I.description),B||y(I.prompt))},M=Os(p),R=async()=>{if(!l.trim()){j("Name is required");return}k(!0),j(null);try{const E={};M.targetOutputKey&&(E.targetOutputKey=f),M.prompt&&x.trim()&&(E.prompt=x);const I=await mc({name:l.trim(),description:c.trim(),evaluator_type_id:p,config:E});t(I),n("#/evaluators")}catch(E){const I=E==null?void 0:E.detail;j(I??"Failed to create evaluator")}finally{k(!1)}},D={background:"var(--bg-secondary)",border:"1px solid var(--border)",color:"var(--text-primary)"};return a.jsx("div",{className:"h-full overflow-y-auto",children:a.jsx("div",{className:"flex items-center justify-center min-h-full py-8",children:a.jsxs("div",{className:"w-full max-w-xl px-6",children:[a.jsxs("div",{className:"mb-8 text-center",children:[a.jsxs("div",{className:"flex items-center justify-center gap-2 mb-2",children:[a.jsx("div",{className:"w-1.5 h-1.5 rounded-full",style:{background:"var(--accent)"}}),a.jsx("span",{className:"text-sm font-semibold",style:{color:"var(--text-muted)"},children:"New Evaluator"})]}),a.jsx("p",{className:"text-sm",style:{color:"var(--text-muted)"},children:"Create an evaluator to score agent outputs"})]}),a.jsxs("div",{className:"mb-6",children:[a.jsx("label",{className:"block text-[11px] font-medium mb-1.5",style:{color:"var(--text-muted)"},children:"Name"}),a.jsx("input",{type:"text",value:l,onChange:E=>u(E.target.value),placeholder:"e.g. MyEvaluator",className:"w-full rounded-md px-3 py-2 text-xs",style:D,onKeyDown:E=>{E.key==="Enter"&&l.trim()&&R()}})]}),a.jsxs("div",{className:"mb-6",children:[a.jsx("label",{className:"block text-[11px] font-medium mb-1.5",style:{color:"var(--text-muted)"},children:"Category"}),r?a.jsx("div",{className:"px-3 py-2 rounded-md text-xs",style:{background:"var(--bg-tertiary)",color:"var(--text-secondary)"},children:jr[i]??i}):a.jsx("select",{value:i,onChange:E=>w(E.target.value),className:"w-full rounded-md px-3 py-2 text-xs cursor-pointer appearance-auto",style:D,children:Ou.map(E=>a.jsx("option",{value:E,children:jr[E]},E))})]}),a.jsxs("div",{className:"mb-6",children:[a.jsx("label",{className:"block text-[11px] font-medium mb-1.5",style:{color:"var(--text-muted)"},children:"Type"}),a.jsx("select",{value:p,onChange:E=>_(E.target.value),className:"w-full rounded-md px-3 py-2 text-xs cursor-pointer appearance-auto",style:D,children:o.map(E=>a.jsx("option",{value:E.id,children:E.name},E.id))})]}),a.jsxs("div",{className:"mb-6",children:[a.jsx("label",{className:"block text-[11px] font-medium mb-1.5",style:{color:"var(--text-muted)"},children:"Description"}),a.jsx("textarea",{value:c,onChange:E=>{d(E.target.value),T(!0)},placeholder:"What does this evaluator check?",rows:3,className:"w-full rounded-md px-3 py-2 text-xs leading-relaxed resize-y",style:D})]}),M.targetOutputKey&&a.jsxs("div",{className:"mb-6",children:[a.jsx("label",{className:"block text-[11px] font-medium mb-1.5",style:{color:"var(--text-muted)"},children:"Target Output Key"}),a.jsx("input",{type:"text",value:f,onChange:E=>g(E.target.value),placeholder:"*",className:"w-full rounded-md px-3 py-2 text-xs",style:D}),a.jsx("div",{className:"text-xs mt-1",style:{color:"var(--text-muted)"},children:"Use * for entire output or a specific key name"})]}),M.prompt&&a.jsxs("div",{className:"mb-6",children:[a.jsx("label",{className:"block text-[11px] font-medium mb-1.5",style:{color:"var(--text-muted)"},children:"Prompt"}),a.jsx("textarea",{value:x,onChange:E=>{y(E.target.value),O(!0)},placeholder:"Evaluation prompt for the LLM judge...",rows:6,className:"w-full rounded-md px-3 py-2 text-xs font-mono leading-relaxed resize-y",style:D})]}),C&&a.jsx("p",{className:"text-xs mb-4 px-3 py-2 rounded",style:{color:"var(--error)",background:"color-mix(in srgb, var(--error) 10%, var(--bg-secondary))"},children:C}),a.jsx("button",{onClick:R,disabled:b||!l.trim(),className:"w-full py-2 rounded-md text-[13px] font-semibold transition-colors cursor-pointer disabled:opacity-40 disabled:cursor-not-allowed",style:{background:"var(--accent)",color:"var(--bg-primary)",border:"none"},children:b?"Creating...":"Create Evaluator"})]})})})}function Ls({path:e,name:t,type:n,depth:r}){const i=Me(b=>b.children[e]),s=Me(b=>!!b.expanded[e]),o=Me(b=>!!b.loadingDirs[e]),l=Me(b=>!!b.dirty[e]),u=Me(b=>b.selectedFile),{setChildren:c,toggleExpanded:d,setLoadingDir:p,openTab:m}=Me(),{navigate:f}=st(),g=n==="directory",x=!g&&u===e,y=S.useCallback(()=>{g?(!i&&!o&&(p(e,!0),Zr(e).then(b=>c(e,b)).catch(console.error).finally(()=>p(e,!1))),d(e)):(m(e),f(`#/explorer/file/${encodeURIComponent(e)}`))},[g,i,o,e,c,d,p,m,f]);return a.jsxs(a.Fragment,{children:[a.jsxs("button",{onClick:y,className:"w-full text-left flex items-center gap-1 py-[3px] text-[13px] cursor-pointer transition-colors group",style:{paddingLeft:`${12+r*16}px`,paddingRight:"8px",background:x?"color-mix(in srgb, var(--accent) 15%, var(--bg-primary))":"transparent",color:x?"var(--text-primary)":"var(--text-secondary)",border:"none"},onMouseEnter:b=>{x||(b.currentTarget.style.background="var(--bg-hover)")},onMouseLeave:b=>{x||(b.currentTarget.style.background="transparent")},children:[a.jsx("span",{className:"w-3 shrink-0 flex items-center justify-center",style:{color:"var(--text-muted)"},children:g&&a.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"currentColor",style:{transform:s?"rotate(90deg)":"rotate(0deg)",transition:"transform 0.15s"},children:a.jsx("path",{d:"M3 1.5L7 5L3 8.5z"})})}),a.jsx("span",{className:"shrink-0",style:{color:g?"var(--accent)":"var(--text-muted)"},children:g?a.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:a.jsx("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"})}):a.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),a.jsx("polyline",{points:"14 2 14 8 20 8"})]})}),a.jsx("span",{className:"truncate flex-1",children:t}),l&&a.jsx("span",{className:"w-2 h-2 rounded-full shrink-0",style:{background:"var(--accent)"}}),o&&a.jsx("span",{className:"text-[10px] shrink-0",style:{color:"var(--text-muted)"},children:"..."})]}),g&&s&&i&&i.map(b=>a.jsx(Ls,{path:b.path,name:b.name,type:b.type,depth:r+1},b.path))]})}function po(){const e=Me(n=>n.children[""]),{setChildren:t}=Me();return S.useEffect(()=>{e||Zr("").then(n=>t("",n)).catch(console.error)},[e,t]),a.jsx("div",{className:"flex-1 overflow-y-auto py-1",children:e?e.map(n=>a.jsx(Ls,{path:n.path,name:n.name,type:n.type,depth:0},n.path)):a.jsx("p",{className:"text-[11px] px-3 py-2",style:{color:"var(--text-muted)"},children:"Loading..."})})}const ju=e=>{e.editor.defineTheme("uipath-dark",{base:"vs-dark",inherit:!0,rules:[{token:"comment",foreground:"64748b",fontStyle:"italic"},{token:"keyword",foreground:"c084fc"},{token:"string",foreground:"86efac"},{token:"number",foreground:"fcd34d"},{token:"type",foreground:"7dd3fc"}],colors:{"editor.background":"#0f172a","editor.foreground":"#cbd5e1","editor.lineHighlightBackground":"#1e293b","editor.selectionBackground":"#334155","editor.inactiveSelectionBackground":"#263348","editorLineNumber.foreground":"#64748b","editorLineNumber.activeForeground":"#94a3b8","editorCursor.foreground":"#fa4616","editorIndentGuide.background":"#334155","editorIndentGuide.activeBackground":"#64748b","editorWidget.background":"#1e293b","editorWidget.border":"#334155","editorSuggestWidget.background":"#1e293b","editorSuggestWidget.border":"#334155","editorSuggestWidget.selectedBackground":"#263348","editorHoverWidget.background":"#1e293b","editorHoverWidget.border":"#334155","scrollbarSlider.background":"#33415580","scrollbarSlider.hoverBackground":"#33415599","scrollbarSlider.activeBackground":"#334155cc"}}),e.editor.defineTheme("uipath-light",{base:"vs",inherit:!0,rules:[{token:"comment",foreground:"94a3b8",fontStyle:"italic"},{token:"keyword",foreground:"7c3aed"},{token:"string",foreground:"16a34a"},{token:"number",foreground:"d97706"},{token:"type",foreground:"0284c7"}],colors:{"editor.background":"#f8fafc","editor.foreground":"#0f172a","editor.lineHighlightBackground":"#f1f5f9","editor.selectionBackground":"#e2e8f0","editor.inactiveSelectionBackground":"#f1f5f9","editorLineNumber.foreground":"#94a3b8","editorLineNumber.activeForeground":"#475569","editorCursor.foreground":"#fa4616","editorIndentGuide.background":"#e2e8f0","editorIndentGuide.activeBackground":"#94a3b8","editorWidget.background":"#ffffff","editorWidget.border":"#e2e8f0","editorSuggestWidget.background":"#ffffff","editorSuggestWidget.border":"#e2e8f0","editorSuggestWidget.selectedBackground":"#f1f5f9","editorHoverWidget.background":"#ffffff","editorHoverWidget.border":"#e2e8f0","scrollbarSlider.background":"#d1d5db80","scrollbarSlider.hoverBackground":"#d1d5db99","scrollbarSlider.activeBackground":"#d1d5dbcc"}})};function fo(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function Du(e){const t=e.replace(/\\/g,"/").split("/");return t[t.length-1]||e}function Pu(){const e=Me(w=>w.openTabs),n=Me(w=>w.selectedFile),r=Me(w=>n?w.fileCache[n]:void 0),i=Me(w=>n?!!w.dirty[n]:!1),s=Me(w=>n?w.buffers[n]:void 0),o=Me(w=>w.loadingFile),l=Me(w=>w.dirty),{setFileContent:u,updateBuffer:c,markClean:d,setLoadingFile:p,openTab:m,closeTab:f}=Me(),{navigate:g}=st(),x=Ns(w=>w.theme),y=S.useRef(null),{explorerFile:b}=st();S.useEffect(()=>{b&&m(b)},[b,m]),S.useEffect(()=>{n&&(Me.getState().fileCache[n]||(p(!0),ys(n).then(w=>u(n,w)).catch(console.error).finally(()=>p(!1))))},[n,u,p]);const k=S.useCallback(()=>{if(!n)return;const w=Me.getState().fileCache[n],M=Me.getState().buffers[n]??(w==null?void 0:w.content);M!=null&&Vl(n,M).then(()=>{d(n),u(n,{...w,content:M})}).catch(console.error)},[n,d,u]);S.useEffect(()=>{const w=_=>{(_.ctrlKey||_.metaKey)&&_.key==="s"&&(_.preventDefault(),k())};return window.addEventListener("keydown",w),()=>window.removeEventListener("keydown",w)},[k]);const C=w=>{y.current=w},j=S.useCallback(w=>{w!==void 0&&n&&c(n,w)},[n,c]),L=S.useCallback(w=>{m(w),g(`#/explorer/file/${encodeURIComponent(w)}`)},[m,g]),T=S.useCallback((w,_)=>{w.stopPropagation();const M=Me.getState(),R=M.openTabs.filter(D=>D!==_);if(f(_),M.selectedFile===_){const D=M.openTabs.indexOf(_),N=R[Math.min(D,R.length-1)];g(N?`#/explorer/file/${encodeURIComponent(N)}`:"#/explorer")}},[f,g]),B=S.useCallback((w,_)=>{w.button===1&&T(w,_)},[T]),O=e.length>0&&a.jsx("div",{className:"h-10 flex items-end overflow-x-auto shrink-0",style:{background:"var(--bg-secondary)",borderBottom:"1px solid var(--border)"},children:e.map(w=>{const _=w===n,M=!!l[w];return a.jsxs("button",{onClick:()=>L(w),onMouseDown:R=>B(R,w),className:"h-full flex items-center gap-1.5 px-3 text-[12px] shrink-0 cursor-pointer transition-colors relative",style:{background:_?"var(--bg-primary)":"transparent",color:_?"var(--text-primary)":"var(--text-secondary)",border:"none",borderBottom:_?"2px solid var(--accent)":"2px solid transparent",maxWidth:"180px"},onMouseEnter:R=>{_||(R.currentTarget.style.background="var(--bg-hover)")},onMouseLeave:R=>{_||(R.currentTarget.style.background="transparent")},children:[a.jsx("span",{className:"truncate",children:Du(w)}),M?a.jsx("span",{className:"w-2 h-2 rounded-full shrink-0",style:{background:"var(--accent)"},title:"Unsaved changes"}):a.jsx("span",{className:"w-4 h-4 flex items-center justify-center rounded shrink-0 transition-colors",style:{color:"var(--text-muted)"},onClick:R=>T(R,w),onMouseEnter:R=>{R.currentTarget.style.background="var(--bg-hover)",R.currentTarget.style.color="var(--text-primary)"},onMouseLeave:R=>{R.currentTarget.style.background="transparent",R.currentTarget.style.color="var(--text-muted)"},children:a.jsx("svg",{width:"10",height:"10",viewBox:"0 0 16 16",fill:"currentColor",children:a.jsx("path",{d:"M8 8.707l3.646 3.647.708-.707L8.707 8l3.647-3.646-.707-.708L8 7.293 4.354 3.646l-.708.708L7.293 8l-3.647 3.646.708.708L8 8.707z"})})})]},w)})});return n?o&&!r?a.jsxs("div",{className:"flex flex-col h-full",children:[O,a.jsx("div",{className:"flex-1 flex items-center justify-center",style:{color:"var(--text-muted)"},children:a.jsx("div",{className:"text-sm",children:"Loading file..."})})]}):!r&&!o?a.jsxs("div",{className:"flex flex-col h-full",children:[O,a.jsx("div",{className:"flex-1 flex items-center justify-center",style:{color:"var(--text-muted)"},children:a.jsx("div",{className:"text-sm",children:"Failed to load file"})})]}):r?r.binary?a.jsxs("div",{className:"flex flex-col h-full",children:[O,a.jsx("div",{className:"h-8 flex items-center px-3 gap-2 text-xs shrink-0 border-b",style:{borderColor:"var(--border)",background:"var(--bg-secondary)"},children:a.jsx("span",{style:{color:"var(--text-muted)"},children:fo(r.size)})}),a.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-3",style:{color:"var(--text-muted)"},children:[a.jsxs("svg",{width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),a.jsx("polyline",{points:"14 2 14 8 20 8"}),a.jsx("line",{x1:"9",y1:"15",x2:"15",y2:"15"})]}),a.jsx("span",{className:"text-sm",children:"Binary file — preview not available"})]})]}):a.jsxs("div",{className:"flex flex-col h-full",children:[O,a.jsxs("div",{className:"h-8 flex items-center px-3 gap-2 text-xs shrink-0 border-b",style:{borderColor:"var(--border)",background:"var(--bg-secondary)"},children:[r.language&&a.jsx("span",{className:"px-1.5 py-0.5 rounded text-[10px]",style:{background:"var(--bg-hover)",color:"var(--text-muted)"},children:r.language}),a.jsx("span",{style:{color:"var(--text-muted)"},children:fo(r.size)}),a.jsx("div",{className:"flex-1"}),i&&a.jsx("span",{className:"text-[10px] font-medium",style:{color:"var(--accent)"},children:"Modified"}),a.jsx("button",{onClick:k,className:"px-2 py-0.5 rounded text-[11px] font-medium cursor-pointer transition-colors",style:{background:i?"var(--accent)":"var(--bg-hover)",color:i?"white":"var(--text-muted)",border:"none"},children:"Save"})]}),a.jsx("div",{className:"flex-1 overflow-hidden",children:a.jsx(Tl,{language:r.language??"plaintext",theme:x==="dark"?"uipath-dark":"uipath-light",value:s??r.content??"",onChange:j,beforeMount:ju,onMount:C,options:{minimap:{enabled:!1},fontSize:13,lineNumbersMinChars:4,scrollBeyondLastLine:!1,wordWrap:"on",automaticLayout:!0,tabSize:2,renderWhitespace:"selection"}},n)})]}):null:a.jsxs("div",{className:"flex flex-col h-full",children:[O,a.jsx("div",{className:"flex-1 flex items-center justify-center",style:{color:"var(--text-muted)"},children:"Select a file to view"})]})}const Xn="/api";async function Bu(){const e=await fetch(`${Xn}/agent/models`);if(!e.ok){if(e.status===401)return[];throw new Error(`HTTP ${e.status}`)}return e.json()}async function Fu(e){const t=await fetch(`${Xn}/agent/session/${e}/diagnostics`);if(!t.ok)throw new Error(`HTTP ${t.status}`);return t.json()}async function zu(e){const t=await fetch(`${Xn}/agent/session/${e}/state`);if(t.status===404)return null;if(!t.ok)throw new Error(`HTTP ${t.status}`);return t.json()}async function $u(){const e=await fetch(`${Xn}/agent/skills`);if(!e.ok)throw new Error(`HTTP ${e.status}`);return e.json()}function Uu(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Hu=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Wu=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ku={};function mo(e,t){return(Ku.jsx?Wu:Hu).test(e)}const Gu=/[ \t\n\f\r]/g;function qu(e){return typeof e=="object"?e.type==="text"?ho(e.value):!1:ho(e)}function ho(e){return e.replace(Gu,"")===""}class xn{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}xn.prototype.normal={};xn.prototype.property={};xn.prototype.space=void 0;function js(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new xn(n,r,t)}function Dr(e){return e.toLowerCase()}class Xe{constructor(t,n){this.attribute=n,this.property=t}}Xe.prototype.attribute="";Xe.prototype.booleanish=!1;Xe.prototype.boolean=!1;Xe.prototype.commaOrSpaceSeparated=!1;Xe.prototype.commaSeparated=!1;Xe.prototype.defined=!1;Xe.prototype.mustUseProperty=!1;Xe.prototype.number=!1;Xe.prototype.overloadedBoolean=!1;Xe.prototype.property="";Xe.prototype.spaceSeparated=!1;Xe.prototype.space=void 0;let Vu=0;const pe=Kt(),Pe=Kt(),Pr=Kt(),q=Kt(),Ce=Kt(),tn=Kt(),Qe=Kt();function Kt(){return 2**++Vu}const Br=Object.freeze(Object.defineProperty({__proto__:null,boolean:pe,booleanish:Pe,commaOrSpaceSeparated:Qe,commaSeparated:tn,number:q,overloadedBoolean:Pr,spaceSeparated:Ce},Symbol.toStringTag,{value:"Module"})),fr=Object.keys(Br);class Qr extends Xe{constructor(t,n,r,i){let s=-1;if(super(t,n),go(this,"space",i),typeof r=="number")for(;++s4&&n.slice(0,4)==="data"&&Qu.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(bo,nd);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!bo.test(s)){let o=s.replace(Ju,td);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=Qr}return new i(r,t)}function td(e){return"-"+e.toLowerCase()}function nd(e){return e.charAt(1).toUpperCase()}const rd=js([Ds,Yu,Fs,zs,$s],"html"),ei=js([Ds,Xu,Fs,zs,$s],"svg");function id(e){return e.join(" ").trim()}var Yt={},mr,xo;function od(){if(xo)return mr;xo=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,l=/^\s+|\s+$/g,u=` -`,c="/",d="*",p="",m="comment",f="declaration";function g(y,b){if(typeof y!="string")throw new TypeError("First argument must be a string");if(!y)return[];b=b||{};var k=1,C=1;function j(N){var E=N.match(t);E&&(k+=E.length);var I=N.lastIndexOf(u);C=~I?N.length-I:C+N.length}function L(){var N={line:k,column:C};return function(E){return E.position=new T(N),w(),E}}function T(N){this.start=N,this.end={line:k,column:C},this.source=b.source}T.prototype.content=y;function B(N){var E=new Error(b.source+":"+k+":"+C+": "+N);if(E.reason=N,E.filename=b.source,E.line=k,E.column=C,E.source=y,!b.silent)throw E}function O(N){var E=N.exec(y);if(E){var I=E[0];return j(I),y=y.slice(I.length),E}}function w(){O(n)}function _(N){var E;for(N=N||[];E=M();)E!==!1&&N.push(E);return N}function M(){var N=L();if(!(c!=y.charAt(0)||d!=y.charAt(1))){for(var E=2;p!=y.charAt(E)&&(d!=y.charAt(E)||c!=y.charAt(E+1));)++E;if(E+=2,p===y.charAt(E-1))return B("End of comment missing");var I=y.slice(2,E-2);return C+=2,j(I),y=y.slice(E),C+=2,N({type:m,comment:I})}}function R(){var N=L(),E=O(r);if(E){if(M(),!O(i))return B("property missing ':'");var I=O(s),G=N({type:f,property:x(E[0].replace(e,p)),value:I?x(I[0].replace(e,p)):p});return O(o),G}}function D(){var N=[];_(N);for(var E;E=R();)E!==!1&&(N.push(E),_(N));return N}return w(),D()}function x(y){return y?y.replace(l,p):p}return mr=g,mr}var yo;function sd(){if(yo)return Yt;yo=1;var e=Yt&&Yt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Yt,"__esModule",{value:!0}),Yt.default=n;const t=e(od());function n(r,i){let s=null;if(!r||typeof r!="string")return s;const o=(0,t.default)(r),l=typeof i=="function";return o.forEach(u=>{if(u.type!=="declaration")return;const{property:c,value:d}=u;l?i(c,d,u):d&&(s=s||{},s[c]=d)}),s}return Yt}var an={},vo;function ad(){if(vo)return an;vo=1,Object.defineProperty(an,"__esModule",{value:!0}),an.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,s=function(c){return!c||n.test(c)||e.test(c)},o=function(c,d){return d.toUpperCase()},l=function(c,d){return"".concat(d,"-")},u=function(c,d){return d===void 0&&(d={}),s(c)?c:(c=c.toLowerCase(),d.reactCompat?c=c.replace(i,l):c=c.replace(r,l),c.replace(t,o))};return an.camelCase=u,an}var ln,ko;function ld(){if(ko)return ln;ko=1;var e=ln&&ln.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(sd()),n=ad();function r(i,s){var o={};return!i||typeof i!="string"||(0,t.default)(i,function(l,u){l&&u&&(o[(0,n.camelCase)(l,s)]=u)}),o}return r.default=r,ln=r,ln}var cd=ld();const ud=Vr(cd),Us=Hs("end"),ti=Hs("start");function Hs(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function dd(e){const t=ti(e),n=Us(e);if(t&&n)return{start:t,end:n}}function fn(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Eo(e.position):"start"in e||"end"in e?Eo(e):"line"in e||"column"in e?Fr(e):""}function Fr(e){return wo(e&&e.line)+":"+wo(e&&e.column)}function Eo(e){return Fr(e&&e.start)+"-"+Fr(e&&e.end)}function wo(e){return e&&typeof e=="number"?e:1}class We extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",s={},o=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof t=="string"?i=t:!s.cause&&t&&(o=!0,i=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?s.ruleId=r:(s.source=r.slice(0,u),s.ruleId=r.slice(u+1))}if(!s.place&&s.ancestors&&s.ancestors){const u=s.ancestors[s.ancestors.length-1];u&&(s.place=u.position)}const l=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=l?l.line:void 0,this.name=fn(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=o&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}We.prototype.file="";We.prototype.name="";We.prototype.reason="";We.prototype.message="";We.prototype.stack="";We.prototype.column=void 0;We.prototype.line=void 0;We.prototype.ancestors=void 0;We.prototype.cause=void 0;We.prototype.fatal=void 0;We.prototype.place=void 0;We.prototype.ruleId=void 0;We.prototype.source=void 0;const ni={}.hasOwnProperty,pd=new Map,fd=/[A-Z]/g,md=new Set(["table","tbody","thead","tfoot","tr"]),hd=new Set(["td","th"]),Ws="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function gd(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=_d(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=wd(n,t.jsx,t.jsxs)}const 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"?ei:rd,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=Ks(i,e,void 0);return s&&typeof s!="string"?s:i.create(e,i.Fragment,{children:s||void 0},void 0)}function Ks(e,t,n){if(t.type==="element")return bd(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return xd(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return vd(e,t,n);if(t.type==="mdxjsEsm")return yd(e,t);if(t.type==="root")return kd(e,t,n);if(t.type==="text")return Ed(e,t)}function bd(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=ei,e.schema=i),e.ancestors.push(t);const s=qs(e,t.tagName,!1),o=Nd(e,t);let l=ii(e,t);return md.has(t.tagName)&&(l=l.filter(function(u){return typeof u=="string"?!qu(u):!0})),Gs(e,o,s,t),ri(o,l),e.ancestors.pop(),e.schema=r,e.create(t,s,o,n)}function xd(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}gn(e,t.position)}function yd(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);gn(e,t.position)}function vd(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=ei,e.schema=i),e.ancestors.push(t);const s=t.name===null?e.Fragment:qs(e,t.name,!0),o=Sd(e,t),l=ii(e,t);return Gs(e,o,s,t),ri(o,l),e.ancestors.pop(),e.schema=r,e.create(t,s,o,n)}function kd(e,t,n){const r={};return ri(r,ii(e,t)),e.create(t,e.Fragment,r,n)}function Ed(e,t){return t.value}function Gs(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function ri(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function wd(e,t,n){return r;function r(i,s,o,l){const c=Array.isArray(o.children)?n:t;return l?c(s,o,l):c(s,o)}}function _d(e,t){return n;function n(r,i,s,o){const l=Array.isArray(s.children),u=ti(r);return t(i,s,o,l,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function Nd(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&ni.call(t.properties,i)){const s=Td(e,i,t.properties[i]);if(s){const[o,l]=s;e.tableCellAlignToStyle&&o==="align"&&typeof l=="string"&&hd.has(t.tagName)?r=l:n[o]=l}}if(r){const s=n.style||(n.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Sd(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const s=r.data.estree.body[0];s.type;const o=s.expression;o.type;const l=o.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else gn(e,t.position);else{const i=r.name;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const l=r.value.data.estree.body[0];l.type,s=e.evaluater.evaluateExpression(l.expression)}else gn(e,t.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function ii(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:pd;for(;++ri?0:i+t: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);s0?(et(e,e.length,0,t),e):t}const So={}.hasOwnProperty;function Ys(e){const t={};let 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 dt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Ve=Dt(/[A-Za-z]/),He=Dt(/[\dA-Za-z]/),Dd=Dt(/[#-'*+\--9=?A-Z^-~]/);function Un(e){return e!==null&&(e<32||e===127)}const zr=Dt(/\d/),Pd=Dt(/[\dA-Fa-f]/),Bd=Dt(/[!-/:-@[-`{-~]/);function se(e){return e!==null&&e<-2}function Ne(e){return e!==null&&(e<0||e===32)}function ge(e){return e===-2||e===-1||e===32}const Zn=Dt(new RegExp("\\p{P}|\\p{S}","u")),Wt=Dt(/\s/);function Dt(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function on(e){const t=[];let n=-1,r=0,i=0;for(;++n55295&&s<57344){const l=e.charCodeAt(n+1);s<56320&&l>56319&&l<57344?(o=String.fromCharCode(s,l),i=1):o="�"}else o=String.fromCharCode(s);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function ve(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let s=0;return o;function o(u){return ge(u)?(e.enter(n),l(u)):t(u)}function l(u){return ge(u)&&s++o))return;const B=t.events.length;let O=B,w,_;for(;O--;)if(t.events[O][0]==="exit"&&t.events[O][1].type==="chunkFlow"){if(w){_=t.events[O][1].end;break}w=!0}for(b(r),T=B;TC;){const L=n[j];t.containerState=L[1],L[0].exit.call(t,e)}n.length=C}function k(){i.write([null]),s=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Hd(e,t,n){return ve(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function nn(e){if(e===null||Ne(e)||Wt(e))return 1;if(Zn(e))return 2}function Jn(e,t,n){const r=[];let i=-1;for(;++i1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const p={...e[r][1].end},m={...e[n][1].start};Co(p,-u),Co(m,u),o={type:u>1?"strongSequence":"emphasisSequence",start:p,end:{...e[r][1].end}},l={type:u>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:m},s={type:u>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:u>1?"strong":"emphasis",start:{...o.start},end:{...l.end}},e[r][1].end={...o.start},e[n][1].start={...l.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=it(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=it(c,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",s,t]]),c=it(c,Jn(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=it(c,[["exit",s,t],["enter",l,t],["exit",l,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,c=it(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,et(e,r-1,n-r+3,c),n=r+c.length-d-2;break}}for(n=-1;++n0&&ge(T)?ve(e,k,"linePrefix",s+1)(T):k(T)}function k(T){return T===null||se(T)?e.check(Ao,x,j)(T):(e.enter("codeFlowValue"),C(T))}function C(T){return T===null||se(T)?(e.exit("codeFlowValue"),k(T)):(e.consume(T),C)}function j(T){return e.exit("codeFenced"),t(T)}function L(T,B,O){let w=0;return _;function _(E){return T.enter("lineEnding"),T.consume(E),T.exit("lineEnding"),M}function M(E){return T.enter("codeFencedFence"),ge(E)?ve(T,R,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):R(E)}function R(E){return E===l?(T.enter("codeFencedFenceSequence"),D(E)):O(E)}function D(E){return E===l?(w++,T.consume(E),D):w>=o?(T.exit("codeFencedFenceSequence"),ge(E)?ve(T,N,"whitespace")(E):N(E)):O(E)}function N(E){return E===null||se(E)?(T.exit("codeFencedFence"),B(E)):O(E)}}}function tp(e,t,n){const r=this;return i;function i(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),s)}function s(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const gr={name:"codeIndented",tokenize:rp},np={partial:!0,tokenize:ip};function rp(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),ve(e,s,"linePrefix",5)(c)}function s(c){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?o(c):n(c)}function o(c){return c===null?u(c):se(c)?e.attempt(np,o,u)(c):(e.enter("codeFlowValue"),l(c))}function l(c){return c===null||se(c)?(e.exit("codeFlowValue"),o(c)):(e.consume(c),l)}function u(c){return e.exit("codeIndented"),t(c)}}function ip(e,t,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):se(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):ve(e,s,"linePrefix",5)(o)}function s(o){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(o):se(o)?i(o):n(o)}}const op={name:"codeText",previous:ap,resolve:sp,tokenize:lp};function sp(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 new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return tthis.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const s=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&cn(this.left,r),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),cn(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),cn(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function ta(e,t,n,r,i,s,o,l,u){const c=u||Number.POSITIVE_INFINITY;let d=0;return p;function p(b){return b===60?(e.enter(r),e.enter(i),e.enter(s),e.consume(b),e.exit(s),m):b===null||b===32||b===41||Un(b)?n(b):(e.enter(r),e.enter(o),e.enter(l),e.enter("chunkString",{contentType:"string"}),x(b))}function m(b){return b===62?(e.enter(s),e.consume(b),e.exit(s),e.exit(i),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),f(b))}function f(b){return b===62?(e.exit("chunkString"),e.exit(l),m(b)):b===null||b===60||se(b)?n(b):(e.consume(b),b===92?g:f)}function g(b){return b===60||b===62||b===92?(e.consume(b),f):f(b)}function x(b){return!d&&(b===null||b===41||Ne(b))?(e.exit("chunkString"),e.exit(l),e.exit(o),e.exit(r),t(b)):d999||f===null||f===91||f===93&&!u||f===94&&!l&&"_hiddenFootnoteSupport"in o.parser.constructs?n(f):f===93?(e.exit(s),e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):se(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),p(f))}function p(f){return f===null||f===91||f===93||se(f)||l++>999?(e.exit("chunkString"),d(f)):(e.consume(f),u||(u=!ge(f)),f===92?m:p)}function m(f){return f===91||f===92||f===93?(e.consume(f),l++,p):p(f)}}function ra(e,t,n,r,i,s){let o;return l;function l(m){return m===34||m===39||m===40?(e.enter(r),e.enter(i),e.consume(m),e.exit(i),o=m===40?41:m,u):n(m)}function u(m){return m===o?(e.enter(i),e.consume(m),e.exit(i),e.exit(r),t):(e.enter(s),c(m))}function c(m){return m===o?(e.exit(s),u(o)):m===null?n(m):se(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),ve(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(m))}function d(m){return m===o||m===null||se(m)?(e.exit("chunkString"),c(m)):(e.consume(m),m===92?p:d)}function p(m){return m===o||m===92?(e.consume(m),d):d(m)}}function mn(e,t){let n;return r;function r(i){return se(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):ge(i)?ve(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const gp={name:"definition",tokenize:xp},bp={partial:!0,tokenize:yp};function xp(e,t,n){const r=this;let i;return s;function s(f){return e.enter("definition"),o(f)}function o(f){return na.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function l(f){return i=dt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),f===58?(e.enter("definitionMarker"),e.consume(f),e.exit("definitionMarker"),u):n(f)}function u(f){return Ne(f)?mn(e,c)(f):c(f)}function c(f){return ta(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function d(f){return e.attempt(bp,p,p)(f)}function p(f){return ge(f)?ve(e,m,"whitespace")(f):m(f)}function m(f){return f===null||se(f)?(e.exit("definition"),r.parser.defined.push(i),t(f)):n(f)}}function yp(e,t,n){return r;function r(l){return Ne(l)?mn(e,i)(l):n(l)}function i(l){return ra(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function s(l){return ge(l)?ve(e,o,"whitespace")(l):o(l)}function o(l){return l===null||se(l)?t(l):n(l)}}const vp={name:"hardBreakEscape",tokenize:kp};function kp(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),i}function i(s){return se(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const Ep={name:"headingAtx",resolve:wp,tokenize:_p};function wp(e,t){let n=e.length-2,r=3,i,s;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},s={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},et(e,r,n-r+1,[["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t]])),e}function _p(e,t,n){let r=0;return i;function i(d){return e.enter("atxHeading"),s(d)}function s(d){return e.enter("atxHeadingSequence"),o(d)}function o(d){return d===35&&r++<6?(e.consume(d),o):d===null||Ne(d)?(e.exit("atxHeadingSequence"),l(d)):n(d)}function l(d){return d===35?(e.enter("atxHeadingSequence"),u(d)):d===null||se(d)?(e.exit("atxHeading"),t(d)):ge(d)?ve(e,l,"whitespace")(d):(e.enter("atxHeadingText"),c(d))}function u(d){return d===35?(e.consume(d),u):(e.exit("atxHeadingSequence"),l(d))}function c(d){return d===null||d===35||Ne(d)?(e.exit("atxHeadingText"),l(d)):(e.consume(d),c)}}const Np=["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"],Io=["pre","script","style","textarea"],Sp={concrete:!0,name:"htmlFlow",resolveTo:Ap,tokenize:Mp},Tp={partial:!0,tokenize:Rp},Cp={partial:!0,tokenize:Ip};function Ap(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 Mp(e,t,n){const r=this;let i,s,o,l,u;return c;function c(v){return d(v)}function d(v){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(v),p}function p(v){return v===33?(e.consume(v),m):v===47?(e.consume(v),s=!0,x):v===63?(e.consume(v),i=3,r.interrupt?t:h):Ve(v)?(e.consume(v),o=String.fromCharCode(v),y):n(v)}function m(v){return v===45?(e.consume(v),i=2,f):v===91?(e.consume(v),i=5,l=0,g):Ve(v)?(e.consume(v),i=4,r.interrupt?t:h):n(v)}function f(v){return v===45?(e.consume(v),r.interrupt?t:h):n(v)}function g(v){const ie="CDATA[";return v===ie.charCodeAt(l++)?(e.consume(v),l===ie.length?r.interrupt?t:R:g):n(v)}function x(v){return Ve(v)?(e.consume(v),o=String.fromCharCode(v),y):n(v)}function y(v){if(v===null||v===47||v===62||Ne(v)){const ie=v===47,W=o.toLowerCase();return!ie&&!s&&Io.includes(W)?(i=1,r.interrupt?t(v):R(v)):Np.includes(o.toLowerCase())?(i=6,ie?(e.consume(v),b):r.interrupt?t(v):R(v)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(v):s?k(v):C(v))}return v===45||He(v)?(e.consume(v),o+=String.fromCharCode(v),y):n(v)}function b(v){return v===62?(e.consume(v),r.interrupt?t:R):n(v)}function k(v){return ge(v)?(e.consume(v),k):_(v)}function C(v){return v===47?(e.consume(v),_):v===58||v===95||Ve(v)?(e.consume(v),j):ge(v)?(e.consume(v),C):_(v)}function j(v){return v===45||v===46||v===58||v===95||He(v)?(e.consume(v),j):L(v)}function L(v){return v===61?(e.consume(v),T):ge(v)?(e.consume(v),L):C(v)}function T(v){return v===null||v===60||v===61||v===62||v===96?n(v):v===34||v===39?(e.consume(v),u=v,B):ge(v)?(e.consume(v),T):O(v)}function B(v){return v===u?(e.consume(v),u=null,w):v===null||se(v)?n(v):(e.consume(v),B)}function O(v){return v===null||v===34||v===39||v===47||v===60||v===61||v===62||v===96||Ne(v)?L(v):(e.consume(v),O)}function w(v){return v===47||v===62||ge(v)?C(v):n(v)}function _(v){return v===62?(e.consume(v),M):n(v)}function M(v){return v===null||se(v)?R(v):ge(v)?(e.consume(v),M):n(v)}function R(v){return v===45&&i===2?(e.consume(v),I):v===60&&i===1?(e.consume(v),G):v===62&&i===4?(e.consume(v),F):v===63&&i===3?(e.consume(v),h):v===93&&i===5?(e.consume(v),V):se(v)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Tp,$,D)(v)):v===null||se(v)?(e.exit("htmlFlowData"),D(v)):(e.consume(v),R)}function D(v){return e.check(Cp,N,$)(v)}function N(v){return e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),E}function E(v){return v===null||se(v)?D(v):(e.enter("htmlFlowData"),R(v))}function I(v){return v===45?(e.consume(v),h):R(v)}function G(v){return v===47?(e.consume(v),o="",H):R(v)}function H(v){if(v===62){const ie=o.toLowerCase();return Io.includes(ie)?(e.consume(v),F):R(v)}return Ve(v)&&o.length<8?(e.consume(v),o+=String.fromCharCode(v),H):R(v)}function V(v){return v===93?(e.consume(v),h):R(v)}function h(v){return v===62?(e.consume(v),F):v===45&&i===2?(e.consume(v),h):R(v)}function F(v){return v===null||se(v)?(e.exit("htmlFlowData"),$(v)):(e.consume(v),F)}function $(v){return e.exit("htmlFlow"),t(v)}}function Ip(e,t,n){const r=this;return i;function i(o){return se(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),s):n(o)}function s(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function Rp(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(yn,t,n)}}const Op={name:"htmlText",tokenize:Lp};function Lp(e,t,n){const r=this;let i,s,o;return l;function l(h){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(h),u}function u(h){return h===33?(e.consume(h),c):h===47?(e.consume(h),L):h===63?(e.consume(h),C):Ve(h)?(e.consume(h),O):n(h)}function c(h){return h===45?(e.consume(h),d):h===91?(e.consume(h),s=0,g):Ve(h)?(e.consume(h),k):n(h)}function d(h){return h===45?(e.consume(h),f):n(h)}function p(h){return h===null?n(h):h===45?(e.consume(h),m):se(h)?(o=p,G(h)):(e.consume(h),p)}function m(h){return h===45?(e.consume(h),f):p(h)}function f(h){return h===62?I(h):h===45?m(h):p(h)}function g(h){const F="CDATA[";return h===F.charCodeAt(s++)?(e.consume(h),s===F.length?x:g):n(h)}function x(h){return h===null?n(h):h===93?(e.consume(h),y):se(h)?(o=x,G(h)):(e.consume(h),x)}function y(h){return h===93?(e.consume(h),b):x(h)}function b(h){return h===62?I(h):h===93?(e.consume(h),b):x(h)}function k(h){return h===null||h===62?I(h):se(h)?(o=k,G(h)):(e.consume(h),k)}function C(h){return h===null?n(h):h===63?(e.consume(h),j):se(h)?(o=C,G(h)):(e.consume(h),C)}function j(h){return h===62?I(h):C(h)}function L(h){return Ve(h)?(e.consume(h),T):n(h)}function T(h){return h===45||He(h)?(e.consume(h),T):B(h)}function B(h){return se(h)?(o=B,G(h)):ge(h)?(e.consume(h),B):I(h)}function O(h){return h===45||He(h)?(e.consume(h),O):h===47||h===62||Ne(h)?w(h):n(h)}function w(h){return h===47?(e.consume(h),I):h===58||h===95||Ve(h)?(e.consume(h),_):se(h)?(o=w,G(h)):ge(h)?(e.consume(h),w):I(h)}function _(h){return h===45||h===46||h===58||h===95||He(h)?(e.consume(h),_):M(h)}function M(h){return h===61?(e.consume(h),R):se(h)?(o=M,G(h)):ge(h)?(e.consume(h),M):w(h)}function R(h){return h===null||h===60||h===61||h===62||h===96?n(h):h===34||h===39?(e.consume(h),i=h,D):se(h)?(o=R,G(h)):ge(h)?(e.consume(h),R):(e.consume(h),N)}function D(h){return h===i?(e.consume(h),i=void 0,E):h===null?n(h):se(h)?(o=D,G(h)):(e.consume(h),D)}function N(h){return h===null||h===34||h===39||h===60||h===61||h===96?n(h):h===47||h===62||Ne(h)?w(h):(e.consume(h),N)}function E(h){return h===47||h===62||Ne(h)?w(h):n(h)}function I(h){return h===62?(e.consume(h),e.exit("htmlTextData"),e.exit("htmlText"),t):n(h)}function G(h){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),H}function H(h){return ge(h)?ve(e,V,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(h):V(h)}function V(h){return e.enter("htmlTextData"),o(h)}}const ai={name:"labelEnd",resolveAll:Bp,resolveTo:Fp,tokenize:zp},jp={tokenize:$p},Dp={tokenize:Up},Pp={tokenize:Hp};function Bp(e){let t=-1;const n=[];for(;++t=3&&(c===null||se(c))?(e.exit("thematicBreak"),t(c)):n(c)}function u(c){return c===i?(e.consume(c),r++,u):(e.exit("thematicBreakSequence"),ge(c)?ve(e,l,"whitespace")(c):l(c))}}const Ye={continuation:{tokenize:Qp},exit:tf,name:"list",tokenize:Jp},Xp={partial:!0,tokenize:nf},Zp={partial:!0,tokenize:ef};function Jp(e,t,n){const r=this,i=r.events[r.events.length-1];let s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return l;function l(f){const g=r.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||f===r.containerState.marker:zr(f)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),f===42||f===45?e.check(Fn,n,c)(f):c(f);if(!r.interrupt||f===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(f)}return n(f)}function u(f){return zr(f)&&++o<10?(e.consume(f),u):(!r.interrupt||o<2)&&(r.containerState.marker?f===r.containerState.marker:f===41||f===46)?(e.exit("listItemValue"),c(f)):n(f)}function c(f){return e.enter("listItemMarker"),e.consume(f),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||f,e.check(yn,r.interrupt?n:d,e.attempt(Xp,m,p))}function d(f){return r.containerState.initialBlankLine=!0,s++,m(f)}function p(f){return ge(f)?(e.enter("listItemPrefixWhitespace"),e.consume(f),e.exit("listItemPrefixWhitespace"),m):n(f)}function m(f){return r.containerState.size=s+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(f)}}function Qp(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(yn,i,s);function i(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ve(e,t,"listItemIndent",r.containerState.size+1)(l)}function s(l){return r.containerState.furtherBlankLines||!ge(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Zp,t,o)(l))}function o(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,ve(e,e.attempt(Ye,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function ef(e,t,n){const r=this;return ve(e,i,"listItemIndent",r.containerState.size+1);function i(s){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(s):n(s)}}function tf(e){e.exit(this.containerState.type)}function nf(e,t,n){const r=this;return ve(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const o=r.events[r.events.length-1];return!ge(s)&&o&&o[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const Ro={name:"setextUnderline",resolveTo:rf,tokenize:of};function rf(e,t){let n=e.length,r,i,s;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),!s&&e[n][1].type==="definition"&&(s=n);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",s?(e.splice(i,0,["enter",o,t]),e.splice(s+1,0,["exit",e[r][1],t]),e[r][1].end={...e[s][1].end}):e[r][1]=o,e.push(["exit",o,t]),e}function of(e,t,n){const r=this;let i;return s;function s(c){let d=r.events.length,p;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){p=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||p)?(e.enter("setextHeadingLine"),i=c,o(c)):n(c)}function o(c){return e.enter("setextHeadingLineSequence"),l(c)}function l(c){return c===i?(e.consume(c),l):(e.exit("setextHeadingLineSequence"),ge(c)?ve(e,u,"lineSuffix")(c):u(c))}function u(c){return c===null||se(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const sf={tokenize:af};function af(e){const t=this,n=e.attempt(yn,r,e.attempt(this.parser.constructs.flowInitial,i,ve(e,e.attempt(this.parser.constructs.flow,i,e.attempt(dp,i)),"linePrefix")));return n;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const lf={resolveAll:oa()},cf=ia("string"),uf=ia("text");function ia(e){return{resolveAll:oa(e==="text"?df:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],s=n.attempt(i,o,l);return o;function o(d){return c(d)?s(d):l(d)}function l(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),u}function u(d){return c(d)?(n.exit("data"),s(d)):(n.consume(d),u)}function c(d){if(d===null)return!0;const p=i[d];let m=-1;if(p)for(;++m-1){const l=o[0];typeof l=="string"?o[0]=l.slice(r):o.shift()}s>0&&o.push(e[i].slice(0,s))}return o}function _f(e,t){let n=-1;const r=[];let i;for(;++nr.id===e))return t;return"deterministic"}function Ru({evaluatorId:e,evaluatorFilter:t}){const n=Me(w=>w.localEvaluators),r=Me(w=>w.setLocalEvaluators),i=Me(w=>w.upsertLocalEvaluator),s=Me(w=>w.evaluators),{navigate:o}=st(),l=e?n.find(w=>w.id===e)??null:null,u=!!l,c=t?n.filter(w=>w.type===t):n,[d,p]=N.useState(()=>{const w=localStorage.getItem("evaluatorSidebarWidth");return w?parseInt(w,10):320}),[m,f]=N.useState(!1),h=N.useRef(null);N.useEffect(()=>{localStorage.setItem("evaluatorSidebarWidth",String(d))},[d]),N.useEffect(()=>{Qr().then(r).catch(console.error)},[r]);const b=N.useCallback(w=>{w.preventDefault(),f(!0);const T="touches"in w?w.touches[0].clientX:w.clientX,j=d,O=P=>{const D=h.current;if(!D)return;const R="touches"in P?P.touches[0].clientX:P.clientX,S=D.clientWidth-300,M=Math.max(280,Math.min(S,j+(T-R)));p(M)},_=()=>{f(!1),document.removeEventListener("mousemove",O),document.removeEventListener("mouseup",_),document.removeEventListener("touchmove",O),document.removeEventListener("touchend",_),document.body.style.cursor="",document.body.style.userSelect=""};document.body.style.cursor="col-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",O),document.addEventListener("mouseup",_),document.addEventListener("touchmove",O,{passive:!1}),document.addEventListener("touchend",_)},[d]),x=w=>{i(w)},y=()=>{o("#/evaluators")};return a.jsxs("div",{ref:h,className:"flex h-full",children:[a.jsxs("div",{className:"flex flex-col flex-1 min-w-0",children:[a.jsxs("div",{className:"px-4 h-10 border-b shrink-0 flex items-center gap-4",style:{borderColor:"var(--border)"},children:[a.jsx("h1",{className:"text-base font-semibold",style:{color:"var(--text-primary)"},children:"Evaluators"}),a.jsxs("span",{className:"text-[11px]",style:{color:"var(--text-muted)"},children:[c.length,t?` / ${n.length}`:""," configured"]})]}),a.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:c.length===0?a.jsx("div",{className:"flex items-center justify-center h-full text-[var(--text-muted)] text-xs",children:n.length===0?"No evaluators configured yet.":"No evaluators in this category."}):a.jsx("div",{className:"grid gap-3",style:{gridTemplateColumns:"repeat(auto-fill, minmax(320px, 1fr))"},children:c.map(w=>a.jsx(Ou,{evaluator:w,evaluators:s,selected:w.id===e,onClick:()=>o(w.id===e?"#/evaluators":`#/evaluators/${encodeURIComponent(w.id)}`)},w.id))})})]}),a.jsx("div",{onMouseDown:b,onTouchStart:b,className:`shrink-0 drag-handle-col${m?"":" transition-all"}`,style:{width:u?3:0,opacity:u?1:0}}),a.jsxs("div",{className:`shrink-0 flex flex-col overflow-hidden${m?"":" transition-[width] duration-200 ease-in-out"}`,style:{width:u?d:0,background:"var(--bg-primary)"},children:[a.jsxs("div",{className:"flex items-center gap-1 px-2 h-10 border-b shrink-0",style:{borderColor:"var(--border)",background:"var(--bg-secondary)",minWidth:d},children:[a.jsx("span",{className:"px-2 py-0.5 h-7 text-xs font-semibold rounded inline-flex items-center",style:{color:"var(--accent)",background:"color-mix(in srgb, var(--accent) 10%, transparent)"},children:"Edit Evaluator"}),a.jsx("button",{onClick:y,"aria-label":"Close editor",className:"ml-auto w-7 h-7 flex items-center justify-center rounded cursor-pointer transition-colors",style:{color:"var(--text-muted)",background:"transparent",border:"none"},onMouseEnter:w=>{w.currentTarget.style.color="var(--text-primary)"},onMouseLeave:w=>{w.currentTarget.style.color="var(--text-muted)"},children:a.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[a.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),a.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),a.jsx("div",{className:"flex-1 overflow-hidden",style:{minWidth:d},children:l&&a.jsx(Lu,{evaluator:l,onUpdated:x})})]})]})}function Ou({evaluator:e,evaluators:t,selected:n,onClick:r}){const i=po[e.type]??po.deterministic,s=t.find(l=>l.id===e.evaluator_type_id),o=e.evaluator_type_id.startsWith("file://");return a.jsxs("div",{className:"rounded-md p-4 flex flex-col cursor-pointer transition-colors",style:{border:n?"1px solid var(--accent)":"1px solid var(--border)",background:n?"color-mix(in srgb, var(--accent) 5%, var(--card-bg))":"var(--card-bg)"},onClick:r,onMouseEnter:l=>{n||(l.currentTarget.style.borderColor="var(--text-muted)")},onMouseLeave:l=>{n||(l.currentTarget.style.borderColor="var(--border)")},children:[a.jsx("div",{className:"text-sm font-semibold",style:{color:"var(--text-primary)"},children:e.name}),e.description&&a.jsx("div",{className:"text-xs leading-relaxed mt-2",style:{color:"var(--text-secondary)"},children:e.description}),a.jsxs("div",{className:"flex flex-wrap gap-1.5 mt-auto pt-3",children:[a.jsxs("span",{className:"px-2 py-0.5 rounded text-[10px] font-medium",style:{color:i.color,background:i.bg},children:["Category: ",i.label]}),a.jsxs("span",{className:"px-2 py-0.5 rounded text-[10px] font-medium",style:{background:"var(--bg-tertiary)",color:"var(--text-secondary)"},children:["Type: ",o?"Custom":(s==null?void 0:s.name)??e.evaluator_type_id]}),a.jsxs("span",{className:"px-2 py-0.5 rounded text-[10px] font-medium font-mono",style:{background:"var(--bg-tertiary)",color:"var(--text-secondary)"},children:["Target: ",e.target_output_key||"*"]})]})]})}function Lu({evaluator:e,onUpdated:t}){var O,_;const n=Iu(e.evaluator_type_id),r=pn[n]??[],[i,s]=N.useState(e.description),[o,l]=N.useState(e.evaluator_type_id),[u,c]=N.useState(((O=e.config)==null?void 0:O.targetOutputKey)??"*"),[d,p]=N.useState(((_=e.config)==null?void 0:_.prompt)??""),[m,f]=N.useState(!1),[h,b]=N.useState(null),[x,y]=N.useState(!1);N.useEffect(()=>{var P,D;s(e.description),l(e.evaluator_type_id),c(((P=e.config)==null?void 0:P.targetOutputKey)??"*"),p(((D=e.config)==null?void 0:D.prompt)??""),b(null),y(!1)},[e.id]);const w=Ls(o),T=async()=>{f(!0),b(null),y(!1);try{const P={};w.targetOutputKey&&(P.targetOutputKey=u),w.prompt&&d.trim()&&(P.prompt=d);const D=await xc(e.id,{description:i.trim(),evaluator_type_id:o,config:P});t(D),y(!0),setTimeout(()=>y(!1),2e3)}catch(P){const D=P==null?void 0:P.detail;b(D??"Failed to update evaluator")}finally{f(!1)}},j={background:"var(--bg-secondary)",color:"var(--text-primary)",border:"1px solid var(--border)"};return a.jsxs("div",{className:"flex flex-col h-full",children:[a.jsxs("div",{className:"p-4 overflow-y-auto flex-1 space-y-4",children:[a.jsxs("div",{children:[a.jsx("label",{className:"text-[11px] font-medium block mb-1",style:{color:"var(--text-muted)"},children:"Name"}),a.jsx("div",{className:"px-3 py-2 rounded-lg text-xs",style:{background:"var(--bg-tertiary)",color:"var(--text-secondary)"},children:e.name})]}),a.jsxs("div",{children:[a.jsx("label",{className:"text-[11px] font-medium block mb-1",style:{color:"var(--text-muted)"},children:"Category"}),a.jsx("div",{className:"px-3 py-2 rounded-lg text-xs",style:{background:"var(--bg-tertiary)",color:"var(--text-secondary)"},children:Pr[n]??n})]}),a.jsxs("div",{children:[a.jsx("label",{className:"text-[11px] font-medium block mb-1",style:{color:"var(--text-muted)"},children:"Type"}),a.jsx("select",{value:o,onChange:P=>l(P.target.value),className:"w-full px-3 py-2 rounded-lg text-xs outline-none cursor-pointer",style:j,children:r.map(P=>a.jsx("option",{value:P.id,children:P.name},P.id))})]}),a.jsxs("div",{children:[a.jsx("label",{className:"text-[11px] font-medium block mb-1",style:{color:"var(--text-muted)"},children:"Description"}),a.jsx("textarea",{value:i,onChange:P=>s(P.target.value),placeholder:"What does this evaluator check?",rows:4,className:"w-full px-3 py-2 rounded-lg text-xs leading-relaxed outline-none resize-y",style:j})]}),w.targetOutputKey&&a.jsxs("div",{children:[a.jsx("label",{className:"text-[11px] font-medium block mb-1",style:{color:"var(--text-muted)"},children:"Target Output Key"}),a.jsx("input",{type:"text",value:u,onChange:P=>c(P.target.value),placeholder:"*",className:"w-full px-3 py-2 rounded-lg text-xs outline-none",style:j}),a.jsx("div",{className:"text-[11px] mt-0.5",style:{color:"var(--text-muted)"},children:"Use * for entire output or a specific key name"})]}),w.prompt&&a.jsxs("div",{children:[a.jsx("label",{className:"text-[11px] font-medium block mb-1",style:{color:"var(--text-muted)"},children:"Prompt"}),a.jsx("textarea",{value:d,onChange:P=>p(P.target.value),placeholder:"Evaluation prompt for the LLM judge...",rows:8,className:"w-full px-3 py-2 rounded-lg text-xs font-mono leading-relaxed outline-none resize-y",style:j})]})]}),a.jsxs("div",{className:"shrink-0 p-4 space-y-2",children:[h&&a.jsx("div",{className:"text-xs px-3 py-2 rounded-lg",style:{background:"rgba(239,68,68,0.1)",color:"var(--error)"},children:h}),x&&a.jsx("div",{className:"text-xs px-3 py-2 rounded-lg",style:{background:"rgba(34,197,94,0.1)",color:"var(--success)"},children:"Saved successfully"}),a.jsx("button",{onClick:T,disabled:m,className:"w-full py-2.5 text-xs font-semibold rounded-md border cursor-pointer disabled:opacity-30 disabled:cursor-not-allowed transition-colors",style:{background:"transparent",borderColor:"var(--accent)",color:"var(--accent)"},onMouseEnter:P=>{P.currentTarget.style.background="color-mix(in srgb, var(--accent) 15%, transparent)"},onMouseLeave:P=>{P.currentTarget.style.background="transparent"},children:m?"Saving...":"Save Changes"})]})]})}const ju=["deterministic","llm","tool"];function Du({category:e}){var v;const t=Me(E=>E.addLocalEvaluator),{navigate:n}=st(),r=e!=="any",[i,s]=N.useState(r?e:"deterministic"),o=pn[i]??[],[l,u]=N.useState(""),[c,d]=N.useState(""),[p,m]=N.useState(((v=o[0])==null?void 0:v.id)??""),[f,h]=N.useState("*"),[b,x]=N.useState(""),[y,w]=N.useState(!1),[T,j]=N.useState(null),[O,_]=N.useState(!1),[P,D]=N.useState(!1);N.useEffect(()=>{var V;const E=r?e:"deterministic";s(E);const H=((V=(pn[E]??[])[0])==null?void 0:V.id)??"",U=fr[H];u(""),d((U==null?void 0:U.description)??""),m(H),h("*"),x((U==null?void 0:U.prompt)??""),j(null),_(!1),D(!1)},[e,r]);const R=E=>{var V;s(E);const H=((V=(pn[E]??[])[0])==null?void 0:V.id)??"",U=fr[H];m(H),O||d((U==null?void 0:U.description)??""),P||x((U==null?void 0:U.prompt)??"")},S=E=>{m(E);const I=fr[E];I&&(O||d(I.description),P||x(I.prompt))},M=Ls(p),L=async()=>{if(!l.trim()){j("Name is required");return}w(!0),j(null);try{const E={};M.targetOutputKey&&(E.targetOutputKey=f),M.prompt&&b.trim()&&(E.prompt=b);const I=await hc({name:l.trim(),description:c.trim(),evaluator_type_id:p,config:E});t(I),n("#/evaluators")}catch(E){const I=E==null?void 0:E.detail;j(I??"Failed to create evaluator")}finally{w(!1)}},C={background:"var(--bg-secondary)",border:"1px solid var(--border)",color:"var(--text-primary)"};return a.jsx("div",{className:"h-full overflow-y-auto",children:a.jsx("div",{className:"flex items-center justify-center min-h-full py-8",children:a.jsxs("div",{className:"w-full max-w-xl px-6",children:[a.jsxs("div",{className:"mb-8 text-center",children:[a.jsxs("div",{className:"flex items-center justify-center gap-2 mb-2",children:[a.jsx("div",{className:"w-1.5 h-1.5 rounded-full",style:{background:"var(--accent)"}}),a.jsx("span",{className:"text-sm font-semibold",style:{color:"var(--text-muted)"},children:"New Evaluator"})]}),a.jsx("p",{className:"text-sm",style:{color:"var(--text-muted)"},children:"Create an evaluator to score agent outputs"})]}),a.jsxs("div",{className:"mb-6",children:[a.jsx("label",{className:"block text-[11px] font-medium mb-1.5",style:{color:"var(--text-muted)"},children:"Name"}),a.jsx("input",{type:"text",value:l,onChange:E=>u(E.target.value),placeholder:"e.g. MyEvaluator",className:"w-full rounded-md px-3 py-2 text-xs",style:C,onKeyDown:E=>{E.key==="Enter"&&l.trim()&&L()}})]}),a.jsxs("div",{className:"mb-6",children:[a.jsx("label",{className:"block text-[11px] font-medium mb-1.5",style:{color:"var(--text-muted)"},children:"Category"}),r?a.jsx("div",{className:"px-3 py-2 rounded-md text-xs",style:{background:"var(--bg-tertiary)",color:"var(--text-secondary)"},children:Pr[i]??i}):a.jsx("select",{value:i,onChange:E=>R(E.target.value),className:"w-full rounded-md px-3 py-2 text-xs cursor-pointer appearance-auto",style:C,children:ju.map(E=>a.jsx("option",{value:E,children:Pr[E]},E))})]}),a.jsxs("div",{className:"mb-6",children:[a.jsx("label",{className:"block text-[11px] font-medium mb-1.5",style:{color:"var(--text-muted)"},children:"Type"}),a.jsx("select",{value:p,onChange:E=>S(E.target.value),className:"w-full rounded-md px-3 py-2 text-xs cursor-pointer appearance-auto",style:C,children:o.map(E=>a.jsx("option",{value:E.id,children:E.name},E.id))})]}),a.jsxs("div",{className:"mb-6",children:[a.jsx("label",{className:"block text-[11px] font-medium mb-1.5",style:{color:"var(--text-muted)"},children:"Description"}),a.jsx("textarea",{value:c,onChange:E=>{d(E.target.value),_(!0)},placeholder:"What does this evaluator check?",rows:3,className:"w-full rounded-md px-3 py-2 text-xs leading-relaxed resize-y",style:C})]}),M.targetOutputKey&&a.jsxs("div",{className:"mb-6",children:[a.jsx("label",{className:"block text-[11px] font-medium mb-1.5",style:{color:"var(--text-muted)"},children:"Target Output Key"}),a.jsx("input",{type:"text",value:f,onChange:E=>h(E.target.value),placeholder:"*",className:"w-full rounded-md px-3 py-2 text-xs",style:C}),a.jsx("div",{className:"text-xs mt-1",style:{color:"var(--text-muted)"},children:"Use * for entire output or a specific key name"})]}),M.prompt&&a.jsxs("div",{className:"mb-6",children:[a.jsx("label",{className:"block text-[11px] font-medium mb-1.5",style:{color:"var(--text-muted)"},children:"Prompt"}),a.jsx("textarea",{value:b,onChange:E=>{x(E.target.value),D(!0)},placeholder:"Evaluation prompt for the LLM judge...",rows:6,className:"w-full rounded-md px-3 py-2 text-xs font-mono leading-relaxed resize-y",style:C})]}),T&&a.jsx("p",{className:"text-xs mb-4 px-3 py-2 rounded",style:{color:"var(--error)",background:"color-mix(in srgb, var(--error) 10%, var(--bg-secondary))"},children:T}),a.jsx("button",{onClick:L,disabled:y||!l.trim(),className:"w-full py-2 rounded-md text-[13px] font-semibold transition-colors cursor-pointer disabled:opacity-40 disabled:cursor-not-allowed",style:{background:"var(--accent)",color:"var(--bg-primary)",border:"none"},children:y?"Creating...":"Create Evaluator"})]})})})}function js({path:e,name:t,type:n,depth:r}){const i=be(w=>w.children[e]),s=be(w=>!!w.expanded[e]),o=be(w=>!!w.loadingDirs[e]),l=be(w=>!!w.dirty[e]),u=be(w=>!!w.agentChangedFiles[e]),c=be(w=>w.selectedFile),{setChildren:d,toggleExpanded:p,setLoadingDir:m,openTab:f}=be(),{navigate:h}=st(),b=n==="directory",x=!b&&c===e,y=N.useCallback(()=>{b?(!i&&!o&&(m(e,!0),$n(e).then(w=>d(e,w)).catch(console.error).finally(()=>m(e,!1))),p(e)):(f(e),h(`#/explorer/file/${encodeURIComponent(e)}`))},[b,i,o,e,d,p,m,f,h]);return a.jsxs(a.Fragment,{children:[a.jsxs("button",{onClick:y,className:`w-full text-left flex items-center gap-1 py-[3px] text-[13px] cursor-pointer transition-colors group${u?" agent-changed-file":""}`,style:{paddingLeft:`${12+r*16}px`,paddingRight:"8px",background:x?"color-mix(in srgb, var(--accent) 15%, var(--bg-primary))":"transparent",color:x?"var(--text-primary)":"var(--text-secondary)",border:"none"},onMouseEnter:w=>{x||(w.currentTarget.style.background="var(--bg-hover)")},onMouseLeave:w=>{x||(w.currentTarget.style.background="transparent")},children:[a.jsx("span",{className:"w-3 shrink-0 flex items-center justify-center",style:{color:"var(--text-muted)"},children:b&&a.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"currentColor",style:{transform:s?"rotate(90deg)":"rotate(0deg)",transition:"transform 0.15s"},children:a.jsx("path",{d:"M3 1.5L7 5L3 8.5z"})})}),a.jsx("span",{className:"shrink-0",style:{color:b?"var(--accent)":"var(--text-muted)"},children:b?a.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:a.jsx("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"})}):a.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),a.jsx("polyline",{points:"14 2 14 8 20 8"})]})}),a.jsx("span",{className:"truncate flex-1",children:t}),l&&a.jsx("span",{className:"w-2 h-2 rounded-full shrink-0",style:{background:"var(--accent)"}}),o&&a.jsx("span",{className:"text-[10px] shrink-0",style:{color:"var(--text-muted)"},children:"..."})]}),b&&s&&i&&i.map(w=>a.jsx(js,{path:w.path,name:w.name,type:w.type,depth:r+1},w.path))]})}function fo(){const e=be(n=>n.children[""]),{setChildren:t}=be();return N.useEffect(()=>{e||$n("").then(n=>t("",n)).catch(console.error)},[e,t]),a.jsx("div",{className:"flex-1 overflow-y-auto py-1",children:e?e.map(n=>a.jsx(js,{path:n.path,name:n.name,type:n.type,depth:0},n.path)):a.jsx("p",{className:"text-[11px] px-3 py-2",style:{color:"var(--text-muted)"},children:"Loading..."})})}const mo=e=>{e.editor.defineTheme("uipath-dark",{base:"vs-dark",inherit:!0,rules:[{token:"comment",foreground:"64748b",fontStyle:"italic"},{token:"keyword",foreground:"c084fc"},{token:"string",foreground:"86efac"},{token:"number",foreground:"fcd34d"},{token:"type",foreground:"7dd3fc"}],colors:{"editor.background":"#0f172a","editor.foreground":"#cbd5e1","editor.lineHighlightBackground":"#1e293b","editor.selectionBackground":"#334155","editor.inactiveSelectionBackground":"#263348","editorLineNumber.foreground":"#64748b","editorLineNumber.activeForeground":"#94a3b8","editorCursor.foreground":"#fa4616","editorIndentGuide.background":"#334155","editorIndentGuide.activeBackground":"#64748b","editorWidget.background":"#1e293b","editorWidget.border":"#334155","editorSuggestWidget.background":"#1e293b","editorSuggestWidget.border":"#334155","editorSuggestWidget.selectedBackground":"#263348","editorHoverWidget.background":"#1e293b","editorHoverWidget.border":"#334155","scrollbarSlider.background":"#33415580","scrollbarSlider.hoverBackground":"#33415599","scrollbarSlider.activeBackground":"#334155cc"}}),e.editor.defineTheme("uipath-light",{base:"vs",inherit:!0,rules:[{token:"comment",foreground:"94a3b8",fontStyle:"italic"},{token:"keyword",foreground:"7c3aed"},{token:"string",foreground:"16a34a"},{token:"number",foreground:"d97706"},{token:"type",foreground:"0284c7"}],colors:{"editor.background":"#f8fafc","editor.foreground":"#0f172a","editor.lineHighlightBackground":"#f1f5f9","editor.selectionBackground":"#e2e8f0","editor.inactiveSelectionBackground":"#f1f5f9","editorLineNumber.foreground":"#94a3b8","editorLineNumber.activeForeground":"#475569","editorCursor.foreground":"#fa4616","editorIndentGuide.background":"#e2e8f0","editorIndentGuide.activeBackground":"#94a3b8","editorWidget.background":"#ffffff","editorWidget.border":"#e2e8f0","editorSuggestWidget.background":"#ffffff","editorSuggestWidget.border":"#e2e8f0","editorSuggestWidget.selectedBackground":"#f1f5f9","editorHoverWidget.background":"#ffffff","editorHoverWidget.border":"#e2e8f0","scrollbarSlider.background":"#d1d5db80","scrollbarSlider.hoverBackground":"#d1d5db99","scrollbarSlider.activeBackground":"#d1d5dbcc"}})};function go(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function Pu(e){const t=e.replace(/\\/g,"/").split("/");return t[t.length-1]||e}function Bu(){const e=be(C=>C.openTabs),n=be(C=>C.selectedFile),r=be(C=>n?C.fileCache[n]:void 0),i=be(C=>n?!!C.dirty[n]:!1),s=be(C=>n?C.buffers[n]:void 0),o=be(C=>C.loadingFile),l=be(C=>C.dirty),u=be(C=>C.diffView),c=be(C=>n?!!C.agentChangedFiles[n]:!1),{setFileContent:d,updateBuffer:p,markClean:m,setLoadingFile:f,openTab:h,closeTab:b,setDiffView:x}=be(),{navigate:y}=st(),w=Ss(C=>C.theme),T=N.useRef(null),{explorerFile:j}=st();N.useEffect(()=>{j&&h(j)},[j,h]),N.useEffect(()=>{n&&(be.getState().fileCache[n]||(f(!0),Lr(n).then(C=>d(n,C)).catch(console.error).finally(()=>f(!1))))},[n,d,f]);const O=N.useCallback(()=>{if(!n)return;const C=be.getState().fileCache[n],E=be.getState().buffers[n]??(C==null?void 0:C.content);E!=null&&Xl(n,E).then(()=>{m(n),d(n,{...C,content:E})}).catch(console.error)},[n,m,d]);N.useEffect(()=>{const C=v=>{(v.ctrlKey||v.metaKey)&&v.key==="s"&&(v.preventDefault(),O())};return window.addEventListener("keydown",C),()=>window.removeEventListener("keydown",C)},[O]);const _=C=>{T.current=C},P=N.useCallback(C=>{C!==void 0&&n&&p(n,C)},[n,p]),D=N.useCallback(C=>{h(C),y(`#/explorer/file/${encodeURIComponent(C)}`)},[h,y]),R=N.useCallback((C,v)=>{C.stopPropagation();const E=be.getState(),I=E.openTabs.filter(H=>H!==v);if(b(v),E.selectedFile===v){const H=E.openTabs.indexOf(v),U=I[Math.min(H,I.length-1)];y(U?`#/explorer/file/${encodeURIComponent(U)}`:"#/explorer")}},[b,y]),S=N.useCallback((C,v)=>{C.button===1&&R(C,v)},[R]),M=e.length>0&&a.jsx("div",{className:"h-10 flex items-end overflow-x-auto shrink-0",style:{background:"var(--bg-secondary)",borderBottom:"1px solid var(--border)"},children:e.map(C=>{const v=C===n,E=!!l[C];return a.jsxs("button",{onClick:()=>D(C),onMouseDown:I=>S(I,C),className:"h-full flex items-center gap-1.5 px-3 text-[12px] shrink-0 cursor-pointer transition-colors relative",style:{background:v?"var(--bg-primary)":"transparent",color:v?"var(--text-primary)":"var(--text-secondary)",border:"none",borderBottom:v?"2px solid var(--accent)":"2px solid transparent",maxWidth:"180px"},onMouseEnter:I=>{v||(I.currentTarget.style.background="var(--bg-hover)")},onMouseLeave:I=>{v||(I.currentTarget.style.background="transparent")},children:[a.jsx("span",{className:"truncate",children:Pu(C)}),E?a.jsx("span",{className:"w-2 h-2 rounded-full shrink-0",style:{background:"var(--accent)"},title:"Unsaved changes"}):a.jsx("span",{className:"w-4 h-4 flex items-center justify-center rounded shrink-0 transition-colors",style:{color:"var(--text-muted)"},onClick:I=>R(I,C),onMouseEnter:I=>{I.currentTarget.style.background="var(--bg-hover)",I.currentTarget.style.color="var(--text-primary)"},onMouseLeave:I=>{I.currentTarget.style.background="transparent",I.currentTarget.style.color="var(--text-muted)"},children:a.jsx("svg",{width:"10",height:"10",viewBox:"0 0 16 16",fill:"currentColor",children:a.jsx("path",{d:"M8 8.707l3.646 3.647.708-.707L8.707 8l3.647-3.646-.707-.708L8 7.293 4.354 3.646l-.708.708L7.293 8l-3.647 3.646.708.708L8 8.707z"})})})]},C)})});if(!n)return a.jsxs("div",{className:"flex flex-col h-full",children:[M,a.jsx("div",{className:"flex-1 flex items-center justify-center",style:{color:"var(--text-muted)"},children:"Select a file to view"})]});if(o&&!r)return a.jsxs("div",{className:"flex flex-col h-full",children:[M,a.jsx("div",{className:"flex-1 flex items-center justify-center",style:{color:"var(--text-muted)"},children:a.jsx("div",{className:"text-sm",children:"Loading file..."})})]});if(!r&&!o)return a.jsxs("div",{className:"flex flex-col h-full",children:[M,a.jsx("div",{className:"flex-1 flex items-center justify-center",style:{color:"var(--text-muted)"},children:a.jsx("div",{className:"text-sm",children:"Failed to load file"})})]});if(!r)return null;if(r.binary)return a.jsxs("div",{className:"flex flex-col h-full",children:[M,a.jsx("div",{className:"h-8 flex items-center px-3 gap-2 text-xs shrink-0 border-b",style:{borderColor:"var(--border)",background:"var(--bg-secondary)"},children:a.jsx("span",{style:{color:"var(--text-muted)"},children:go(r.size)})}),a.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-3",style:{color:"var(--text-muted)"},children:[a.jsxs("svg",{width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),a.jsx("polyline",{points:"14 2 14 8 20 8"}),a.jsx("line",{x1:"9",y1:"15",x2:"15",y2:"15"})]}),a.jsx("span",{className:"text-sm",children:"Binary file — preview not available"})]})]});const L=u&&u.path===n;return a.jsxs("div",{className:"flex flex-col h-full",children:[M,a.jsxs("div",{className:"h-8 flex items-center px-3 gap-2 text-xs shrink-0 border-b",style:{borderColor:"var(--border)",background:"var(--bg-secondary)"},children:[r.language&&a.jsx("span",{className:"px-1.5 py-0.5 rounded text-[10px]",style:{background:"var(--bg-hover)",color:"var(--text-muted)"},children:r.language}),a.jsx("span",{style:{color:"var(--text-muted)"},children:go(r.size)}),c&&a.jsx("span",{className:"px-1.5 py-0.5 rounded text-[10px] font-medium",style:{background:"color-mix(in srgb, var(--info) 20%, transparent)",color:"var(--info)"},children:"Agent modified"}),a.jsx("div",{className:"flex-1"}),i&&a.jsx("span",{className:"text-[10px] font-medium",style:{color:"var(--accent)"},children:"Modified"}),a.jsx("button",{onClick:O,className:"px-2 py-0.5 rounded text-[11px] font-medium cursor-pointer transition-colors",style:{background:i?"var(--accent)":"var(--bg-hover)",color:i?"white":"var(--text-muted)",border:"none"},children:"Save"})]}),L&&a.jsxs("div",{className:"h-8 flex items-center px-3 gap-2 text-xs shrink-0 border-b",style:{borderColor:"var(--border)",background:"color-mix(in srgb, var(--info) 10%, var(--bg-secondary))"},children:[a.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--info)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("circle",{cx:"12",cy:"12",r:"10"}),a.jsx("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),a.jsx("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})]}),a.jsx("span",{style:{color:"var(--info)"},children:"Agent modified this file"}),a.jsx("div",{className:"flex-1"}),a.jsx("button",{onClick:()=>x(null),className:"px-2 py-0.5 rounded text-[11px] font-medium cursor-pointer transition-colors",style:{background:"var(--bg-hover)",color:"var(--text-secondary)",border:"none"},children:"Dismiss"})]}),a.jsx("div",{className:"flex-1 overflow-hidden",children:L?a.jsx(Cl,{original:u.original,modified:u.modified,language:u.language??"plaintext",theme:w==="dark"?"uipath-dark":"uipath-light",beforeMount:mo,options:{readOnly:!0,minimap:{enabled:!1},fontSize:13,lineNumbersMinChars:4,scrollBeyondLastLine:!1,automaticLayout:!0,renderSideBySide:!0}},`diff-${n}`):a.jsx(Al,{language:r.language??"plaintext",theme:w==="dark"?"uipath-dark":"uipath-light",value:s??r.content??"",onChange:P,beforeMount:mo,onMount:_,options:{minimap:{enabled:!1},fontSize:13,lineNumbersMinChars:4,scrollBeyondLastLine:!1,wordWrap:"on",automaticLayout:!0,tabSize:2,renderWhitespace:"selection"}},n)})]})}const Zn="/api";async function Fu(){const e=await fetch(`${Zn}/agent/models`);if(!e.ok){if(e.status===401)return[];throw new Error(`HTTP ${e.status}`)}return e.json()}async function zu(e){const t=await fetch(`${Zn}/agent/session/${e}/diagnostics`);if(!t.ok)throw new Error(`HTTP ${t.status}`);return t.json()}async function $u(e){const t=await fetch(`${Zn}/agent/session/${e}/state`);if(t.status===404)return null;if(!t.ok)throw new Error(`HTTP ${t.status}`);return t.json()}async function Uu(){const e=await fetch(`${Zn}/agent/skills`);if(!e.ok)throw new Error(`HTTP ${e.status}`);return e.json()}function Hu(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Wu=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ku=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Gu={};function ho(e,t){return(Gu.jsx?Ku:Wu).test(e)}const qu=/[ \t\n\f\r]/g;function Vu(e){return typeof e=="object"?e.type==="text"?bo(e.value):!1:bo(e)}function bo(e){return e.replace(qu,"")===""}class xn{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}xn.prototype.normal={};xn.prototype.property={};xn.prototype.space=void 0;function Ds(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new xn(n,r,t)}function Br(e){return e.toLowerCase()}class Xe{constructor(t,n){this.attribute=n,this.property=t}}Xe.prototype.attribute="";Xe.prototype.booleanish=!1;Xe.prototype.boolean=!1;Xe.prototype.commaOrSpaceSeparated=!1;Xe.prototype.commaSeparated=!1;Xe.prototype.defined=!1;Xe.prototype.mustUseProperty=!1;Xe.prototype.number=!1;Xe.prototype.overloadedBoolean=!1;Xe.prototype.property="";Xe.prototype.spaceSeparated=!1;Xe.prototype.space=void 0;let Yu=0;const pe=Kt(),Pe=Kt(),Fr=Kt(),q=Kt(),Ae=Kt(),tn=Kt(),Qe=Kt();function Kt(){return 2**++Yu}const zr=Object.freeze(Object.defineProperty({__proto__:null,boolean:pe,booleanish:Pe,commaOrSpaceSeparated:Qe,commaSeparated:tn,number:q,overloadedBoolean:Fr,spaceSeparated:Ae},Symbol.toStringTag,{value:"Module"})),mr=Object.keys(zr);class ei extends Xe{constructor(t,n,r,i){let s=-1;if(super(t,n),xo(this,"space",i),typeof r=="number")for(;++s4&&n.slice(0,4)==="data"&&ed.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(yo,rd);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!yo.test(s)){let o=s.replace(Qu,nd);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=ei}return new i(r,t)}function nd(e){return"-"+e.toLowerCase()}function rd(e){return e.charAt(1).toUpperCase()}const id=Ds([Ps,Xu,zs,$s,Us],"html"),ti=Ds([Ps,Zu,zs,$s,Us],"svg");function od(e){return e.join(" ").trim()}var Yt={},gr,vo;function sd(){if(vo)return gr;vo=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,l=/^\s+|\s+$/g,u=` +`,c="/",d="*",p="",m="comment",f="declaration";function h(x,y){if(typeof x!="string")throw new TypeError("First argument must be a string");if(!x)return[];y=y||{};var w=1,T=1;function j(v){var E=v.match(t);E&&(w+=E.length);var I=v.lastIndexOf(u);T=~I?v.length-I:T+v.length}function O(){var v={line:w,column:T};return function(E){return E.position=new _(v),R(),E}}function _(v){this.start=v,this.end={line:w,column:T},this.source=y.source}_.prototype.content=x;function P(v){var E=new Error(y.source+":"+w+":"+T+": "+v);if(E.reason=v,E.filename=y.source,E.line=w,E.column=T,E.source=x,!y.silent)throw E}function D(v){var E=v.exec(x);if(E){var I=E[0];return j(I),x=x.slice(I.length),E}}function R(){D(n)}function S(v){var E;for(v=v||[];E=M();)E!==!1&&v.push(E);return v}function M(){var v=O();if(!(c!=x.charAt(0)||d!=x.charAt(1))){for(var E=2;p!=x.charAt(E)&&(d!=x.charAt(E)||c!=x.charAt(E+1));)++E;if(E+=2,p===x.charAt(E-1))return P("End of comment missing");var I=x.slice(2,E-2);return T+=2,j(I),x=x.slice(E),T+=2,v({type:m,comment:I})}}function L(){var v=O(),E=D(r);if(E){if(M(),!D(i))return P("property missing ':'");var I=D(s),H=v({type:f,property:b(E[0].replace(e,p)),value:I?b(I[0].replace(e,p)):p});return D(o),H}}function C(){var v=[];S(v);for(var E;E=L();)E!==!1&&(v.push(E),S(v));return v}return R(),C()}function b(x){return x?x.replace(l,p):p}return gr=h,gr}var ko;function ad(){if(ko)return Yt;ko=1;var e=Yt&&Yt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Yt,"__esModule",{value:!0}),Yt.default=n;const t=e(sd());function n(r,i){let s=null;if(!r||typeof r!="string")return s;const o=(0,t.default)(r),l=typeof i=="function";return o.forEach(u=>{if(u.type!=="declaration")return;const{property:c,value:d}=u;l?i(c,d,u):d&&(s=s||{},s[c]=d)}),s}return Yt}var an={},Eo;function ld(){if(Eo)return an;Eo=1,Object.defineProperty(an,"__esModule",{value:!0}),an.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,s=function(c){return!c||n.test(c)||e.test(c)},o=function(c,d){return d.toUpperCase()},l=function(c,d){return"".concat(d,"-")},u=function(c,d){return d===void 0&&(d={}),s(c)?c:(c=c.toLowerCase(),d.reactCompat?c=c.replace(i,l):c=c.replace(r,l),c.replace(t,o))};return an.camelCase=u,an}var ln,wo;function cd(){if(wo)return ln;wo=1;var e=ln&&ln.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(ad()),n=ld();function r(i,s){var o={};return!i||typeof i!="string"||(0,t.default)(i,function(l,u){l&&u&&(o[(0,n.camelCase)(l,s)]=u)}),o}return r.default=r,ln=r,ln}var ud=cd();const dd=Xr(ud),Hs=Ws("end"),ni=Ws("start");function Ws(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function pd(e){const t=ni(e),n=Hs(e);if(t&&n)return{start:t,end:n}}function fn(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?_o(e.position):"start"in e||"end"in e?_o(e):"line"in e||"column"in e?$r(e):""}function $r(e){return No(e&&e.line)+":"+No(e&&e.column)}function _o(e){return $r(e&&e.start)+"-"+$r(e&&e.end)}function No(e){return e&&typeof e=="number"?e:1}class We extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",s={},o=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof t=="string"?i=t:!s.cause&&t&&(o=!0,i=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?s.ruleId=r:(s.source=r.slice(0,u),s.ruleId=r.slice(u+1))}if(!s.place&&s.ancestors&&s.ancestors){const u=s.ancestors[s.ancestors.length-1];u&&(s.place=u.position)}const l=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=l?l.line:void 0,this.name=fn(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=o&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}We.prototype.file="";We.prototype.name="";We.prototype.reason="";We.prototype.message="";We.prototype.stack="";We.prototype.column=void 0;We.prototype.line=void 0;We.prototype.ancestors=void 0;We.prototype.cause=void 0;We.prototype.fatal=void 0;We.prototype.place=void 0;We.prototype.ruleId=void 0;We.prototype.source=void 0;const ri={}.hasOwnProperty,fd=new Map,md=/[A-Z]/g,gd=new Set(["table","tbody","thead","tfoot","tr"]),hd=new Set(["td","th"]),Ks="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function bd(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Nd(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=_d(n,t.jsx,t.jsxs)}const 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"?ti:id,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=Gs(i,e,void 0);return s&&typeof s!="string"?s:i.create(e,i.Fragment,{children:s||void 0},void 0)}function Gs(e,t,n){if(t.type==="element")return xd(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return yd(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return kd(e,t,n);if(t.type==="mdxjsEsm")return vd(e,t);if(t.type==="root")return Ed(e,t,n);if(t.type==="text")return wd(e,t)}function xd(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=ti,e.schema=i),e.ancestors.push(t);const s=Vs(e,t.tagName,!1),o=Sd(e,t);let l=oi(e,t);return gd.has(t.tagName)&&(l=l.filter(function(u){return typeof u=="string"?!Vu(u):!0})),qs(e,o,s,t),ii(o,l),e.ancestors.pop(),e.schema=r,e.create(t,s,o,n)}function yd(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}hn(e,t.position)}function vd(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);hn(e,t.position)}function kd(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=ti,e.schema=i),e.ancestors.push(t);const s=t.name===null?e.Fragment:Vs(e,t.name,!0),o=Td(e,t),l=oi(e,t);return qs(e,o,s,t),ii(o,l),e.ancestors.pop(),e.schema=r,e.create(t,s,o,n)}function Ed(e,t,n){const r={};return ii(r,oi(e,t)),e.create(t,e.Fragment,r,n)}function wd(e,t){return t.value}function qs(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function ii(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function _d(e,t,n){return r;function r(i,s,o,l){const c=Array.isArray(o.children)?n:t;return l?c(s,o,l):c(s,o)}}function Nd(e,t){return n;function n(r,i,s,o){const l=Array.isArray(s.children),u=ni(r);return t(i,s,o,l,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function Sd(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&ri.call(t.properties,i)){const s=Cd(e,i,t.properties[i]);if(s){const[o,l]=s;e.tableCellAlignToStyle&&o==="align"&&typeof l=="string"&&hd.has(t.tagName)?r=l:n[o]=l}}if(r){const s=n.style||(n.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Td(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const s=r.data.estree.body[0];s.type;const o=s.expression;o.type;const l=o.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else hn(e,t.position);else{const i=r.name;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const l=r.value.data.estree.body[0];l.type,s=e.evaluater.evaluateExpression(l.expression)}else hn(e,t.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function oi(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:fd;for(;++ri?0:i+t: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);s0?(et(e,e.length,0,t),e):t}const Co={}.hasOwnProperty;function Xs(e){const t={};let 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 dt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Ve=Dt(/[A-Za-z]/),He=Dt(/[\dA-Za-z]/),Pd=Dt(/[#-'*+\--9=?A-Z^-~]/);function Hn(e){return e!==null&&(e<32||e===127)}const Ur=Dt(/\d/),Bd=Dt(/[\dA-Fa-f]/),Fd=Dt(/[!-/:-@[-`{-~]/);function se(e){return e!==null&&e<-2}function Se(e){return e!==null&&(e<0||e===32)}function he(e){return e===-2||e===-1||e===32}const Jn=Dt(new RegExp("\\p{P}|\\p{S}","u")),Wt=Dt(/\s/);function Dt(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function on(e){const t=[];let n=-1,r=0,i=0;for(;++n55295&&s<57344){const l=e.charCodeAt(n+1);s<56320&&l>56319&&l<57344?(o=String.fromCharCode(s,l),i=1):o="�"}else o=String.fromCharCode(s);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function ke(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let s=0;return o;function o(u){return he(u)?(e.enter(n),l(u)):t(u)}function l(u){return he(u)&&s++o))return;const P=t.events.length;let D=P,R,S;for(;D--;)if(t.events[D][0]==="exit"&&t.events[D][1].type==="chunkFlow"){if(R){S=t.events[D][1].end;break}R=!0}for(y(r),_=P;_T;){const O=n[j];t.containerState=O[1],O[0].exit.call(t,e)}n.length=T}function w(){i.write([null]),s=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Wd(e,t,n){return ke(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function nn(e){if(e===null||Se(e)||Wt(e))return 1;if(Jn(e))return 2}function Qn(e,t,n){const r=[];let i=-1;for(;++i1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const p={...e[r][1].end},m={...e[n][1].start};Mo(p,-u),Mo(m,u),o={type:u>1?"strongSequence":"emphasisSequence",start:p,end:{...e[r][1].end}},l={type:u>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:m},s={type:u>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:u>1?"strong":"emphasis",start:{...o.start},end:{...l.end}},e[r][1].end={...o.start},e[n][1].start={...l.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=it(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=it(c,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",s,t]]),c=it(c,Qn(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=it(c,[["exit",s,t],["enter",l,t],["exit",l,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,c=it(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,et(e,r-1,n-r+3,c),n=r+c.length-d-2;break}}for(n=-1;++n0&&he(_)?ke(e,w,"linePrefix",s+1)(_):w(_)}function w(_){return _===null||se(_)?e.check(Io,b,j)(_):(e.enter("codeFlowValue"),T(_))}function T(_){return _===null||se(_)?(e.exit("codeFlowValue"),w(_)):(e.consume(_),T)}function j(_){return e.exit("codeFenced"),t(_)}function O(_,P,D){let R=0;return S;function S(E){return _.enter("lineEnding"),_.consume(E),_.exit("lineEnding"),M}function M(E){return _.enter("codeFencedFence"),he(E)?ke(_,L,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):L(E)}function L(E){return E===l?(_.enter("codeFencedFenceSequence"),C(E)):D(E)}function C(E){return E===l?(R++,_.consume(E),C):R>=o?(_.exit("codeFencedFenceSequence"),he(E)?ke(_,v,"whitespace")(E):v(E)):D(E)}function v(E){return E===null||se(E)?(_.exit("codeFencedFence"),P(E)):D(E)}}}function np(e,t,n){const r=this;return i;function i(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),s)}function s(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const br={name:"codeIndented",tokenize:ip},rp={partial:!0,tokenize:op};function ip(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),ke(e,s,"linePrefix",5)(c)}function s(c){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?o(c):n(c)}function o(c){return c===null?u(c):se(c)?e.attempt(rp,o,u)(c):(e.enter("codeFlowValue"),l(c))}function l(c){return c===null||se(c)?(e.exit("codeFlowValue"),o(c)):(e.consume(c),l)}function u(c){return e.exit("codeIndented"),t(c)}}function op(e,t,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):se(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):ke(e,s,"linePrefix",5)(o)}function s(o){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(o):se(o)?i(o):n(o)}}const sp={name:"codeText",previous:lp,resolve:ap,tokenize:cp};function ap(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 new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return tthis.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const s=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&cn(this.left,r),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),cn(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),cn(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function na(e,t,n,r,i,s,o,l,u){const c=u||Number.POSITIVE_INFINITY;let d=0;return p;function p(y){return y===60?(e.enter(r),e.enter(i),e.enter(s),e.consume(y),e.exit(s),m):y===null||y===32||y===41||Hn(y)?n(y):(e.enter(r),e.enter(o),e.enter(l),e.enter("chunkString",{contentType:"string"}),b(y))}function m(y){return y===62?(e.enter(s),e.consume(y),e.exit(s),e.exit(i),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),f(y))}function f(y){return y===62?(e.exit("chunkString"),e.exit(l),m(y)):y===null||y===60||se(y)?n(y):(e.consume(y),y===92?h:f)}function h(y){return y===60||y===62||y===92?(e.consume(y),f):f(y)}function b(y){return!d&&(y===null||y===41||Se(y))?(e.exit("chunkString"),e.exit(l),e.exit(o),e.exit(r),t(y)):d999||f===null||f===91||f===93&&!u||f===94&&!l&&"_hiddenFootnoteSupport"in o.parser.constructs?n(f):f===93?(e.exit(s),e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):se(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),p(f))}function p(f){return f===null||f===91||f===93||se(f)||l++>999?(e.exit("chunkString"),d(f)):(e.consume(f),u||(u=!he(f)),f===92?m:p)}function m(f){return f===91||f===92||f===93?(e.consume(f),l++,p):p(f)}}function ia(e,t,n,r,i,s){let o;return l;function l(m){return m===34||m===39||m===40?(e.enter(r),e.enter(i),e.consume(m),e.exit(i),o=m===40?41:m,u):n(m)}function u(m){return m===o?(e.enter(i),e.consume(m),e.exit(i),e.exit(r),t):(e.enter(s),c(m))}function c(m){return m===o?(e.exit(s),u(o)):m===null?n(m):se(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),ke(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(m))}function d(m){return m===o||m===null||se(m)?(e.exit("chunkString"),c(m)):(e.consume(m),m===92?p:d)}function p(m){return m===o||m===92?(e.consume(m),d):d(m)}}function mn(e,t){let n;return r;function r(i){return se(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):he(i)?ke(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const bp={name:"definition",tokenize:yp},xp={partial:!0,tokenize:vp};function yp(e,t,n){const r=this;let i;return s;function s(f){return e.enter("definition"),o(f)}function o(f){return ra.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function l(f){return i=dt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),f===58?(e.enter("definitionMarker"),e.consume(f),e.exit("definitionMarker"),u):n(f)}function u(f){return Se(f)?mn(e,c)(f):c(f)}function c(f){return na(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function d(f){return e.attempt(xp,p,p)(f)}function p(f){return he(f)?ke(e,m,"whitespace")(f):m(f)}function m(f){return f===null||se(f)?(e.exit("definition"),r.parser.defined.push(i),t(f)):n(f)}}function vp(e,t,n){return r;function r(l){return Se(l)?mn(e,i)(l):n(l)}function i(l){return ia(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function s(l){return he(l)?ke(e,o,"whitespace")(l):o(l)}function o(l){return l===null||se(l)?t(l):n(l)}}const kp={name:"hardBreakEscape",tokenize:Ep};function Ep(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),i}function i(s){return se(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const wp={name:"headingAtx",resolve:_p,tokenize:Np};function _p(e,t){let n=e.length-2,r=3,i,s;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},s={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},et(e,r,n-r+1,[["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t]])),e}function Np(e,t,n){let r=0;return i;function i(d){return e.enter("atxHeading"),s(d)}function s(d){return e.enter("atxHeadingSequence"),o(d)}function o(d){return d===35&&r++<6?(e.consume(d),o):d===null||Se(d)?(e.exit("atxHeadingSequence"),l(d)):n(d)}function l(d){return d===35?(e.enter("atxHeadingSequence"),u(d)):d===null||se(d)?(e.exit("atxHeading"),t(d)):he(d)?ke(e,l,"whitespace")(d):(e.enter("atxHeadingText"),c(d))}function u(d){return d===35?(e.consume(d),u):(e.exit("atxHeadingSequence"),l(d))}function c(d){return d===null||d===35||Se(d)?(e.exit("atxHeadingText"),l(d)):(e.consume(d),c)}}const Sp=["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"],Oo=["pre","script","style","textarea"],Tp={concrete:!0,name:"htmlFlow",resolveTo:Mp,tokenize:Ip},Cp={partial:!0,tokenize:Op},Ap={partial:!0,tokenize:Rp};function Mp(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 Ip(e,t,n){const r=this;let i,s,o,l,u;return c;function c(k){return d(k)}function d(k){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(k),p}function p(k){return k===33?(e.consume(k),m):k===47?(e.consume(k),s=!0,b):k===63?(e.consume(k),i=3,r.interrupt?t:g):Ve(k)?(e.consume(k),o=String.fromCharCode(k),x):n(k)}function m(k){return k===45?(e.consume(k),i=2,f):k===91?(e.consume(k),i=5,l=0,h):Ve(k)?(e.consume(k),i=4,r.interrupt?t:g):n(k)}function f(k){return k===45?(e.consume(k),r.interrupt?t:g):n(k)}function h(k){const ie="CDATA[";return k===ie.charCodeAt(l++)?(e.consume(k),l===ie.length?r.interrupt?t:L:h):n(k)}function b(k){return Ve(k)?(e.consume(k),o=String.fromCharCode(k),x):n(k)}function x(k){if(k===null||k===47||k===62||Se(k)){const ie=k===47,K=o.toLowerCase();return!ie&&!s&&Oo.includes(K)?(i=1,r.interrupt?t(k):L(k)):Sp.includes(o.toLowerCase())?(i=6,ie?(e.consume(k),y):r.interrupt?t(k):L(k)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(k):s?w(k):T(k))}return k===45||He(k)?(e.consume(k),o+=String.fromCharCode(k),x):n(k)}function y(k){return k===62?(e.consume(k),r.interrupt?t:L):n(k)}function w(k){return he(k)?(e.consume(k),w):S(k)}function T(k){return k===47?(e.consume(k),S):k===58||k===95||Ve(k)?(e.consume(k),j):he(k)?(e.consume(k),T):S(k)}function j(k){return k===45||k===46||k===58||k===95||He(k)?(e.consume(k),j):O(k)}function O(k){return k===61?(e.consume(k),_):he(k)?(e.consume(k),O):T(k)}function _(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),u=k,P):he(k)?(e.consume(k),_):D(k)}function P(k){return k===u?(e.consume(k),u=null,R):k===null||se(k)?n(k):(e.consume(k),P)}function D(k){return k===null||k===34||k===39||k===47||k===60||k===61||k===62||k===96||Se(k)?O(k):(e.consume(k),D)}function R(k){return k===47||k===62||he(k)?T(k):n(k)}function S(k){return k===62?(e.consume(k),M):n(k)}function M(k){return k===null||se(k)?L(k):he(k)?(e.consume(k),M):n(k)}function L(k){return k===45&&i===2?(e.consume(k),I):k===60&&i===1?(e.consume(k),H):k===62&&i===4?(e.consume(k),F):k===63&&i===3?(e.consume(k),g):k===93&&i===5?(e.consume(k),V):se(k)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Cp,$,C)(k)):k===null||se(k)?(e.exit("htmlFlowData"),C(k)):(e.consume(k),L)}function C(k){return e.check(Ap,v,$)(k)}function v(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),E}function E(k){return k===null||se(k)?C(k):(e.enter("htmlFlowData"),L(k))}function I(k){return k===45?(e.consume(k),g):L(k)}function H(k){return k===47?(e.consume(k),o="",U):L(k)}function U(k){if(k===62){const ie=o.toLowerCase();return Oo.includes(ie)?(e.consume(k),F):L(k)}return Ve(k)&&o.length<8?(e.consume(k),o+=String.fromCharCode(k),U):L(k)}function V(k){return k===93?(e.consume(k),g):L(k)}function g(k){return k===62?(e.consume(k),F):k===45&&i===2?(e.consume(k),g):L(k)}function F(k){return k===null||se(k)?(e.exit("htmlFlowData"),$(k)):(e.consume(k),F)}function $(k){return e.exit("htmlFlow"),t(k)}}function Rp(e,t,n){const r=this;return i;function i(o){return se(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),s):n(o)}function s(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function Op(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(yn,t,n)}}const Lp={name:"htmlText",tokenize:jp};function jp(e,t,n){const r=this;let i,s,o;return l;function l(g){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(g),u}function u(g){return g===33?(e.consume(g),c):g===47?(e.consume(g),O):g===63?(e.consume(g),T):Ve(g)?(e.consume(g),D):n(g)}function c(g){return g===45?(e.consume(g),d):g===91?(e.consume(g),s=0,h):Ve(g)?(e.consume(g),w):n(g)}function d(g){return g===45?(e.consume(g),f):n(g)}function p(g){return g===null?n(g):g===45?(e.consume(g),m):se(g)?(o=p,H(g)):(e.consume(g),p)}function m(g){return g===45?(e.consume(g),f):p(g)}function f(g){return g===62?I(g):g===45?m(g):p(g)}function h(g){const F="CDATA[";return g===F.charCodeAt(s++)?(e.consume(g),s===F.length?b:h):n(g)}function b(g){return g===null?n(g):g===93?(e.consume(g),x):se(g)?(o=b,H(g)):(e.consume(g),b)}function x(g){return g===93?(e.consume(g),y):b(g)}function y(g){return g===62?I(g):g===93?(e.consume(g),y):b(g)}function w(g){return g===null||g===62?I(g):se(g)?(o=w,H(g)):(e.consume(g),w)}function T(g){return g===null?n(g):g===63?(e.consume(g),j):se(g)?(o=T,H(g)):(e.consume(g),T)}function j(g){return g===62?I(g):T(g)}function O(g){return Ve(g)?(e.consume(g),_):n(g)}function _(g){return g===45||He(g)?(e.consume(g),_):P(g)}function P(g){return se(g)?(o=P,H(g)):he(g)?(e.consume(g),P):I(g)}function D(g){return g===45||He(g)?(e.consume(g),D):g===47||g===62||Se(g)?R(g):n(g)}function R(g){return g===47?(e.consume(g),I):g===58||g===95||Ve(g)?(e.consume(g),S):se(g)?(o=R,H(g)):he(g)?(e.consume(g),R):I(g)}function S(g){return g===45||g===46||g===58||g===95||He(g)?(e.consume(g),S):M(g)}function M(g){return g===61?(e.consume(g),L):se(g)?(o=M,H(g)):he(g)?(e.consume(g),M):R(g)}function L(g){return g===null||g===60||g===61||g===62||g===96?n(g):g===34||g===39?(e.consume(g),i=g,C):se(g)?(o=L,H(g)):he(g)?(e.consume(g),L):(e.consume(g),v)}function C(g){return g===i?(e.consume(g),i=void 0,E):g===null?n(g):se(g)?(o=C,H(g)):(e.consume(g),C)}function v(g){return g===null||g===34||g===39||g===60||g===61||g===96?n(g):g===47||g===62||Se(g)?R(g):(e.consume(g),v)}function E(g){return g===47||g===62||Se(g)?R(g):n(g)}function I(g){return g===62?(e.consume(g),e.exit("htmlTextData"),e.exit("htmlText"),t):n(g)}function H(g){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),U}function U(g){return he(g)?ke(e,V,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(g):V(g)}function V(g){return e.enter("htmlTextData"),o(g)}}const li={name:"labelEnd",resolveAll:Fp,resolveTo:zp,tokenize:$p},Dp={tokenize:Up},Pp={tokenize:Hp},Bp={tokenize:Wp};function Fp(e){let t=-1;const n=[];for(;++t=3&&(c===null||se(c))?(e.exit("thematicBreak"),t(c)):n(c)}function u(c){return c===i?(e.consume(c),r++,u):(e.exit("thematicBreakSequence"),he(c)?ke(e,l,"whitespace")(c):l(c))}}const Ye={continuation:{tokenize:ef},exit:nf,name:"list",tokenize:Qp},Zp={partial:!0,tokenize:rf},Jp={partial:!0,tokenize:tf};function Qp(e,t,n){const r=this,i=r.events[r.events.length-1];let s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return l;function l(f){const h=r.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(h==="listUnordered"?!r.containerState.marker||f===r.containerState.marker:Ur(f)){if(r.containerState.type||(r.containerState.type=h,e.enter(h,{_container:!0})),h==="listUnordered")return e.enter("listItemPrefix"),f===42||f===45?e.check(Fn,n,c)(f):c(f);if(!r.interrupt||f===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(f)}return n(f)}function u(f){return Ur(f)&&++o<10?(e.consume(f),u):(!r.interrupt||o<2)&&(r.containerState.marker?f===r.containerState.marker:f===41||f===46)?(e.exit("listItemValue"),c(f)):n(f)}function c(f){return e.enter("listItemMarker"),e.consume(f),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||f,e.check(yn,r.interrupt?n:d,e.attempt(Zp,m,p))}function d(f){return r.containerState.initialBlankLine=!0,s++,m(f)}function p(f){return he(f)?(e.enter("listItemPrefixWhitespace"),e.consume(f),e.exit("listItemPrefixWhitespace"),m):n(f)}function m(f){return r.containerState.size=s+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(f)}}function ef(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(yn,i,s);function i(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ke(e,t,"listItemIndent",r.containerState.size+1)(l)}function s(l){return r.containerState.furtherBlankLines||!he(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Jp,t,o)(l))}function o(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,ke(e,e.attempt(Ye,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function tf(e,t,n){const r=this;return ke(e,i,"listItemIndent",r.containerState.size+1);function i(s){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(s):n(s)}}function nf(e){e.exit(this.containerState.type)}function rf(e,t,n){const r=this;return ke(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const o=r.events[r.events.length-1];return!he(s)&&o&&o[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const Lo={name:"setextUnderline",resolveTo:of,tokenize:sf};function of(e,t){let n=e.length,r,i,s;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),!s&&e[n][1].type==="definition"&&(s=n);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",s?(e.splice(i,0,["enter",o,t]),e.splice(s+1,0,["exit",e[r][1],t]),e[r][1].end={...e[s][1].end}):e[r][1]=o,e.push(["exit",o,t]),e}function sf(e,t,n){const r=this;let i;return s;function s(c){let d=r.events.length,p;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){p=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||p)?(e.enter("setextHeadingLine"),i=c,o(c)):n(c)}function o(c){return e.enter("setextHeadingLineSequence"),l(c)}function l(c){return c===i?(e.consume(c),l):(e.exit("setextHeadingLineSequence"),he(c)?ke(e,u,"lineSuffix")(c):u(c))}function u(c){return c===null||se(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const af={tokenize:lf};function lf(e){const t=this,n=e.attempt(yn,r,e.attempt(this.parser.constructs.flowInitial,i,ke(e,e.attempt(this.parser.constructs.flow,i,e.attempt(pp,i)),"linePrefix")));return n;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const cf={resolveAll:sa()},uf=oa("string"),df=oa("text");function oa(e){return{resolveAll:sa(e==="text"?pf:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],s=n.attempt(i,o,l);return o;function o(d){return c(d)?s(d):l(d)}function l(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),u}function u(d){return c(d)?(n.exit("data"),s(d)):(n.consume(d),u)}function c(d){if(d===null)return!0;const p=i[d];let m=-1;if(p)for(;++m-1){const l=o[0];typeof l=="string"?o[0]=l.slice(r):o.shift()}s>0&&o.push(e[i].slice(0,s))}return o}function Nf(e,t){let n=-1;const r=[];let i;for(;++n0){const Ke=ee.tokenStack[ee.tokenStack.length-1];(Ke[1]||Lo).call(ee,void 0,Ke[0])}for(K.position={start:Rt(P.length>0?P[0][1].start:{line:1,column:1,offset:0}),end:Rt(P.length>0?P[P.length-2][1].end:{line:1,column:1,offset:0})},Ee=-1;++Ee0&&(r.className=["language-"+i[0]]);let s={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function Bf(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ff(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function zf(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=on(r.toLowerCase()),s=e.footnoteOrder.indexOf(r);let o,l=e.footnoteCounts.get(r);l===void 0?(l=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=s+1,l+=1,e.footnoteCounts.set(r,l);const u={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,u);const c={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(t,c),e.applyData(t,c)}function $f(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Uf(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function la(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),s=i[0];s&&s.type==="text"?s.value="["+s.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&o.type==="text"?o.value+=r:i.push({type:"text",value:r}),i}function Hf(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return la(e,t);const i={src:on(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,s),e.applyData(t,s)}function Wf(e,t){const n={src:on(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Kf(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Gf(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return la(e,t);const i={href:on(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function qf(e,t){const n={href:on(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Vf(e,t,n){const r=e.all(t),i=n?Yf(n):ca(t),s={},o=[];if(typeof t.checked=="boolean"){const d=r[0];let p;d&&d.type==="element"&&d.tagName==="p"?p=d:(p={type:"element",tagName:"p",properties:{},children:[]},r.unshift(p)),p.children.length>0&&p.children.unshift({type:"text",value:" "}),p.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let l=-1;for(;++l0){const Ke=ee.tokenStack[ee.tokenStack.length-1];(Ke[1]||Do).call(ee,void 0,Ke[0])}for(G.position={start:Rt(B.length>0?B[0][1].start:{line:1,column:1,offset:0}),end:Rt(B.length>0?B[B.length-2][1].end:{line:1,column:1,offset:0})},we=-1;++we0&&(r.className=["language-"+i[0]]);let s={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function Ff(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function zf(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function $f(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=on(r.toLowerCase()),s=e.footnoteOrder.indexOf(r);let o,l=e.footnoteCounts.get(r);l===void 0?(l=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=s+1,l+=1,e.footnoteCounts.set(r,l);const u={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,u);const c={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(t,c),e.applyData(t,c)}function Uf(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Hf(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function ca(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),s=i[0];s&&s.type==="text"?s.value="["+s.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&o.type==="text"?o.value+=r:i.push({type:"text",value:r}),i}function Wf(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ca(e,t);const i={src:on(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,s),e.applyData(t,s)}function Kf(e,t){const n={src:on(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Gf(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function qf(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ca(e,t);const i={href:on(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function Vf(e,t){const n={href:on(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Yf(e,t,n){const r=e.all(t),i=n?Xf(n):ua(t),s={},o=[];if(typeof t.checked=="boolean"){const d=r[0];let p;d&&d.type==="element"&&d.tagName==="p"?p=d:(p={type:"element",tagName:"p",properties:{},children:[]},r.unshift(p)),p.children.length>0&&p.children.unshift({type:"text",value:" "}),p.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let l=-1;for(;++l1}function Xf(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=ti(t.children[1]),u=Us(t.children[t.children.length-1]);l&&u&&(o.position={start:l,end:u}),i.push(o)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,s),e.applyData(t,s)}function tm(e,t,n){const r=n?n.children:void 0,s=(r?r.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,l=o?o.length:t.children.length;let u=-1;const c=[];for(;++u0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return s.push(Po(t.slice(i),i>0,!1)),s.join("")}function Po(e,t,n){let r=0,i=e.length;if(t){let s=e.codePointAt(r);for(;s===jo||s===Do;)r++,s=e.codePointAt(r)}if(n){let s=e.codePointAt(i-1);for(;s===jo||s===Do;)i--,s=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function im(e,t){const n={type:"text",value:rm(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function om(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const sm={blockquote:jf,break:Df,code:Pf,delete:Bf,emphasis:Ff,footnoteReference:zf,heading:$f,html:Uf,imageReference:Hf,image:Wf,inlineCode:Kf,linkReference:Gf,link:qf,listItem:Vf,list:Xf,paragraph:Zf,root:Jf,strong:Qf,table:em,tableCell:nm,tableRow:tm,text:im,thematicBreak:om,toml:Mn,yaml:Mn,definition:Mn,footnoteDefinition:Mn};function Mn(){}const ua=-1,Qn=0,hn=1,Hn=2,li=3,ci=4,ui=5,di=6,da=7,pa=8,Bo=typeof self=="object"?self:globalThis,am=(e,t)=>{const n=(i,s)=>(e.set(s,i),i),r=i=>{if(e.has(i))return e.get(i);const[s,o]=t[i];switch(s){case Qn:case ua:return n(o,i);case hn:{const l=n([],i);for(const u of o)l.push(r(u));return l}case Hn:{const l=n({},i);for(const[u,c]of o)l[r(u)]=r(c);return l}case li:return n(new Date(o),i);case ci:{const{source:l,flags:u}=o;return n(new RegExp(l,u),i)}case ui:{const l=n(new Map,i);for(const[u,c]of o)l.set(r(u),r(c));return l}case di:{const l=n(new Set,i);for(const u of o)l.add(r(u));return l}case da:{const{name:l,message:u}=o;return n(new Bo[l](u),i)}case pa:return n(BigInt(o),i);case"BigInt":return n(Object(BigInt(o)),i);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:l}=new Uint8Array(o);return n(new DataView(l),o)}}return n(new Bo[s](o),i)};return r},Fo=e=>am(new Map,e)(0),Xt="",{toString:lm}={},{keys:cm}=Object,un=e=>{const t=typeof e;if(t!=="object"||!e)return[Qn,t];const n=lm.call(e).slice(8,-1);switch(n){case"Array":return[hn,Xt];case"Object":return[Hn,Xt];case"Date":return[li,Xt];case"RegExp":return[ci,Xt];case"Map":return[ui,Xt];case"Set":return[di,Xt];case"DataView":return[hn,n]}return n.includes("Array")?[hn,n]:n.includes("Error")?[da,n]:[Hn,n]},In=([e,t])=>e===Qn&&(t==="function"||t==="symbol"),um=(e,t,n,r)=>{const i=(o,l)=>{const u=r.push(o)-1;return n.set(l,u),u},s=o=>{if(n.has(o))return n.get(o);let[l,u]=un(o);switch(l){case Qn:{let d=o;switch(u){case"bigint":l=pa,d=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);d=null;break;case"undefined":return i([ua],o)}return i([l,d],o)}case hn:{if(u){let m=o;return u==="DataView"?m=new Uint8Array(o.buffer):u==="ArrayBuffer"&&(m=new Uint8Array(o)),i([u,[...m]],o)}const d=[],p=i([l,d],o);for(const m of o)d.push(s(m));return p}case Hn:{if(u)switch(u){case"BigInt":return i([u,o.toString()],o);case"Boolean":case"Number":case"String":return i([u,o.valueOf()],o)}if(t&&"toJSON"in o)return s(o.toJSON());const d=[],p=i([l,d],o);for(const m of cm(o))(e||!In(un(o[m])))&&d.push([s(m),s(o[m])]);return p}case li:return i([l,o.toISOString()],o);case ci:{const{source:d,flags:p}=o;return i([l,{source:d,flags:p}],o)}case ui:{const d=[],p=i([l,d],o);for(const[m,f]of o)(e||!(In(un(m))||In(un(f))))&&d.push([s(m),s(f)]);return p}case di:{const d=[],p=i([l,d],o);for(const m of o)(e||!In(un(m)))&&d.push(s(m));return p}}const{message:c}=o;return i([l,{name:u,message:c}],o)};return s},zo=(e,{json:t,lossy:n}={})=>{const r=[];return um(!(t||n),!!t,new Map,r)(e),r},Wn=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Fo(zo(e,t)):structuredClone(e):(e,t)=>Fo(zo(e,t));function dm(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function pm(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function fm(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||dm,r=e.options.footnoteBackLabel||pm,i=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let u=-1;for(;++u0&&g.push({type:"text",value:" "});let k=typeof n=="string"?n:n(u,f);typeof k=="string"&&(k={type:"text",value:k}),g.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+m+(f>1?"-"+f:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(u,f),className:["data-footnote-backref"]},children:Array.isArray(k)?k:[k]})}const y=d[d.length-1];if(y&&y.type==="element"&&y.tagName==="p"){const k=y.children[y.children.length-1];k&&k.type==="text"?k.value+=" ":y.children.push({type:"text",value:" "}),y.children.push(...g)}else d.push(...g);const b={type:"element",tagName:"li",properties:{id:t+"fn-"+m},children:e.wrap(d,!0)};e.patch(c,b),l.push(b)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Wn(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:` +`});const c={type:"element",tagName:"li",properties:s,children:o};return e.patch(t,c),e.applyData(t,c)}function Xf(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r1}function Zf(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=ni(t.children[1]),u=Hs(t.children[t.children.length-1]);l&&u&&(o.position={start:l,end:u}),i.push(o)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,s),e.applyData(t,s)}function nm(e,t,n){const r=n?n.children:void 0,s=(r?r.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,l=o?o.length:t.children.length;let u=-1;const c=[];for(;++u0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return s.push(Fo(t.slice(i),i>0,!1)),s.join("")}function Fo(e,t,n){let r=0,i=e.length;if(t){let s=e.codePointAt(r);for(;s===Po||s===Bo;)r++,s=e.codePointAt(r)}if(n){let s=e.codePointAt(i-1);for(;s===Po||s===Bo;)i--,s=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function om(e,t){const n={type:"text",value:im(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function sm(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const am={blockquote:Df,break:Pf,code:Bf,delete:Ff,emphasis:zf,footnoteReference:$f,heading:Uf,html:Hf,imageReference:Wf,image:Kf,inlineCode:Gf,linkReference:qf,link:Vf,listItem:Yf,list:Zf,paragraph:Jf,root:Qf,strong:em,table:tm,tableCell:rm,tableRow:nm,text:om,thematicBreak:sm,toml:Mn,yaml:Mn,definition:Mn,footnoteDefinition:Mn};function Mn(){}const da=-1,er=0,gn=1,Wn=2,ci=3,ui=4,di=5,pi=6,pa=7,fa=8,zo=typeof self=="object"?self:globalThis,lm=(e,t)=>{const n=(i,s)=>(e.set(s,i),i),r=i=>{if(e.has(i))return e.get(i);const[s,o]=t[i];switch(s){case er:case da:return n(o,i);case gn:{const l=n([],i);for(const u of o)l.push(r(u));return l}case Wn:{const l=n({},i);for(const[u,c]of o)l[r(u)]=r(c);return l}case ci:return n(new Date(o),i);case ui:{const{source:l,flags:u}=o;return n(new RegExp(l,u),i)}case di:{const l=n(new Map,i);for(const[u,c]of o)l.set(r(u),r(c));return l}case pi:{const l=n(new Set,i);for(const u of o)l.add(r(u));return l}case pa:{const{name:l,message:u}=o;return n(new zo[l](u),i)}case fa:return n(BigInt(o),i);case"BigInt":return n(Object(BigInt(o)),i);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:l}=new Uint8Array(o);return n(new DataView(l),o)}}return n(new zo[s](o),i)};return r},$o=e=>lm(new Map,e)(0),Xt="",{toString:cm}={},{keys:um}=Object,un=e=>{const t=typeof e;if(t!=="object"||!e)return[er,t];const n=cm.call(e).slice(8,-1);switch(n){case"Array":return[gn,Xt];case"Object":return[Wn,Xt];case"Date":return[ci,Xt];case"RegExp":return[ui,Xt];case"Map":return[di,Xt];case"Set":return[pi,Xt];case"DataView":return[gn,n]}return n.includes("Array")?[gn,n]:n.includes("Error")?[pa,n]:[Wn,n]},In=([e,t])=>e===er&&(t==="function"||t==="symbol"),dm=(e,t,n,r)=>{const i=(o,l)=>{const u=r.push(o)-1;return n.set(l,u),u},s=o=>{if(n.has(o))return n.get(o);let[l,u]=un(o);switch(l){case er:{let d=o;switch(u){case"bigint":l=fa,d=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);d=null;break;case"undefined":return i([da],o)}return i([l,d],o)}case gn:{if(u){let m=o;return u==="DataView"?m=new Uint8Array(o.buffer):u==="ArrayBuffer"&&(m=new Uint8Array(o)),i([u,[...m]],o)}const d=[],p=i([l,d],o);for(const m of o)d.push(s(m));return p}case Wn:{if(u)switch(u){case"BigInt":return i([u,o.toString()],o);case"Boolean":case"Number":case"String":return i([u,o.valueOf()],o)}if(t&&"toJSON"in o)return s(o.toJSON());const d=[],p=i([l,d],o);for(const m of um(o))(e||!In(un(o[m])))&&d.push([s(m),s(o[m])]);return p}case ci:return i([l,o.toISOString()],o);case ui:{const{source:d,flags:p}=o;return i([l,{source:d,flags:p}],o)}case di:{const d=[],p=i([l,d],o);for(const[m,f]of o)(e||!(In(un(m))||In(un(f))))&&d.push([s(m),s(f)]);return p}case pi:{const d=[],p=i([l,d],o);for(const m of o)(e||!In(un(m)))&&d.push(s(m));return p}}const{message:c}=o;return i([l,{name:u,message:c}],o)};return s},Uo=(e,{json:t,lossy:n}={})=>{const r=[];return dm(!(t||n),!!t,new Map,r)(e),r},Kn=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?$o(Uo(e,t)):structuredClone(e):(e,t)=>$o(Uo(e,t));function pm(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function fm(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function mm(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||pm,r=e.options.footnoteBackLabel||fm,i=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let u=-1;for(;++u0&&h.push({type:"text",value:" "});let w=typeof n=="string"?n:n(u,f);typeof w=="string"&&(w={type:"text",value:w}),h.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+m+(f>1?"-"+f:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(u,f),className:["data-footnote-backref"]},children:Array.isArray(w)?w:[w]})}const x=d[d.length-1];if(x&&x.type==="element"&&x.tagName==="p"){const w=x.children[x.children.length-1];w&&w.type==="text"?w.value+=" ":x.children.push({type:"text",value:" "}),x.children.push(...h)}else d.push(...h);const y={type:"element",tagName:"li",properties:{id:t+"fn-"+m},children:e.wrap(d,!0)};e.patch(c,y),l.push(y)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Kn(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:` `},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:` -`}]}}const vn=(function(e){if(e==null)return bm;if(typeof e=="function")return er(e);if(typeof e=="object")return Array.isArray(e)?mm(e):hm(e);if(typeof e=="string")return gm(e);throw new Error("Expected function, string, or object as test")});function mm(e){const t=[];let n=-1;for(;++n":""))+")"})}return m;function m(){let f=fa,g,x,y;if((!t||s(u,c,d[d.length-1]||void 0))&&(f=km(n(u,d)),f[0]===Ur))return f;if("children"in u&&u.children){const b=u;if(b.children&&f[0]!==vm)for(x=(r?b.children.length:-1)+o,y=d.concat(b);x>-1&&x":""))+")"})}return m;function m(){let f=ma,h,b,x;if((!t||s(u,c,d[d.length-1]||void 0))&&(f=Em(n(u,d)),f[0]===Wr))return f;if("children"in u&&u.children){const y=u;if(y.children&&f[0]!==km)for(b=(r?y.children.length:-1)+o,x=d.concat(y);b>-1&&b0&&n.push({type:"text",value:` -`}),n}function $o(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Uo(e,t){const n=wm(e,t),r=n.one(e,void 0),i=fm(n),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&s.children.push({type:"text",value:` -`},i),s}function Cm(e,t){return e&&"run"in e?async function(n,r){const i=Uo(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Uo(n,{file:r,...e||t})}}function Ho(e){if(e)throw e}var xr,Wo;function Am(){if(Wo)return xr;Wo=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(c){return typeof Array.isArray=="function"?Array.isArray(c):t.call(c)==="[object Array]"},s=function(c){if(!c||t.call(c)!=="[object Object]")return!1;var d=e.call(c,"constructor"),p=c.constructor&&c.constructor.prototype&&e.call(c.constructor.prototype,"isPrototypeOf");if(c.constructor&&!d&&!p)return!1;var m;for(m in c);return typeof m>"u"||e.call(c,m)},o=function(c,d){n&&d.name==="__proto__"?n(c,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):c[d.name]=d.newValue},l=function(c,d){if(d==="__proto__")if(e.call(c,d)){if(r)return r(c,d).value}else return;return c[d]};return xr=function u(){var c,d,p,m,f,g,x=arguments[0],y=1,b=arguments.length,k=!1;for(typeof x=="boolean"&&(k=x,x=arguments[1]||{},y=2),(x==null||typeof x!="object"&&typeof x!="function")&&(x={});yo.length;let u;l&&o.push(i);try{u=e.apply(this,o)}catch(c){const d=c;if(l&&n)throw d;return i(d)}l||(u&&u.then&&typeof u.then=="function"?u.then(s,i):u instanceof Error?i(u):s(u))}function i(o,...l){n||(n=!0,t(o,...l))}function s(o){i(null,o)}}const ht={basename:Om,dirname:Lm,extname:jm,join:Dm,sep:"/"};function Om(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');kn(e);let n=0,r=-1,i=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else r<0&&(s=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let o=-1,l=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else o<0&&(s=!0,o=i+1),l>-1&&(e.codePointAt(i)===t.codePointAt(l--)?l<0&&(r=i):(l=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function Lm(e){if(kn(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||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function jm(e){kn(e);let t=e.length,n=-1,r=0,i=-1,s=0,o;for(;t--;){const l=e.codePointAt(t);if(l===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),l===46?i<0?i=t:s!==1&&(s=1):i>-1&&(s=-1)}return i<0||n<0||s===0||s===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function Dm(...e){let t=-1,n;for(;++t0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Bm(e,t){let n="",r=0,i=-1,s=0,o=-1,l,u;for(;++o<=e.length;){if(o2){if(u=n.lastIndexOf("/"),u!==n.length-1){u<0?(n="",r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf("/")),i=o,s=0;continue}}else if(n.length>0){n="",r=0,i=o,s=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,s=0}else l===46&&s>-1?s++:s=-1}return n}function kn(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Fm={cwd:zm};function zm(){return"/"}function Kr(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function $m(e){if(typeof e=="string")e=new URL(e);else if(!Kr(e)){const t=new 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:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Um(e)}function Um(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n0){let[f,...g]=d;const x=r[m][1];Wr(x)&&Wr(f)&&(f=yr(!0,x,f)),r[m]=[c,f,...g]}}}}const Gm=new pi().freeze();function wr(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function _r(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Nr(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Go(e){if(!Wr(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function qo(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Rn(e){return qm(e)?e:new ha(e)}function qm(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Vm(e){return typeof e=="string"||Ym(e)}function Ym(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Xm="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Vo=[],Yo={allowDangerousHtml:!0},Zm=/^(https?|ircs?|mailto|xmpp)$/i,Jm=[{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 Qm(e){const t=eh(e),n=th(e);return nh(t.runSync(t.parse(n),n),e)}function eh(e){const t=e.rehypePlugins||Vo,n=e.remarkPlugins||Vo,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Yo}:Yo;return Gm().use(Lf).use(n).use(Cm,r).use(t)}function th(e){const t=e.children||"",n=new ha;return typeof t=="string"&&(n.value=t),n}function nh(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,s=t.disallowedElements,o=t.skipHtml,l=t.unwrapDisallowed,u=t.urlTransform||rh;for(const d of Jm)Object.hasOwn(t,d.from)&&(""+d.from+(d.to?"use `"+d.to+"` instead":"remove it")+Xm+d.id,void 0);return tr(e,c),gd(e,{Fragment:a.Fragment,components:i,ignoreInvalidStyle:!0,jsx:a.jsx,jsxs:a.jsxs,passKeys:!0,passNode:!0});function c(d,p,m){if(d.type==="raw"&&m&&typeof p=="number")return o?m.children.splice(p,1):m.children[p]={type:"text",value:d.value},p;if(d.type==="element"){let f;for(f in hr)if(Object.hasOwn(hr,f)&&Object.hasOwn(d.properties,f)){const g=d.properties[f],x=hr[f];(x===null||x.includes(d.tagName))&&(d.properties[f]=u(String(g||""),f,d))}}if(d.type==="element"){let f=n?!n.includes(d.tagName):s?s.includes(d.tagName):!1;if(!f&&r&&typeof p=="number"&&(f=!r(d,p,m)),f&&m&&typeof p=="number")return l&&d.children?m.children.splice(p,1,...d.children):m.children.splice(p,1),p}}}function rh(e){const 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||Zm.test(e.slice(0,t))?e:""}const Xo=(function(e,t,n){const r=vn(n);if(!e||!e.type||!e.children)throw new Error("Expected parent node");if(typeof t=="number"){if(t<0||t===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(t=e.children.indexOf(t),t<0)throw new Error("Expected child node or index");for(;++tc&&(c=d):d&&(c!==void 0&&c>-1&&u.push(` -`.repeat(c)||" "),c=-1,u.push(d))}return u.join("")}function ba(e,t,n){return e.type==="element"?dh(e,t,n):e.type==="text"?n.whitespace==="normal"?xa(e,n):ph(e):[]}function dh(e,t,n){const r=ya(e,n),i=e.children||[];let s=-1,o=[];if(ch(e))return o;let l,u;for(Gr(e)||es(e)&&Xo(t,e,es)?u=` -`:lh(e)?(l=2,u=2):ga(e)&&(l=1,u=1);++s]+>")+")",l={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},c={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},d={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},p={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(c,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},m={className:"title",begin:t.optional(i)+e.IDENT_RE,relevance:0},f=t.optional(i)+e.IDENT_RE+"\\s*\\(",g=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],x=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],y=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],b=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],j={type:x,keyword:g,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:y},L={className:"function.dispatch",relevance:0,keywords:{_hint:b},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},T=[L,p,l,n,e.C_BLOCK_COMMENT_MODE,d,c],B={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:j,contains:T.concat([{begin:/\(/,end:/\)/,keywords:j,contains:T.concat(["self"]),relevance:0}]),relevance:0},O={className:"function",begin:"("+o+"[\\*&\\s]+)+"+f,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:j,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:j,relevance:0},{begin:f,returnBegin:!0,contains:[m],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[c,d]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:j,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,c,d,l,{begin:/\(/,end:/\)/,keywords:j,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,c,d,l]}]},l,n,e.C_BLOCK_COMMENT_MODE,p]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:j,illegal:"",keywords:j,contains:["self",l]},{begin:e.IDENT_RE+"::",keywords:j},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function xh(e){const t={type:["boolean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand","Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server","GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch","scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","beginTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","attachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNameWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blinkVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket","isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readString","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noDisplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflow","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","getBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","setMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect","line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit","tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},n=bh(e),r=n.keywords;return r.type=[...r.type,...t.type],r.literal=[...r.literal,...t.literal],r.built_in=[...r.built_in,...t.built_in],r._hints=t._hints,n.name="Arduino",n.aliases=["ino"],n.supersetOf="cpp",n}function yh(e){const t=e.regex,n={},r={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},r]});const i={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},s=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),o={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},l={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,i]};i.contains.push(l);const u={match:/\\"/},c={className:"string",begin:/'/,end:/'/},d={match:/\\'/},p={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},m=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],f=e.SHEBANG({binary:`(${m.join("|")})`,relevance:10}),g={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},x=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],y=["true","false"],b={match:/(\/[a-z._-]+)+/},k=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],C=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],j=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],L=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:x,literal:y,built_in:[...k,...C,"set","shopt",...j,...L]},contains:[f,e.SHEBANG(),g,p,s,o,b,l,u,c,d,n]}}function vh(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",o="("+r+"|"+t.optional(i)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",l={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},c={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},d={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},p={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(c,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},m={className:"title",begin:t.optional(i)+e.IDENT_RE,relevance:0},f=t.optional(i)+e.IDENT_RE+"\\s*\\(",y={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},b=[p,l,n,e.C_BLOCK_COMMENT_MODE,d,c],k={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:y,contains:b.concat([{begin:/\(/,end:/\)/,keywords:y,contains:b.concat(["self"]),relevance:0}]),relevance:0},C={begin:"("+o+"[\\*&\\s]+)+"+f,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:y,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:y,relevance:0},{begin:f,returnBegin:!0,contains:[e.inherit(m,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:y,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,c,d,l,{begin:/\(/,end:/\)/,keywords:y,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,c,d,l]}]},l,n,e.C_BLOCK_COMMENT_MODE,p]};return{name:"C",aliases:["h"],keywords:y,disableAutodetect:!0,illegal:"=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:p,strings:c,keywords:y}}}function kh(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",o="(?!struct)("+r+"|"+t.optional(i)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",l={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},c={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},d={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},p={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(c,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},m={className:"title",begin:t.optional(i)+e.IDENT_RE,relevance:0},f=t.optional(i)+e.IDENT_RE+"\\s*\\(",g=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],x=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],y=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],b=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],j={type:x,keyword:g,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:y},L={className:"function.dispatch",relevance:0,keywords:{_hint:b},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},T=[L,p,l,n,e.C_BLOCK_COMMENT_MODE,d,c],B={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:j,contains:T.concat([{begin:/\(/,end:/\)/,keywords:j,contains:T.concat(["self"]),relevance:0}]),relevance:0},O={className:"function",begin:"("+o+"[\\*&\\s]+)+"+f,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:j,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:j,relevance:0},{begin:f,returnBegin:!0,contains:[m],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[c,d]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:j,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,c,d,l,{begin:/\(/,end:/\)/,keywords:j,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,c,d,l]}]},l,n,e.C_BLOCK_COMMENT_MODE,p]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:j,illegal:"",keywords:j,contains:["self",l]},{begin:e.IDENT_RE+"::",keywords:j},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function Eh(e){const t=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],n=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],r=["default","false","null","true"],i=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],s=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],o={keyword:i.concat(s),built_in:t,literal:r},l=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),u={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},c={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},d={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},p=e.inherit(d,{illegal:/\n/}),m={className:"subst",begin:/\{/,end:/\}/,keywords:o},f=e.inherit(m,{illegal:/\n/}),g={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,f]},x={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},m]},y=e.inherit(x,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},f]});m.contains=[x,g,d,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,u,e.C_BLOCK_COMMENT_MODE],f.contains=[y,g,p,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,u,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const b={variants:[c,x,g,d,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},k={begin:"<",end:">",contains:[{beginKeywords:"in out"},l]},C=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",j={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:o,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:""},{begin:""}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},b,u,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},l,k,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[l,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[l,k,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+C+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:o,contains:[{beginKeywords:n.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,k],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,relevance:0,contains:[b,u,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},j]}}const wh=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),_h=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],Nh=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],Sh=[..._h,...Nh],Th=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),Ch=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),Ah=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),Mh=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function Ih(e){const t=e.regex,n=wh(e),r={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},i="and or not only",s=/@-?\w[\w]*(-\w+)*/,o="[a-zA-Z-][a-zA-Z0-9_-]*",l=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,r,n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+o,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+Ch.join("|")+")"},{begin:":(:)?("+Ah.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+Mh.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...l,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...l,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:s},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:i,attribute:Th.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...l,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+Sh.join("|")+")\\b"}]}}function Rh(e){const t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}function Oh(e){const s={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:s,illegal:"va(e,t,n-1))}function Dh(e){const t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",r=n+va("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),u={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},c={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},d={className:"params",begin:/\(/,end:/\)/,keywords:u,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:u,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[d,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+r+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:u,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:u,relevance:0,contains:[c,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,ts,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},ts,c]}}const ns="[A-Za-z$_][0-9A-Za-z$_]*",Ph=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],Bh=["true","false","null","undefined","NaN","Infinity"],ka=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],Ea=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],wa=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Fh=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],zh=[].concat(wa,ka,Ea);function $h(e){const t=e.regex,n=(H,{after:V})=>{const h="",end:""},s=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(H,V)=>{const h=H[0].length+H.index,F=H.input[h];if(F==="<"||F===","){V.ignoreMatch();return}F===">"&&(n(H,{after:h})||V.ignoreMatch());let $;const v=H.input.substring(h);if($=v.match(/^\s*=/)){V.ignoreMatch();return}if(($=v.match(/^\s+extends\s+/))&&$.index===0){V.ignoreMatch();return}}},l={$pattern:ns,keyword:Ph,literal:Bh,built_in:zh,"variable.language":Fh},u="[0-9](_?[0-9])*",c=`\\.(${u})`,d="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",p={className:"number",variants:[{begin:`(\\b(${d})((${c})|\\.)?|(${c}))[eE][+-]?(${u})\\b`},{begin:`\\b(${d})\\b((${c})\\b|\\.)?|(${c})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},m={className:"subst",begin:"\\$\\{",end:"\\}",keywords:l,contains:[]},f={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,m],subLanguage:"xml"}},g={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,m],subLanguage:"css"}},x={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,m],subLanguage:"graphql"}},y={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,m]},k={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},C=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,f,g,x,y,{match:/\$\d+/},p];m.contains=C.concat({begin:/\{/,end:/\}/,keywords:l,contains:["self"].concat(C)});const j=[].concat(k,m.contains),L=j.concat([{begin:/(\s*)\(/,end:/\)/,keywords:l,contains:["self"].concat(j)}]),T={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:L},B={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},O={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...ka,...Ea]}},w={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},_={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[T],illegal:/%/},M={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function R(H){return t.concat("(?!",H.join("|"),")")}const D={match:t.concat(/\b/,R([...wa,"super","import"].map(H=>`${H}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},N={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},E={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},T]},I="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",G={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(I)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[T]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:l,exports:{PARAMS_CONTAINS:L,CLASS_REFERENCE:O},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),w,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,f,g,x,y,k,{match:/\$\d+/},p,O,{scope:"attr",match:r+t.lookahead(":"),relevance:0},G,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[k,e.REGEXP_MODE,{className:"function",begin:I,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:L}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:s},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0,contains:["self"]}]}]},_,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[T,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},N,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[T]},D,M,B,E,{match:/\$[(.]/}]}}function Uh(e){const t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},r=["true","false","null"],i={scope:"literal",beginKeywords:r.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:r},contains:[t,n,e.QUOTE_STRING_MODE,i,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var Jt="[0-9](_*[0-9])*",jn=`\\.(${Jt})`,Dn="[0-9a-fA-F](_*[0-9a-fA-F])*",Hh={className:"number",variants:[{begin:`(\\b(${Jt})((${jn})|\\.)?|(${jn}))[eE][+-]?(${Jt})[fFdD]?\\b`},{begin:`\\b(${Jt})((${jn})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${jn})[fFdD]?\\b`},{begin:`\\b(${Jt})[fFdD]\\b`},{begin:`\\b0[xX]((${Dn})\\.?|(${Dn})?\\.(${Dn}))[pP][+-]?(${Jt})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${Dn})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function Wh(e){const t={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},n={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},r={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},i={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},s={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},o={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[s,i]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,s,i]}]};i.contains.push(o);const l={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},u={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(o,{className:"string"}),"self"]}]},c=Hh,d=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),p={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},m=p;return m.variants[1].contains=[p],p.variants[1].contains=[m],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,d,n,r,l,u,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin://,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[p,e.C_LINE_COMMENT_MODE,d],relevance:0},e.C_LINE_COMMENT_MODE,d,l,u,o,e.C_NUMBER_MODE]},d]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin://,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},l,u]},o,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:` -`},c]}}const Kh=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),Gh=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],qh=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],Vh=[...Gh,...qh],Yh=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),_a=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),Na=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),Xh=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),Zh=_a.concat(Na).sort().reverse();function Jh(e){const t=Kh(e),n=Zh,r="and or not only",i="[\\w-]+",s="("+i+"|@\\{"+i+"\\})",o=[],l=[],u=function(C){return{className:"string",begin:"~?"+C+".*?"+C}},c=function(C,j,L){return{className:C,begin:j,relevance:L}},d={$pattern:/[a-z-]+/,keyword:r,attribute:Yh.join(" ")},p={begin:"\\(",end:"\\)",contains:l,keywords:d,relevance:0};l.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,u("'"),u('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,p,c("variable","@@?"+i,10),c("variable","@\\{"+i+"\\}"),c("built_in","~?`[^`]*?`"),{className:"attribute",begin:i+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);const m=l.concat({begin:/\{/,end:/\}/,contains:o}),f={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(l)},g={begin:s+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+Xh.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:l}}]},x={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:d,returnEnd:!0,contains:l,relevance:0}},y={className:"variable",variants:[{begin:"@"+i+"\\s*:",relevance:15},{begin:"@"+i}],starts:{end:"[;}]",returnEnd:!0,contains:m}},b={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:s,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,f,c("keyword","all\\b"),c("variable","@\\{"+i+"\\}"),{begin:"\\b("+Vh.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,c("selector-tag",s,0),c("selector-id","#"+s),c("selector-class","\\."+s,0),c("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+_a.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+Na.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:m},{begin:"!important"},t.FUNCTION_DISPATCH]},k={begin:i+`:(:)?(${n.join("|")})`,returnBegin:!0,contains:[b]};return o.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,x,y,k,g,b,f,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:o}}function Qh(e){const t="\\[=*\\[",n="\\]=*\\]",r={begin:t,end:n,contains:["self"]},i=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,n,{contains:[r],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:i.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:i}].concat(i)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:n,contains:[r],relevance:5}])}}function eg(e){const t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%",subLanguage:"xml",relevance:0},r={begin:"^[-\\*]{3,}",end:"$"},i={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},s={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},o={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},l=/[A-Za-z][A-Za-z0-9+.-]*/,u={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,l,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},c={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},d={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},p=e.inherit(c,{contains:[]}),m=e.inherit(d,{contains:[]});c.contains.push(m),d.contains.push(p);let f=[n,u];return[c,d,p,m].forEach(b=>{b.contains=b.contains.concat(f)}),f=f.concat(c,d),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:f},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:f}]}]},n,s,c,d,{className:"quote",begin:"^>\\s+",contains:f,end:"$"},i,r,u,o,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function ng(e){const t={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},n=/[a-zA-Z@][a-zA-Z0-9_]*/,l={"variable.language":["this","super"],$pattern:n,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},u={$pattern:n,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:l,illegal:"/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+u.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:u,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function rg(e){const t=e.regex,n=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],r=/[dualxmsipngr]{0,12}/,i={$pattern:/[\w.]+/,keyword:n.join(" ")},s={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:i},o={begin:/->\{/,end:/\}/},l={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},u={scope:"variable",variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[l]},c={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},d=[e.BACKSLASH_ESCAPE,s,u],p=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],m=(x,y,b="\\1")=>{const k=b==="\\1"?b:t.concat(b,y);return t.concat(t.concat("(?:",x,")"),y,/(?:\\.|[^\\\/])*?/,k,/(?:\\.|[^\\\/])*?/,b,r)},f=(x,y,b)=>t.concat(t.concat("(?:",x,")"),y,/(?:\\.|[^\\\/])*?/,b,r),g=[u,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),o,{className:"string",contains:d,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},c,{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:m("s|tr|y",t.either(...p,{capture:!0}))},{begin:m("s|tr|y","\\(","\\)")},{begin:m("s|tr|y","\\[","\\]")},{begin:m("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:f("(?:m|qr)?",/\//,/\//)},{begin:f("m|qr",t.either(...p,{capture:!0}),/\1/)},{begin:f("m|qr",/\(/,/\)/)},{begin:f("m|qr",/\[/,/\]/)},{begin:f("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,l]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,l,c]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return s.contains=g,o.contains=g,{name:"Perl",aliases:["pl","pm"],keywords:i,contains:g}}function ig(e){const t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,r=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),i=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),s=t.concat(/[A-Z]+/,n),o={scope:"variable",match:"\\$+"+r},l={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},u={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},c=e.inherit(e.APOS_STRING_MODE,{illegal:null}),d=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(u)}),p={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(u),"on:begin":(N,E)=>{E.data._beginMatch=N[1]||N[2]},"on:end":(N,E)=>{E.data._beginMatch!==N[1]&&E.ignoreMatch()}},m=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),f=`[ -]`,g={scope:"string",variants:[d,c,p,m]},x={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},y=["false","null","true"],b=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],k=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],j={keyword:b,literal:(N=>{const E=[];return N.forEach(I=>{E.push(I),I.toLowerCase()===I?E.push(I.toUpperCase()):E.push(I.toLowerCase())}),E})(y),built_in:k},L=N=>N.map(E=>E.replace(/\|\d+$/,"")),T={variants:[{match:[/new/,t.concat(f,"+"),t.concat("(?!",L(k).join("\\b|"),"\\b)"),i],scope:{1:"keyword",4:"title.class"}}]},B=t.concat(r,"\\b(?!\\()"),O={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),B],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[i,t.concat(/::/,t.lookahead(/(?!class\b)/)),B],scope:{1:"title.class",3:"variable.constant"}},{match:[i,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[i,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},w={scope:"attr",match:t.concat(r,t.lookahead(":"),t.lookahead(/(?!::)/))},_={relevance:0,begin:/\(/,end:/\)/,keywords:j,contains:[w,o,O,e.C_BLOCK_COMMENT_MODE,g,x,T]},M={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",L(b).join("\\b|"),"|",L(k).join("\\b|"),"\\b)"),r,t.concat(f,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[_]};_.contains.push(M);const R=[w,O,e.C_BLOCK_COMMENT_MODE,g,x,T],D={begin:t.concat(/#\[\s*\\?/,t.either(i,s)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:y,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:y,keyword:["new","array"]},contains:["self",...R]},...R,{scope:"meta",variants:[{match:i},{match:s}]}]};return{case_insensitive:!1,keywords:j,contains:[D,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},l,{scope:"variable.language",match:/\$this\b/},o,M,O,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},T,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:j,contains:["self",D,o,O,e.C_BLOCK_COMMENT_MODE,g,x]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},g,x]}}function og(e){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}function sg(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function ag(e){const t=e.regex,n=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),r=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],l={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},u={className:"meta",begin:/^(>>>|\.\.\.) /},c={className:"subst",begin:/\{/,end:/\}/,keywords:l,illegal:/#/},d={begin:/\{\{/,relevance:0},p={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,u],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,u],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,u,d,c]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,u,d,c]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,d,c]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,d,c]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},m="[0-9](_?[0-9])*",f=`(\\b(${m}))?\\.(${m})|\\b(${m})\\.`,g=`\\b|${r.join("|")}`,x={className:"number",relevance:0,variants:[{begin:`(\\b(${m})|(${f}))[eE][+-]?(${m})[jJ]?(?=${g})`},{begin:`(${f})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${g})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${g})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${g})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${g})`},{begin:`\\b(${m})[jJ](?=${g})`}]},y={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:l,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},b={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:["self",u,x,p,e.HASH_COMMENT_MODE]}]};return c.contains=[p,x,u],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:l,illegal:/(<\/|\?)|=>/,contains:[u,x,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},p,y,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[b]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[x,b,p]}]}}function lg(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function cg(e){const t=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,r=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),i=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,s=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:n,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:n},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[i,r]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,r]},{scope:{1:"punctuation",2:"number"},match:[s,r]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,r]}]},{scope:{3:"operator"},match:[n,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:i},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:s},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function ug(e){const t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",r=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),i=t.concat(r,/(::\w+)*/),o={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},l={className:"doctag",begin:"@[A-Za-z]+"},u={begin:"#<",end:">"},c=[e.COMMENT("#","$",{contains:[l]}),e.COMMENT("^=begin","^=end",{contains:[l],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],d={className:"subst",begin:/#\{/,end:/\}/,keywords:o},p={className:"string",contains:[e.BACKSLASH_ESCAPE,d],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,d]})]}]},m="[1-9](_?[0-9])*|0",f="[0-9](_?[0-9])*",g={className:"number",relevance:0,variants:[{begin:`\\b(${m})(\\.(${f}))?([eE][+-]?(${f})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},x={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:o}]},T=[p,{variants:[{match:[/class\s+/,i,/\s+<\s+/,i]},{match:[/\b(class|module)\s+/,i]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:o},{match:[/(include|extend)\s+/,i],scope:{2:"title.class"},keywords:o},{relevance:0,match:[i,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:r,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[x]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[p,{begin:n}],relevance:0},g,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:o},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,d],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(u,c),relevance:0}].concat(u,c);d.contains=T,x.contains=T;const _=[{begin:/^\s*=>/,starts:{end:"$",contains:T}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:o,contains:T}}];return c.unshift(u),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:o,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(_).concat(c).concat(T)}}function dg(e){const t=e.regex,n=/(r#)?/,r=t.concat(n,e.UNDERSCORE_IDENT_RE),i=t.concat(n,e.IDENT_RE),s={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,i,t.lookahead(/\s*\(/))},o="([ui](8|16|32|64|128|size)|f(32|64))?",l=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],u=["true","false","Some","None","Ok","Err"],c=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],d=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:d,keyword:l,literal:u,built_in:c},illegal:""},s]}}const pg=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),fg=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],mg=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],hg=[...fg,...mg],gg=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),bg=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),xg=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),yg=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function vg(e){const t=pg(e),n=xg,r=bg,i="@[a-z-]+",s="and or not only",l={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+hg.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+r.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},l,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+yg.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,l,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:i,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:s,attribute:gg.join(" ")},contains:[{begin:i,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},l,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}function kg(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function Eg(e){const t=e.regex,n=e.COMMENT("--","$"),r={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},i={begin:/"/,end:/"/,contains:[{match:/""/}]},s=["true","false","unknown"],o=["double precision","large object","with timezone","without timezone"],l=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],u=["add","asc","collation","desc","final","first","last","view"],c=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],d=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],p=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],m=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],f=d,g=[...c,...u].filter(L=>!d.includes(L)),x={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},y={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},b={match:t.concat(/\b/,t.either(...f),/\s*\(/),relevance:0,keywords:{built_in:f}};function k(L){return t.concat(/\b/,t.either(...L.map(T=>T.replace(/\s+/,"\\s+"))),/\b/)}const C={scope:"keyword",match:k(m),relevance:0};function j(L,{exceptions:T,when:B}={}){const O=B;return T=T||[],L.map(w=>w.match(/\|\d+$/)||T.includes(w)?w:O(w)?`${w}|0`:w)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:j(g,{when:L=>L.length<3}),literal:s,type:l,built_in:p},contains:[{scope:"type",match:k(o)},C,b,x,r,i,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,y]}}function Sa(e){return e?typeof e=="string"?e:e.source:null}function dn(e){return _e("(?=",e,")")}function _e(...e){return e.map(n=>Sa(n)).join("")}function wg(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function qe(...e){return"("+(wg(e).capture?"":"?:")+e.map(r=>Sa(r)).join("|")+")"}const mi=e=>_e(/\b/,e,/\w$/.test(e)?/\b/:/\B/),_g=["Protocol","Type"].map(mi),rs=["init","self"].map(mi),Ng=["Any","Self"],Sr=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],is=["false","nil","true"],Sg=["assignment","associativity","higherThan","left","lowerThan","none","right"],Tg=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],os=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],Ta=qe(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),Ca=qe(Ta,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),Tr=_e(Ta,Ca,"*"),Aa=qe(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),Kn=qe(Aa,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),mt=_e(Aa,Kn,"*"),Pn=_e(/[A-Z]/,Kn,"*"),Cg=["attached","autoclosure",_e(/convention\(/,qe("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",_e(/objc\(/,mt,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],Ag=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function Mg(e){const t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),r=[e.C_LINE_COMMENT_MODE,n],i={match:[/\./,qe(..._g,...rs)],className:{2:"keyword"}},s={match:_e(/\./,qe(...Sr)),relevance:0},o=Sr.filter(ye=>typeof ye=="string").concat(["_|0"]),l=Sr.filter(ye=>typeof ye!="string").concat(Ng).map(mi),u={variants:[{className:"keyword",match:qe(...l,...rs)}]},c={$pattern:qe(/\b\w+/,/#\w+/),keyword:o.concat(Tg),literal:is},d=[i,s,u],p={match:_e(/\./,qe(...os)),relevance:0},m={className:"built_in",match:_e(/\b/,qe(...os),/(?=\()/)},f=[p,m],g={match:/->/,relevance:0},x={className:"operator",relevance:0,variants:[{match:Tr},{match:`\\.(\\.|${Ca})+`}]},y=[g,x],b="([0-9]_*)+",k="([0-9a-fA-F]_*)+",C={className:"number",relevance:0,variants:[{match:`\\b(${b})(\\.(${b}))?([eE][+-]?(${b}))?\\b`},{match:`\\b0x(${k})(\\.(${k}))?([pP][+-]?(${b}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},j=(ye="")=>({className:"subst",variants:[{match:_e(/\\/,ye,/[0\\tnr"']/)},{match:_e(/\\/,ye,/u\{[0-9a-fA-F]{1,8}\}/)}]}),L=(ye="")=>({className:"subst",match:_e(/\\/,ye,/[\t ]*(?:[\r\n]|\r\n)/)}),T=(ye="")=>({className:"subst",label:"interpol",begin:_e(/\\/,ye,/\(/),end:/\)/}),B=(ye="")=>({begin:_e(ye,/"""/),end:_e(/"""/,ye),contains:[j(ye),L(ye),T(ye)]}),O=(ye="")=>({begin:_e(ye,/"/),end:_e(/"/,ye),contains:[j(ye),T(ye)]}),w={className:"string",variants:[B(),B("#"),B("##"),B("###"),O(),O("#"),O("##"),O("###")]},_=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],M={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:_},R=ye=>{const lt=_e(ye,/\//),rt=_e(/\//,ye);return{begin:lt,end:rt,contains:[..._,{scope:"comment",begin:`#(?!.*${rt})`,end:/$/}]}},D={scope:"regexp",variants:[R("###"),R("##"),R("#"),M]},N={match:_e(/`/,mt,/`/)},E={className:"variable",match:/\$\d+/},I={className:"variable",match:`\\$${Kn}+`},G=[N,E,I],H={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:Ag,contains:[...y,C,w]}]}},V={scope:"keyword",match:_e(/@/,qe(...Cg),dn(qe(/\(/,/\s+/)))},h={scope:"meta",match:_e(/@/,mt)},F=[H,V,h],$={match:dn(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:_e(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,Kn,"+")},{className:"type",match:Pn,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:_e(/\s+&\s+/,dn(Pn)),relevance:0}]},v={begin://,keywords:c,contains:[...r,...d,...F,g,$]};$.contains.push(v);const ie={match:_e(mt,/\s*:/),keywords:"_|0",relevance:0},W={begin:/\(/,end:/\)/,relevance:0,keywords:c,contains:["self",ie,...r,D,...d,...f,...y,C,w,...G,...F,$]},U={begin://,keywords:"repeat each",contains:[...r,$]},re={begin:qe(dn(_e(mt,/\s*:/)),dn(_e(mt,/\s+/,mt,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:mt}]},de={begin:/\(/,end:/\)/,keywords:c,contains:[re,...r,...d,...y,C,w,...F,$,W],endsParent:!0,illegal:/["']/},be={match:[/(func|macro)/,/\s+/,qe(N.match,mt,Tr)],className:{1:"keyword",3:"title.function"},contains:[U,de,t],illegal:[/\[/,/%/]},Oe={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[U,de,t],illegal:/\[|%/},Ie={match:[/operator/,/\s+/,Tr],className:{1:"keyword",3:"title"}},at={begin:[/precedencegroup/,/\s+/,Pn],className:{1:"keyword",3:"title"},contains:[$],keywords:[...Sg,...is],end:/}/},St={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},Pt={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},yt={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,mt,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:c,contains:[U,...d,{begin:/:/,end:/\{/,keywords:c,contains:[{scope:"title.class.inherited",match:Pn},...d],relevance:0}]};for(const ye of w.variants){const lt=ye.contains.find(vt=>vt.label==="interpol");lt.keywords=c;const rt=[...d,...f,...y,C,w,...G];lt.contains=[...rt,{begin:/\(/,end:/\)/,contains:["self",...rt]}]}return{name:"Swift",keywords:c,contains:[...r,be,Oe,St,Pt,yt,Ie,at,{beginKeywords:"import",end:/$/,contains:[...r],relevance:0},D,...d,...f,...y,C,w,...G,...F,$,W]}}const Gn="[A-Za-z$_][0-9A-Za-z$_]*",Ma=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],Ia=["true","false","null","undefined","NaN","Infinity"],Ra=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],Oa=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],La=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],ja=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Da=[].concat(La,Ra,Oa);function Ig(e){const t=e.regex,n=(H,{after:V})=>{const h="",end:""},s=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(H,V)=>{const h=H[0].length+H.index,F=H.input[h];if(F==="<"||F===","){V.ignoreMatch();return}F===">"&&(n(H,{after:h})||V.ignoreMatch());let $;const v=H.input.substring(h);if($=v.match(/^\s*=/)){V.ignoreMatch();return}if(($=v.match(/^\s+extends\s+/))&&$.index===0){V.ignoreMatch();return}}},l={$pattern:Gn,keyword:Ma,literal:Ia,built_in:Da,"variable.language":ja},u="[0-9](_?[0-9])*",c=`\\.(${u})`,d="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",p={className:"number",variants:[{begin:`(\\b(${d})((${c})|\\.)?|(${c}))[eE][+-]?(${u})\\b`},{begin:`\\b(${d})\\b((${c})\\b|\\.)?|(${c})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},m={className:"subst",begin:"\\$\\{",end:"\\}",keywords:l,contains:[]},f={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,m],subLanguage:"xml"}},g={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,m],subLanguage:"css"}},x={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,m],subLanguage:"graphql"}},y={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,m]},k={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},C=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,f,g,x,y,{match:/\$\d+/},p];m.contains=C.concat({begin:/\{/,end:/\}/,keywords:l,contains:["self"].concat(C)});const j=[].concat(k,m.contains),L=j.concat([{begin:/(\s*)\(/,end:/\)/,keywords:l,contains:["self"].concat(j)}]),T={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:L},B={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},O={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...Ra,...Oa]}},w={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},_={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[T],illegal:/%/},M={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function R(H){return t.concat("(?!",H.join("|"),")")}const D={match:t.concat(/\b/,R([...La,"super","import"].map(H=>`${H}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},N={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},E={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},T]},I="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",G={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(I)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[T]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:l,exports:{PARAMS_CONTAINS:L,CLASS_REFERENCE:O},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),w,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,f,g,x,y,k,{match:/\$\d+/},p,O,{scope:"attr",match:r+t.lookahead(":"),relevance:0},G,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[k,e.REGEXP_MODE,{className:"function",begin:I,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:L}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:s},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0,contains:["self"]}]}]},_,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[T,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},N,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[T]},D,M,B,E,{match:/\$[(.]/}]}}function Rg(e){const t=e.regex,n=Ig(e),r=Gn,i=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],s={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},o={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:i},contains:[n.exports.CLASS_REFERENCE]},l={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},u=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],c={$pattern:Gn,keyword:Ma.concat(u),literal:Ia,built_in:Da.concat(i),"variable.language":ja},d={className:"meta",begin:"@"+r},p=(x,y,b)=>{const k=x.contains.findIndex(C=>C.label===y);if(k===-1)throw new Error("can not find mode to replace");x.contains.splice(k,1,b)};Object.assign(n.keywords,c),n.exports.PARAMS_CONTAINS.push(d);const m=n.contains.find(x=>x.scope==="attr"),f=Object.assign({},m,{match:t.concat(r,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,m,f]),n.contains=n.contains.concat([d,s,o,f]),p(n,"shebang",e.SHEBANG()),p(n,"use_strict",l);const g=n.contains.find(x=>x.label==="func.def");return g.relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n}function Og(e){const t=e.regex,n={className:"string",begin:/"(""|[^/n])"C\b/},r={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},i=/\d{1,2}\/\d{1,2}\/\d{4}/,s=/\d{4}-\d{1,2}-\d{1,2}/,o=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,l=/\d{1,2}(:\d{1,2}){1,2}/,u={className:"literal",variants:[{begin:t.concat(/# */,t.either(s,i),/ *#/)},{begin:t.concat(/# */,l,/ *#/)},{begin:t.concat(/# */,o,/ *#/)},{begin:t.concat(/# */,t.either(s,i),/ +/,t.either(o,l),/ *#/)}]},c={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},d={className:"label",begin:/^\w+:/},p=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),m=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[n,r,u,c,d,p,m,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[m]}]}}function Lg(e){e.regex;const t=e.COMMENT(/\(;/,/;\)/);t.contains.push("self");const n=e.COMMENT(/;;/,/$/),r=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],i={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},s={className:"variable",begin:/\$[\w_]+/},o={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},l={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},u={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},c={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:r},contains:[n,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},s,o,i,e.QUOTE_STRING_MODE,u,c,l]}}function jg(e){const t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,i={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},s={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},o=e.inherit(s,{begin:/\(/,end:/\)/}),l=e.inherit(e.APOS_STRING_MODE,{className:"string"}),u=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),c={endsWithParent:!0,illegal:/`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin://,relevance:10,contains:[s,u,l,o,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin://,contains:[s,o,u,l]}]}]},e.COMMENT(//,{relevance:10}),{begin://,relevance:10},i,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[u]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/)/,end:/>/,keywords:{name:"style"},contains:[c],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/)/,end:/>/,keywords:{name:"script"},contains:[c],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(//,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:c}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function Dg(e){const t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",r={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},i={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},s={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},o={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,i]},l=e.inherit(o,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),m={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},f={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},g={begin:/\{/,end:/\}/,contains:[f],illegal:"\\n",relevance:0},x={begin:"\\[",end:"\\]",contains:[f],illegal:"\\n",relevance:0},y=[r,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},m,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},g,x,s,o],b=[...y];return b.pop(),b.push(l),f.contains=b,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:y}}const Pg={arduino:xh,bash:yh,c:vh,cpp:kh,csharp:Eh,css:Ih,diff:Rh,go:Oh,graphql:Lh,ini:jh,java:Dh,javascript:$h,json:Uh,kotlin:Wh,less:Jh,lua:Qh,makefile:eg,markdown:tg,objectivec:ng,perl:rg,php:ig,"php-template":og,plaintext:sg,python:ag,"python-repl":lg,r:cg,ruby:ug,rust:dg,scss:vg,shell:kg,sql:Eg,swift:Mg,typescript:Rg,vbnet:Og,wasm:Lg,xml:jg,yaml:Dg};var Cr,ss;function Bg(){if(ss)return Cr;ss=1;function e(A){return A instanceof Map?A.clear=A.delete=A.set=function(){throw new Error("map is read-only")}:A instanceof Set&&(A.add=A.clear=A.delete=function(){throw new Error("set is read-only")}),Object.freeze(A),Object.getOwnPropertyNames(A).forEach(z=>{const X=A[z],ce=typeof X;(ce==="object"||ce==="function")&&!Object.isFrozen(X)&&e(X)}),A}class t{constructor(z){z.data===void 0&&(z.data={}),this.data=z.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(A){return A.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function r(A,...z){const X=Object.create(null);for(const ce in A)X[ce]=A[ce];return z.forEach(function(ce){for(const Le in ce)X[Le]=ce[Le]}),X}const i="",s=A=>!!A.scope,o=(A,{prefix:z})=>{if(A.startsWith("language:"))return A.replace("language:","language-");if(A.includes(".")){const X=A.split(".");return[`${z}${X.shift()}`,...X.map((ce,Le)=>`${ce}${"_".repeat(Le+1)}`)].join(" ")}return`${z}${A}`};class l{constructor(z,X){this.buffer="",this.classPrefix=X.classPrefix,z.walk(this)}addText(z){this.buffer+=n(z)}openNode(z){if(!s(z))return;const X=o(z.scope,{prefix:this.classPrefix});this.span(X)}closeNode(z){s(z)&&(this.buffer+=i)}value(){return this.buffer}span(z){this.buffer+=``}}const u=(A={})=>{const z={children:[]};return Object.assign(z,A),z};class c{constructor(){this.rootNode=u(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(z){this.top.children.push(z)}openNode(z){const X=u({scope:z});this.add(X),this.stack.push(X)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(z){return this.constructor._walk(z,this.rootNode)}static _walk(z,X){return typeof X=="string"?z.addText(X):X.children&&(z.openNode(X),X.children.forEach(ce=>this._walk(z,ce)),z.closeNode(X)),z}static _collapse(z){typeof z!="string"&&z.children&&(z.children.every(X=>typeof X=="string")?z.children=[z.children.join("")]:z.children.forEach(X=>{c._collapse(X)}))}}class d extends c{constructor(z){super(),this.options=z}addText(z){z!==""&&this.add(z)}startScope(z){this.openNode(z)}endScope(){this.closeNode()}__addSublanguage(z,X){const ce=z.root;X&&(ce.scope=`language:${X}`),this.add(ce)}toHTML(){return new l(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function p(A){return A?typeof A=="string"?A:A.source:null}function m(A){return x("(?=",A,")")}function f(A){return x("(?:",A,")*")}function g(A){return x("(?:",A,")?")}function x(...A){return A.map(X=>p(X)).join("")}function y(A){const z=A[A.length-1];return typeof z=="object"&&z.constructor===Object?(A.splice(A.length-1,1),z):{}}function b(...A){return"("+(y(A).capture?"":"?:")+A.map(ce=>p(ce)).join("|")+")"}function k(A){return new RegExp(A.toString()+"|").exec("").length-1}function C(A,z){const X=A&&A.exec(z);return X&&X.index===0}const j=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function L(A,{joinWith:z}){let X=0;return A.map(ce=>{X+=1;const Le=X;let je=p(ce),te="";for(;je.length>0;){const Q=j.exec(je);if(!Q){te+=je;break}te+=je.substring(0,Q.index),je=je.substring(Q.index+Q[0].length),Q[0][0]==="\\"&&Q[1]?te+="\\"+String(Number(Q[1])+Le):(te+=Q[0],Q[0]==="("&&X++)}return te}).map(ce=>`(${ce})`).join(z)}const T=/\b\B/,B="[a-zA-Z]\\w*",O="[a-zA-Z_]\\w*",w="\\b\\d+(\\.\\d+)?",_="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",M="\\b(0b[01]+)",R="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",D=(A={})=>{const z=/^#![ ]*\//;return A.binary&&(A.begin=x(z,/.*\b/,A.binary,/\b.*/)),r({scope:"meta",begin:z,end:/$/,relevance:0,"on:begin":(X,ce)=>{X.index!==0&&ce.ignoreMatch()}},A)},N={begin:"\\\\[\\s\\S]",relevance:0},E={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[N]},I={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[N]},G={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},H=function(A,z,X={}){const ce=r({scope:"comment",begin:A,end:z,contains:[]},X);ce.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const Le=b("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return ce.contains.push({begin:x(/[ ]+/,"(",Le,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),ce},V=H("//","$"),h=H("/\\*","\\*/"),F=H("#","$"),$={scope:"number",begin:w,relevance:0},v={scope:"number",begin:_,relevance:0},ie={scope:"number",begin:M,relevance:0},W={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[N,{begin:/\[/,end:/\]/,relevance:0,contains:[N]}]},U={scope:"title",begin:B,relevance:0},re={scope:"title",begin:O,relevance:0},de={begin:"\\.\\s*"+O,relevance:0};var Oe=Object.freeze({__proto__:null,APOS_STRING_MODE:E,BACKSLASH_ESCAPE:N,BINARY_NUMBER_MODE:ie,BINARY_NUMBER_RE:M,COMMENT:H,C_BLOCK_COMMENT_MODE:h,C_LINE_COMMENT_MODE:V,C_NUMBER_MODE:v,C_NUMBER_RE:_,END_SAME_AS_BEGIN:function(A){return Object.assign(A,{"on:begin":(z,X)=>{X.data._beginMatch=z[1]},"on:end":(z,X)=>{X.data._beginMatch!==z[1]&&X.ignoreMatch()}})},HASH_COMMENT_MODE:F,IDENT_RE:B,MATCH_NOTHING_RE:T,METHOD_GUARD:de,NUMBER_MODE:$,NUMBER_RE:w,PHRASAL_WORDS_MODE:G,QUOTE_STRING_MODE:I,REGEXP_MODE:W,RE_STARTERS_RE:R,SHEBANG:D,TITLE_MODE:U,UNDERSCORE_IDENT_RE:O,UNDERSCORE_TITLE_MODE:re});function Ie(A,z){A.input[A.index-1]==="."&&z.ignoreMatch()}function at(A,z){A.className!==void 0&&(A.scope=A.className,delete A.className)}function St(A,z){z&&A.beginKeywords&&(A.begin="\\b("+A.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",A.__beforeBegin=Ie,A.keywords=A.keywords||A.beginKeywords,delete A.beginKeywords,A.relevance===void 0&&(A.relevance=0))}function Pt(A,z){Array.isArray(A.illegal)&&(A.illegal=b(...A.illegal))}function yt(A,z){if(A.match){if(A.begin||A.end)throw new Error("begin & end are not supported with match");A.begin=A.match,delete A.match}}function ye(A,z){A.relevance===void 0&&(A.relevance=1)}const lt=(A,z)=>{if(!A.beforeMatch)return;if(A.starts)throw new Error("beforeMatch cannot be used with starts");const X=Object.assign({},A);Object.keys(A).forEach(ce=>{delete A[ce]}),A.keywords=X.keywords,A.begin=x(X.beforeMatch,m(X.begin)),A.starts={relevance:0,contains:[Object.assign(X,{endsParent:!0})]},A.relevance=0,delete X.beforeMatch},rt=["of","and","for","in","not","or","if","then","parent","list","value"],vt="keyword";function Bt(A,z,X=vt){const ce=Object.create(null);return typeof A=="string"?Le(X,A.split(" ")):Array.isArray(A)?Le(X,A):Object.keys(A).forEach(function(je){Object.assign(ce,Bt(A[je],z,je))}),ce;function Le(je,te){z&&(te=te.map(Q=>Q.toLowerCase())),te.forEach(function(Q){const le=Q.split("|");ce[le[0]]=[je,qt(le[0],le[1])]})}}function qt(A,z){return z?Number(z):J(A)?0:1}function J(A){return rt.includes(A.toLowerCase())}const he={},Re=A=>{console.error(A)},fe=(A,...z)=>{console.log(`WARN: ${A}`,...z)},P=(A,z)=>{he[`${A}/${z}`]||(console.log(`Deprecated as of ${A}. ${z}`),he[`${A}/${z}`]=!0)},K=new Error;function ee(A,z,{key:X}){let ce=0;const Le=A[X],je={},te={};for(let Q=1;Q<=z.length;Q++)te[Q+ce]=Le[Q],je[Q+ce]=!0,ce+=k(z[Q-1]);A[X]=te,A[X]._emit=je,A[X]._multi=!0}function ae(A){if(Array.isArray(A.begin)){if(A.skip||A.excludeBegin||A.returnBegin)throw Re("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),K;if(typeof A.beginScope!="object"||A.beginScope===null)throw Re("beginScope must be object"),K;ee(A,A.begin,{key:"beginScope"}),A.begin=L(A.begin,{joinWith:""})}}function Ee(A){if(Array.isArray(A.end)){if(A.skip||A.excludeEnd||A.returnEnd)throw Re("skip, excludeEnd, returnEnd not compatible with endScope: {}"),K;if(typeof A.endScope!="object"||A.endScope===null)throw Re("endScope must be object"),K;ee(A,A.end,{key:"endScope"}),A.end=L(A.end,{joinWith:""})}}function Ke(A){A.scope&&typeof A.scope=="object"&&A.scope!==null&&(A.beginScope=A.scope,delete A.scope)}function kt(A){Ke(A),typeof A.beginScope=="string"&&(A.beginScope={_wrap:A.beginScope}),typeof A.endScope=="string"&&(A.endScope={_wrap:A.endScope}),ae(A),Ee(A)}function ct(A){function z(te,Q){return new RegExp(p(te),"m"+(A.case_insensitive?"i":"")+(A.unicodeRegex?"u":"")+(Q?"g":""))}class X{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(Q,le){le.position=this.position++,this.matchIndexes[this.matchAt]=le,this.regexes.push([le,Q]),this.matchAt+=k(Q)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const Q=this.regexes.map(le=>le[1]);this.matcherRe=z(L(Q,{joinWith:"|"}),!0),this.lastIndex=0}exec(Q){this.matcherRe.lastIndex=this.lastIndex;const le=this.matcherRe.exec(Q);if(!le)return null;const Fe=le.findIndex((sn,nr)=>nr>0&&sn!==void 0),De=this.matchIndexes[Fe];return le.splice(0,Fe),Object.assign(le,De)}}class ce{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(Q){if(this.multiRegexes[Q])return this.multiRegexes[Q];const le=new X;return this.rules.slice(Q).forEach(([Fe,De])=>le.addRule(Fe,De)),le.compile(),this.multiRegexes[Q]=le,le}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(Q,le){this.rules.push([Q,le]),le.type==="begin"&&this.count++}exec(Q){const le=this.getMatcher(this.regexIndex);le.lastIndex=this.lastIndex;let Fe=le.exec(Q);if(this.resumingScanAtSamePosition()&&!(Fe&&Fe.index===this.lastIndex)){const De=this.getMatcher(0);De.lastIndex=this.lastIndex+1,Fe=De.exec(Q)}return Fe&&(this.regexIndex+=Fe.position+1,this.regexIndex===this.count&&this.considerAll()),Fe}}function Le(te){const Q=new ce;return te.contains.forEach(le=>Q.addRule(le.begin,{rule:le,type:"begin"})),te.terminatorEnd&&Q.addRule(te.terminatorEnd,{type:"end"}),te.illegal&&Q.addRule(te.illegal,{type:"illegal"}),Q}function je(te,Q){const le=te;if(te.isCompiled)return le;[at,yt,kt,lt].forEach(De=>De(te,Q)),A.compilerExtensions.forEach(De=>De(te,Q)),te.__beforeBegin=null,[St,Pt,ye].forEach(De=>De(te,Q)),te.isCompiled=!0;let Fe=null;return typeof te.keywords=="object"&&te.keywords.$pattern&&(te.keywords=Object.assign({},te.keywords),Fe=te.keywords.$pattern,delete te.keywords.$pattern),Fe=Fe||/\w+/,te.keywords&&(te.keywords=Bt(te.keywords,A.case_insensitive)),le.keywordPatternRe=z(Fe,!0),Q&&(te.begin||(te.begin=/\B|\b/),le.beginRe=z(le.begin),!te.end&&!te.endsWithParent&&(te.end=/\B|\b/),te.end&&(le.endRe=z(le.end)),le.terminatorEnd=p(le.end)||"",te.endsWithParent&&Q.terminatorEnd&&(le.terminatorEnd+=(te.end?"|":"")+Q.terminatorEnd)),te.illegal&&(le.illegalRe=z(te.illegal)),te.contains||(te.contains=[]),te.contains=[].concat(...te.contains.map(function(De){return Ft(De==="self"?te:De)})),te.contains.forEach(function(De){je(De,le)}),te.starts&&je(te.starts,Q),le.matcher=Le(le),le}if(A.compilerExtensions||(A.compilerExtensions=[]),A.contains&&A.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return A.classNameAliases=r(A.classNameAliases||{}),je(A)}function Tt(A){return A?A.endsWithParent||Tt(A.starts):!1}function Ft(A){return A.variants&&!A.cachedVariants&&(A.cachedVariants=A.variants.map(function(z){return r(A,{variants:null},z)})),A.cachedVariants?A.cachedVariants:Tt(A)?r(A,{starts:A.starts?r(A.starts):null}):Object.isFrozen(A)?r(A):A}var Ge="11.11.1";class Ct extends Error{constructor(z,X){super(z),this.name="HTMLInjectionError",this.html=X}}const Ze=n,xi=r,yi=Symbol("nomatch"),sl=7,vi=function(A){const z=Object.create(null),X=Object.create(null),ce=[];let Le=!0;const je="Could not find the language '{}', did you forget to load/include a language module?",te={disableAutodetect:!0,name:"Plain text",contains:[]};let Q={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:d};function le(Y){return Q.noHighlightRe.test(Y)}function Fe(Y){let oe=Y.className+" ";oe+=Y.parentNode?Y.parentNode.className:"";const xe=Q.languageDetectRe.exec(oe);if(xe){const Se=At(xe[1]);return Se||(fe(je.replace("{}",xe[1])),fe("Falling back to no-highlight mode for this block.",Y)),Se?xe[1]:"no-highlight"}return oe.split(/\s+/).find(Se=>le(Se)||At(Se))}function De(Y,oe,xe){let Se="",Be="";typeof oe=="object"?(Se=Y,xe=oe.ignoreIllegals,Be=oe.language):(P("10.7.0","highlight(lang, code, ...args) has been deprecated."),P("10.7.0",`Please use highlight(code, options) instead. -https://github.com/highlightjs/highlight.js/issues/2277`),Be=Y,Se=oe),xe===void 0&&(xe=!0);const ut={code:Se,language:Be};wn("before:highlight",ut);const Mt=ut.result?ut.result:sn(ut.language,ut.code,xe);return Mt.code=ut.code,wn("after:highlight",Mt),Mt}function sn(Y,oe,xe,Se){const Be=Object.create(null);function ut(Z,ne){return Z.keywords[ne]}function Mt(){if(!ue.keywords){ze.addText(Te);return}let Z=0;ue.keywordPatternRe.lastIndex=0;let ne=ue.keywordPatternRe.exec(Te),me="";for(;ne;){me+=Te.substring(Z,ne.index);const we=ft.case_insensitive?ne[0].toLowerCase():ne[0],Ue=ut(ue,we);if(Ue){const[Et,wl]=Ue;if(ze.addText(me),me="",Be[we]=(Be[we]||0)+1,Be[we]<=sl&&(Sn+=wl),Et.startsWith("_"))me+=ne[0];else{const _l=ft.classNameAliases[Et]||Et;pt(ne[0],_l)}}else me+=ne[0];Z=ue.keywordPatternRe.lastIndex,ne=ue.keywordPatternRe.exec(Te)}me+=Te.substring(Z),ze.addText(me)}function _n(){if(Te==="")return;let Z=null;if(typeof ue.subLanguage=="string"){if(!z[ue.subLanguage]){ze.addText(Te);return}Z=sn(ue.subLanguage,Te,!0,Ci[ue.subLanguage]),Ci[ue.subLanguage]=Z._top}else Z=rr(Te,ue.subLanguage.length?ue.subLanguage:null);ue.relevance>0&&(Sn+=Z.relevance),ze.__addSublanguage(Z._emitter,Z.language)}function Je(){ue.subLanguage!=null?_n():Mt(),Te=""}function pt(Z,ne){Z!==""&&(ze.startScope(ne),ze.addText(Z),ze.endScope())}function _i(Z,ne){let me=1;const we=ne.length-1;for(;me<=we;){if(!Z._emit[me]){me++;continue}const Ue=ft.classNameAliases[Z[me]]||Z[me],Et=ne[me];Ue?pt(Et,Ue):(Te=Et,Mt(),Te=""),me++}}function Ni(Z,ne){return Z.scope&&typeof Z.scope=="string"&&ze.openNode(ft.classNameAliases[Z.scope]||Z.scope),Z.beginScope&&(Z.beginScope._wrap?(pt(Te,ft.classNameAliases[Z.beginScope._wrap]||Z.beginScope._wrap),Te=""):Z.beginScope._multi&&(_i(Z.beginScope,ne),Te="")),ue=Object.create(Z,{parent:{value:ue}}),ue}function Si(Z,ne,me){let we=C(Z.endRe,me);if(we){if(Z["on:end"]){const Ue=new t(Z);Z["on:end"](ne,Ue),Ue.isMatchIgnored&&(we=!1)}if(we){for(;Z.endsParent&&Z.parent;)Z=Z.parent;return Z}}if(Z.endsWithParent)return Si(Z.parent,ne,me)}function xl(Z){return ue.matcher.regexIndex===0?(Te+=Z[0],1):(ar=!0,0)}function yl(Z){const ne=Z[0],me=Z.rule,we=new t(me),Ue=[me.__beforeBegin,me["on:begin"]];for(const Et of Ue)if(Et&&(Et(Z,we),we.isMatchIgnored))return xl(ne);return me.skip?Te+=ne:(me.excludeBegin&&(Te+=ne),Je(),!me.returnBegin&&!me.excludeBegin&&(Te=ne)),Ni(me,Z),me.returnBegin?0:ne.length}function vl(Z){const ne=Z[0],me=oe.substring(Z.index),we=Si(ue,Z,me);if(!we)return yi;const Ue=ue;ue.endScope&&ue.endScope._wrap?(Je(),pt(ne,ue.endScope._wrap)):ue.endScope&&ue.endScope._multi?(Je(),_i(ue.endScope,Z)):Ue.skip?Te+=ne:(Ue.returnEnd||Ue.excludeEnd||(Te+=ne),Je(),Ue.excludeEnd&&(Te=ne));do ue.scope&&ze.closeNode(),!ue.skip&&!ue.subLanguage&&(Sn+=ue.relevance),ue=ue.parent;while(ue!==we.parent);return we.starts&&Ni(we.starts,Z),Ue.returnEnd?0:ne.length}function kl(){const Z=[];for(let ne=ue;ne!==ft;ne=ne.parent)ne.scope&&Z.unshift(ne.scope);Z.forEach(ne=>ze.openNode(ne))}let Nn={};function Ti(Z,ne){const me=ne&&ne[0];if(Te+=Z,me==null)return Je(),0;if(Nn.type==="begin"&&ne.type==="end"&&Nn.index===ne.index&&me===""){if(Te+=oe.slice(ne.index,ne.index+1),!Le){const we=new Error(`0 width match regex (${Y})`);throw we.languageName=Y,we.badRule=Nn.rule,we}return 1}if(Nn=ne,ne.type==="begin")return yl(ne);if(ne.type==="illegal"&&!xe){const we=new Error('Illegal lexeme "'+me+'" for mode "'+(ue.scope||"")+'"');throw we.mode=ue,we}else if(ne.type==="end"){const we=vl(ne);if(we!==yi)return we}if(ne.type==="illegal"&&me==="")return Te+=` -`,1;if(sr>1e5&&sr>ne.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Te+=me,me.length}const ft=At(Y);if(!ft)throw Re(je.replace("{}",Y)),new Error('Unknown language: "'+Y+'"');const El=ct(ft);let or="",ue=Se||El;const Ci={},ze=new Q.__emitter(Q);kl();let Te="",Sn=0,zt=0,sr=0,ar=!1;try{if(ft.__emitTokens)ft.__emitTokens(oe,ze);else{for(ue.matcher.considerAll();;){sr++,ar?ar=!1:ue.matcher.considerAll(),ue.matcher.lastIndex=zt;const Z=ue.matcher.exec(oe);if(!Z)break;const ne=oe.substring(zt,Z.index),me=Ti(ne,Z);zt=Z.index+me}Ti(oe.substring(zt))}return ze.finalize(),or=ze.toHTML(),{language:Y,value:or,relevance:Sn,illegal:!1,_emitter:ze,_top:ue}}catch(Z){if(Z.message&&Z.message.includes("Illegal"))return{language:Y,value:Ze(oe),illegal:!0,relevance:0,_illegalBy:{message:Z.message,index:zt,context:oe.slice(zt-100,zt+100),mode:Z.mode,resultSoFar:or},_emitter:ze};if(Le)return{language:Y,value:Ze(oe),illegal:!1,relevance:0,errorRaised:Z,_emitter:ze,_top:ue};throw Z}}function nr(Y){const oe={value:Ze(Y),illegal:!1,relevance:0,_top:te,_emitter:new Q.__emitter(Q)};return oe._emitter.addText(Y),oe}function rr(Y,oe){oe=oe||Q.languages||Object.keys(z);const xe=nr(Y),Se=oe.filter(At).filter(wi).map(Je=>sn(Je,Y,!1));Se.unshift(xe);const Be=Se.sort((Je,pt)=>{if(Je.relevance!==pt.relevance)return pt.relevance-Je.relevance;if(Je.language&&pt.language){if(At(Je.language).supersetOf===pt.language)return 1;if(At(pt.language).supersetOf===Je.language)return-1}return 0}),[ut,Mt]=Be,_n=ut;return _n.secondBest=Mt,_n}function al(Y,oe,xe){const Se=oe&&X[oe]||xe;Y.classList.add("hljs"),Y.classList.add(`language-${Se}`)}function ir(Y){let oe=null;const xe=Fe(Y);if(le(xe))return;if(wn("before:highlightElement",{el:Y,language:xe}),Y.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",Y);return}if(Y.children.length>0&&(Q.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(Y)),Q.throwUnescapedHTML))throw new Ct("One of your code blocks includes unescaped HTML.",Y.innerHTML);oe=Y;const Se=oe.textContent,Be=xe?De(Se,{language:xe,ignoreIllegals:!0}):rr(Se);Y.innerHTML=Be.value,Y.dataset.highlighted="yes",al(Y,xe,Be.language),Y.result={language:Be.language,re:Be.relevance,relevance:Be.relevance},Be.secondBest&&(Y.secondBest={language:Be.secondBest.language,relevance:Be.secondBest.relevance}),wn("after:highlightElement",{el:Y,result:Be,text:Se})}function ll(Y){Q=xi(Q,Y)}const cl=()=>{En(),P("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function ul(){En(),P("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let ki=!1;function En(){function Y(){En()}if(document.readyState==="loading"){ki||window.addEventListener("DOMContentLoaded",Y,!1),ki=!0;return}document.querySelectorAll(Q.cssSelector).forEach(ir)}function dl(Y,oe){let xe=null;try{xe=oe(A)}catch(Se){if(Re("Language definition for '{}' could not be registered.".replace("{}",Y)),Le)Re(Se);else throw Se;xe=te}xe.name||(xe.name=Y),z[Y]=xe,xe.rawDefinition=oe.bind(null,A),xe.aliases&&Ei(xe.aliases,{languageName:Y})}function pl(Y){delete z[Y];for(const oe of Object.keys(X))X[oe]===Y&&delete X[oe]}function fl(){return Object.keys(z)}function At(Y){return Y=(Y||"").toLowerCase(),z[Y]||z[X[Y]]}function Ei(Y,{languageName:oe}){typeof Y=="string"&&(Y=[Y]),Y.forEach(xe=>{X[xe.toLowerCase()]=oe})}function wi(Y){const oe=At(Y);return oe&&!oe.disableAutodetect}function ml(Y){Y["before:highlightBlock"]&&!Y["before:highlightElement"]&&(Y["before:highlightElement"]=oe=>{Y["before:highlightBlock"](Object.assign({block:oe.el},oe))}),Y["after:highlightBlock"]&&!Y["after:highlightElement"]&&(Y["after:highlightElement"]=oe=>{Y["after:highlightBlock"](Object.assign({block:oe.el},oe))})}function hl(Y){ml(Y),ce.push(Y)}function gl(Y){const oe=ce.indexOf(Y);oe!==-1&&ce.splice(oe,1)}function wn(Y,oe){const xe=Y;ce.forEach(function(Se){Se[xe]&&Se[xe](oe)})}function bl(Y){return P("10.7.0","highlightBlock will be removed entirely in v12.0"),P("10.7.0","Please use highlightElement now."),ir(Y)}Object.assign(A,{highlight:De,highlightAuto:rr,highlightAll:En,highlightElement:ir,highlightBlock:bl,configure:ll,initHighlighting:cl,initHighlightingOnLoad:ul,registerLanguage:dl,unregisterLanguage:pl,listLanguages:fl,getLanguage:At,registerAliases:Ei,autoDetection:wi,inherit:xi,addPlugin:hl,removePlugin:gl}),A.debugMode=function(){Le=!1},A.safeMode=function(){Le=!0},A.versionString=Ge,A.regex={concat:x,lookahead:m,either:b,optional:g,anyNumberOfTimes:f};for(const Y in Oe)typeof Oe[Y]=="object"&&e(Oe[Y]);return Object.assign(A,Oe),A},Vt=vi({});return Vt.newInstance=()=>vi({}),Cr=Vt,Vt.HighlightJS=Vt,Vt.default=Vt,Cr}var Fg=Bg();const zg=Vr(Fg),as={},$g="hljs-";function Ug(e){const t=zg.newInstance();return e&&s(e),{highlight:n,highlightAuto:r,listLanguages:i,register:s,registerAlias:o,registered:l};function n(u,c,d){const p=d||as,m=typeof p.prefix=="string"?p.prefix:$g;if(!t.getLanguage(u))throw new Error("Unknown language: `"+u+"` is not registered");t.configure({__emitter:Hg,classPrefix:m});const f=t.highlight(c,{ignoreIllegals:!0,language:u});if(f.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:f.errorRaised});const g=f._emitter.root,x=g.data;return x.language=f.language,x.relevance=f.relevance,g}function r(u,c){const p=(c||as).subset||i();let m=-1,f=0,g;for(;++mf&&(f=y.data.relevance,g=y)}return g||{type:"root",children:[],data:{language:void 0,relevance:f}}}function i(){return t.listLanguages()}function s(u,c){if(typeof u=="string")t.registerLanguage(u,c);else{let d;for(d in u)Object.hasOwn(u,d)&&t.registerLanguage(d,u[d])}}function o(u,c){if(typeof u=="string")t.registerAliases(typeof c=="string"?c:[...c],{languageName:u});else{let d;for(d in u)if(Object.hasOwn(u,d)){const p=u[d];t.registerAliases(typeof p=="string"?p:[...p],{languageName:d})}}}function l(u){return!!t.getLanguage(u)}}class Hg{constructor(t){this.options=t,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(t){if(t==="")return;const n=this.stack[this.stack.length-1],r=n.children[n.children.length-1];r&&r.type==="text"?r.value+=t:n.children.push({type:"text",value:t})}startScope(t){this.openNode(String(t))}endScope(){this.closeNode()}__addSublanguage(t,n){const r=this.stack[this.stack.length-1],i=t.root.children;n?r.children.push({type:"element",tagName:"span",properties:{className:[n]},children:i}):r.children.push(...i)}openNode(t){const n=this,r=t.split(".").map(function(o,l){return l?o+"_".repeat(l):n.options.classPrefix+o}),i=this.stack[this.stack.length-1],s={type:"element",tagName:"span",properties:{className:r},children:[]};i.children.push(s),this.stack.push(s)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const Wg={};function Kg(e){const t=e||Wg,n=t.aliases,r=t.detect||!1,i=t.languages||Pg,s=t.plainText,o=t.prefix,l=t.subset;let u="hljs";const c=Ug(i);if(n&&c.registerAlias(n),o){const d=o.indexOf("-");u=d===-1?o:o.slice(0,d)}return function(d,p){tr(d,"element",function(m,f,g){if(m.tagName!=="code"||!g||g.type!=="element"||g.tagName!=="pre")return;const x=Gg(m);if(x===!1||!x&&!r||x&&s&&s.includes(x))return;Array.isArray(m.properties.className)||(m.properties.className=[]),m.properties.className.includes(u)||m.properties.className.unshift(u);const y=uh(m,{whitespace:"pre"});let b;try{b=x?c.highlight(x,y,{prefix:o}):c.highlightAuto(y,{prefix:o,subset:l})}catch(k){const C=k;if(x&&/Unknown language/.test(C.message)){p.message("Cannot highlight as `"+x+"`, it’s not registered",{ancestors:[g,m],cause:C,place:m.position,ruleId:"missing-language",source:"rehype-highlight"});return}throw C}!x&&b.data&&b.data.language&&m.properties.className.push("language-"+b.data.language),b.children.length>0&&(m.children=b.children)})}}function Gg(e){const t=e.properties.className;let n=-1;if(!Array.isArray(t))return;let r;for(;++n0?{type:"text",value:T}:void 0),T===!1?m.lastIndex=j+1:(g!==j&&k.push({type:"text",value:c.value.slice(g,j)}),Array.isArray(T)?k.push(...T):T&&k.push(T),g=j+C[0].length,b=!0),!m.global)break;C=m.exec(c.value)}return b?(g?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=ls(e,"(");let s=ls(e,")");for(;r!==-1&&i>s;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),s++;return[e,n]}function Pa(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Wt(n)||Zn(n))&&(!t||n!==47)}Ba.peek=xb;function ub(){this.buffer()}function db(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function pb(){this.buffer()}function fb(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function mb(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=dt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function hb(e){this.exit(e)}function gb(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=dt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function bb(e){this.exit(e)}function xb(){return"["}function Ba(e,t,n,r){const i=n.createTracker(r);let s=i.move("[^");const o=n.enter("footnoteReference"),l=n.enter("reference");return s+=i.move(n.safe(n.associationId(e),{after:"]",before:s})),l(),o(),s+=i.move("]"),s}function yb(){return{enter:{gfmFootnoteCallString:ub,gfmFootnoteCall:db,gfmFootnoteDefinitionLabelString:pb,gfmFootnoteDefinition:fb},exit:{gfmFootnoteCallString:mb,gfmFootnoteCall:hb,gfmFootnoteDefinitionLabelString:gb,gfmFootnoteDefinition:bb}}}function vb(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Ba},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,s,o){const l=s.createTracker(o);let u=l.move("[^");const c=s.enter("footnoteDefinition"),d=s.enter("label");return u+=l.move(s.safe(s.associationId(r),{before:u,after:"]"})),d(),u+=l.move("]:"),r.children&&r.children.length>0&&(l.shift(4),u+=l.move((t?` -`:" ")+s.indentLines(s.containerFlow(r,l.current()),t?Fa:kb))),c(),u}}function kb(e,t,n){return t===0?e:Fa(e,t,n)}function Fa(e,t,n){return(n?"":" ")+e}const Eb=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];za.peek=Tb;function wb(){return{canContainEols:["delete"],enter:{strikethrough:Nb},exit:{strikethrough:Sb}}}function _b(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Eb}],handlers:{delete:za}}}function Nb(e){this.enter({type:"delete",children:[]},e)}function Sb(e){this.exit(e)}function za(e,t,n,r){const i=n.createTracker(r),s=n.enter("strikethrough");let o=i.move("~~");return o+=n.containerPhrasing(e,{...i.current(),before:o,after:"~"}),o+=i.move("~~"),s(),o}function Tb(){return"~"}function Cb(e){return e.length}function Ab(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Cb,s=[],o=[],l=[],u=[];let c=0,d=-1;for(;++dc&&(c=e[d].length);++bu[b])&&(u[b]=C)}x.push(k)}o[d]=x,l[d]=y}let p=-1;if(typeof r=="object"&&"length"in r)for(;++pu[p]&&(u[p]=k),f[p]=k),m[p]=C}o.splice(1,0,m),l.splice(1,0,f),d=-1;const g=[];for(;++d "),s.shift(2);const o=n.indentLines(n.containerFlow(e,s.current()),Rb);return i(),o}function Rb(e,t,n){return">"+(n?"":" ")+e}function Ob(e,t){return us(e,t.inConstruct,!0)&&!us(e,t.notInConstruct,!1)}function us(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++ro&&(o=s):s=1,i=r+t.length,r=n.indexOf(t,i);return o}function jb(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 Db(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Pb(e,t,n,r){const i=Db(n),s=e.value||"",o=i==="`"?"GraveAccent":"Tilde";if(jb(e,n)){const p=n.enter("codeIndented"),m=n.indentLines(s,Bb);return p(),m}const l=n.createTracker(r),u=i.repeat(Math.max(Lb(s,i)+1,3)),c=n.enter("codeFenced");let d=l.move(u);if(e.lang){const p=n.enter(`codeFencedLang${o}`);d+=l.move(n.safe(e.lang,{before:d,after:" ",encode:["`"],...l.current()})),p()}if(e.lang&&e.meta){const p=n.enter(`codeFencedMeta${o}`);d+=l.move(" "),d+=l.move(n.safe(e.meta,{before:d,after:` +`}),n}function Ho(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Wo(e,t){const n=_m(e,t),r=n.one(e,void 0),i=mm(n),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&s.children.push({type:"text",value:` +`},i),s}function Am(e,t){return e&&"run"in e?async function(n,r){const i=Wo(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Wo(n,{file:r,...e||t})}}function Ko(e){if(e)throw e}var yr,Go;function Mm(){if(Go)return yr;Go=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(c){return typeof Array.isArray=="function"?Array.isArray(c):t.call(c)==="[object Array]"},s=function(c){if(!c||t.call(c)!=="[object Object]")return!1;var d=e.call(c,"constructor"),p=c.constructor&&c.constructor.prototype&&e.call(c.constructor.prototype,"isPrototypeOf");if(c.constructor&&!d&&!p)return!1;var m;for(m in c);return typeof m>"u"||e.call(c,m)},o=function(c,d){n&&d.name==="__proto__"?n(c,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):c[d.name]=d.newValue},l=function(c,d){if(d==="__proto__")if(e.call(c,d)){if(r)return r(c,d).value}else return;return c[d]};return yr=function u(){var c,d,p,m,f,h,b=arguments[0],x=1,y=arguments.length,w=!1;for(typeof b=="boolean"&&(w=b,b=arguments[1]||{},x=2),(b==null||typeof b!="object"&&typeof b!="function")&&(b={});xo.length;let u;l&&o.push(i);try{u=e.apply(this,o)}catch(c){const d=c;if(l&&n)throw d;return i(d)}l||(u&&u.then&&typeof u.then=="function"?u.then(s,i):u instanceof Error?i(u):s(u))}function i(o,...l){n||(n=!0,t(o,...l))}function s(o){i(null,o)}}const gt={basename:Lm,dirname:jm,extname:Dm,join:Pm,sep:"/"};function Lm(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');kn(e);let n=0,r=-1,i=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else r<0&&(s=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let o=-1,l=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else o<0&&(s=!0,o=i+1),l>-1&&(e.codePointAt(i)===t.codePointAt(l--)?l<0&&(r=i):(l=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function jm(e){if(kn(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||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Dm(e){kn(e);let t=e.length,n=-1,r=0,i=-1,s=0,o;for(;t--;){const l=e.codePointAt(t);if(l===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),l===46?i<0?i=t:s!==1&&(s=1):i>-1&&(s=-1)}return i<0||n<0||s===0||s===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function Pm(...e){let t=-1,n;for(;++t0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Fm(e,t){let n="",r=0,i=-1,s=0,o=-1,l,u;for(;++o<=e.length;){if(o2){if(u=n.lastIndexOf("/"),u!==n.length-1){u<0?(n="",r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf("/")),i=o,s=0;continue}}else if(n.length>0){n="",r=0,i=o,s=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,s=0}else l===46&&s>-1?s++:s=-1}return n}function kn(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const zm={cwd:$m};function $m(){return"/"}function qr(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Um(e){if(typeof e=="string")e=new URL(e);else if(!qr(e)){const t=new 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:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Hm(e)}function Hm(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n0){let[f,...h]=d;const b=r[m][1];Gr(b)&&Gr(f)&&(f=vr(!0,b,f)),r[m]=[c,f,...h]}}}}const qm=new fi().freeze();function _r(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Nr(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Sr(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Vo(e){if(!Gr(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Yo(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Rn(e){return Vm(e)?e:new ha(e)}function Vm(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Ym(e){return typeof e=="string"||Xm(e)}function Xm(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Zm="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Xo=[],Zo={allowDangerousHtml:!0},Jm=/^(https?|ircs?|mailto|xmpp)$/i,Qm=[{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 eg(e){const t=tg(e),n=ng(e);return rg(t.runSync(t.parse(n),n),e)}function tg(e){const t=e.rehypePlugins||Xo,n=e.remarkPlugins||Xo,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Zo}:Zo;return qm().use(jf).use(n).use(Am,r).use(t)}function ng(e){const t=e.children||"",n=new ha;return typeof t=="string"&&(n.value=t),n}function rg(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,s=t.disallowedElements,o=t.skipHtml,l=t.unwrapDisallowed,u=t.urlTransform||ig;for(const d of Qm)Object.hasOwn(t,d.from)&&(""+d.from+(d.to?"use `"+d.to+"` instead":"remove it")+Zm+d.id,void 0);return nr(e,c),bd(e,{Fragment:a.Fragment,components:i,ignoreInvalidStyle:!0,jsx:a.jsx,jsxs:a.jsxs,passKeys:!0,passNode:!0});function c(d,p,m){if(d.type==="raw"&&m&&typeof p=="number")return o?m.children.splice(p,1):m.children[p]={type:"text",value:d.value},p;if(d.type==="element"){let f;for(f in hr)if(Object.hasOwn(hr,f)&&Object.hasOwn(d.properties,f)){const h=d.properties[f],b=hr[f];(b===null||b.includes(d.tagName))&&(d.properties[f]=u(String(h||""),f,d))}}if(d.type==="element"){let f=n?!n.includes(d.tagName):s?s.includes(d.tagName):!1;if(!f&&r&&typeof p=="number"&&(f=!r(d,p,m)),f&&m&&typeof p=="number")return l&&d.children?m.children.splice(p,1,...d.children):m.children.splice(p,1),p}}}function ig(e){const 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||Jm.test(e.slice(0,t))?e:""}const Jo=(function(e,t,n){const r=vn(n);if(!e||!e.type||!e.children)throw new Error("Expected parent node");if(typeof t=="number"){if(t<0||t===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(t=e.children.indexOf(t),t<0)throw new Error("Expected child node or index");for(;++tc&&(c=d):d&&(c!==void 0&&c>-1&&u.push(` +`.repeat(c)||" "),c=-1,u.push(d))}return u.join("")}function xa(e,t,n){return e.type==="element"?pg(e,t,n):e.type==="text"?n.whitespace==="normal"?ya(e,n):fg(e):[]}function pg(e,t,n){const r=va(e,n),i=e.children||[];let s=-1,o=[];if(ug(e))return o;let l,u;for(Vr(e)||ns(e)&&Jo(t,e,ns)?u=` +`:cg(e)?(l=2,u=2):ba(e)&&(l=1,u=1);++s]+>")+")",l={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},c={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},d={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},p={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(c,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},m={className:"title",begin:t.optional(i)+e.IDENT_RE,relevance:0},f=t.optional(i)+e.IDENT_RE+"\\s*\\(",h=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],b=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],x=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],y=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],j={type:b,keyword:h,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:x},O={className:"function.dispatch",relevance:0,keywords:{_hint:y},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},_=[O,p,l,n,e.C_BLOCK_COMMENT_MODE,d,c],P={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:j,contains:_.concat([{begin:/\(/,end:/\)/,keywords:j,contains:_.concat(["self"]),relevance:0}]),relevance:0},D={className:"function",begin:"("+o+"[\\*&\\s]+)+"+f,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:j,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:j,relevance:0},{begin:f,returnBegin:!0,contains:[m],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[c,d]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:j,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,c,d,l,{begin:/\(/,end:/\)/,keywords:j,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,c,d,l]}]},l,n,e.C_BLOCK_COMMENT_MODE,p]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:j,illegal:"",keywords:j,contains:["self",l]},{begin:e.IDENT_RE+"::",keywords:j},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function yg(e){const t={type:["boolean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand","Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server","GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch","scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","beginTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","attachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNameWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blinkVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket","isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readString","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noDisplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflow","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","getBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","setMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect","line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit","tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},n=xg(e),r=n.keywords;return r.type=[...r.type,...t.type],r.literal=[...r.literal,...t.literal],r.built_in=[...r.built_in,...t.built_in],r._hints=t._hints,n.name="Arduino",n.aliases=["ino"],n.supersetOf="cpp",n}function vg(e){const t=e.regex,n={},r={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},r]});const i={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},s=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),o={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},l={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,i]};i.contains.push(l);const u={match:/\\"/},c={className:"string",begin:/'/,end:/'/},d={match:/\\'/},p={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},m=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],f=e.SHEBANG({binary:`(${m.join("|")})`,relevance:10}),h={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},b=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],x=["true","false"],y={match:/(\/[a-z._-]+)+/},w=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],T=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],j=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],O=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:b,literal:x,built_in:[...w,...T,"set","shopt",...j,...O]},contains:[f,e.SHEBANG(),h,p,s,o,y,l,u,c,d,n]}}function kg(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",o="("+r+"|"+t.optional(i)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",l={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},c={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},d={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},p={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(c,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},m={className:"title",begin:t.optional(i)+e.IDENT_RE,relevance:0},f=t.optional(i)+e.IDENT_RE+"\\s*\\(",x={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},y=[p,l,n,e.C_BLOCK_COMMENT_MODE,d,c],w={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:x,contains:y.concat([{begin:/\(/,end:/\)/,keywords:x,contains:y.concat(["self"]),relevance:0}]),relevance:0},T={begin:"("+o+"[\\*&\\s]+)+"+f,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:x,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:x,relevance:0},{begin:f,returnBegin:!0,contains:[e.inherit(m,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:x,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,c,d,l,{begin:/\(/,end:/\)/,keywords:x,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,c,d,l]}]},l,n,e.C_BLOCK_COMMENT_MODE,p]};return{name:"C",aliases:["h"],keywords:x,disableAutodetect:!0,illegal:"=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:p,strings:c,keywords:x}}}function Eg(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",o="(?!struct)("+r+"|"+t.optional(i)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",l={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},c={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},d={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},p={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(c,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},m={className:"title",begin:t.optional(i)+e.IDENT_RE,relevance:0},f=t.optional(i)+e.IDENT_RE+"\\s*\\(",h=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],b=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],x=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],y=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],j={type:b,keyword:h,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:x},O={className:"function.dispatch",relevance:0,keywords:{_hint:y},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},_=[O,p,l,n,e.C_BLOCK_COMMENT_MODE,d,c],P={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:j,contains:_.concat([{begin:/\(/,end:/\)/,keywords:j,contains:_.concat(["self"]),relevance:0}]),relevance:0},D={className:"function",begin:"("+o+"[\\*&\\s]+)+"+f,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:j,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:j,relevance:0},{begin:f,returnBegin:!0,contains:[m],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[c,d]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:j,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,c,d,l,{begin:/\(/,end:/\)/,keywords:j,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,c,d,l]}]},l,n,e.C_BLOCK_COMMENT_MODE,p]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:j,illegal:"",keywords:j,contains:["self",l]},{begin:e.IDENT_RE+"::",keywords:j},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function wg(e){const t=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],n=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],r=["default","false","null","true"],i=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],s=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],o={keyword:i.concat(s),built_in:t,literal:r},l=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),u={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},c={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},d={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},p=e.inherit(d,{illegal:/\n/}),m={className:"subst",begin:/\{/,end:/\}/,keywords:o},f=e.inherit(m,{illegal:/\n/}),h={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,f]},b={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},m]},x=e.inherit(b,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},f]});m.contains=[b,h,d,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,u,e.C_BLOCK_COMMENT_MODE],f.contains=[x,h,p,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,u,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const y={variants:[c,b,h,d,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},w={begin:"<",end:">",contains:[{beginKeywords:"in out"},l]},T=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",j={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:o,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:""},{begin:""}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},y,u,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},l,w,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[l,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[l,w,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+T+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:o,contains:[{beginKeywords:n.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,w],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,relevance:0,contains:[y,u,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},j]}}const _g=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),Ng=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],Sg=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],Tg=[...Ng,...Sg],Cg=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),Ag=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),Mg=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),Ig=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function Rg(e){const t=e.regex,n=_g(e),r={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},i="and or not only",s=/@-?\w[\w]*(-\w+)*/,o="[a-zA-Z-][a-zA-Z0-9_-]*",l=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,r,n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+o,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+Ag.join("|")+")"},{begin:":(:)?("+Mg.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+Ig.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...l,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...l,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:s},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:i,attribute:Cg.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...l,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+Tg.join("|")+")\\b"}]}}function Og(e){const t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}function Lg(e){const s={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:s,illegal:"ka(e,t,n-1))}function Pg(e){const t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",r=n+ka("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),u={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},c={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},d={className:"params",begin:/\(/,end:/\)/,keywords:u,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:u,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[d,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+r+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:u,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:u,relevance:0,contains:[c,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,rs,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},rs,c]}}const is="[A-Za-z$_][0-9A-Za-z$_]*",Bg=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],Fg=["true","false","null","undefined","NaN","Infinity"],Ea=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],wa=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],_a=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],zg=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],$g=[].concat(_a,Ea,wa);function Ug(e){const t=e.regex,n=(U,{after:V})=>{const g="",end:""},s=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(U,V)=>{const g=U[0].length+U.index,F=U.input[g];if(F==="<"||F===","){V.ignoreMatch();return}F===">"&&(n(U,{after:g})||V.ignoreMatch());let $;const k=U.input.substring(g);if($=k.match(/^\s*=/)){V.ignoreMatch();return}if(($=k.match(/^\s+extends\s+/))&&$.index===0){V.ignoreMatch();return}}},l={$pattern:is,keyword:Bg,literal:Fg,built_in:$g,"variable.language":zg},u="[0-9](_?[0-9])*",c=`\\.(${u})`,d="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",p={className:"number",variants:[{begin:`(\\b(${d})((${c})|\\.)?|(${c}))[eE][+-]?(${u})\\b`},{begin:`\\b(${d})\\b((${c})\\b|\\.)?|(${c})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},m={className:"subst",begin:"\\$\\{",end:"\\}",keywords:l,contains:[]},f={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,m],subLanguage:"xml"}},h={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,m],subLanguage:"css"}},b={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,m],subLanguage:"graphql"}},x={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,m]},w={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},T=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,f,h,b,x,{match:/\$\d+/},p];m.contains=T.concat({begin:/\{/,end:/\}/,keywords:l,contains:["self"].concat(T)});const j=[].concat(w,m.contains),O=j.concat([{begin:/(\s*)\(/,end:/\)/,keywords:l,contains:["self"].concat(j)}]),_={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:O},P={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},D={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...Ea,...wa]}},R={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},S={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[_],illegal:/%/},M={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function L(U){return t.concat("(?!",U.join("|"),")")}const C={match:t.concat(/\b/,L([..._a,"super","import"].map(U=>`${U}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},v={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},E={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},_]},I="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",H={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(I)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[_]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:l,exports:{PARAMS_CONTAINS:O,CLASS_REFERENCE:D},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),R,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,f,h,b,x,w,{match:/\$\d+/},p,D,{scope:"attr",match:r+t.lookahead(":"),relevance:0},H,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[w,e.REGEXP_MODE,{className:"function",begin:I,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:O}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:s},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0,contains:["self"]}]}]},S,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[_,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},v,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[_]},C,M,P,E,{match:/\$[(.]/}]}}function Hg(e){const t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},r=["true","false","null"],i={scope:"literal",beginKeywords:r.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:r},contains:[t,n,e.QUOTE_STRING_MODE,i,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var Jt="[0-9](_*[0-9])*",jn=`\\.(${Jt})`,Dn="[0-9a-fA-F](_*[0-9a-fA-F])*",Wg={className:"number",variants:[{begin:`(\\b(${Jt})((${jn})|\\.)?|(${jn}))[eE][+-]?(${Jt})[fFdD]?\\b`},{begin:`\\b(${Jt})((${jn})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${jn})[fFdD]?\\b`},{begin:`\\b(${Jt})[fFdD]\\b`},{begin:`\\b0[xX]((${Dn})\\.?|(${Dn})?\\.(${Dn}))[pP][+-]?(${Jt})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${Dn})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function Kg(e){const t={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},n={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},r={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},i={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},s={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},o={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[s,i]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,s,i]}]};i.contains.push(o);const l={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},u={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(o,{className:"string"}),"self"]}]},c=Wg,d=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),p={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},m=p;return m.variants[1].contains=[p],p.variants[1].contains=[m],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,d,n,r,l,u,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin://,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[p,e.C_LINE_COMMENT_MODE,d],relevance:0},e.C_LINE_COMMENT_MODE,d,l,u,o,e.C_NUMBER_MODE]},d]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin://,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},l,u]},o,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:` +`},c]}}const Gg=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),qg=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],Vg=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],Yg=[...qg,...Vg],Xg=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),Na=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),Sa=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),Zg=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),Jg=Na.concat(Sa).sort().reverse();function Qg(e){const t=Gg(e),n=Jg,r="and or not only",i="[\\w-]+",s="("+i+"|@\\{"+i+"\\})",o=[],l=[],u=function(T){return{className:"string",begin:"~?"+T+".*?"+T}},c=function(T,j,O){return{className:T,begin:j,relevance:O}},d={$pattern:/[a-z-]+/,keyword:r,attribute:Xg.join(" ")},p={begin:"\\(",end:"\\)",contains:l,keywords:d,relevance:0};l.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,u("'"),u('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,p,c("variable","@@?"+i,10),c("variable","@\\{"+i+"\\}"),c("built_in","~?`[^`]*?`"),{className:"attribute",begin:i+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);const m=l.concat({begin:/\{/,end:/\}/,contains:o}),f={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(l)},h={begin:s+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+Zg.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:l}}]},b={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:d,returnEnd:!0,contains:l,relevance:0}},x={className:"variable",variants:[{begin:"@"+i+"\\s*:",relevance:15},{begin:"@"+i}],starts:{end:"[;}]",returnEnd:!0,contains:m}},y={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:s,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,f,c("keyword","all\\b"),c("variable","@\\{"+i+"\\}"),{begin:"\\b("+Yg.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,c("selector-tag",s,0),c("selector-id","#"+s),c("selector-class","\\."+s,0),c("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+Na.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+Sa.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:m},{begin:"!important"},t.FUNCTION_DISPATCH]},w={begin:i+`:(:)?(${n.join("|")})`,returnBegin:!0,contains:[y]};return o.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,b,x,w,h,y,f,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:o}}function eh(e){const t="\\[=*\\[",n="\\]=*\\]",r={begin:t,end:n,contains:["self"]},i=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,n,{contains:[r],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:i.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:i}].concat(i)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:n,contains:[r],relevance:5}])}}function th(e){const t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%",subLanguage:"xml",relevance:0},r={begin:"^[-\\*]{3,}",end:"$"},i={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},s={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},o={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},l=/[A-Za-z][A-Za-z0-9+.-]*/,u={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,l,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},c={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},d={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},p=e.inherit(c,{contains:[]}),m=e.inherit(d,{contains:[]});c.contains.push(m),d.contains.push(p);let f=[n,u];return[c,d,p,m].forEach(y=>{y.contains=y.contains.concat(f)}),f=f.concat(c,d),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:f},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:f}]}]},n,s,c,d,{className:"quote",begin:"^>\\s+",contains:f,end:"$"},i,r,u,o,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function rh(e){const t={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},n=/[a-zA-Z@][a-zA-Z0-9_]*/,l={"variable.language":["this","super"],$pattern:n,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},u={$pattern:n,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:l,illegal:"/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+u.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:u,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function ih(e){const t=e.regex,n=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],r=/[dualxmsipngr]{0,12}/,i={$pattern:/[\w.]+/,keyword:n.join(" ")},s={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:i},o={begin:/->\{/,end:/\}/},l={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},u={scope:"variable",variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[l]},c={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},d=[e.BACKSLASH_ESCAPE,s,u],p=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],m=(b,x,y="\\1")=>{const w=y==="\\1"?y:t.concat(y,x);return t.concat(t.concat("(?:",b,")"),x,/(?:\\.|[^\\\/])*?/,w,/(?:\\.|[^\\\/])*?/,y,r)},f=(b,x,y)=>t.concat(t.concat("(?:",b,")"),x,/(?:\\.|[^\\\/])*?/,y,r),h=[u,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),o,{className:"string",contains:d,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},c,{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:m("s|tr|y",t.either(...p,{capture:!0}))},{begin:m("s|tr|y","\\(","\\)")},{begin:m("s|tr|y","\\[","\\]")},{begin:m("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:f("(?:m|qr)?",/\//,/\//)},{begin:f("m|qr",t.either(...p,{capture:!0}),/\1/)},{begin:f("m|qr",/\(/,/\)/)},{begin:f("m|qr",/\[/,/\]/)},{begin:f("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,l]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,l,c]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return s.contains=h,o.contains=h,{name:"Perl",aliases:["pl","pm"],keywords:i,contains:h}}function oh(e){const t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,r=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),i=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),s=t.concat(/[A-Z]+/,n),o={scope:"variable",match:"\\$+"+r},l={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},u={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},c=e.inherit(e.APOS_STRING_MODE,{illegal:null}),d=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(u)}),p={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(u),"on:begin":(v,E)=>{E.data._beginMatch=v[1]||v[2]},"on:end":(v,E)=>{E.data._beginMatch!==v[1]&&E.ignoreMatch()}},m=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),f=`[ +]`,h={scope:"string",variants:[d,c,p,m]},b={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},x=["false","null","true"],y=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],w=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],j={keyword:y,literal:(v=>{const E=[];return v.forEach(I=>{E.push(I),I.toLowerCase()===I?E.push(I.toUpperCase()):E.push(I.toLowerCase())}),E})(x),built_in:w},O=v=>v.map(E=>E.replace(/\|\d+$/,"")),_={variants:[{match:[/new/,t.concat(f,"+"),t.concat("(?!",O(w).join("\\b|"),"\\b)"),i],scope:{1:"keyword",4:"title.class"}}]},P=t.concat(r,"\\b(?!\\()"),D={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),P],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[i,t.concat(/::/,t.lookahead(/(?!class\b)/)),P],scope:{1:"title.class",3:"variable.constant"}},{match:[i,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[i,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},R={scope:"attr",match:t.concat(r,t.lookahead(":"),t.lookahead(/(?!::)/))},S={relevance:0,begin:/\(/,end:/\)/,keywords:j,contains:[R,o,D,e.C_BLOCK_COMMENT_MODE,h,b,_]},M={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",O(y).join("\\b|"),"|",O(w).join("\\b|"),"\\b)"),r,t.concat(f,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[S]};S.contains.push(M);const L=[R,D,e.C_BLOCK_COMMENT_MODE,h,b,_],C={begin:t.concat(/#\[\s*\\?/,t.either(i,s)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:x,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:x,keyword:["new","array"]},contains:["self",...L]},...L,{scope:"meta",variants:[{match:i},{match:s}]}]};return{case_insensitive:!1,keywords:j,contains:[C,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},l,{scope:"variable.language",match:/\$this\b/},o,M,D,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},_,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:j,contains:["self",C,o,D,e.C_BLOCK_COMMENT_MODE,h,b]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},h,b]}}function sh(e){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}function ah(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function lh(e){const t=e.regex,n=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),r=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],l={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},u={className:"meta",begin:/^(>>>|\.\.\.) /},c={className:"subst",begin:/\{/,end:/\}/,keywords:l,illegal:/#/},d={begin:/\{\{/,relevance:0},p={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,u],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,u],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,u,d,c]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,u,d,c]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,d,c]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,d,c]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},m="[0-9](_?[0-9])*",f=`(\\b(${m}))?\\.(${m})|\\b(${m})\\.`,h=`\\b|${r.join("|")}`,b={className:"number",relevance:0,variants:[{begin:`(\\b(${m})|(${f}))[eE][+-]?(${m})[jJ]?(?=${h})`},{begin:`(${f})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${h})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${h})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${h})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${h})`},{begin:`\\b(${m})[jJ](?=${h})`}]},x={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:l,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},y={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:["self",u,b,p,e.HASH_COMMENT_MODE]}]};return c.contains=[p,b,u],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:l,illegal:/(<\/|\?)|=>/,contains:[u,b,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},p,x,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[y]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[b,y,p]}]}}function ch(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function uh(e){const t=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,r=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),i=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,s=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:n,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:n},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[i,r]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,r]},{scope:{1:"punctuation",2:"number"},match:[s,r]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,r]}]},{scope:{3:"operator"},match:[n,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:i},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:s},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function dh(e){const t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",r=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),i=t.concat(r,/(::\w+)*/),o={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},l={className:"doctag",begin:"@[A-Za-z]+"},u={begin:"#<",end:">"},c=[e.COMMENT("#","$",{contains:[l]}),e.COMMENT("^=begin","^=end",{contains:[l],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],d={className:"subst",begin:/#\{/,end:/\}/,keywords:o},p={className:"string",contains:[e.BACKSLASH_ESCAPE,d],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,d]})]}]},m="[1-9](_?[0-9])*|0",f="[0-9](_?[0-9])*",h={className:"number",relevance:0,variants:[{begin:`\\b(${m})(\\.(${f}))?([eE][+-]?(${f})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},b={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:o}]},_=[p,{variants:[{match:[/class\s+/,i,/\s+<\s+/,i]},{match:[/\b(class|module)\s+/,i]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:o},{match:[/(include|extend)\s+/,i],scope:{2:"title.class"},keywords:o},{relevance:0,match:[i,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:r,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[b]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[p,{begin:n}],relevance:0},h,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:o},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,d],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(u,c),relevance:0}].concat(u,c);d.contains=_,b.contains=_;const S=[{begin:/^\s*=>/,starts:{end:"$",contains:_}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:o,contains:_}}];return c.unshift(u),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:o,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(S).concat(c).concat(_)}}function ph(e){const t=e.regex,n=/(r#)?/,r=t.concat(n,e.UNDERSCORE_IDENT_RE),i=t.concat(n,e.IDENT_RE),s={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,i,t.lookahead(/\s*\(/))},o="([ui](8|16|32|64|128|size)|f(32|64))?",l=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],u=["true","false","Some","None","Ok","Err"],c=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],d=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:d,keyword:l,literal:u,built_in:c},illegal:""},s]}}const fh=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),mh=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],gh=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],hh=[...mh,...gh],bh=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),xh=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),yh=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),vh=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function kh(e){const t=fh(e),n=yh,r=xh,i="@[a-z-]+",s="and or not only",l={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+hh.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+r.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},l,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+vh.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,l,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:i,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:s,attribute:bh.join(" ")},contains:[{begin:i,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},l,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}function Eh(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function wh(e){const t=e.regex,n=e.COMMENT("--","$"),r={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},i={begin:/"/,end:/"/,contains:[{match:/""/}]},s=["true","false","unknown"],o=["double precision","large object","with timezone","without timezone"],l=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],u=["add","asc","collation","desc","final","first","last","view"],c=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],d=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],p=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],m=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],f=d,h=[...c,...u].filter(O=>!d.includes(O)),b={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},x={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},y={match:t.concat(/\b/,t.either(...f),/\s*\(/),relevance:0,keywords:{built_in:f}};function w(O){return t.concat(/\b/,t.either(...O.map(_=>_.replace(/\s+/,"\\s+"))),/\b/)}const T={scope:"keyword",match:w(m),relevance:0};function j(O,{exceptions:_,when:P}={}){const D=P;return _=_||[],O.map(R=>R.match(/\|\d+$/)||_.includes(R)?R:D(R)?`${R}|0`:R)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:j(h,{when:O=>O.length<3}),literal:s,type:l,built_in:p},contains:[{scope:"type",match:w(o)},T,y,b,r,i,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,x]}}function Ta(e){return e?typeof e=="string"?e:e.source:null}function dn(e){return Ne("(?=",e,")")}function Ne(...e){return e.map(n=>Ta(n)).join("")}function _h(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function qe(...e){return"("+(_h(e).capture?"":"?:")+e.map(r=>Ta(r)).join("|")+")"}const gi=e=>Ne(/\b/,e,/\w$/.test(e)?/\b/:/\B/),Nh=["Protocol","Type"].map(gi),os=["init","self"].map(gi),Sh=["Any","Self"],Tr=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],ss=["false","nil","true"],Th=["assignment","associativity","higherThan","left","lowerThan","none","right"],Ch=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],as=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],Ca=qe(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),Aa=qe(Ca,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),Cr=Ne(Ca,Aa,"*"),Ma=qe(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),Gn=qe(Ma,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),mt=Ne(Ma,Gn,"*"),Pn=Ne(/[A-Z]/,Gn,"*"),Ah=["attached","autoclosure",Ne(/convention\(/,qe("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",Ne(/objc\(/,mt,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],Mh=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function Ih(e){const t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),r=[e.C_LINE_COMMENT_MODE,n],i={match:[/\./,qe(...Nh,...os)],className:{2:"keyword"}},s={match:Ne(/\./,qe(...Tr)),relevance:0},o=Tr.filter(ve=>typeof ve=="string").concat(["_|0"]),l=Tr.filter(ve=>typeof ve!="string").concat(Sh).map(gi),u={variants:[{className:"keyword",match:qe(...l,...os)}]},c={$pattern:qe(/\b\w+/,/#\w+/),keyword:o.concat(Ch),literal:ss},d=[i,s,u],p={match:Ne(/\./,qe(...as)),relevance:0},m={className:"built_in",match:Ne(/\b/,qe(...as),/(?=\()/)},f=[p,m],h={match:/->/,relevance:0},b={className:"operator",relevance:0,variants:[{match:Cr},{match:`\\.(\\.|${Aa})+`}]},x=[h,b],y="([0-9]_*)+",w="([0-9a-fA-F]_*)+",T={className:"number",relevance:0,variants:[{match:`\\b(${y})(\\.(${y}))?([eE][+-]?(${y}))?\\b`},{match:`\\b0x(${w})(\\.(${w}))?([pP][+-]?(${y}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},j=(ve="")=>({className:"subst",variants:[{match:Ne(/\\/,ve,/[0\\tnr"']/)},{match:Ne(/\\/,ve,/u\{[0-9a-fA-F]{1,8}\}/)}]}),O=(ve="")=>({className:"subst",match:Ne(/\\/,ve,/[\t ]*(?:[\r\n]|\r\n)/)}),_=(ve="")=>({className:"subst",label:"interpol",begin:Ne(/\\/,ve,/\(/),end:/\)/}),P=(ve="")=>({begin:Ne(ve,/"""/),end:Ne(/"""/,ve),contains:[j(ve),O(ve),_(ve)]}),D=(ve="")=>({begin:Ne(ve,/"/),end:Ne(/"/,ve),contains:[j(ve),_(ve)]}),R={className:"string",variants:[P(),P("#"),P("##"),P("###"),D(),D("#"),D("##"),D("###")]},S=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],M={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:S},L=ve=>{const lt=Ne(ve,/\//),rt=Ne(/\//,ve);return{begin:lt,end:rt,contains:[...S,{scope:"comment",begin:`#(?!.*${rt})`,end:/$/}]}},C={scope:"regexp",variants:[L("###"),L("##"),L("#"),M]},v={match:Ne(/`/,mt,/`/)},E={className:"variable",match:/\$\d+/},I={className:"variable",match:`\\$${Gn}+`},H=[v,E,I],U={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:Mh,contains:[...x,T,R]}]}},V={scope:"keyword",match:Ne(/@/,qe(...Ah),dn(qe(/\(/,/\s+/)))},g={scope:"meta",match:Ne(/@/,mt)},F=[U,V,g],$={match:dn(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:Ne(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,Gn,"+")},{className:"type",match:Pn,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:Ne(/\s+&\s+/,dn(Pn)),relevance:0}]},k={begin://,keywords:c,contains:[...r,...d,...F,h,$]};$.contains.push(k);const ie={match:Ne(mt,/\s*:/),keywords:"_|0",relevance:0},K={begin:/\(/,end:/\)/,relevance:0,keywords:c,contains:["self",ie,...r,C,...d,...f,...x,T,R,...H,...F,$]},W={begin://,keywords:"repeat each",contains:[...r,$]},re={begin:qe(dn(Ne(mt,/\s*:/)),dn(Ne(mt,/\s+/,mt,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:mt}]},de={begin:/\(/,end:/\)/,keywords:c,contains:[re,...r,...d,...x,T,R,...F,$,K],endsParent:!0,illegal:/["']/},xe={match:[/(func|macro)/,/\s+/,qe(v.match,mt,Cr)],className:{1:"keyword",3:"title.function"},contains:[W,de,t],illegal:[/\[/,/%/]},Oe={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[W,de,t],illegal:/\[|%/},Ie={match:[/operator/,/\s+/,Cr],className:{1:"keyword",3:"title"}},at={begin:[/precedencegroup/,/\s+/,Pn],className:{1:"keyword",3:"title"},contains:[$],keywords:[...Th,...ss],end:/}/},St={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},Pt={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},yt={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,mt,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:c,contains:[W,...d,{begin:/:/,end:/\{/,keywords:c,contains:[{scope:"title.class.inherited",match:Pn},...d],relevance:0}]};for(const ve of R.variants){const lt=ve.contains.find(vt=>vt.label==="interpol");lt.keywords=c;const rt=[...d,...f,...x,T,R,...H];lt.contains=[...rt,{begin:/\(/,end:/\)/,contains:["self",...rt]}]}return{name:"Swift",keywords:c,contains:[...r,xe,Oe,St,Pt,yt,Ie,at,{beginKeywords:"import",end:/$/,contains:[...r],relevance:0},C,...d,...f,...x,T,R,...H,...F,$,K]}}const qn="[A-Za-z$_][0-9A-Za-z$_]*",Ia=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],Ra=["true","false","null","undefined","NaN","Infinity"],Oa=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],La=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],ja=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Da=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Pa=[].concat(ja,Oa,La);function Rh(e){const t=e.regex,n=(U,{after:V})=>{const g="",end:""},s=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(U,V)=>{const g=U[0].length+U.index,F=U.input[g];if(F==="<"||F===","){V.ignoreMatch();return}F===">"&&(n(U,{after:g})||V.ignoreMatch());let $;const k=U.input.substring(g);if($=k.match(/^\s*=/)){V.ignoreMatch();return}if(($=k.match(/^\s+extends\s+/))&&$.index===0){V.ignoreMatch();return}}},l={$pattern:qn,keyword:Ia,literal:Ra,built_in:Pa,"variable.language":Da},u="[0-9](_?[0-9])*",c=`\\.(${u})`,d="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",p={className:"number",variants:[{begin:`(\\b(${d})((${c})|\\.)?|(${c}))[eE][+-]?(${u})\\b`},{begin:`\\b(${d})\\b((${c})\\b|\\.)?|(${c})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},m={className:"subst",begin:"\\$\\{",end:"\\}",keywords:l,contains:[]},f={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,m],subLanguage:"xml"}},h={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,m],subLanguage:"css"}},b={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,m],subLanguage:"graphql"}},x={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,m]},w={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},T=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,f,h,b,x,{match:/\$\d+/},p];m.contains=T.concat({begin:/\{/,end:/\}/,keywords:l,contains:["self"].concat(T)});const j=[].concat(w,m.contains),O=j.concat([{begin:/(\s*)\(/,end:/\)/,keywords:l,contains:["self"].concat(j)}]),_={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:O},P={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},D={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...Oa,...La]}},R={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},S={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[_],illegal:/%/},M={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function L(U){return t.concat("(?!",U.join("|"),")")}const C={match:t.concat(/\b/,L([...ja,"super","import"].map(U=>`${U}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},v={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},E={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},_]},I="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",H={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(I)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[_]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:l,exports:{PARAMS_CONTAINS:O,CLASS_REFERENCE:D},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),R,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,f,h,b,x,w,{match:/\$\d+/},p,D,{scope:"attr",match:r+t.lookahead(":"),relevance:0},H,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[w,e.REGEXP_MODE,{className:"function",begin:I,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:O}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:s},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0,contains:["self"]}]}]},S,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[_,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},v,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[_]},C,M,P,E,{match:/\$[(.]/}]}}function Oh(e){const t=e.regex,n=Rh(e),r=qn,i=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],s={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},o={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:i},contains:[n.exports.CLASS_REFERENCE]},l={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},u=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],c={$pattern:qn,keyword:Ia.concat(u),literal:Ra,built_in:Pa.concat(i),"variable.language":Da},d={className:"meta",begin:"@"+r},p=(b,x,y)=>{const w=b.contains.findIndex(T=>T.label===x);if(w===-1)throw new Error("can not find mode to replace");b.contains.splice(w,1,y)};Object.assign(n.keywords,c),n.exports.PARAMS_CONTAINS.push(d);const m=n.contains.find(b=>b.scope==="attr"),f=Object.assign({},m,{match:t.concat(r,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,m,f]),n.contains=n.contains.concat([d,s,o,f]),p(n,"shebang",e.SHEBANG()),p(n,"use_strict",l);const h=n.contains.find(b=>b.label==="func.def");return h.relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n}function Lh(e){const t=e.regex,n={className:"string",begin:/"(""|[^/n])"C\b/},r={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},i=/\d{1,2}\/\d{1,2}\/\d{4}/,s=/\d{4}-\d{1,2}-\d{1,2}/,o=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,l=/\d{1,2}(:\d{1,2}){1,2}/,u={className:"literal",variants:[{begin:t.concat(/# */,t.either(s,i),/ *#/)},{begin:t.concat(/# */,l,/ *#/)},{begin:t.concat(/# */,o,/ *#/)},{begin:t.concat(/# */,t.either(s,i),/ +/,t.either(o,l),/ *#/)}]},c={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},d={className:"label",begin:/^\w+:/},p=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),m=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[n,r,u,c,d,p,m,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[m]}]}}function jh(e){e.regex;const t=e.COMMENT(/\(;/,/;\)/);t.contains.push("self");const n=e.COMMENT(/;;/,/$/),r=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],i={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},s={className:"variable",begin:/\$[\w_]+/},o={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},l={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},u={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},c={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:r},contains:[n,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},s,o,i,e.QUOTE_STRING_MODE,u,c,l]}}function Dh(e){const t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,i={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},s={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},o=e.inherit(s,{begin:/\(/,end:/\)/}),l=e.inherit(e.APOS_STRING_MODE,{className:"string"}),u=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),c={endsWithParent:!0,illegal:/`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin://,relevance:10,contains:[s,u,l,o,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin://,contains:[s,o,u,l]}]}]},e.COMMENT(//,{relevance:10}),{begin://,relevance:10},i,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[u]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/)/,end:/>/,keywords:{name:"style"},contains:[c],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/)/,end:/>/,keywords:{name:"script"},contains:[c],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(//,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:c}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function Ph(e){const t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",r={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},i={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},s={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},o={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,i]},l=e.inherit(o,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),m={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},f={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},h={begin:/\{/,end:/\}/,contains:[f],illegal:"\\n",relevance:0},b={begin:"\\[",end:"\\]",contains:[f],illegal:"\\n",relevance:0},x=[r,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},m,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},h,b,s,o],y=[...x];return y.pop(),y.push(l),f.contains=y,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:x}}const Bh={arduino:yg,bash:vg,c:kg,cpp:Eg,csharp:wg,css:Rg,diff:Og,go:Lg,graphql:jg,ini:Dg,java:Pg,javascript:Ug,json:Hg,kotlin:Kg,less:Qg,lua:eh,makefile:th,markdown:nh,objectivec:rh,perl:ih,php:oh,"php-template":sh,plaintext:ah,python:lh,"python-repl":ch,r:uh,ruby:dh,rust:ph,scss:kh,shell:Eh,sql:wh,swift:Ih,typescript:Oh,vbnet:Lh,wasm:jh,xml:Dh,yaml:Ph};var Ar,ls;function Fh(){if(ls)return Ar;ls=1;function e(A){return A instanceof Map?A.clear=A.delete=A.set=function(){throw new Error("map is read-only")}:A instanceof Set&&(A.add=A.clear=A.delete=function(){throw new Error("set is read-only")}),Object.freeze(A),Object.getOwnPropertyNames(A).forEach(z=>{const X=A[z],ce=typeof X;(ce==="object"||ce==="function")&&!Object.isFrozen(X)&&e(X)}),A}class t{constructor(z){z.data===void 0&&(z.data={}),this.data=z.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(A){return A.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function r(A,...z){const X=Object.create(null);for(const ce in A)X[ce]=A[ce];return z.forEach(function(ce){for(const Le in ce)X[Le]=ce[Le]}),X}const i="",s=A=>!!A.scope,o=(A,{prefix:z})=>{if(A.startsWith("language:"))return A.replace("language:","language-");if(A.includes(".")){const X=A.split(".");return[`${z}${X.shift()}`,...X.map((ce,Le)=>`${ce}${"_".repeat(Le+1)}`)].join(" ")}return`${z}${A}`};class l{constructor(z,X){this.buffer="",this.classPrefix=X.classPrefix,z.walk(this)}addText(z){this.buffer+=n(z)}openNode(z){if(!s(z))return;const X=o(z.scope,{prefix:this.classPrefix});this.span(X)}closeNode(z){s(z)&&(this.buffer+=i)}value(){return this.buffer}span(z){this.buffer+=``}}const u=(A={})=>{const z={children:[]};return Object.assign(z,A),z};class c{constructor(){this.rootNode=u(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(z){this.top.children.push(z)}openNode(z){const X=u({scope:z});this.add(X),this.stack.push(X)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(z){return this.constructor._walk(z,this.rootNode)}static _walk(z,X){return typeof X=="string"?z.addText(X):X.children&&(z.openNode(X),X.children.forEach(ce=>this._walk(z,ce)),z.closeNode(X)),z}static _collapse(z){typeof z!="string"&&z.children&&(z.children.every(X=>typeof X=="string")?z.children=[z.children.join("")]:z.children.forEach(X=>{c._collapse(X)}))}}class d extends c{constructor(z){super(),this.options=z}addText(z){z!==""&&this.add(z)}startScope(z){this.openNode(z)}endScope(){this.closeNode()}__addSublanguage(z,X){const ce=z.root;X&&(ce.scope=`language:${X}`),this.add(ce)}toHTML(){return new l(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function p(A){return A?typeof A=="string"?A:A.source:null}function m(A){return b("(?=",A,")")}function f(A){return b("(?:",A,")*")}function h(A){return b("(?:",A,")?")}function b(...A){return A.map(X=>p(X)).join("")}function x(A){const z=A[A.length-1];return typeof z=="object"&&z.constructor===Object?(A.splice(A.length-1,1),z):{}}function y(...A){return"("+(x(A).capture?"":"?:")+A.map(ce=>p(ce)).join("|")+")"}function w(A){return new RegExp(A.toString()+"|").exec("").length-1}function T(A,z){const X=A&&A.exec(z);return X&&X.index===0}const j=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function O(A,{joinWith:z}){let X=0;return A.map(ce=>{X+=1;const Le=X;let je=p(ce),te="";for(;je.length>0;){const Q=j.exec(je);if(!Q){te+=je;break}te+=je.substring(0,Q.index),je=je.substring(Q.index+Q[0].length),Q[0][0]==="\\"&&Q[1]?te+="\\"+String(Number(Q[1])+Le):(te+=Q[0],Q[0]==="("&&X++)}return te}).map(ce=>`(${ce})`).join(z)}const _=/\b\B/,P="[a-zA-Z]\\w*",D="[a-zA-Z_]\\w*",R="\\b\\d+(\\.\\d+)?",S="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",M="\\b(0b[01]+)",L="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",C=(A={})=>{const z=/^#![ ]*\//;return A.binary&&(A.begin=b(z,/.*\b/,A.binary,/\b.*/)),r({scope:"meta",begin:z,end:/$/,relevance:0,"on:begin":(X,ce)=>{X.index!==0&&ce.ignoreMatch()}},A)},v={begin:"\\\\[\\s\\S]",relevance:0},E={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[v]},I={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[v]},H={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},U=function(A,z,X={}){const ce=r({scope:"comment",begin:A,end:z,contains:[]},X);ce.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const Le=y("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return ce.contains.push({begin:b(/[ ]+/,"(",Le,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),ce},V=U("//","$"),g=U("/\\*","\\*/"),F=U("#","$"),$={scope:"number",begin:R,relevance:0},k={scope:"number",begin:S,relevance:0},ie={scope:"number",begin:M,relevance:0},K={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[v,{begin:/\[/,end:/\]/,relevance:0,contains:[v]}]},W={scope:"title",begin:P,relevance:0},re={scope:"title",begin:D,relevance:0},de={begin:"\\.\\s*"+D,relevance:0};var Oe=Object.freeze({__proto__:null,APOS_STRING_MODE:E,BACKSLASH_ESCAPE:v,BINARY_NUMBER_MODE:ie,BINARY_NUMBER_RE:M,COMMENT:U,C_BLOCK_COMMENT_MODE:g,C_LINE_COMMENT_MODE:V,C_NUMBER_MODE:k,C_NUMBER_RE:S,END_SAME_AS_BEGIN:function(A){return Object.assign(A,{"on:begin":(z,X)=>{X.data._beginMatch=z[1]},"on:end":(z,X)=>{X.data._beginMatch!==z[1]&&X.ignoreMatch()}})},HASH_COMMENT_MODE:F,IDENT_RE:P,MATCH_NOTHING_RE:_,METHOD_GUARD:de,NUMBER_MODE:$,NUMBER_RE:R,PHRASAL_WORDS_MODE:H,QUOTE_STRING_MODE:I,REGEXP_MODE:K,RE_STARTERS_RE:L,SHEBANG:C,TITLE_MODE:W,UNDERSCORE_IDENT_RE:D,UNDERSCORE_TITLE_MODE:re});function Ie(A,z){A.input[A.index-1]==="."&&z.ignoreMatch()}function at(A,z){A.className!==void 0&&(A.scope=A.className,delete A.className)}function St(A,z){z&&A.beginKeywords&&(A.begin="\\b("+A.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",A.__beforeBegin=Ie,A.keywords=A.keywords||A.beginKeywords,delete A.beginKeywords,A.relevance===void 0&&(A.relevance=0))}function Pt(A,z){Array.isArray(A.illegal)&&(A.illegal=y(...A.illegal))}function yt(A,z){if(A.match){if(A.begin||A.end)throw new Error("begin & end are not supported with match");A.begin=A.match,delete A.match}}function ve(A,z){A.relevance===void 0&&(A.relevance=1)}const lt=(A,z)=>{if(!A.beforeMatch)return;if(A.starts)throw new Error("beforeMatch cannot be used with starts");const X=Object.assign({},A);Object.keys(A).forEach(ce=>{delete A[ce]}),A.keywords=X.keywords,A.begin=b(X.beforeMatch,m(X.begin)),A.starts={relevance:0,contains:[Object.assign(X,{endsParent:!0})]},A.relevance=0,delete X.beforeMatch},rt=["of","and","for","in","not","or","if","then","parent","list","value"],vt="keyword";function Bt(A,z,X=vt){const ce=Object.create(null);return typeof A=="string"?Le(X,A.split(" ")):Array.isArray(A)?Le(X,A):Object.keys(A).forEach(function(je){Object.assign(ce,Bt(A[je],z,je))}),ce;function Le(je,te){z&&(te=te.map(Q=>Q.toLowerCase())),te.forEach(function(Q){const le=Q.split("|");ce[le[0]]=[je,qt(le[0],le[1])]})}}function qt(A,z){return z?Number(z):J(A)?0:1}function J(A){return rt.includes(A.toLowerCase())}const ge={},Re=A=>{console.error(A)},fe=(A,...z)=>{console.log(`WARN: ${A}`,...z)},B=(A,z)=>{ge[`${A}/${z}`]||(console.log(`Deprecated as of ${A}. ${z}`),ge[`${A}/${z}`]=!0)},G=new Error;function ee(A,z,{key:X}){let ce=0;const Le=A[X],je={},te={};for(let Q=1;Q<=z.length;Q++)te[Q+ce]=Le[Q],je[Q+ce]=!0,ce+=w(z[Q-1]);A[X]=te,A[X]._emit=je,A[X]._multi=!0}function ae(A){if(Array.isArray(A.begin)){if(A.skip||A.excludeBegin||A.returnBegin)throw Re("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),G;if(typeof A.beginScope!="object"||A.beginScope===null)throw Re("beginScope must be object"),G;ee(A,A.begin,{key:"beginScope"}),A.begin=O(A.begin,{joinWith:""})}}function we(A){if(Array.isArray(A.end)){if(A.skip||A.excludeEnd||A.returnEnd)throw Re("skip, excludeEnd, returnEnd not compatible with endScope: {}"),G;if(typeof A.endScope!="object"||A.endScope===null)throw Re("endScope must be object"),G;ee(A,A.end,{key:"endScope"}),A.end=O(A.end,{joinWith:""})}}function Ke(A){A.scope&&typeof A.scope=="object"&&A.scope!==null&&(A.beginScope=A.scope,delete A.scope)}function kt(A){Ke(A),typeof A.beginScope=="string"&&(A.beginScope={_wrap:A.beginScope}),typeof A.endScope=="string"&&(A.endScope={_wrap:A.endScope}),ae(A),we(A)}function ct(A){function z(te,Q){return new RegExp(p(te),"m"+(A.case_insensitive?"i":"")+(A.unicodeRegex?"u":"")+(Q?"g":""))}class X{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(Q,le){le.position=this.position++,this.matchIndexes[this.matchAt]=le,this.regexes.push([le,Q]),this.matchAt+=w(Q)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const Q=this.regexes.map(le=>le[1]);this.matcherRe=z(O(Q,{joinWith:"|"}),!0),this.lastIndex=0}exec(Q){this.matcherRe.lastIndex=this.lastIndex;const le=this.matcherRe.exec(Q);if(!le)return null;const Fe=le.findIndex((sn,rr)=>rr>0&&sn!==void 0),De=this.matchIndexes[Fe];return le.splice(0,Fe),Object.assign(le,De)}}class ce{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(Q){if(this.multiRegexes[Q])return this.multiRegexes[Q];const le=new X;return this.rules.slice(Q).forEach(([Fe,De])=>le.addRule(Fe,De)),le.compile(),this.multiRegexes[Q]=le,le}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(Q,le){this.rules.push([Q,le]),le.type==="begin"&&this.count++}exec(Q){const le=this.getMatcher(this.regexIndex);le.lastIndex=this.lastIndex;let Fe=le.exec(Q);if(this.resumingScanAtSamePosition()&&!(Fe&&Fe.index===this.lastIndex)){const De=this.getMatcher(0);De.lastIndex=this.lastIndex+1,Fe=De.exec(Q)}return Fe&&(this.regexIndex+=Fe.position+1,this.regexIndex===this.count&&this.considerAll()),Fe}}function Le(te){const Q=new ce;return te.contains.forEach(le=>Q.addRule(le.begin,{rule:le,type:"begin"})),te.terminatorEnd&&Q.addRule(te.terminatorEnd,{type:"end"}),te.illegal&&Q.addRule(te.illegal,{type:"illegal"}),Q}function je(te,Q){const le=te;if(te.isCompiled)return le;[at,yt,kt,lt].forEach(De=>De(te,Q)),A.compilerExtensions.forEach(De=>De(te,Q)),te.__beforeBegin=null,[St,Pt,ve].forEach(De=>De(te,Q)),te.isCompiled=!0;let Fe=null;return typeof te.keywords=="object"&&te.keywords.$pattern&&(te.keywords=Object.assign({},te.keywords),Fe=te.keywords.$pattern,delete te.keywords.$pattern),Fe=Fe||/\w+/,te.keywords&&(te.keywords=Bt(te.keywords,A.case_insensitive)),le.keywordPatternRe=z(Fe,!0),Q&&(te.begin||(te.begin=/\B|\b/),le.beginRe=z(le.begin),!te.end&&!te.endsWithParent&&(te.end=/\B|\b/),te.end&&(le.endRe=z(le.end)),le.terminatorEnd=p(le.end)||"",te.endsWithParent&&Q.terminatorEnd&&(le.terminatorEnd+=(te.end?"|":"")+Q.terminatorEnd)),te.illegal&&(le.illegalRe=z(te.illegal)),te.contains||(te.contains=[]),te.contains=[].concat(...te.contains.map(function(De){return Ft(De==="self"?te:De)})),te.contains.forEach(function(De){je(De,le)}),te.starts&&je(te.starts,Q),le.matcher=Le(le),le}if(A.compilerExtensions||(A.compilerExtensions=[]),A.contains&&A.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return A.classNameAliases=r(A.classNameAliases||{}),je(A)}function Tt(A){return A?A.endsWithParent||Tt(A.starts):!1}function Ft(A){return A.variants&&!A.cachedVariants&&(A.cachedVariants=A.variants.map(function(z){return r(A,{variants:null},z)})),A.cachedVariants?A.cachedVariants:Tt(A)?r(A,{starts:A.starts?r(A.starts):null}):Object.isFrozen(A)?r(A):A}var Ge="11.11.1";class Ct extends Error{constructor(z,X){super(z),this.name="HTMLInjectionError",this.html=X}}const Ze=n,yi=r,vi=Symbol("nomatch"),al=7,ki=function(A){const z=Object.create(null),X=Object.create(null),ce=[];let Le=!0;const je="Could not find the language '{}', did you forget to load/include a language module?",te={disableAutodetect:!0,name:"Plain text",contains:[]};let Q={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:d};function le(Y){return Q.noHighlightRe.test(Y)}function Fe(Y){let oe=Y.className+" ";oe+=Y.parentNode?Y.parentNode.className:"";const ye=Q.languageDetectRe.exec(oe);if(ye){const Te=At(ye[1]);return Te||(fe(je.replace("{}",ye[1])),fe("Falling back to no-highlight mode for this block.",Y)),Te?ye[1]:"no-highlight"}return oe.split(/\s+/).find(Te=>le(Te)||At(Te))}function De(Y,oe,ye){let Te="",Be="";typeof oe=="object"?(Te=Y,ye=oe.ignoreIllegals,Be=oe.language):(B("10.7.0","highlight(lang, code, ...args) has been deprecated."),B("10.7.0",`Please use highlight(code, options) instead. +https://github.com/highlightjs/highlight.js/issues/2277`),Be=Y,Te=oe),ye===void 0&&(ye=!0);const ut={code:Te,language:Be};wn("before:highlight",ut);const Mt=ut.result?ut.result:sn(ut.language,ut.code,ye);return Mt.code=ut.code,wn("after:highlight",Mt),Mt}function sn(Y,oe,ye,Te){const Be=Object.create(null);function ut(Z,ne){return Z.keywords[ne]}function Mt(){if(!ue.keywords){$e.addText(Ce);return}let Z=0;ue.keywordPatternRe.lastIndex=0;let ne=ue.keywordPatternRe.exec(Ce),me="";for(;ne;){me+=Ce.substring(Z,ne.index);const _e=ft.case_insensitive?ne[0].toLowerCase():ne[0],Ue=ut(ue,_e);if(Ue){const[Et,_l]=Ue;if($e.addText(me),me="",Be[_e]=(Be[_e]||0)+1,Be[_e]<=al&&(Sn+=_l),Et.startsWith("_"))me+=ne[0];else{const Nl=ft.classNameAliases[Et]||Et;pt(ne[0],Nl)}}else me+=ne[0];Z=ue.keywordPatternRe.lastIndex,ne=ue.keywordPatternRe.exec(Ce)}me+=Ce.substring(Z),$e.addText(me)}function _n(){if(Ce==="")return;let Z=null;if(typeof ue.subLanguage=="string"){if(!z[ue.subLanguage]){$e.addText(Ce);return}Z=sn(ue.subLanguage,Ce,!0,Ai[ue.subLanguage]),Ai[ue.subLanguage]=Z._top}else Z=ir(Ce,ue.subLanguage.length?ue.subLanguage:null);ue.relevance>0&&(Sn+=Z.relevance),$e.__addSublanguage(Z._emitter,Z.language)}function Je(){ue.subLanguage!=null?_n():Mt(),Ce=""}function pt(Z,ne){Z!==""&&($e.startScope(ne),$e.addText(Z),$e.endScope())}function Ni(Z,ne){let me=1;const _e=ne.length-1;for(;me<=_e;){if(!Z._emit[me]){me++;continue}const Ue=ft.classNameAliases[Z[me]]||Z[me],Et=ne[me];Ue?pt(Et,Ue):(Ce=Et,Mt(),Ce=""),me++}}function Si(Z,ne){return Z.scope&&typeof Z.scope=="string"&&$e.openNode(ft.classNameAliases[Z.scope]||Z.scope),Z.beginScope&&(Z.beginScope._wrap?(pt(Ce,ft.classNameAliases[Z.beginScope._wrap]||Z.beginScope._wrap),Ce=""):Z.beginScope._multi&&(Ni(Z.beginScope,ne),Ce="")),ue=Object.create(Z,{parent:{value:ue}}),ue}function Ti(Z,ne,me){let _e=T(Z.endRe,me);if(_e){if(Z["on:end"]){const Ue=new t(Z);Z["on:end"](ne,Ue),Ue.isMatchIgnored&&(_e=!1)}if(_e){for(;Z.endsParent&&Z.parent;)Z=Z.parent;return Z}}if(Z.endsWithParent)return Ti(Z.parent,ne,me)}function yl(Z){return ue.matcher.regexIndex===0?(Ce+=Z[0],1):(lr=!0,0)}function vl(Z){const ne=Z[0],me=Z.rule,_e=new t(me),Ue=[me.__beforeBegin,me["on:begin"]];for(const Et of Ue)if(Et&&(Et(Z,_e),_e.isMatchIgnored))return yl(ne);return me.skip?Ce+=ne:(me.excludeBegin&&(Ce+=ne),Je(),!me.returnBegin&&!me.excludeBegin&&(Ce=ne)),Si(me,Z),me.returnBegin?0:ne.length}function kl(Z){const ne=Z[0],me=oe.substring(Z.index),_e=Ti(ue,Z,me);if(!_e)return vi;const Ue=ue;ue.endScope&&ue.endScope._wrap?(Je(),pt(ne,ue.endScope._wrap)):ue.endScope&&ue.endScope._multi?(Je(),Ni(ue.endScope,Z)):Ue.skip?Ce+=ne:(Ue.returnEnd||Ue.excludeEnd||(Ce+=ne),Je(),Ue.excludeEnd&&(Ce=ne));do ue.scope&&$e.closeNode(),!ue.skip&&!ue.subLanguage&&(Sn+=ue.relevance),ue=ue.parent;while(ue!==_e.parent);return _e.starts&&Si(_e.starts,Z),Ue.returnEnd?0:ne.length}function El(){const Z=[];for(let ne=ue;ne!==ft;ne=ne.parent)ne.scope&&Z.unshift(ne.scope);Z.forEach(ne=>$e.openNode(ne))}let Nn={};function Ci(Z,ne){const me=ne&&ne[0];if(Ce+=Z,me==null)return Je(),0;if(Nn.type==="begin"&&ne.type==="end"&&Nn.index===ne.index&&me===""){if(Ce+=oe.slice(ne.index,ne.index+1),!Le){const _e=new Error(`0 width match regex (${Y})`);throw _e.languageName=Y,_e.badRule=Nn.rule,_e}return 1}if(Nn=ne,ne.type==="begin")return vl(ne);if(ne.type==="illegal"&&!ye){const _e=new Error('Illegal lexeme "'+me+'" for mode "'+(ue.scope||"")+'"');throw _e.mode=ue,_e}else if(ne.type==="end"){const _e=kl(ne);if(_e!==vi)return _e}if(ne.type==="illegal"&&me==="")return Ce+=` +`,1;if(ar>1e5&&ar>ne.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Ce+=me,me.length}const ft=At(Y);if(!ft)throw Re(je.replace("{}",Y)),new Error('Unknown language: "'+Y+'"');const wl=ct(ft);let sr="",ue=Te||wl;const Ai={},$e=new Q.__emitter(Q);El();let Ce="",Sn=0,zt=0,ar=0,lr=!1;try{if(ft.__emitTokens)ft.__emitTokens(oe,$e);else{for(ue.matcher.considerAll();;){ar++,lr?lr=!1:ue.matcher.considerAll(),ue.matcher.lastIndex=zt;const Z=ue.matcher.exec(oe);if(!Z)break;const ne=oe.substring(zt,Z.index),me=Ci(ne,Z);zt=Z.index+me}Ci(oe.substring(zt))}return $e.finalize(),sr=$e.toHTML(),{language:Y,value:sr,relevance:Sn,illegal:!1,_emitter:$e,_top:ue}}catch(Z){if(Z.message&&Z.message.includes("Illegal"))return{language:Y,value:Ze(oe),illegal:!0,relevance:0,_illegalBy:{message:Z.message,index:zt,context:oe.slice(zt-100,zt+100),mode:Z.mode,resultSoFar:sr},_emitter:$e};if(Le)return{language:Y,value:Ze(oe),illegal:!1,relevance:0,errorRaised:Z,_emitter:$e,_top:ue};throw Z}}function rr(Y){const oe={value:Ze(Y),illegal:!1,relevance:0,_top:te,_emitter:new Q.__emitter(Q)};return oe._emitter.addText(Y),oe}function ir(Y,oe){oe=oe||Q.languages||Object.keys(z);const ye=rr(Y),Te=oe.filter(At).filter(_i).map(Je=>sn(Je,Y,!1));Te.unshift(ye);const Be=Te.sort((Je,pt)=>{if(Je.relevance!==pt.relevance)return pt.relevance-Je.relevance;if(Je.language&&pt.language){if(At(Je.language).supersetOf===pt.language)return 1;if(At(pt.language).supersetOf===Je.language)return-1}return 0}),[ut,Mt]=Be,_n=ut;return _n.secondBest=Mt,_n}function ll(Y,oe,ye){const Te=oe&&X[oe]||ye;Y.classList.add("hljs"),Y.classList.add(`language-${Te}`)}function or(Y){let oe=null;const ye=Fe(Y);if(le(ye))return;if(wn("before:highlightElement",{el:Y,language:ye}),Y.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",Y);return}if(Y.children.length>0&&(Q.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(Y)),Q.throwUnescapedHTML))throw new Ct("One of your code blocks includes unescaped HTML.",Y.innerHTML);oe=Y;const Te=oe.textContent,Be=ye?De(Te,{language:ye,ignoreIllegals:!0}):ir(Te);Y.innerHTML=Be.value,Y.dataset.highlighted="yes",ll(Y,ye,Be.language),Y.result={language:Be.language,re:Be.relevance,relevance:Be.relevance},Be.secondBest&&(Y.secondBest={language:Be.secondBest.language,relevance:Be.secondBest.relevance}),wn("after:highlightElement",{el:Y,result:Be,text:Te})}function cl(Y){Q=yi(Q,Y)}const ul=()=>{En(),B("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function dl(){En(),B("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let Ei=!1;function En(){function Y(){En()}if(document.readyState==="loading"){Ei||window.addEventListener("DOMContentLoaded",Y,!1),Ei=!0;return}document.querySelectorAll(Q.cssSelector).forEach(or)}function pl(Y,oe){let ye=null;try{ye=oe(A)}catch(Te){if(Re("Language definition for '{}' could not be registered.".replace("{}",Y)),Le)Re(Te);else throw Te;ye=te}ye.name||(ye.name=Y),z[Y]=ye,ye.rawDefinition=oe.bind(null,A),ye.aliases&&wi(ye.aliases,{languageName:Y})}function fl(Y){delete z[Y];for(const oe of Object.keys(X))X[oe]===Y&&delete X[oe]}function ml(){return Object.keys(z)}function At(Y){return Y=(Y||"").toLowerCase(),z[Y]||z[X[Y]]}function wi(Y,{languageName:oe}){typeof Y=="string"&&(Y=[Y]),Y.forEach(ye=>{X[ye.toLowerCase()]=oe})}function _i(Y){const oe=At(Y);return oe&&!oe.disableAutodetect}function gl(Y){Y["before:highlightBlock"]&&!Y["before:highlightElement"]&&(Y["before:highlightElement"]=oe=>{Y["before:highlightBlock"](Object.assign({block:oe.el},oe))}),Y["after:highlightBlock"]&&!Y["after:highlightElement"]&&(Y["after:highlightElement"]=oe=>{Y["after:highlightBlock"](Object.assign({block:oe.el},oe))})}function hl(Y){gl(Y),ce.push(Y)}function bl(Y){const oe=ce.indexOf(Y);oe!==-1&&ce.splice(oe,1)}function wn(Y,oe){const ye=Y;ce.forEach(function(Te){Te[ye]&&Te[ye](oe)})}function xl(Y){return B("10.7.0","highlightBlock will be removed entirely in v12.0"),B("10.7.0","Please use highlightElement now."),or(Y)}Object.assign(A,{highlight:De,highlightAuto:ir,highlightAll:En,highlightElement:or,highlightBlock:xl,configure:cl,initHighlighting:ul,initHighlightingOnLoad:dl,registerLanguage:pl,unregisterLanguage:fl,listLanguages:ml,getLanguage:At,registerAliases:wi,autoDetection:_i,inherit:yi,addPlugin:hl,removePlugin:bl}),A.debugMode=function(){Le=!1},A.safeMode=function(){Le=!0},A.versionString=Ge,A.regex={concat:b,lookahead:m,either:y,optional:h,anyNumberOfTimes:f};for(const Y in Oe)typeof Oe[Y]=="object"&&e(Oe[Y]);return Object.assign(A,Oe),A},Vt=ki({});return Vt.newInstance=()=>ki({}),Ar=Vt,Vt.HighlightJS=Vt,Vt.default=Vt,Ar}var zh=Fh();const $h=Xr(zh),cs={},Uh="hljs-";function Hh(e){const t=$h.newInstance();return e&&s(e),{highlight:n,highlightAuto:r,listLanguages:i,register:s,registerAlias:o,registered:l};function n(u,c,d){const p=d||cs,m=typeof p.prefix=="string"?p.prefix:Uh;if(!t.getLanguage(u))throw new Error("Unknown language: `"+u+"` is not registered");t.configure({__emitter:Wh,classPrefix:m});const f=t.highlight(c,{ignoreIllegals:!0,language:u});if(f.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:f.errorRaised});const h=f._emitter.root,b=h.data;return b.language=f.language,b.relevance=f.relevance,h}function r(u,c){const p=(c||cs).subset||i();let m=-1,f=0,h;for(;++mf&&(f=x.data.relevance,h=x)}return h||{type:"root",children:[],data:{language:void 0,relevance:f}}}function i(){return t.listLanguages()}function s(u,c){if(typeof u=="string")t.registerLanguage(u,c);else{let d;for(d in u)Object.hasOwn(u,d)&&t.registerLanguage(d,u[d])}}function o(u,c){if(typeof u=="string")t.registerAliases(typeof c=="string"?c:[...c],{languageName:u});else{let d;for(d in u)if(Object.hasOwn(u,d)){const p=u[d];t.registerAliases(typeof p=="string"?p:[...p],{languageName:d})}}}function l(u){return!!t.getLanguage(u)}}class Wh{constructor(t){this.options=t,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(t){if(t==="")return;const n=this.stack[this.stack.length-1],r=n.children[n.children.length-1];r&&r.type==="text"?r.value+=t:n.children.push({type:"text",value:t})}startScope(t){this.openNode(String(t))}endScope(){this.closeNode()}__addSublanguage(t,n){const r=this.stack[this.stack.length-1],i=t.root.children;n?r.children.push({type:"element",tagName:"span",properties:{className:[n]},children:i}):r.children.push(...i)}openNode(t){const n=this,r=t.split(".").map(function(o,l){return l?o+"_".repeat(l):n.options.classPrefix+o}),i=this.stack[this.stack.length-1],s={type:"element",tagName:"span",properties:{className:r},children:[]};i.children.push(s),this.stack.push(s)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const Kh={};function Gh(e){const t=e||Kh,n=t.aliases,r=t.detect||!1,i=t.languages||Bh,s=t.plainText,o=t.prefix,l=t.subset;let u="hljs";const c=Hh(i);if(n&&c.registerAlias(n),o){const d=o.indexOf("-");u=d===-1?o:o.slice(0,d)}return function(d,p){nr(d,"element",function(m,f,h){if(m.tagName!=="code"||!h||h.type!=="element"||h.tagName!=="pre")return;const b=qh(m);if(b===!1||!b&&!r||b&&s&&s.includes(b))return;Array.isArray(m.properties.className)||(m.properties.className=[]),m.properties.className.includes(u)||m.properties.className.unshift(u);const x=dg(m,{whitespace:"pre"});let y;try{y=b?c.highlight(b,x,{prefix:o}):c.highlightAuto(x,{prefix:o,subset:l})}catch(w){const T=w;if(b&&/Unknown language/.test(T.message)){p.message("Cannot highlight as `"+b+"`, it’s not registered",{ancestors:[h,m],cause:T,place:m.position,ruleId:"missing-language",source:"rehype-highlight"});return}throw T}!b&&y.data&&y.data.language&&m.properties.className.push("language-"+y.data.language),y.children.length>0&&(m.children=y.children)})}}function qh(e){const t=e.properties.className;let n=-1;if(!Array.isArray(t))return;let r;for(;++n0?{type:"text",value:_}:void 0),_===!1?m.lastIndex=j+1:(h!==j&&w.push({type:"text",value:c.value.slice(h,j)}),Array.isArray(_)?w.push(..._):_&&w.push(_),h=j+T[0].length,y=!0),!m.global)break;T=m.exec(c.value)}return y?(h?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=us(e,"(");let s=us(e,")");for(;r!==-1&&i>s;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),s++;return[e,n]}function Ba(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Wt(n)||Jn(n))&&(!t||n!==47)}Fa.peek=yb;function db(){this.buffer()}function pb(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function fb(){this.buffer()}function mb(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function gb(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=dt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function hb(e){this.exit(e)}function bb(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=dt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function xb(e){this.exit(e)}function yb(){return"["}function Fa(e,t,n,r){const i=n.createTracker(r);let s=i.move("[^");const o=n.enter("footnoteReference"),l=n.enter("reference");return s+=i.move(n.safe(n.associationId(e),{after:"]",before:s})),l(),o(),s+=i.move("]"),s}function vb(){return{enter:{gfmFootnoteCallString:db,gfmFootnoteCall:pb,gfmFootnoteDefinitionLabelString:fb,gfmFootnoteDefinition:mb},exit:{gfmFootnoteCallString:gb,gfmFootnoteCall:hb,gfmFootnoteDefinitionLabelString:bb,gfmFootnoteDefinition:xb}}}function kb(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Fa},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,s,o){const l=s.createTracker(o);let u=l.move("[^");const c=s.enter("footnoteDefinition"),d=s.enter("label");return u+=l.move(s.safe(s.associationId(r),{before:u,after:"]"})),d(),u+=l.move("]:"),r.children&&r.children.length>0&&(l.shift(4),u+=l.move((t?` +`:" ")+s.indentLines(s.containerFlow(r,l.current()),t?za:Eb))),c(),u}}function Eb(e,t,n){return t===0?e:za(e,t,n)}function za(e,t,n){return(n?"":" ")+e}const wb=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];$a.peek=Cb;function _b(){return{canContainEols:["delete"],enter:{strikethrough:Sb},exit:{strikethrough:Tb}}}function Nb(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:wb}],handlers:{delete:$a}}}function Sb(e){this.enter({type:"delete",children:[]},e)}function Tb(e){this.exit(e)}function $a(e,t,n,r){const i=n.createTracker(r),s=n.enter("strikethrough");let o=i.move("~~");return o+=n.containerPhrasing(e,{...i.current(),before:o,after:"~"}),o+=i.move("~~"),s(),o}function Cb(){return"~"}function Ab(e){return e.length}function Mb(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Ab,s=[],o=[],l=[],u=[];let c=0,d=-1;for(;++dc&&(c=e[d].length);++yu[y])&&(u[y]=T)}b.push(w)}o[d]=b,l[d]=x}let p=-1;if(typeof r=="object"&&"length"in r)for(;++pu[p]&&(u[p]=w),f[p]=w),m[p]=T}o.splice(1,0,m),l.splice(1,0,f),d=-1;const h=[];for(;++d "),s.shift(2);const o=n.indentLines(n.containerFlow(e,s.current()),Ob);return i(),o}function Ob(e,t,n){return">"+(n?"":" ")+e}function Lb(e,t){return ps(e,t.inConstruct,!0)&&!ps(e,t.notInConstruct,!1)}function ps(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++ro&&(o=s):s=1,i=r+t.length,r=n.indexOf(t,i);return o}function Db(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 Pb(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Bb(e,t,n,r){const i=Pb(n),s=e.value||"",o=i==="`"?"GraveAccent":"Tilde";if(Db(e,n)){const p=n.enter("codeIndented"),m=n.indentLines(s,Fb);return p(),m}const l=n.createTracker(r),u=i.repeat(Math.max(jb(s,i)+1,3)),c=n.enter("codeFenced");let d=l.move(u);if(e.lang){const p=n.enter(`codeFencedLang${o}`);d+=l.move(n.safe(e.lang,{before:d,after:" ",encode:["`"],...l.current()})),p()}if(e.lang&&e.meta){const p=n.enter(`codeFencedMeta${o}`);d+=l.move(" "),d+=l.move(n.safe(e.meta,{before:d,after:` `,encode:["`"],...l.current()})),p()}return d+=l.move(` `),s&&(d+=l.move(s+` -`)),d+=l.move(u),c(),d}function Bb(e,t,n){return(n?"":" ")+e}function hi(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Fb(e,t,n,r){const i=hi(n),s=i==='"'?"Quote":"Apostrophe",o=n.enter("definition");let l=n.enter("label");const u=n.createTracker(r);let c=u.move("[");return c+=u.move(n.safe(n.associationId(e),{before:c,after:"]",...u.current()})),c+=u.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=u.move("<"),c+=u.move(n.safe(e.url,{before:c,after:">",...u.current()})),c+=u.move(">")):(l=n.enter("destinationRaw"),c+=u.move(n.safe(e.url,{before:c,after:e.title?" ":` -`,...u.current()}))),l(),e.title&&(l=n.enter(`title${s}`),c+=u.move(" "+i),c+=u.move(n.safe(e.title,{before:c,after:i,...u.current()})),c+=u.move(i),l()),o(),c}function zb(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function bn(e){return"&#x"+e.toString(16).toUpperCase()+";"}function qn(e,t,n){const r=nn(e),i=nn(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}}$a.peek=$b;function $a(e,t,n,r){const i=zb(n),s=n.enter("emphasis"),o=n.createTracker(r),l=o.move(i);let u=o.move(n.containerPhrasing(e,{after:i,before:l,...o.current()}));const c=u.charCodeAt(0),d=qn(r.before.charCodeAt(r.before.length-1),c,i);d.inside&&(u=bn(c)+u.slice(1));const p=u.charCodeAt(u.length-1),m=qn(r.after.charCodeAt(0),p,i);m.inside&&(u=u.slice(0,-1)+bn(p));const f=o.move(i);return s(),n.attentionEncodeSurroundingInfo={after:m.outside,before:d.outside},l+u+f}function $b(e,t,n){return n.options.emphasis||"*"}function Ub(e,t){let n=!1;return tr(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Ur}),!!((!e.depth||e.depth<3)&&oi(e)&&(t.options.setext||n))}function Hb(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),s=n.createTracker(r);if(Ub(e,n)){const d=n.enter("headingSetext"),p=n.enter("phrasing"),m=n.containerPhrasing(e,{...s.current(),before:` +`)),d+=l.move(u),c(),d}function Fb(e,t,n){return(n?"":" ")+e}function hi(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function zb(e,t,n,r){const i=hi(n),s=i==='"'?"Quote":"Apostrophe",o=n.enter("definition");let l=n.enter("label");const u=n.createTracker(r);let c=u.move("[");return c+=u.move(n.safe(n.associationId(e),{before:c,after:"]",...u.current()})),c+=u.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=u.move("<"),c+=u.move(n.safe(e.url,{before:c,after:">",...u.current()})),c+=u.move(">")):(l=n.enter("destinationRaw"),c+=u.move(n.safe(e.url,{before:c,after:e.title?" ":` +`,...u.current()}))),l(),e.title&&(l=n.enter(`title${s}`),c+=u.move(" "+i),c+=u.move(n.safe(e.title,{before:c,after:i,...u.current()})),c+=u.move(i),l()),o(),c}function $b(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function bn(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Vn(e,t,n){const r=nn(e),i=nn(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}}Ua.peek=Ub;function Ua(e,t,n,r){const i=$b(n),s=n.enter("emphasis"),o=n.createTracker(r),l=o.move(i);let u=o.move(n.containerPhrasing(e,{after:i,before:l,...o.current()}));const c=u.charCodeAt(0),d=Vn(r.before.charCodeAt(r.before.length-1),c,i);d.inside&&(u=bn(c)+u.slice(1));const p=u.charCodeAt(u.length-1),m=Vn(r.after.charCodeAt(0),p,i);m.inside&&(u=u.slice(0,-1)+bn(p));const f=o.move(i);return s(),n.attentionEncodeSurroundingInfo={after:m.outside,before:d.outside},l+u+f}function Ub(e,t,n){return n.options.emphasis||"*"}function Hb(e,t){let n=!1;return nr(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Wr}),!!((!e.depth||e.depth<3)&&si(e)&&(t.options.setext||n))}function Wb(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),s=n.createTracker(r);if(Hb(e,n)){const d=n.enter("headingSetext"),p=n.enter("phrasing"),m=n.containerPhrasing(e,{...s.current(),before:` `,after:` `});return p(),d(),m+` `+(i===1?"=":"-").repeat(m.length-(Math.max(m.lastIndexOf("\r"),m.lastIndexOf(` `))+1))}const o="#".repeat(i),l=n.enter("headingAtx"),u=n.enter("phrasing");s.move(o+" ");let c=n.containerPhrasing(e,{before:"# ",after:` -`,...s.current()});return/^[\t ]/.test(c)&&(c=bn(c.charCodeAt(0))+c.slice(1)),c=c?o+" "+c:o,n.options.closeAtx&&(c+=" "+o),u(),l(),c}Ua.peek=Wb;function Ua(e){return e.value||""}function Wb(){return"<"}Ha.peek=Kb;function Ha(e,t,n,r){const i=hi(n),s=i==='"'?"Quote":"Apostrophe",o=n.enter("image");let l=n.enter("label");const u=n.createTracker(r);let c=u.move("![");return c+=u.move(n.safe(e.alt,{before:c,after:"]",...u.current()})),c+=u.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=u.move("<"),c+=u.move(n.safe(e.url,{before:c,after:">",...u.current()})),c+=u.move(">")):(l=n.enter("destinationRaw"),c+=u.move(n.safe(e.url,{before:c,after:e.title?" ":")",...u.current()}))),l(),e.title&&(l=n.enter(`title${s}`),c+=u.move(" "+i),c+=u.move(n.safe(e.title,{before:c,after:i,...u.current()})),c+=u.move(i),l()),c+=u.move(")"),o(),c}function Kb(){return"!"}Wa.peek=Gb;function Wa(e,t,n,r){const i=e.referenceType,s=n.enter("imageReference");let o=n.enter("label");const l=n.createTracker(r);let u=l.move("![");const c=n.safe(e.alt,{before:u,after:"]",...l.current()});u+=l.move(c+"]["),o();const d=n.stack;n.stack=[],o=n.enter("reference");const p=n.safe(n.associationId(e),{before:u,after:"]",...l.current()});return o(),n.stack=d,s(),i==="full"||!c||c!==p?u+=l.move(p+"]"):i==="shortcut"?u=u.slice(0,-1):u+=l.move("]"),u}function Gb(){return"!"}Ka.peek=qb;function Ka(e,t,n){let r=e.value||"",i="`",s=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++s\u007F]/.test(e.url))}qa.peek=Vb;function qa(e,t,n,r){const i=hi(n),s=i==='"'?"Quote":"Apostrophe",o=n.createTracker(r);let l,u;if(Ga(e,n)){const d=n.stack;n.stack=[],l=n.enter("autolink");let p=o.move("<");return p+=o.move(n.containerPhrasing(e,{before:p,after:">",...o.current()})),p+=o.move(">"),l(),n.stack=d,p}l=n.enter("link"),u=n.enter("label");let c=o.move("[");return c+=o.move(n.containerPhrasing(e,{before:c,after:"](",...o.current()})),c+=o.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),c+=o.move("<"),c+=o.move(n.safe(e.url,{before:c,after:">",...o.current()})),c+=o.move(">")):(u=n.enter("destinationRaw"),c+=o.move(n.safe(e.url,{before:c,after:e.title?" ":")",...o.current()}))),u(),e.title&&(u=n.enter(`title${s}`),c+=o.move(" "+i),c+=o.move(n.safe(e.title,{before:c,after:i,...o.current()})),c+=o.move(i),u()),c+=o.move(")"),l(),c}function Vb(e,t,n){return Ga(e,n)?"<":"["}Va.peek=Yb;function Va(e,t,n,r){const i=e.referenceType,s=n.enter("linkReference");let o=n.enter("label");const l=n.createTracker(r);let u=l.move("[");const c=n.containerPhrasing(e,{before:u,after:"]",...l.current()});u+=l.move(c+"]["),o();const d=n.stack;n.stack=[],o=n.enter("reference");const p=n.safe(n.associationId(e),{before:u,after:"]",...l.current()});return o(),n.stack=d,s(),i==="full"||!c||c!==p?u+=l.move(p+"]"):i==="shortcut"?u=u.slice(0,-1):u+=l.move("]"),u}function Yb(){return"["}function gi(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Xb(e){const t=gi(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Zb(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Ya(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Jb(e,t,n,r){const i=n.enter("list"),s=n.bulletCurrent;let o=e.ordered?Zb(n):gi(n);const l=e.ordered?o==="."?")":".":Xb(n);let u=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){const d=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&d&&(!d.children||!d.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&&(u=!0),Ya(n)===o&&d){let p=-1;for(;++p-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+s);let o=s.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);const l=n.createTracker(r);l.move(s+" ".repeat(o-s.length)),l.shift(o);const u=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,l.current()),d);return u(),c;function d(p,m,f){return m?(f?"":" ".repeat(o))+p:(f?s:s+" ".repeat(o-s.length))+p}}function tx(e,t,n,r){const i=n.enter("paragraph"),s=n.enter("phrasing"),o=n.containerPhrasing(e,r);return s(),i(),o}const nx=vn(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function rx(e,t,n,r){return(e.children.some(function(o){return nx(o)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function ix(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Xa.peek=ox;function Xa(e,t,n,r){const i=ix(n),s=n.enter("strong"),o=n.createTracker(r),l=o.move(i+i);let u=o.move(n.containerPhrasing(e,{after:i,before:l,...o.current()}));const c=u.charCodeAt(0),d=qn(r.before.charCodeAt(r.before.length-1),c,i);d.inside&&(u=bn(c)+u.slice(1));const p=u.charCodeAt(u.length-1),m=qn(r.after.charCodeAt(0),p,i);m.inside&&(u=u.slice(0,-1)+bn(p));const f=o.move(i+i);return s(),n.attentionEncodeSurroundingInfo={after:m.outside,before:d.outside},l+u+f}function ox(e,t,n){return n.options.strong||"*"}function sx(e,t,n,r){return n.safe(e.value,r)}function ax(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function lx(e,t,n){const r=(Ya(n)+(n.options.ruleSpaces?" ":"")).repeat(ax(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Za={blockquote:Ib,break:ds,code:Pb,definition:Fb,emphasis:$a,hardBreak:ds,heading:Hb,html:Ua,image:Ha,imageReference:Wa,inlineCode:Ka,link:qa,linkReference:Va,list:Jb,listItem:ex,paragraph:tx,root:rx,strong:Xa,text:sx,thematicBreak:lx};function cx(){return{enter:{table:ux,tableData:ps,tableHeader:ps,tableRow:px},exit:{codeText:fx,table:dx,tableData:Rr,tableHeader:Rr,tableRow:Rr}}}function ux(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function dx(e){this.exit(e),this.data.inTable=void 0}function px(e){this.enter({type:"tableRow",children:[]},e)}function Rr(e){this.exit(e)}function ps(e){this.enter({type:"tableCell",children:[]},e)}function fx(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,mx));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function mx(e,t){return t==="|"?t:e}function hx(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,s=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:m,table:o,tableCell:u,tableRow:l}};function o(f,g,x,y){return c(d(f,x,y),f.align)}function l(f,g,x,y){const b=p(f,x,y),k=c([b]);return k.slice(0,k.indexOf(` -`))}function u(f,g,x,y){const b=x.enter("tableCell"),k=x.enter("phrasing"),C=x.containerPhrasing(f,{...y,before:s,after:s});return k(),b(),C}function c(f,g){return Ab(f,{align:g,alignDelimiters:r,padding:n,stringLength:i})}function d(f,g,x){const y=f.children;let b=-1;const k=[],C=g.enter("table");for(;++b0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const Ox={tokenize:$x,partial:!0};function Lx(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Bx,continuation:{tokenize:Fx},exit:zx}},text:{91:{name:"gfmFootnoteCall",tokenize:Px},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:jx,resolveTo:Dx}}}}function jx(e,t,n){const r=this;let i=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;i--;){const u=r.events[i][1];if(u.type==="labelImage"){o=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return l;function l(u){if(!o||!o._balanced)return n(u);const c=dt(r.sliceSerialize({start:o.end,end:r.now()}));return c.codePointAt(0)!==94||!s.includes(c.slice(1))?n(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),t(u))}}function Dx(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";const 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++;const s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},l=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",s,t],["enter",o,t],["exit",o,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...l),e}function Px(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,o;return l;function l(p){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),u}function u(p){return p!==94?n(p):(e.enter("gfmFootnoteCallMarker"),e.consume(p),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(p){if(s>999||p===93&&!o||p===null||p===91||Ne(p))return n(p);if(p===93){e.exit("chunkString");const m=e.exit("gfmFootnoteCallString");return i.includes(dt(r.sliceSerialize(m)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(p)}return Ne(p)||(o=!0),s++,e.consume(p),p===92?d:c}function d(p){return p===91||p===92||p===93?(e.consume(p),s++,c):c(p)}}function Bx(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,o=0,l;return u;function u(g){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(g){return g===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):n(g)}function d(g){if(o>999||g===93&&!l||g===null||g===91||Ne(g))return n(g);if(g===93){e.exit("chunkString");const x=e.exit("gfmFootnoteDefinitionLabelString");return s=dt(r.sliceSerialize(x)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),m}return Ne(g)||(l=!0),o++,e.consume(g),g===92?p:d}function p(g){return g===91||g===92||g===93?(e.consume(g),o++,d):d(g)}function m(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),i.includes(s)||i.push(s),ve(e,f,"gfmFootnoteDefinitionWhitespace")):n(g)}function f(g){return t(g)}}function Fx(e,t,n){return e.check(yn,t,e.attempt(Ox,t,n))}function zx(e){e.exit("gfmFootnoteDefinition")}function $x(e,t,n){const r=this;return ve(e,i,"gfmFootnoteDefinitionIndent",5);function i(s){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(s):n(s)}}function Ux(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(o,l){let u=-1;for(;++u1?u(g):(o.consume(g),p++,f);if(p<2&&!n)return u(g);const y=o.exit("strikethroughSequenceTemporary"),b=nn(g);return y._open=!b||b===2&&!!x,y._close=!x||x===2&&!!b,l(g)}}}class Hx{constructor(){this.map=[]}add(t,n,r){Wx(this,t,n,r)}consume(t){if(this.map.sort(function(s,o){return s[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const s of i)t.push(s);i=r.pop()}this.map.length=0}}function Wx(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i-1;){const N=r.events[M][1].type;if(N==="lineEnding"||N==="linePrefix")M--;else break}const R=M>-1?r.events[M][1].type:null,D=R==="tableHead"||R==="tableRow"?T:u;return D===T&&r.parser.lazy[r.now().line]?n(_):D(_)}function u(_){return e.enter("tableHead"),e.enter("tableRow"),c(_)}function c(_){return _===124||(o=!0,s+=1),d(_)}function d(_){return _===null?n(_):se(_)?s>1?(s=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),f):n(_):ge(_)?ve(e,d,"whitespace")(_):(s+=1,o&&(o=!1,i+=1),_===124?(e.enter("tableCellDivider"),e.consume(_),e.exit("tableCellDivider"),o=!0,d):(e.enter("data"),p(_)))}function p(_){return _===null||_===124||Ne(_)?(e.exit("data"),d(_)):(e.consume(_),_===92?m:p)}function m(_){return _===92||_===124?(e.consume(_),p):p(_)}function f(_){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(_):(e.enter("tableDelimiterRow"),o=!1,ge(_)?ve(e,g,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(_):g(_))}function g(_){return _===45||_===58?y(_):_===124?(o=!0,e.enter("tableCellDivider"),e.consume(_),e.exit("tableCellDivider"),x):L(_)}function x(_){return ge(_)?ve(e,y,"whitespace")(_):y(_)}function y(_){return _===58?(s+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(_),e.exit("tableDelimiterMarker"),b):_===45?(s+=1,b(_)):_===null||se(_)?j(_):L(_)}function b(_){return _===45?(e.enter("tableDelimiterFiller"),k(_)):L(_)}function k(_){return _===45?(e.consume(_),k):_===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(_),e.exit("tableDelimiterMarker"),C):(e.exit("tableDelimiterFiller"),C(_))}function C(_){return ge(_)?ve(e,j,"whitespace")(_):j(_)}function j(_){return _===124?g(_):_===null||se(_)?!o||i!==s?L(_):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(_)):L(_)}function L(_){return n(_)}function T(_){return e.enter("tableRow"),B(_)}function B(_){return _===124?(e.enter("tableCellDivider"),e.consume(_),e.exit("tableCellDivider"),B):_===null||se(_)?(e.exit("tableRow"),t(_)):ge(_)?ve(e,B,"whitespace")(_):(e.enter("data"),O(_))}function O(_){return _===null||_===124||Ne(_)?(e.exit("data"),B(_)):(e.consume(_),_===92?w:O)}function w(_){return _===92||_===124?(e.consume(_),O):O(_)}}function Vx(e,t){let n=-1,r=!0,i=0,s=[0,0,0,0],o=[0,0,0,0],l=!1,u=0,c,d,p;const m=new Hx;for(;++nn[2]+1){const g=n[2]+1,x=n[3]-n[2]-1;e.add(g,x,[])}}e.add(n[3]+1,0,[["exit",p,t]])}return i!==void 0&&(s.end=Object.assign({},Qt(t.events,i)),e.add(i,0,[["exit",s,t]]),s=void 0),s}function ms(e,t,n,r,i){const s=[],o=Qt(t.events,n);i&&(i.end=Object.assign({},o),s.push(["exit",i,t])),r.end=Object.assign({},o),s.push(["exit",r,t]),e.add(n+1,0,s)}function Qt(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const Yx={name:"tasklistCheck",tokenize:Zx};function Xx(){return{text:{91:Yx}}}function Zx(e,t,n){const r=this;return i;function i(u){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),s)}function s(u){return Ne(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),o):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),o):n(u)}function o(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(u)}function l(u){return se(u)?t(u):ge(u)?e.check({tokenize:Jx},t,n)(u):n(u)}}function Jx(e,t,n){return ve(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function Qx(e){return Ys([_x(),Lx(),Ux(e),Gx(),Xx()])}const ey={};function ty(e){const t=this,n=e||ey,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Qx(n)),s.push(vx()),o.push(kx(n))}const ny={user:{label:"You",color:"var(--info)"},assistant:{label:"AI",color:"var(--success)"},tool:{label:"Tool",color:"var(--warning)"},plan:{label:"Plan",color:"var(--accent)"},thinking:{label:"Reasoning",color:"var(--text-muted)"}};function ry({message:e}){const[t,n]=S.useState(!1);return a.jsxs("div",{className:"py-1.5",children:[a.jsxs("button",{onClick:()=>n(!t),className:"flex items-center gap-1.5 mb-0.5 cursor-pointer",style:{background:"none",border:"none",padding:0},children:[a.jsx("div",{className:"w-2 h-2 rounded-full",style:{background:"var(--text-muted)",opacity:.5}}),a.jsx("span",{className:"text-[11px] font-semibold",style:{color:"var(--text-muted)"},children:"Reasoning"}),a.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-muted)",strokeWidth:"2",style:{transform:t?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.15s",marginLeft:2},children:a.jsx("path",{d:"M6 9l6 6 6-6"})})]}),t&&a.jsx("div",{className:"text-[12px] leading-relaxed pl-2.5 max-w-prose whitespace-pre-wrap",style:{color:"var(--text-muted)",fontStyle:"italic"},children:e.content})]})}function iy({message:e}){const t=e.planItems??[];return a.jsxs("div",{className:"py-1.5",children:[a.jsxs("div",{className:"flex items-center gap-1.5 mb-0.5",children:[a.jsx("div",{className:"w-2 h-2 rounded-full",style:{background:"var(--accent)"}}),a.jsx("span",{className:"text-[11px] font-semibold",style:{color:"var(--accent)"},children:"Plan"})]}),a.jsx("div",{className:"pl-2.5 space-y-1 mt-1",children:t.map((n,r)=>a.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[n.status==="completed"?a.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--success)",strokeWidth:"2.5",strokeLinecap:"round",children:a.jsx("path",{d:"M20 6L9 17l-5-5"})}):n.status==="in_progress"?a.jsx("span",{className:"w-3.5 h-3.5 flex items-center justify-center",children:a.jsx("span",{className:"w-2 h-2 rounded-full animate-pulse",style:{background:"var(--accent)"}})}):a.jsx("span",{className:"w-3.5 h-3.5 flex items-center justify-center",children:a.jsx("span",{className:"w-2 h-2 rounded-full",style:{background:"var(--text-muted)",opacity:.4}})}),a.jsx("span",{style:{color:n.status==="completed"?"var(--text-muted)":"var(--text-primary)",textDecoration:n.status==="completed"?"line-through":"none"},children:n.title})]},r))})]})}function oy({tc:e}){const t=n=>{if(!e.tool_call_id)return;const r=$e.getState().sessionId;r&&($e.getState().resolveToolApproval(e.tool_call_id,n),Yn().sendToolApproval(r,e.tool_call_id,n))};return a.jsxs("div",{className:"rounded-lg overflow-hidden",style:{border:"1px solid color-mix(in srgb, var(--warning) 40%, var(--border))"},children:[a.jsxs("div",{className:"px-3 py-2 flex items-center gap-2",style:{background:"color-mix(in srgb, var(--warning) 10%, var(--bg-secondary))"},children:[a.jsx("span",{className:"text-[11px] font-semibold",style:{color:"var(--warning)"},children:"Action Required"}),a.jsx("span",{className:"text-[11px] font-mono px-1.5 py-0.5 rounded",style:{background:"color-mix(in srgb, var(--warning) 15%, var(--bg-secondary))",color:"var(--text-primary)"},children:e.tool})]}),e.args!=null&&a.jsx("pre",{className:"px-3 py-2 text-[11px] font-mono whitespace-pre-wrap break-words overflow-y-auto leading-normal",style:{background:"var(--bg-secondary)",color:"var(--text-secondary)",maxHeight:200},children:JSON.stringify(e.args,null,2)}),a.jsxs("div",{className:"flex items-center gap-2 px-3 py-2",style:{background:"var(--bg-secondary)",borderTop:"1px solid var(--border)"},children:[a.jsx("button",{onClick:()=>t(!0),className:"text-xs font-semibold px-3 py-1.5 rounded cursor-pointer transition-colors",style:{background:"color-mix(in srgb, var(--success) 15%, var(--bg-secondary))",color:"var(--success)",border:"1px solid color-mix(in srgb, var(--success) 30%, var(--border))"},onMouseEnter:n=>{n.currentTarget.style.background="color-mix(in srgb, var(--success) 25%, var(--bg-secondary))"},onMouseLeave:n=>{n.currentTarget.style.background="color-mix(in srgb, var(--success) 15%, var(--bg-secondary))"},children:"Approve"}),a.jsx("button",{onClick:()=>t(!1),className:"text-xs font-semibold px-3 py-1.5 rounded cursor-pointer transition-colors",style:{background:"color-mix(in srgb, var(--error) 15%, var(--bg-secondary))",color:"var(--error)",border:"1px solid color-mix(in srgb, var(--error) 30%, var(--border))"},onMouseEnter:n=>{n.currentTarget.style.background="color-mix(in srgb, var(--error) 25%, var(--bg-secondary))"},onMouseLeave:n=>{n.currentTarget.style.background="color-mix(in srgb, var(--error) 15%, var(--bg-secondary))"},children:"Reject"})]})]})}function sy({tc:e,active:t,onClick:n}){const r=e.status==="denied",i=e.result!==void 0,s=r?"var(--error)":i?e.is_error?"var(--error)":"var(--success)":"var(--text-muted)",o=r?"✗":i?e.is_error?"✗":"✓":"•";return a.jsxs("button",{onClick:n,className:"inline-flex items-center gap-1 text-[11px] font-mono px-2 py-1 rounded cursor-pointer transition-all",style:{background:t?"var(--bg-secondary)":"var(--bg-primary)",border:t?"1px solid var(--text-muted)":"1px solid var(--border)",color:s},children:[o," ",e.tool,r&&a.jsx("span",{className:"ml-1 text-[10px] uppercase",children:"Denied"})]})}function ay({tc:e}){const t=e.result!==void 0,n=e.args!=null&&Object.keys(e.args).length>0;return a.jsxs("div",{className:"rounded-lg overflow-hidden",style:{background:"var(--bg-secondary)",border:"1px solid var(--border)"},children:[a.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5",style:{borderBottom:"1px solid var(--border)"},children:[a.jsx("span",{className:"text-[11px] font-mono font-semibold",style:{color:"var(--text-primary)"},children:e.tool}),e.is_error&&a.jsx("span",{className:"text-[10px] font-semibold px-1.5 py-0.5 rounded",style:{background:"color-mix(in srgb, var(--error) 15%, transparent)",color:"var(--error)"},children:"Error"})]}),a.jsxs("div",{className:"flex flex-col gap-0",children:[n&&a.jsxs("div",{style:{borderBottom:t?"1px solid var(--border)":"none"},children:[a.jsx("div",{className:"px-3 pt-1.5 pb-0.5",children:a.jsx("span",{className:"text-[10px] uppercase tracking-wider font-semibold",style:{color:"var(--text-muted)"},children:"Input"})}),a.jsx("pre",{className:"px-3 pb-2 text-[11px] font-mono whitespace-pre-wrap break-words overflow-y-auto leading-relaxed",style:{color:"var(--text-secondary)",maxHeight:160},children:JSON.stringify(e.args,null,2)})]}),t&&a.jsxs("div",{children:[a.jsx("div",{className:"px-3 pt-1.5 pb-0.5",children:a.jsx("span",{className:"text-[10px] uppercase tracking-wider font-semibold",style:{color:e.is_error?"var(--error)":"var(--text-muted)"},children:"Output"})}),a.jsx("pre",{className:"px-3 pb-2 text-[11px] font-mono whitespace-pre-wrap break-words overflow-y-auto leading-relaxed",style:{color:e.is_error?"var(--error)":"var(--text-secondary)",maxHeight:240},children:e.result})]})]})]})}const hs=3;function ly({message:e}){const t=e.toolCalls??(e.toolCall?[e.toolCall]:[]),[n,r]=S.useState(!1),[i,s]=S.useState(null);if(t.length===0)return null;const o=t.find(p=>p.status==="pending");if(o)return a.jsx("div",{className:"py-1.5 pl-2.5",children:a.jsx(oy,{tc:o})});const l=t.length-hs,u=l>0&&!n,c=u?t.slice(-hs):t,d=u?l:0;return a.jsxs("div",{className:"py-1.5",children:[a.jsxs("div",{className:"flex items-center gap-1.5 mb-0.5",children:[a.jsx("div",{className:"w-2 h-2 rounded-full",style:{background:"var(--warning)"}}),a.jsx("span",{className:"text-[11px] font-semibold",style:{color:"var(--warning)"},children:t.length===1?"Tool":`Tools (${t.length})`})]}),a.jsxs("div",{className:"pl-2.5 space-y-1.5",children:[a.jsxs("div",{className:"flex flex-wrap gap-1",children:[u&&a.jsxs("button",{onClick:()=>r(!0),className:"inline-flex items-center gap-1 text-[11px] font-mono px-2 py-1 rounded cursor-pointer hover:brightness-125",style:{background:"var(--bg-primary)",border:"1px solid var(--border)",color:"var(--text-muted)"},children:["+",l," more"]}),c.map((p,m)=>{const f=m+d;return a.jsx(sy,{tc:p,active:i===f,onClick:()=>s(i===f?null:f)},f)})]}),i!==null&&t[i]&&a.jsx(ay,{tc:t[i]})]})]})}function cy(e){const t=e.total_prompt_tokens+e.total_completion_tokens;let n=`## Agent Diagnostics +`,...s.current()});return/^[\t ]/.test(c)&&(c=bn(c.charCodeAt(0))+c.slice(1)),c=c?o+" "+c:o,n.options.closeAtx&&(c+=" "+o),u(),l(),c}Ha.peek=Kb;function Ha(e){return e.value||""}function Kb(){return"<"}Wa.peek=Gb;function Wa(e,t,n,r){const i=hi(n),s=i==='"'?"Quote":"Apostrophe",o=n.enter("image");let l=n.enter("label");const u=n.createTracker(r);let c=u.move("![");return c+=u.move(n.safe(e.alt,{before:c,after:"]",...u.current()})),c+=u.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=u.move("<"),c+=u.move(n.safe(e.url,{before:c,after:">",...u.current()})),c+=u.move(">")):(l=n.enter("destinationRaw"),c+=u.move(n.safe(e.url,{before:c,after:e.title?" ":")",...u.current()}))),l(),e.title&&(l=n.enter(`title${s}`),c+=u.move(" "+i),c+=u.move(n.safe(e.title,{before:c,after:i,...u.current()})),c+=u.move(i),l()),c+=u.move(")"),o(),c}function Gb(){return"!"}Ka.peek=qb;function Ka(e,t,n,r){const i=e.referenceType,s=n.enter("imageReference");let o=n.enter("label");const l=n.createTracker(r);let u=l.move("![");const c=n.safe(e.alt,{before:u,after:"]",...l.current()});u+=l.move(c+"]["),o();const d=n.stack;n.stack=[],o=n.enter("reference");const p=n.safe(n.associationId(e),{before:u,after:"]",...l.current()});return o(),n.stack=d,s(),i==="full"||!c||c!==p?u+=l.move(p+"]"):i==="shortcut"?u=u.slice(0,-1):u+=l.move("]"),u}function qb(){return"!"}Ga.peek=Vb;function Ga(e,t,n){let r=e.value||"",i="`",s=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++s\u007F]/.test(e.url))}Va.peek=Yb;function Va(e,t,n,r){const i=hi(n),s=i==='"'?"Quote":"Apostrophe",o=n.createTracker(r);let l,u;if(qa(e,n)){const d=n.stack;n.stack=[],l=n.enter("autolink");let p=o.move("<");return p+=o.move(n.containerPhrasing(e,{before:p,after:">",...o.current()})),p+=o.move(">"),l(),n.stack=d,p}l=n.enter("link"),u=n.enter("label");let c=o.move("[");return c+=o.move(n.containerPhrasing(e,{before:c,after:"](",...o.current()})),c+=o.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),c+=o.move("<"),c+=o.move(n.safe(e.url,{before:c,after:">",...o.current()})),c+=o.move(">")):(u=n.enter("destinationRaw"),c+=o.move(n.safe(e.url,{before:c,after:e.title?" ":")",...o.current()}))),u(),e.title&&(u=n.enter(`title${s}`),c+=o.move(" "+i),c+=o.move(n.safe(e.title,{before:c,after:i,...o.current()})),c+=o.move(i),u()),c+=o.move(")"),l(),c}function Yb(e,t,n){return qa(e,n)?"<":"["}Ya.peek=Xb;function Ya(e,t,n,r){const i=e.referenceType,s=n.enter("linkReference");let o=n.enter("label");const l=n.createTracker(r);let u=l.move("[");const c=n.containerPhrasing(e,{before:u,after:"]",...l.current()});u+=l.move(c+"]["),o();const d=n.stack;n.stack=[],o=n.enter("reference");const p=n.safe(n.associationId(e),{before:u,after:"]",...l.current()});return o(),n.stack=d,s(),i==="full"||!c||c!==p?u+=l.move(p+"]"):i==="shortcut"?u=u.slice(0,-1):u+=l.move("]"),u}function Xb(){return"["}function bi(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Zb(e){const t=bi(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Jb(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Xa(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Qb(e,t,n,r){const i=n.enter("list"),s=n.bulletCurrent;let o=e.ordered?Jb(n):bi(n);const l=e.ordered?o==="."?")":".":Zb(n);let u=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){const d=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&d&&(!d.children||!d.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&&(u=!0),Xa(n)===o&&d){let p=-1;for(;++p-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+s);let o=s.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);const l=n.createTracker(r);l.move(s+" ".repeat(o-s.length)),l.shift(o);const u=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,l.current()),d);return u(),c;function d(p,m,f){return m?(f?"":" ".repeat(o))+p:(f?s:s+" ".repeat(o-s.length))+p}}function nx(e,t,n,r){const i=n.enter("paragraph"),s=n.enter("phrasing"),o=n.containerPhrasing(e,r);return s(),i(),o}const rx=vn(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function ix(e,t,n,r){return(e.children.some(function(o){return rx(o)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function ox(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Za.peek=sx;function Za(e,t,n,r){const i=ox(n),s=n.enter("strong"),o=n.createTracker(r),l=o.move(i+i);let u=o.move(n.containerPhrasing(e,{after:i,before:l,...o.current()}));const c=u.charCodeAt(0),d=Vn(r.before.charCodeAt(r.before.length-1),c,i);d.inside&&(u=bn(c)+u.slice(1));const p=u.charCodeAt(u.length-1),m=Vn(r.after.charCodeAt(0),p,i);m.inside&&(u=u.slice(0,-1)+bn(p));const f=o.move(i+i);return s(),n.attentionEncodeSurroundingInfo={after:m.outside,before:d.outside},l+u+f}function sx(e,t,n){return n.options.strong||"*"}function ax(e,t,n,r){return n.safe(e.value,r)}function lx(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function cx(e,t,n){const r=(Xa(n)+(n.options.ruleSpaces?" ":"")).repeat(lx(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Ja={blockquote:Rb,break:fs,code:Bb,definition:zb,emphasis:Ua,hardBreak:fs,heading:Wb,html:Ha,image:Wa,imageReference:Ka,inlineCode:Ga,link:Va,linkReference:Ya,list:Qb,listItem:tx,paragraph:nx,root:ix,strong:Za,text:ax,thematicBreak:cx};function ux(){return{enter:{table:dx,tableData:ms,tableHeader:ms,tableRow:fx},exit:{codeText:mx,table:px,tableData:Or,tableHeader:Or,tableRow:Or}}}function dx(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function px(e){this.exit(e),this.data.inTable=void 0}function fx(e){this.enter({type:"tableRow",children:[]},e)}function Or(e){this.exit(e)}function ms(e){this.enter({type:"tableCell",children:[]},e)}function mx(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,gx));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function gx(e,t){return t==="|"?t:e}function hx(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,s=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:m,table:o,tableCell:u,tableRow:l}};function o(f,h,b,x){return c(d(f,b,x),f.align)}function l(f,h,b,x){const y=p(f,b,x),w=c([y]);return w.slice(0,w.indexOf(` +`))}function u(f,h,b,x){const y=b.enter("tableCell"),w=b.enter("phrasing"),T=b.containerPhrasing(f,{...x,before:s,after:s});return w(),y(),T}function c(f,h){return Mb(f,{align:h,alignDelimiters:r,padding:n,stringLength:i})}function d(f,h,b){const x=f.children;let y=-1;const w=[],T=h.enter("table");for(;++y0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const Lx={tokenize:Ux,partial:!0};function jx(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Fx,continuation:{tokenize:zx},exit:$x}},text:{91:{name:"gfmFootnoteCall",tokenize:Bx},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Dx,resolveTo:Px}}}}function Dx(e,t,n){const r=this;let i=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;i--;){const u=r.events[i][1];if(u.type==="labelImage"){o=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return l;function l(u){if(!o||!o._balanced)return n(u);const c=dt(r.sliceSerialize({start:o.end,end:r.now()}));return c.codePointAt(0)!==94||!s.includes(c.slice(1))?n(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),t(u))}}function Px(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";const 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++;const s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},l=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",s,t],["enter",o,t],["exit",o,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...l),e}function Bx(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,o;return l;function l(p){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),u}function u(p){return p!==94?n(p):(e.enter("gfmFootnoteCallMarker"),e.consume(p),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(p){if(s>999||p===93&&!o||p===null||p===91||Se(p))return n(p);if(p===93){e.exit("chunkString");const m=e.exit("gfmFootnoteCallString");return i.includes(dt(r.sliceSerialize(m)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(p)}return Se(p)||(o=!0),s++,e.consume(p),p===92?d:c}function d(p){return p===91||p===92||p===93?(e.consume(p),s++,c):c(p)}}function Fx(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,o=0,l;return u;function u(h){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(h){return h===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):n(h)}function d(h){if(o>999||h===93&&!l||h===null||h===91||Se(h))return n(h);if(h===93){e.exit("chunkString");const b=e.exit("gfmFootnoteDefinitionLabelString");return s=dt(r.sliceSerialize(b)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),m}return Se(h)||(l=!0),o++,e.consume(h),h===92?p:d}function p(h){return h===91||h===92||h===93?(e.consume(h),o++,d):d(h)}function m(h){return h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),i.includes(s)||i.push(s),ke(e,f,"gfmFootnoteDefinitionWhitespace")):n(h)}function f(h){return t(h)}}function zx(e,t,n){return e.check(yn,t,e.attempt(Lx,t,n))}function $x(e){e.exit("gfmFootnoteDefinition")}function Ux(e,t,n){const r=this;return ke(e,i,"gfmFootnoteDefinitionIndent",5);function i(s){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(s):n(s)}}function Hx(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(o,l){let u=-1;for(;++u1?u(h):(o.consume(h),p++,f);if(p<2&&!n)return u(h);const x=o.exit("strikethroughSequenceTemporary"),y=nn(h);return x._open=!y||y===2&&!!b,x._close=!b||b===2&&!!y,l(h)}}}class Wx{constructor(){this.map=[]}add(t,n,r){Kx(this,t,n,r)}consume(t){if(this.map.sort(function(s,o){return s[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const s of i)t.push(s);i=r.pop()}this.map.length=0}}function Kx(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i-1;){const v=r.events[M][1].type;if(v==="lineEnding"||v==="linePrefix")M--;else break}const L=M>-1?r.events[M][1].type:null,C=L==="tableHead"||L==="tableRow"?_:u;return C===_&&r.parser.lazy[r.now().line]?n(S):C(S)}function u(S){return e.enter("tableHead"),e.enter("tableRow"),c(S)}function c(S){return S===124||(o=!0,s+=1),d(S)}function d(S){return S===null?n(S):se(S)?s>1?(s=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),f):n(S):he(S)?ke(e,d,"whitespace")(S):(s+=1,o&&(o=!1,i+=1),S===124?(e.enter("tableCellDivider"),e.consume(S),e.exit("tableCellDivider"),o=!0,d):(e.enter("data"),p(S)))}function p(S){return S===null||S===124||Se(S)?(e.exit("data"),d(S)):(e.consume(S),S===92?m:p)}function m(S){return S===92||S===124?(e.consume(S),p):p(S)}function f(S){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(S):(e.enter("tableDelimiterRow"),o=!1,he(S)?ke(e,h,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):h(S))}function h(S){return S===45||S===58?x(S):S===124?(o=!0,e.enter("tableCellDivider"),e.consume(S),e.exit("tableCellDivider"),b):O(S)}function b(S){return he(S)?ke(e,x,"whitespace")(S):x(S)}function x(S){return S===58?(s+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(S),e.exit("tableDelimiterMarker"),y):S===45?(s+=1,y(S)):S===null||se(S)?j(S):O(S)}function y(S){return S===45?(e.enter("tableDelimiterFiller"),w(S)):O(S)}function w(S){return S===45?(e.consume(S),w):S===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(S),e.exit("tableDelimiterMarker"),T):(e.exit("tableDelimiterFiller"),T(S))}function T(S){return he(S)?ke(e,j,"whitespace")(S):j(S)}function j(S){return S===124?h(S):S===null||se(S)?!o||i!==s?O(S):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(S)):O(S)}function O(S){return n(S)}function _(S){return e.enter("tableRow"),P(S)}function P(S){return S===124?(e.enter("tableCellDivider"),e.consume(S),e.exit("tableCellDivider"),P):S===null||se(S)?(e.exit("tableRow"),t(S)):he(S)?ke(e,P,"whitespace")(S):(e.enter("data"),D(S))}function D(S){return S===null||S===124||Se(S)?(e.exit("data"),P(S)):(e.consume(S),S===92?R:D)}function R(S){return S===92||S===124?(e.consume(S),D):D(S)}}function Yx(e,t){let n=-1,r=!0,i=0,s=[0,0,0,0],o=[0,0,0,0],l=!1,u=0,c,d,p;const m=new Wx;for(;++nn[2]+1){const h=n[2]+1,b=n[3]-n[2]-1;e.add(h,b,[])}}e.add(n[3]+1,0,[["exit",p,t]])}return i!==void 0&&(s.end=Object.assign({},Qt(t.events,i)),e.add(i,0,[["exit",s,t]]),s=void 0),s}function hs(e,t,n,r,i){const s=[],o=Qt(t.events,n);i&&(i.end=Object.assign({},o),s.push(["exit",i,t])),r.end=Object.assign({},o),s.push(["exit",r,t]),e.add(n+1,0,s)}function Qt(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const Xx={name:"tasklistCheck",tokenize:Jx};function Zx(){return{text:{91:Xx}}}function Jx(e,t,n){const r=this;return i;function i(u){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),s)}function s(u){return Se(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),o):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),o):n(u)}function o(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(u)}function l(u){return se(u)?t(u):he(u)?e.check({tokenize:Qx},t,n)(u):n(u)}}function Qx(e,t,n){return ke(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function ey(e){return Xs([Nx(),jx(),Hx(e),qx(),Zx()])}const ty={};function ny(e){const t=this,n=e||ty,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(ey(n)),s.push(kx()),o.push(Ex(n))}const ry={user:{label:"You",color:"var(--info)"},assistant:{label:"AI",color:"var(--success)"},tool:{label:"Tool",color:"var(--warning)"},plan:{label:"Plan",color:"var(--accent)"},thinking:{label:"Reasoning",color:"var(--text-muted)"}};function iy({message:e}){const[t,n]=N.useState(!1);return a.jsxs("div",{className:"py-1.5",children:[a.jsxs("button",{onClick:()=>n(!t),className:"flex items-center gap-1.5 mb-0.5 cursor-pointer",style:{background:"none",border:"none",padding:0},children:[a.jsx("div",{className:"w-2 h-2 rounded-full",style:{background:"var(--text-muted)",opacity:.5}}),a.jsx("span",{className:"text-[11px] font-semibold",style:{color:"var(--text-muted)"},children:"Reasoning"}),a.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-muted)",strokeWidth:"2",style:{transform:t?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.15s",marginLeft:2},children:a.jsx("path",{d:"M6 9l6 6 6-6"})})]}),t&&a.jsx("div",{className:"text-[12px] leading-relaxed pl-2.5 max-w-prose whitespace-pre-wrap",style:{color:"var(--text-muted)",fontStyle:"italic"},children:e.content})]})}function oy({message:e}){const t=e.planItems??[];return a.jsxs("div",{className:"py-1.5",children:[a.jsxs("div",{className:"flex items-center gap-1.5 mb-0.5",children:[a.jsx("div",{className:"w-2 h-2 rounded-full",style:{background:"var(--accent)"}}),a.jsx("span",{className:"text-[11px] font-semibold",style:{color:"var(--accent)"},children:"Plan"})]}),a.jsx("div",{className:"pl-2.5 space-y-1 mt-1",children:t.map((n,r)=>a.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[n.status==="completed"?a.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--success)",strokeWidth:"2.5",strokeLinecap:"round",children:a.jsx("path",{d:"M20 6L9 17l-5-5"})}):n.status==="in_progress"?a.jsx("span",{className:"w-3.5 h-3.5 flex items-center justify-center",children:a.jsx("span",{className:"w-2 h-2 rounded-full animate-pulse",style:{background:"var(--accent)"}})}):a.jsx("span",{className:"w-3.5 h-3.5 flex items-center justify-center",children:a.jsx("span",{className:"w-2 h-2 rounded-full",style:{background:"var(--text-muted)",opacity:.4}})}),a.jsx("span",{style:{color:n.status==="completed"?"var(--text-muted)":"var(--text-primary)",textDecoration:n.status==="completed"?"line-through":"none"},children:n.title})]},r))})]})}function sy({tc:e}){const t=n=>{if(!e.tool_call_id)return;const r=ze.getState().sessionId;r&&(ze.getState().resolveToolApproval(e.tool_call_id,n),Xn().sendToolApproval(r,e.tool_call_id,n))};return a.jsxs("div",{className:"rounded-lg overflow-hidden",style:{border:"1px solid color-mix(in srgb, var(--warning) 40%, var(--border))"},children:[a.jsxs("div",{className:"px-3 py-2 flex items-center gap-2",style:{background:"color-mix(in srgb, var(--warning) 10%, var(--bg-secondary))"},children:[a.jsx("span",{className:"text-[11px] font-semibold",style:{color:"var(--warning)"},children:"Action Required"}),a.jsx("span",{className:"text-[11px] font-mono px-1.5 py-0.5 rounded",style:{background:"color-mix(in srgb, var(--warning) 15%, var(--bg-secondary))",color:"var(--text-primary)"},children:e.tool})]}),e.args!=null&&a.jsx("pre",{className:"px-3 py-2 text-[11px] font-mono whitespace-pre-wrap break-words overflow-y-auto leading-normal",style:{background:"var(--bg-secondary)",color:"var(--text-secondary)",maxHeight:200},children:JSON.stringify(e.args,null,2)}),a.jsxs("div",{className:"flex items-center gap-2 px-3 py-2",style:{background:"var(--bg-secondary)",borderTop:"1px solid var(--border)"},children:[a.jsx("button",{onClick:()=>t(!0),className:"text-xs font-semibold px-3 py-1.5 rounded cursor-pointer transition-colors",style:{background:"color-mix(in srgb, var(--success) 15%, var(--bg-secondary))",color:"var(--success)",border:"1px solid color-mix(in srgb, var(--success) 30%, var(--border))"},onMouseEnter:n=>{n.currentTarget.style.background="color-mix(in srgb, var(--success) 25%, var(--bg-secondary))"},onMouseLeave:n=>{n.currentTarget.style.background="color-mix(in srgb, var(--success) 15%, var(--bg-secondary))"},children:"Approve"}),a.jsx("button",{onClick:()=>t(!1),className:"text-xs font-semibold px-3 py-1.5 rounded cursor-pointer transition-colors",style:{background:"color-mix(in srgb, var(--error) 15%, var(--bg-secondary))",color:"var(--error)",border:"1px solid color-mix(in srgb, var(--error) 30%, var(--border))"},onMouseEnter:n=>{n.currentTarget.style.background="color-mix(in srgb, var(--error) 25%, var(--bg-secondary))"},onMouseLeave:n=>{n.currentTarget.style.background="color-mix(in srgb, var(--error) 15%, var(--bg-secondary))"},children:"Reject"})]})]})}function ay({tc:e,active:t,onClick:n}){const r=e.status==="denied",i=e.result!==void 0,s=r?"var(--error)":i?e.is_error?"var(--error)":"var(--success)":"var(--text-muted)",o=r?"✗":i?e.is_error?"✗":"✓":"•";return a.jsxs("button",{onClick:n,className:"inline-flex items-center gap-1 text-[11px] font-mono px-2 py-1 rounded cursor-pointer transition-all",style:{background:t?"var(--bg-secondary)":"var(--bg-primary)",border:t?"1px solid var(--text-muted)":"1px solid var(--border)",color:s},children:[o," ",e.tool,r&&a.jsx("span",{className:"ml-1 text-[10px] uppercase",children:"Denied"})]})}function ly({tc:e}){const t=e.result!==void 0,n=e.args!=null&&Object.keys(e.args).length>0;return a.jsxs("div",{className:"rounded-lg overflow-hidden",style:{background:"var(--bg-secondary)",border:"1px solid var(--border)"},children:[a.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5",style:{borderBottom:"1px solid var(--border)"},children:[a.jsx("span",{className:"text-[11px] font-mono font-semibold",style:{color:"var(--text-primary)"},children:e.tool}),e.is_error&&a.jsx("span",{className:"text-[10px] font-semibold px-1.5 py-0.5 rounded",style:{background:"color-mix(in srgb, var(--error) 15%, transparent)",color:"var(--error)"},children:"Error"})]}),a.jsxs("div",{className:"flex flex-col gap-0",children:[n&&a.jsxs("div",{style:{borderBottom:t?"1px solid var(--border)":"none"},children:[a.jsx("div",{className:"px-3 pt-1.5 pb-0.5",children:a.jsx("span",{className:"text-[10px] uppercase tracking-wider font-semibold",style:{color:"var(--text-muted)"},children:"Input"})}),a.jsx("pre",{className:"px-3 pb-2 text-[11px] font-mono whitespace-pre-wrap break-words overflow-y-auto leading-relaxed",style:{color:"var(--text-secondary)",maxHeight:160},children:JSON.stringify(e.args,null,2)})]}),t&&a.jsxs("div",{children:[a.jsx("div",{className:"px-3 pt-1.5 pb-0.5",children:a.jsx("span",{className:"text-[10px] uppercase tracking-wider font-semibold",style:{color:e.is_error?"var(--error)":"var(--text-muted)"},children:"Output"})}),a.jsx("pre",{className:"px-3 pb-2 text-[11px] font-mono whitespace-pre-wrap break-words overflow-y-auto leading-relaxed",style:{color:e.is_error?"var(--error)":"var(--text-secondary)",maxHeight:240},children:e.result})]})]})]})}const bs=3;function cy({message:e}){const t=e.toolCalls??(e.toolCall?[e.toolCall]:[]),[n,r]=N.useState(!1),[i,s]=N.useState(null);if(t.length===0)return null;const o=t.find(p=>p.status==="pending");if(o)return a.jsx("div",{className:"py-1.5 pl-2.5",children:a.jsx(sy,{tc:o})});const l=t.length-bs,u=l>0&&!n,c=u?t.slice(-bs):t,d=u?l:0;return a.jsxs("div",{className:"py-1.5",children:[a.jsxs("div",{className:"flex items-center gap-1.5 mb-0.5",children:[a.jsx("div",{className:"w-2 h-2 rounded-full",style:{background:"var(--warning)"}}),a.jsx("span",{className:"text-[11px] font-semibold",style:{color:"var(--warning)"},children:t.length===1?"Tool":`Tools (${t.length})`})]}),a.jsxs("div",{className:"pl-2.5 space-y-1.5",children:[a.jsxs("div",{className:"flex flex-wrap gap-1",children:[u&&a.jsxs("button",{onClick:()=>r(!0),className:"inline-flex items-center gap-1 text-[11px] font-mono px-2 py-1 rounded cursor-pointer hover:brightness-125",style:{background:"var(--bg-primary)",border:"1px solid var(--border)",color:"var(--text-muted)"},children:["+",l," more"]}),c.map((p,m)=>{const f=m+d;return a.jsx(ay,{tc:p,active:i===f,onClick:()=>s(i===f?null:f)},f)})]}),i!==null&&t[i]&&a.jsx(ly,{tc:t[i]})]})]})}function uy(e){const t=e.total_prompt_tokens+e.total_completion_tokens;let n=`## Agent Diagnostics - Model: ${e.model} - Turns: ${e.turn_count}/50 (max reached) - Tokens: ${e.total_prompt_tokens} prompt + ${e.total_completion_tokens} completion = ${t} total @@ -115,5 +115,5 @@ https://github.com/highlightjs/highlight.js/issues/2277`),Be=Y,Se=oe),xe===void - [${o.status}] ${o.title}`}const s=e.last_messages;return s&&s.length>0&&(n+=` ## Last Messages`,s.forEach((o,l)=>{const u=o.tool?`${o.role}:${o.tool}`:o.role,c=o.content?o.content.replace(/\n/g," "):"";n+=` -${l+1}. [${u}] ${c}`})),n}function uy(){const[e,t]=S.useState("idle"),n=async()=>{const r=$e.getState().sessionId;if(r){t("loading");try{const i=await Fu(r),s=cy(i);await navigator.clipboard.writeText(s),t("copied"),setTimeout(()=>t("idle"),2e3)}catch{t("idle")}}};return a.jsx("button",{onClick:n,disabled:e==="loading",className:"inline-flex items-center gap-1 text-[11px] font-mono px-2 py-1 rounded cursor-pointer hover:brightness-125 mt-1",style:{background:"var(--bg-primary)",border:"1px solid var(--border)",color:e==="copied"?"var(--success)":"var(--text-muted)"},children:e==="copied"?"Copied!":e==="loading"?"Loading...":"Copy Diagnostics"})}function dy({message:e}){if(e.role==="thinking")return a.jsx(ry,{message:e});if(e.role==="plan")return a.jsx(iy,{message:e});if(e.role==="tool")return a.jsx(ly,{message:e});const t=e.role==="user"?"user":"assistant",n=ny[t];return a.jsxs("div",{className:"py-1.5",children:[a.jsxs("div",{className:"flex items-center gap-1.5 mb-0.5",children:[a.jsx("div",{className:"w-2 h-2 rounded-full",style:{background:n.color}}),a.jsx("span",{className:"text-[11px] font-semibold",style:{color:n.color},children:n.label})]}),e.content&&(e.role==="user"?a.jsx("div",{className:"text-sm leading-relaxed pl-2.5 max-w-prose",style:{color:"var(--text-primary)"},children:e.content}):a.jsxs("div",{className:"text-sm leading-relaxed pl-2.5 max-w-prose chat-markdown",style:{color:"var(--text-secondary)"},children:[a.jsx(Qm,{remarkPlugins:[ty],rehypePlugins:[Kg],children:e.content}),e.content.includes("Reached maximum iterations")&&a.jsx(uy,{})]}))]})}function py(){const e=$e(l=>l.activeQuestion),t=$e(l=>l.sessionId),n=$e(l=>l.setActiveQuestion),[r,i]=S.useState("");if(!e)return null;const s=l=>{t&&(Yn().sendQuestionResponse(t,e.question_id,l),n(null),i(""))},o=e.options.length>0;return a.jsxs("div",{className:"mx-3 mb-2 rounded-lg overflow-hidden",style:{border:"1px solid color-mix(in srgb, var(--accent) 40%, var(--border))"},children:[a.jsx("div",{className:"px-3 py-2",style:{background:"color-mix(in srgb, var(--accent) 10%, var(--bg-secondary))"},children:a.jsx("span",{className:"text-[11px] font-semibold",style:{color:"var(--accent)"},children:"Question"})}),a.jsxs("div",{className:"px-3 py-2",style:{background:"var(--bg-secondary)"},children:[a.jsx("p",{className:"text-sm mb-2",style:{color:"var(--text-primary)"},children:e.question}),o&&a.jsx("div",{className:"flex flex-col gap-1 mb-2",children:e.options.map((l,u)=>a.jsxs("button",{onClick:()=>s(l),className:"w-full text-left text-[13px] py-2 px-3 rounded cursor-pointer transition-colors flex items-center gap-2",style:{background:"var(--bg-primary)",border:"1px solid var(--border)",borderLeft:"2px solid transparent",color:"var(--text-primary)",fontFamily:"var(--font-mono, ui-monospace, monospace)"},onMouseEnter:c=>{c.currentTarget.style.borderLeftColor="var(--accent)",c.currentTarget.style.background="color-mix(in srgb, var(--accent) 8%, var(--bg-primary))"},onMouseLeave:c=>{c.currentTarget.style.borderLeftColor="transparent",c.currentTarget.style.background="var(--bg-primary)"},children:[a.jsxs("span",{className:"text-[11px] font-semibold shrink-0",style:{color:"var(--text-muted)"},children:[u+1,"."]}),a.jsx("span",{className:"truncate",children:l})]},u))}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("input",{type:"text",value:r,onChange:l=>i(l.target.value),onKeyDown:l=>{l.key==="Enter"&&r.trim()&&s(r.trim())},placeholder:o?"Or type a custom answer...":"Type your answer...",className:"flex-1 text-sm px-2 py-1.5 rounded outline-none",style:{background:"var(--bg-primary)",border:"1px solid var(--border)",color:"var(--text-primary)"}}),a.jsx("button",{onClick:()=>{r.trim()&&s(r.trim())},disabled:!r.trim(),className:"text-xs font-semibold px-3 py-1.5 rounded cursor-pointer transition-colors disabled:opacity-30 disabled:cursor-not-allowed",style:{background:"color-mix(in srgb, var(--accent) 15%, var(--bg-secondary))",color:"var(--accent)",border:"1px solid color-mix(in srgb, var(--accent) 30%, var(--border))"},children:"Send"})]})]})]})}function fy(){const e=S.useRef(Yn()).current,[t,n]=S.useState(""),r=S.useRef(null),i=S.useRef(!0),s=zn(W=>W.enabled),o=zn(W=>W.status),l=!s||o==="authenticated",{sessionId:u,status:c,messages:d,plan:p,models:m,selectedModel:f,modelsLoading:g,skills:x,selectedSkillIds:y,skillsLoading:b,setModels:k,setSelectedModel:C,setModelsLoading:j,setSkills:L,setSelectedSkillIds:T,toggleSkill:B,setSkillsLoading:O,addUserMessage:w,hydrateSession:_,clearSession:M}=$e();S.useEffect(()=>{l&&(m.length>0||(j(!0),Bu().then(W=>{if(k(W),W.length>0&&!f){const U=W.find(re=>re.model_name.includes("claude"));C(U?U.model_name:W[0].model_name)}}).catch(console.error).finally(()=>j(!1))))},[l,m.length,f,k,C,j]),S.useEffect(()=>{x.length>0||(O(!0),$u().then(W=>{L(W),T(W.map(U=>U.id))}).catch(console.error).finally(()=>O(!1)))},[x.length,L,T,O]),S.useEffect(()=>{if(u)return;const W=sessionStorage.getItem("agent_session_id");W&&zu(W).then(U=>{U?_(U):sessionStorage.removeItem("agent_session_id")}).catch(()=>{sessionStorage.removeItem("agent_session_id")})},[]);const[R,D]=S.useState(!1),N=()=>{const W=r.current;if(!W)return;const U=W.scrollHeight-W.scrollTop-W.clientHeight<40;i.current=U,D(W.scrollTop>100)};S.useEffect(()=>{i.current&&r.current&&(r.current.scrollTop=r.current.scrollHeight)});const E=c==="thinking"||c==="executing"||c==="planning"||c==="awaiting_input",I=d[d.length-1],G=E&&(I==null?void 0:I.role)==="assistant"&&!I.done,H=E&&!G,V=S.useRef(null),h=()=>{const W=V.current;W&&(W.style.height="auto",W.style.height=Math.min(W.scrollHeight,200)+"px")},F=S.useCallback(()=>{const W=t.trim();!W||!f||E||(i.current=!0,w(W),e.sendAgentMessage(W,f,u,y),n(""),requestAnimationFrame(()=>{const U=V.current;U&&(U.style.height="auto")}))},[t,f,E,u,y,w,e]),$=S.useCallback(()=>{u&&e.sendAgentStop(u)},[u,e]),v=W=>{W.key==="Enter"&&!W.shiftKey&&(W.preventDefault(),F())},ie=!E&&!!f&&t.trim().length>0;return l?a.jsxs("div",{className:"flex flex-col h-full",style:{background:"var(--bg-primary)"},children:[a.jsx(gs,{selectedModel:f,models:m,modelsLoading:g,onModelChange:C,skills:x,selectedSkillIds:y,skillsLoading:b,onToggleSkill:B,onClear:M,onStop:$,hasMessages:d.length>0,isBusy:E}),a.jsx(hy,{plan:p}),a.jsxs("div",{className:"relative flex-1 overflow-hidden",children:[a.jsxs("div",{ref:r,onScroll:N,className:"h-full overflow-y-auto px-3 py-2 space-y-0.5",children:[d.length===0&&a.jsxs("div",{className:"flex flex-col items-center justify-center py-10 px-4 gap-3",style:{color:"var(--text-muted)"},children:[a.jsx("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:a.jsx("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})}),a.jsxs("div",{className:"text-center space-y-1.5",children:[a.jsx("p",{className:"text-sm font-medium",style:{color:"var(--text-secondary)"},children:"Ask the agent to help you code"}),a.jsxs("p",{className:"text-xs leading-relaxed",children:["Create agents, functions, evaluations,",a.jsx("br",{}),"or ask questions about your project."]})]})]}),d.filter(W=>W.role!=="plan").map(W=>a.jsx(dy,{message:W},W.id)),H&&a.jsx("div",{className:"py-1.5",children:a.jsxs("div",{className:"flex items-center gap-1.5",children:[a.jsx("div",{className:"w-2 h-2 rounded-full animate-pulse",style:{background:"var(--success)"}}),a.jsx("span",{className:"text-[11px] font-semibold",style:{color:"var(--success)"},children:c==="thinking"?"Thinking...":c==="executing"?"Executing...":c==="awaiting_input"?"Waiting for answer...":"Planning..."})]})})]}),R&&a.jsx("button",{onClick:()=>{var W;i.current=!1,(W=r.current)==null||W.scrollTo({top:0,behavior:"smooth"})},className:"absolute top-2 right-3 w-6 h-6 flex items-center justify-center rounded-full cursor-pointer transition-opacity opacity-70 hover:opacity-100",style:{background:"var(--bg-tertiary)",color:"var(--text-primary)"},title:"Scroll to top",children:a.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:a.jsx("polyline",{points:"18 15 12 9 6 15"})})})]}),a.jsx(py,{}),a.jsxs("div",{className:"flex items-end gap-2 px-3 py-2 border-t",style:{borderColor:"var(--border)"},children:[a.jsx("textarea",{ref:V,value:t,onChange:W=>{n(W.target.value),h()},onKeyDown:v,disabled:E||!f,placeholder:E?"Waiting for response...":"Message...",rows:2,className:"flex-1 bg-transparent text-sm py-1 disabled:opacity-40 placeholder:text-[var(--text-muted)] resize-none",style:{color:"var(--text-primary)",maxHeight:200,overflow:"auto"}}),a.jsx("button",{onClick:F,disabled:!ie,className:"text-xs font-semibold px-3 py-1.5 rounded transition-colors cursor-pointer disabled:opacity-30 disabled:cursor-not-allowed shrink-0","aria-label":"Send message",style:{color:ie?"var(--accent)":"var(--text-muted)",background:"transparent"},onMouseEnter:W=>{ie&&(W.currentTarget.style.background="color-mix(in srgb, var(--accent) 10%, transparent)")},onMouseLeave:W=>{W.currentTarget.style.background="transparent"},children:"Send"})]})]}):a.jsxs("div",{className:"flex flex-col h-full",style:{background:"var(--bg-primary)"},children:[a.jsx(gs,{selectedModel:f,models:m,modelsLoading:g,onModelChange:C,skills:x,selectedSkillIds:y,skillsLoading:b,onToggleSkill:B,onClear:M,onStop:$,hasMessages:!1,isBusy:!1}),a.jsx("div",{className:"flex-1 flex items-center justify-center p-4",children:a.jsxs("div",{className:"text-center",style:{color:"var(--text-muted)"},children:[a.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",className:"mx-auto mb-2",strokeLinecap:"round",children:[a.jsx("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2",ry:"2"}),a.jsx("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"})]}),a.jsx("p",{className:"text-sm font-medium mb-1",children:"Sign in to use Agent"}),a.jsx("p",{className:"text-xs",children:"Authentication is required to access the coding agent."})]})})]})}function gs({selectedModel:e,models:t,modelsLoading:n,onModelChange:r,skills:i,selectedSkillIds:s,skillsLoading:o,onToggleSkill:l,onClear:u,onStop:c,hasMessages:d,isBusy:p}){const[m,f]=S.useState(!1),g=S.useRef(null);return S.useEffect(()=>{if(!m)return;const x=y=>{g.current&&!g.current.contains(y.target)&&f(!1)};return document.addEventListener("mousedown",x),()=>document.removeEventListener("mousedown",x)},[m]),a.jsxs("div",{className:"shrink-0 flex items-center gap-2 px-3 h-10 border-b",style:{borderColor:"var(--border)",background:"var(--bg-primary)"},children:[a.jsx("span",{className:"text-[11px] uppercase tracking-wider font-semibold shrink-0",style:{color:"var(--text-muted)"},children:"Agent"}),a.jsxs("select",{value:e??"",onChange:x=>r(x.target.value),className:"flex-1 text-[11px] rounded px-1.5 py-1 outline-none min-w-0 cursor-pointer",style:{background:"var(--bg-secondary)",border:"1px solid var(--border)",color:"var(--text-primary)"},disabled:n,children:[n&&a.jsx("option",{value:"",children:"Loading models..."}),!n&&t.length===0&&a.jsx("option",{value:"",children:"No models"}),t.map(x=>a.jsx("option",{value:x.model_name,children:x.model_name},x.model_name))]}),!o&&i.length>0&&a.jsxs("div",{className:"relative shrink-0",ref:g,children:[a.jsxs("button",{onClick:()=>f(!m),className:"text-[11px] font-semibold px-2 py-1 rounded cursor-pointer flex items-center gap-1",style:{background:s.length>0?"color-mix(in srgb, var(--accent) 15%, transparent)":"transparent",border:`1px solid ${s.length>0?"var(--accent)":"var(--border)"}`,color:s.length>0?"var(--accent)":"var(--text-muted)"},title:"Skills",children:[a.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("path",{d:"M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"}),a.jsx("path",{d:"M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"})]}),s.length>0&&a.jsx("span",{children:s.length})]}),m&&a.jsx("div",{className:"absolute top-full right-0 mt-1 rounded shadow-lg z-50 py-1 max-h-64 overflow-y-auto",style:{background:"var(--bg-secondary)",border:"1px solid var(--border)",width:"190px"},children:i.map(x=>a.jsxs("button",{onClick:()=>l(x.id),className:"w-full text-left px-2 py-1 text-[11px] flex items-center gap-1.5 cursor-pointer",style:{color:"var(--text-primary)"},title:x.description,onMouseEnter:y=>{y.currentTarget.style.background="var(--bg-tertiary)"},onMouseLeave:y=>{y.currentTarget.style.background="transparent"},children:[a.jsx("span",{className:"w-3 h-3 rounded border flex items-center justify-center shrink-0",style:{borderColor:s.includes(x.id)?"var(--accent)":"var(--border)",background:s.includes(x.id)?"var(--accent)":"transparent"},children:s.includes(x.id)&&a.jsx("svg",{width:"8",height:"8",viewBox:"0 0 24 24",fill:"none",stroke:"white",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:a.jsx("polyline",{points:"20 6 9 17 4 12"})})}),a.jsx("span",{className:"truncate",children:x.name})]},x.id))})]}),p&&a.jsx("button",{onClick:c,className:"shrink-0 text-[11px] font-semibold px-2 py-1 rounded cursor-pointer",style:{background:"transparent",border:"1px solid var(--error)",color:"var(--error)"},title:"Stop",onMouseEnter:x=>{x.currentTarget.style.background="color-mix(in srgb, var(--error) 10%, transparent)"},onMouseLeave:x=>{x.currentTarget.style.background="transparent"},children:"Stop"}),d&&!p&&a.jsx("button",{onClick:u,className:"shrink-0 w-6 h-6 flex items-center justify-center rounded cursor-pointer",style:{background:"transparent",border:"none",color:"var(--text-muted)"},title:"New session",onMouseEnter:x=>{x.currentTarget.style.color="var(--text-primary)"},onMouseLeave:x=>{x.currentTarget.style.color="var(--text-muted)"},children:a.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("polyline",{points:"1 4 1 10 7 10"}),a.jsx("path",{d:"M3.51 15a9 9 0 1 0 2.13-9.36L1 10"})]})})]})}const my=10;function hy({plan:e}){const t=e.filter(m=>m.status==="completed").length,n=e.filter(m=>m.status!=="completed"),r=e.length>0&&t===e.length,[i,s]=S.useState(!1),o=S.useRef(n.length);if(S.useEffect(()=>{r&&s(!0)},[r]),S.useEffect(()=>{n.length>o.current&&s(!1),o.current=n.length},[n.length]),e.length===0)return null;const l=e.filter(m=>m.status==="completed"),u=Math.max(0,my-n.length),d=[...l.slice(-u),...n],p=e.length-d.length;return a.jsxs("div",{className:"shrink-0 border-b",style:{borderColor:"var(--border)",background:"var(--bg-secondary)"},children:[a.jsxs("button",{onClick:()=>s(!i),className:"w-full flex items-center gap-2 px-3 py-1.5 cursor-pointer",style:{background:"none",border:"none"},children:[a.jsx("div",{className:"w-2 h-2 rounded-full",style:{background:"var(--accent)"}}),a.jsxs("span",{className:"text-[11px] font-semibold",style:{color:"var(--accent)"},children:["Plan (",t,"/",e.length," completed)"]}),a.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-muted)",strokeWidth:"2",className:"ml-auto",style:{transform:i?"rotate(0deg)":"rotate(180deg)",transition:"transform 0.15s"},children:a.jsx("path",{d:"M6 9l6 6 6-6"})})]}),!i&&a.jsxs("div",{className:"px-3 pb-2 space-y-1",children:[p>0&&a.jsxs("div",{className:"text-[11px]",style:{color:"var(--text-muted)"},children:[p," earlier completed task",p!==1?"s":""," hidden"]}),d.map((m,f)=>a.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[m.status==="completed"?a.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--success)",strokeWidth:"2.5",strokeLinecap:"round",children:a.jsx("path",{d:"M20 6L9 17l-5-5"})}):m.status==="in_progress"?a.jsx("span",{className:"w-3.5 h-3.5 flex items-center justify-center",children:a.jsx("span",{className:"w-2 h-2 rounded-full animate-pulse",style:{background:"var(--accent)"}})}):a.jsx("span",{className:"w-3.5 h-3.5 flex items-center justify-center",children:a.jsx("span",{className:"w-2 h-2 rounded-full",style:{background:"var(--text-muted)",opacity:.4}})}),a.jsx("span",{style:{color:m.status==="completed"?"var(--text-muted)":"var(--text-primary)",textDecoration:m.status==="completed"?"line-through":"none"},children:m.title})]},f))]})]})}function gy(){const e=Yl(),t=ic(),[n,r]=S.useState(!1),[i,s]=S.useState(248),[o,l]=S.useState(!1),[u,c]=S.useState(380),[d,p]=S.useState(!1),{runs:m,selectedRunId:f,setRuns:g,upsertRun:x,selectRun:y,setTraces:b,setLogs:k,setChatMessages:C,setEntrypoints:j,setStateEvents:L,setGraphCache:T,setActiveNode:B,removeActiveNode:O}=ke(),{section:w,view:_,runId:M,setupEntrypoint:R,setupMode:D,evalCreating:N,evalSetId:E,evalRunId:I,evalRunItemName:G,evaluatorCreateType:H,evaluatorId:V,evaluatorFilter:h,explorerFile:F,navigate:$}=st(),{setEvalSets:v,setEvaluators:ie,setLocalEvaluators:W,setEvalRuns:U}=Ae();S.useEffect(()=>{w==="debug"&&_==="details"&&M&&M!==f&&y(M)},[w,_,M,f,y]);const re=zn(J=>J.init),de=xs(J=>J.init);S.useEffect(()=>{Ql().then(g).catch(console.error),vs().then(J=>j(J.map(he=>he.name))).catch(console.error),re(),de()},[g,j,re,de]),S.useEffect(()=>{w==="evals"&&(ks().then(J=>v(J)).catch(console.error),fc().then(J=>U(J)).catch(console.error)),(w==="evals"||w==="evaluators")&&(ac().then(J=>ie(J)).catch(console.error),Jr().then(J=>W(J)).catch(console.error))},[w,v,ie,W,U]);const be=Ae(J=>J.evalSets),Oe=Ae(J=>J.evalRuns);S.useEffect(()=>{if(w!=="evals"||N||E||I)return;const J=Object.values(Oe).sort((Re,fe)=>new Date(fe.start_time??0).getTime()-new Date(Re.start_time??0).getTime());if(J.length>0){$(`#/evals/runs/${J[0].id}`);return}const he=Object.values(be);he.length>0&&$(`#/evals/sets/${he[0].id}`)},[w,N,E,I,Oe,be,$]),S.useEffect(()=>{const J=he=>{he.key==="Escape"&&n&&r(!1)};return window.addEventListener("keydown",J),()=>window.removeEventListener("keydown",J)},[n]);const Ie=f?m[f]:null,at=S.useCallback((J,he)=>{x(he),b(J,he.traces),k(J,he.logs);const Re=he.messages.map(fe=>{const P=fe.contentParts??fe.content_parts??[],K=fe.toolCalls??fe.tool_calls??[];return{message_id:fe.messageId??fe.message_id,role:fe.role??"assistant",content:P.filter(ee=>{const ae=ee.mimeType??ee.mime_type??"";return ae.startsWith("text/")||ae==="application/json"}).map(ee=>{const ae=ee.data;return(ae==null?void 0:ae.inline)??""}).join(` -`).trim()??"",tool_calls:K.length>0?K.map(ee=>({name:ee.name??"",has_result:!!ee.result})):void 0}});if(C(J,Re),he.graph&&he.graph.nodes.length>0&&T(J,he.graph),he.states&&he.states.length>0&&(L(J,he.states.map(fe=>({node_name:fe.node_name,qualified_node_name:fe.qualified_node_name,phase:fe.phase,timestamp:new Date(fe.timestamp).getTime(),payload:fe.payload}))),he.status!=="completed"&&he.status!=="failed"))for(const fe of he.states)fe.phase==="started"?B(J,fe.node_name,fe.qualified_node_name):fe.phase==="completed"&&O(J,fe.node_name)},[x,b,k,C,L,T,B,O]);S.useEffect(()=>{if(!f)return;e.subscribe(f),cr(f).then(he=>at(f,he)).catch(console.error);const J=setTimeout(()=>{const he=ke.getState().runs[f];he&&(he.status==="pending"||he.status==="running")&&cr(f).then(Re=>at(f,Re)).catch(console.error)},2e3);return()=>{clearTimeout(J),e.unsubscribe(f)}},[f,e,at]);const St=S.useRef(null);S.useEffect(()=>{var Re,fe;if(!f)return;const J=Ie==null?void 0:Ie.status,he=St.current;if(St.current=J??null,J&&(J==="completed"||J==="failed")&&he!==J){const P=ke.getState(),K=((Re=P.traces[f])==null?void 0:Re.length)??0,ee=((fe=P.logs[f])==null?void 0:fe.length)??0,ae=(Ie==null?void 0:Ie.trace_count)??0,Ee=(Ie==null?void 0:Ie.log_count)??0;(Kat(f,Ke)).catch(console.error)}},[f,Ie==null?void 0:Ie.status,at]);const Pt=J=>{$(`#/debug/runs/${J}/traces`),y(J),r(!1)},yt=J=>{$(`#/debug/runs/${J}/traces`),y(J),r(!1)},ye=()=>{$("#/debug/new"),r(!1)},lt=J=>{J==="debug"?$("#/debug/new"):J==="evals"?$("#/evals"):J==="evaluators"?$("#/evaluators"):J==="explorer"&&$("#/explorer")},rt=S.useCallback(J=>{J.preventDefault(),l(!0);const he="touches"in J?J.touches[0].clientX:J.clientX,Re=i,fe=K=>{const ee="touches"in K?K.touches[0].clientX:K.clientX,ae=Math.max(200,Math.min(480,Re+(ee-he)));s(ae)},P=()=>{l(!1),document.removeEventListener("mousemove",fe),document.removeEventListener("mouseup",P),document.removeEventListener("touchmove",fe),document.removeEventListener("touchend",P),document.body.style.cursor="",document.body.style.userSelect=""};document.body.style.cursor="col-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",fe),document.addEventListener("mouseup",P),document.addEventListener("touchmove",fe,{passive:!1}),document.addEventListener("touchend",P)},[i]),vt=S.useCallback(J=>{J.preventDefault(),p(!0);const he="touches"in J?J.touches[0].clientX:J.clientX,Re=u,fe=K=>{const ee="touches"in K?K.touches[0].clientX:K.clientX,ae=Math.max(280,Math.min(700,Re-(ee-he)));c(ae)},P=()=>{p(!1),document.removeEventListener("mousemove",fe),document.removeEventListener("mouseup",P),document.removeEventListener("touchmove",fe),document.removeEventListener("touchend",P),document.body.style.cursor="",document.body.style.userSelect=""};document.body.style.cursor="col-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",fe),document.addEventListener("mouseup",P),document.addEventListener("touchmove",fe,{passive:!1}),document.addEventListener("touchend",P)},[u]),Bt=Me(J=>J.openTabs),qt=()=>w==="explorer"?Bt.length>0||F?a.jsx(Pu,{}):a.jsx("div",{className:"flex items-center justify-center h-full text-[var(--text-muted)]",children:"Select a file to view"}):w==="evals"?N?a.jsx(lo,{}):I?a.jsx(ku,{evalRunId:I,itemName:G}):E?a.jsx(bu,{evalSetId:E}):a.jsx(lo,{}):w==="evaluators"?H?a.jsx(Lu,{category:H}):a.jsx(Mu,{evaluatorId:V,evaluatorFilter:h}):_==="new"?a.jsx(wc,{}):_==="setup"&&R&&D?a.jsx(Vc,{entrypoint:R,mode:D,ws:e,onRunCreated:Pt,isMobile:t}):Ie?a.jsx(fu,{run:Ie,ws:e,isMobile:t}):a.jsx("div",{className:"flex items-center justify-center h-full text-[var(--text-muted)]",children:"Select a run or create a new one"});return t?a.jsxs("div",{className:"flex flex-col h-screen w-screen",children:[a.jsxs("div",{className:"flex flex-1 overflow-hidden relative",children:[!n&&a.jsx("button",{onClick:()=>r(!0),className:"fixed top-2 left-2 z-40 w-9 h-9 flex items-center justify-center rounded-lg cursor-pointer",style:{background:"var(--bg-secondary)",border:"1px solid var(--border)"},children:a.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[a.jsx("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),a.jsx("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),a.jsx("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]})}),n&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"fixed inset-0 z-50",style:{background:"rgba(0,0,0,0.5)"},onClick:()=>r(!1)}),a.jsxs("aside",{className:"fixed inset-y-0 left-0 z-50 w-64 bg-[var(--sidebar-bg)] border-r border-[var(--border)] flex flex-col",children:[a.jsxs("div",{className:"px-3 h-10 border-b border-[var(--border)] flex items-center justify-between",children:[a.jsxs("button",{onClick:()=>{$("#/debug/new"),r(!1)},className:"flex items-center gap-2 cursor-pointer",style:{background:"none",border:"none"},children:[a.jsx("img",{src:"/favicon.ico",width:"14",height:"14",alt:"UiPath"}),a.jsx("span",{className:"text-[10px] uppercase tracking-widest font-semibold",style:{color:"var(--text-muted)"},children:"Developer Console"})]}),a.jsx("button",{onClick:()=>r(!1),className:"w-6 h-6 flex items-center justify-center rounded cursor-pointer transition-colors",style:{color:"var(--text-muted)",background:"transparent",border:"none"},children:a.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[a.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),a.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),w==="debug"&&a.jsx(Li,{runs:Object.values(m),selectedRunId:f,onSelectRun:yt,onNewRun:ye}),w==="evals"&&a.jsx(no,{}),w==="evaluators"&&a.jsx(co,{}),w==="explorer"&&a.jsx(po,{})]})]}),a.jsx("main",{className:"flex-1 overflow-hidden bg-[var(--bg-primary)]",children:qt()})]}),a.jsx(ji,{}),a.jsx(Zi,{}),a.jsx(eo,{})]}):a.jsxs("div",{className:"flex flex-col h-screen w-screen",children:[a.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[a.jsxs("aside",{className:"shrink-0 flex flex-col",style:{width:i,background:"var(--sidebar-bg)"},children:[a.jsxs("div",{className:"flex h-10 border-b shrink-0",style:{borderColor:"var(--border)"},children:[a.jsx("button",{onClick:()=>$("#/debug/new"),className:"w-12 shrink-0 flex items-center justify-center cursor-pointer transition-colors border-r",style:{background:"var(--activity-bar-bg)",border:"none",borderRight:"1px solid var(--border)"},onMouseEnter:J=>{J.currentTarget.style.background="var(--bg-hover)"},onMouseLeave:J=>{J.currentTarget.style.background="var(--activity-bar-bg)"},children:a.jsx("img",{src:"/favicon.ico",width:"20",height:"20",alt:"UiPath"})}),a.jsx("div",{className:"flex-1 flex items-center px-3",style:{background:"var(--sidebar-bg)"},children:a.jsx("span",{className:"text-[11px] uppercase tracking-widest font-semibold",style:{color:"var(--text-muted)"},children:w==="debug"?"Developer Console":w==="evals"?"Evaluations":w==="evaluators"?"Evaluators":"Explorer"})})]}),a.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[a.jsx(sc,{section:w,onSectionChange:lt}),a.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[w==="debug"&&a.jsx(Li,{runs:Object.values(m),selectedRunId:f,onSelectRun:yt,onNewRun:ye}),w==="evals"&&a.jsx(no,{}),w==="evaluators"&&a.jsx(co,{}),w==="explorer"&&a.jsx(po,{})]})]})]}),a.jsx("div",{onMouseDown:rt,onTouchStart:rt,className:"shrink-0 drag-handle-col",style:o?{background:"var(--accent)"}:void 0}),a.jsxs("main",{className:"flex-1 overflow-hidden bg-[var(--bg-primary)] flex",children:[a.jsx("div",{className:"flex-1 overflow-hidden",children:qt()}),w==="explorer"&&a.jsxs(a.Fragment,{children:[a.jsx("div",{onMouseDown:vt,onTouchStart:vt,className:"shrink-0 drag-handle-col",style:d?{background:"var(--accent)"}:void 0}),a.jsx("div",{className:"shrink-0 overflow-hidden",style:{width:u,borderLeft:"1px solid var(--border)"},children:a.jsx(fy,{})})]})]})]}),a.jsx(ji,{}),a.jsx(Zi,{}),a.jsx(eo,{})]})}Cl.createRoot(document.getElementById("root")).render(a.jsx(S.StrictMode,{children:a.jsx(gy,{})}));export{Qm as M,ty as a,Kg as r,ke as u}; +${l+1}. [${u}] ${c}`})),n}function dy(){const[e,t]=N.useState("idle"),n=async()=>{const r=ze.getState().sessionId;if(r){t("loading");try{const i=await zu(r),s=uy(i);await navigator.clipboard.writeText(s),t("copied"),setTimeout(()=>t("idle"),2e3)}catch{t("idle")}}};return a.jsx("button",{onClick:n,disabled:e==="loading",className:"inline-flex items-center gap-1 text-[11px] font-mono px-2 py-1 rounded cursor-pointer hover:brightness-125 mt-1",style:{background:"var(--bg-primary)",border:"1px solid var(--border)",color:e==="copied"?"var(--success)":"var(--text-muted)"},children:e==="copied"?"Copied!":e==="loading"?"Loading...":"Copy Diagnostics"})}function py({message:e}){if(e.role==="thinking")return a.jsx(iy,{message:e});if(e.role==="plan")return a.jsx(oy,{message:e});if(e.role==="tool")return a.jsx(cy,{message:e});const t=e.role==="user"?"user":"assistant",n=ry[t];return a.jsxs("div",{className:"py-1.5",children:[a.jsxs("div",{className:"flex items-center gap-1.5 mb-0.5",children:[a.jsx("div",{className:"w-2 h-2 rounded-full",style:{background:n.color}}),a.jsx("span",{className:"text-[11px] font-semibold",style:{color:n.color},children:n.label})]}),e.content&&(e.role==="user"?a.jsx("div",{className:"text-sm leading-relaxed pl-2.5 max-w-prose",style:{color:"var(--text-primary)"},children:e.content}):a.jsxs("div",{className:"text-sm leading-relaxed pl-2.5 max-w-prose chat-markdown",style:{color:"var(--text-secondary)"},children:[a.jsx(eg,{remarkPlugins:[ny],rehypePlugins:[Gh],children:e.content}),e.content.includes("Reached maximum iterations")&&a.jsx(dy,{})]}))]})}function fy(){const e=ze(l=>l.activeQuestion),t=ze(l=>l.sessionId),n=ze(l=>l.setActiveQuestion),[r,i]=N.useState("");if(!e)return null;const s=l=>{t&&(Xn().sendQuestionResponse(t,e.question_id,l),n(null),i(""))},o=e.options.length>0;return a.jsxs("div",{className:"mx-3 mb-2 rounded-lg overflow-hidden",style:{border:"1px solid color-mix(in srgb, var(--accent) 40%, var(--border))"},children:[a.jsx("div",{className:"px-3 py-2",style:{background:"color-mix(in srgb, var(--accent) 10%, var(--bg-secondary))"},children:a.jsx("span",{className:"text-[11px] font-semibold",style:{color:"var(--accent)"},children:"Question"})}),a.jsxs("div",{className:"px-3 py-2",style:{background:"var(--bg-secondary)"},children:[a.jsx("p",{className:"text-sm mb-2",style:{color:"var(--text-primary)"},children:e.question}),o&&a.jsx("div",{className:"flex flex-col gap-1 mb-2",children:e.options.map((l,u)=>a.jsxs("button",{onClick:()=>s(l),className:"w-full text-left text-[13px] py-2 px-3 rounded cursor-pointer transition-colors flex items-center gap-2",style:{background:"var(--bg-primary)",border:"1px solid var(--border)",borderLeft:"2px solid transparent",color:"var(--text-primary)",fontFamily:"var(--font-mono, ui-monospace, monospace)"},onMouseEnter:c=>{c.currentTarget.style.borderLeftColor="var(--accent)",c.currentTarget.style.background="color-mix(in srgb, var(--accent) 8%, var(--bg-primary))"},onMouseLeave:c=>{c.currentTarget.style.borderLeftColor="transparent",c.currentTarget.style.background="var(--bg-primary)"},children:[a.jsxs("span",{className:"text-[11px] font-semibold shrink-0",style:{color:"var(--text-muted)"},children:[u+1,"."]}),a.jsx("span",{className:"truncate",children:l})]},u))}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("input",{type:"text",value:r,onChange:l=>i(l.target.value),onKeyDown:l=>{l.key==="Enter"&&r.trim()&&s(r.trim())},placeholder:o?"Or type a custom answer...":"Type your answer...",className:"flex-1 text-sm px-2 py-1.5 rounded outline-none",style:{background:"var(--bg-primary)",border:"1px solid var(--border)",color:"var(--text-primary)"}}),a.jsx("button",{onClick:()=>{r.trim()&&s(r.trim())},disabled:!r.trim(),className:"text-xs font-semibold px-3 py-1.5 rounded cursor-pointer transition-colors disabled:opacity-30 disabled:cursor-not-allowed",style:{background:"color-mix(in srgb, var(--accent) 15%, var(--bg-secondary))",color:"var(--accent)",border:"1px solid color-mix(in srgb, var(--accent) 30%, var(--border))"},children:"Send"})]})]})]})}function my(){const e=N.useRef(Xn()).current,[t,n]=N.useState(""),r=N.useRef(null),i=N.useRef(!0),s=zn(K=>K.enabled),o=zn(K=>K.status),l=!s||o==="authenticated",{sessionId:u,status:c,messages:d,plan:p,models:m,selectedModel:f,modelsLoading:h,skills:b,selectedSkillIds:x,skillsLoading:y,setModels:w,setSelectedModel:T,setModelsLoading:j,setSkills:O,setSelectedSkillIds:_,toggleSkill:P,setSkillsLoading:D,addUserMessage:R,hydrateSession:S,clearSession:M}=ze();N.useEffect(()=>{l&&(m.length>0||(j(!0),Fu().then(K=>{if(w(K),K.length>0&&!f){const W=K.find(re=>re.model_name.includes("claude"));T(W?W.model_name:K[0].model_name)}}).catch(console.error).finally(()=>j(!1))))},[l,m.length,f,w,T,j]),N.useEffect(()=>{b.length>0||(D(!0),Uu().then(K=>{O(K),_(K.map(W=>W.id))}).catch(console.error).finally(()=>D(!1)))},[b.length,O,_,D]),N.useEffect(()=>{if(u)return;const K=sessionStorage.getItem("agent_session_id");K&&$u(K).then(W=>{W?S(W):sessionStorage.removeItem("agent_session_id")}).catch(()=>{sessionStorage.removeItem("agent_session_id")})},[]);const[L,C]=N.useState(!1),v=()=>{const K=r.current;if(!K)return;const W=K.scrollHeight-K.scrollTop-K.clientHeight<40;i.current=W,C(K.scrollTop>100)};N.useEffect(()=>{i.current&&r.current&&(r.current.scrollTop=r.current.scrollHeight)});const E=c==="thinking"||c==="executing"||c==="planning"||c==="awaiting_input",I=d[d.length-1],H=E&&(I==null?void 0:I.role)==="assistant"&&!I.done,U=E&&!H,V=N.useRef(null),g=()=>{const K=V.current;K&&(K.style.height="auto",K.style.height=Math.min(K.scrollHeight,200)+"px")},F=N.useCallback(()=>{const K=t.trim();!K||!f||E||(i.current=!0,R(K),e.sendAgentMessage(K,f,u,x),n(""),requestAnimationFrame(()=>{const W=V.current;W&&(W.style.height="auto")}))},[t,f,E,u,x,R,e]),$=N.useCallback(()=>{u&&e.sendAgentStop(u)},[u,e]),k=K=>{K.key==="Enter"&&!K.shiftKey&&(K.preventDefault(),F())},ie=!E&&!!f&&t.trim().length>0;return l?a.jsxs("div",{className:"flex flex-col h-full",style:{background:"var(--bg-primary)"},children:[a.jsx(xs,{selectedModel:f,models:m,modelsLoading:h,onModelChange:T,skills:b,selectedSkillIds:x,skillsLoading:y,onToggleSkill:P,onClear:M,onStop:$,hasMessages:d.length>0,isBusy:E}),a.jsx(hy,{plan:p}),a.jsxs("div",{className:"relative flex-1 overflow-hidden",children:[a.jsxs("div",{ref:r,onScroll:v,className:"h-full overflow-y-auto px-3 py-2 space-y-0.5",children:[d.length===0&&a.jsxs("div",{className:"flex flex-col items-center justify-center py-10 px-4 gap-3",style:{color:"var(--text-muted)"},children:[a.jsx("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:a.jsx("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})}),a.jsxs("div",{className:"text-center space-y-1.5",children:[a.jsx("p",{className:"text-sm font-medium",style:{color:"var(--text-secondary)"},children:"Ask the agent to help you code"}),a.jsxs("p",{className:"text-xs leading-relaxed",children:["Create agents, functions, evaluations,",a.jsx("br",{}),"or ask questions about your project."]})]})]}),d.filter(K=>K.role!=="plan").map(K=>a.jsx(py,{message:K},K.id)),U&&a.jsx("div",{className:"py-1.5",children:a.jsxs("div",{className:"flex items-center gap-1.5",children:[a.jsx("div",{className:"w-2 h-2 rounded-full animate-pulse",style:{background:"var(--success)"}}),a.jsx("span",{className:"text-[11px] font-semibold",style:{color:"var(--success)"},children:c==="thinking"?"Thinking...":c==="executing"?"Executing...":c==="awaiting_input"?"Waiting for answer...":"Planning..."})]})})]}),L&&a.jsx("button",{onClick:()=>{var K;i.current=!1,(K=r.current)==null||K.scrollTo({top:0,behavior:"smooth"})},className:"absolute top-2 right-3 w-6 h-6 flex items-center justify-center rounded-full cursor-pointer transition-opacity opacity-70 hover:opacity-100",style:{background:"var(--bg-tertiary)",color:"var(--text-primary)"},title:"Scroll to top",children:a.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:a.jsx("polyline",{points:"18 15 12 9 6 15"})})})]}),a.jsx(fy,{}),a.jsxs("div",{className:"flex items-end gap-2 px-3 py-2 border-t",style:{borderColor:"var(--border)"},children:[a.jsx("textarea",{ref:V,value:t,onChange:K=>{n(K.target.value),g()},onKeyDown:k,disabled:E||!f,placeholder:E?"Waiting for response...":"Message...",rows:2,className:"flex-1 bg-transparent text-sm py-1 disabled:opacity-40 placeholder:text-[var(--text-muted)] resize-none",style:{color:"var(--text-primary)",maxHeight:200,overflow:"auto"}}),a.jsx("button",{onClick:F,disabled:!ie,className:"text-xs font-semibold px-3 py-1.5 rounded transition-colors cursor-pointer disabled:opacity-30 disabled:cursor-not-allowed shrink-0","aria-label":"Send message",style:{color:ie?"var(--accent)":"var(--text-muted)",background:"transparent"},onMouseEnter:K=>{ie&&(K.currentTarget.style.background="color-mix(in srgb, var(--accent) 10%, transparent)")},onMouseLeave:K=>{K.currentTarget.style.background="transparent"},children:"Send"})]})]}):a.jsxs("div",{className:"flex flex-col h-full",style:{background:"var(--bg-primary)"},children:[a.jsx(xs,{selectedModel:f,models:m,modelsLoading:h,onModelChange:T,skills:b,selectedSkillIds:x,skillsLoading:y,onToggleSkill:P,onClear:M,onStop:$,hasMessages:!1,isBusy:!1}),a.jsx("div",{className:"flex-1 flex items-center justify-center p-4",children:a.jsxs("div",{className:"text-center",style:{color:"var(--text-muted)"},children:[a.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",className:"mx-auto mb-2",strokeLinecap:"round",children:[a.jsx("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2",ry:"2"}),a.jsx("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"})]}),a.jsx("p",{className:"text-sm font-medium mb-1",children:"Sign in to use Agent"}),a.jsx("p",{className:"text-xs",children:"Authentication is required to access the coding agent."})]})})]})}function xs({selectedModel:e,models:t,modelsLoading:n,onModelChange:r,skills:i,selectedSkillIds:s,skillsLoading:o,onToggleSkill:l,onClear:u,onStop:c,hasMessages:d,isBusy:p}){const[m,f]=N.useState(!1),h=N.useRef(null);return N.useEffect(()=>{if(!m)return;const b=x=>{h.current&&!h.current.contains(x.target)&&f(!1)};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[m]),a.jsxs("div",{className:"shrink-0 flex items-center gap-2 px-3 h-10 border-b",style:{borderColor:"var(--border)",background:"var(--bg-primary)"},children:[a.jsx("span",{className:"text-[11px] uppercase tracking-wider font-semibold shrink-0",style:{color:"var(--text-muted)"},children:"Agent"}),a.jsxs("select",{value:e??"",onChange:b=>r(b.target.value),className:"flex-1 text-[11px] rounded px-1.5 py-1 outline-none min-w-0 cursor-pointer",style:{background:"var(--bg-secondary)",border:"1px solid var(--border)",color:"var(--text-primary)"},disabled:n,children:[n&&a.jsx("option",{value:"",children:"Loading models..."}),!n&&t.length===0&&a.jsx("option",{value:"",children:"No models"}),t.map(b=>a.jsx("option",{value:b.model_name,children:b.model_name},b.model_name))]}),!o&&i.length>0&&a.jsxs("div",{className:"relative shrink-0",ref:h,children:[a.jsxs("button",{onClick:()=>f(!m),className:"text-[11px] font-semibold px-2 py-1 rounded cursor-pointer flex items-center gap-1",style:{background:s.length>0?"color-mix(in srgb, var(--accent) 15%, transparent)":"transparent",border:`1px solid ${s.length>0?"var(--accent)":"var(--border)"}`,color:s.length>0?"var(--accent)":"var(--text-muted)"},title:"Skills",children:[a.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("path",{d:"M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"}),a.jsx("path",{d:"M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"})]}),s.length>0&&a.jsx("span",{children:s.length})]}),m&&a.jsx("div",{className:"absolute top-full right-0 mt-1 rounded shadow-lg z-50 py-1 max-h-64 overflow-y-auto",style:{background:"var(--bg-secondary)",border:"1px solid var(--border)",width:"190px"},children:i.map(b=>a.jsxs("button",{onClick:()=>l(b.id),className:"w-full text-left px-2 py-1 text-[11px] flex items-center gap-1.5 cursor-pointer",style:{color:"var(--text-primary)"},title:b.description,onMouseEnter:x=>{x.currentTarget.style.background="var(--bg-tertiary)"},onMouseLeave:x=>{x.currentTarget.style.background="transparent"},children:[a.jsx("span",{className:"w-3 h-3 rounded border flex items-center justify-center shrink-0",style:{borderColor:s.includes(b.id)?"var(--accent)":"var(--border)",background:s.includes(b.id)?"var(--accent)":"transparent"},children:s.includes(b.id)&&a.jsx("svg",{width:"8",height:"8",viewBox:"0 0 24 24",fill:"none",stroke:"white",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:a.jsx("polyline",{points:"20 6 9 17 4 12"})})}),a.jsx("span",{className:"truncate",children:b.name})]},b.id))})]}),p&&a.jsx("button",{onClick:c,className:"shrink-0 text-[11px] font-semibold px-2 py-1 rounded cursor-pointer",style:{background:"transparent",border:"1px solid var(--error)",color:"var(--error)"},title:"Stop",onMouseEnter:b=>{b.currentTarget.style.background="color-mix(in srgb, var(--error) 10%, transparent)"},onMouseLeave:b=>{b.currentTarget.style.background="transparent"},children:"Stop"}),d&&!p&&a.jsx("button",{onClick:u,className:"shrink-0 w-6 h-6 flex items-center justify-center rounded cursor-pointer",style:{background:"transparent",border:"none",color:"var(--text-muted)"},title:"New session",onMouseEnter:b=>{b.currentTarget.style.color="var(--text-primary)"},onMouseLeave:b=>{b.currentTarget.style.color="var(--text-muted)"},children:a.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("polyline",{points:"1 4 1 10 7 10"}),a.jsx("path",{d:"M3.51 15a9 9 0 1 0 2.13-9.36L1 10"})]})})]})}const gy=10;function hy({plan:e}){const t=e.filter(m=>m.status==="completed").length,n=e.filter(m=>m.status!=="completed"),r=e.length>0&&t===e.length,[i,s]=N.useState(!1),o=N.useRef(n.length);if(N.useEffect(()=>{r&&s(!0)},[r]),N.useEffect(()=>{n.length>o.current&&s(!1),o.current=n.length},[n.length]),e.length===0)return null;const l=e.filter(m=>m.status==="completed"),u=Math.max(0,gy-n.length),d=[...l.slice(-u),...n],p=e.length-d.length;return a.jsxs("div",{className:"shrink-0 border-b",style:{borderColor:"var(--border)",background:"var(--bg-secondary)"},children:[a.jsxs("button",{onClick:()=>s(!i),className:"w-full flex items-center gap-2 px-3 py-1.5 cursor-pointer",style:{background:"none",border:"none"},children:[a.jsx("div",{className:"w-2 h-2 rounded-full",style:{background:"var(--accent)"}}),a.jsxs("span",{className:"text-[11px] font-semibold",style:{color:"var(--accent)"},children:["Plan (",t,"/",e.length," completed)"]}),a.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-muted)",strokeWidth:"2",className:"ml-auto",style:{transform:i?"rotate(0deg)":"rotate(180deg)",transition:"transform 0.15s"},children:a.jsx("path",{d:"M6 9l6 6 6-6"})})]}),!i&&a.jsxs("div",{className:"px-3 pb-2 space-y-1",children:[p>0&&a.jsxs("div",{className:"text-[11px]",style:{color:"var(--text-muted)"},children:[p," earlier completed task",p!==1?"s":""," hidden"]}),d.map((m,f)=>a.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[m.status==="completed"?a.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--success)",strokeWidth:"2.5",strokeLinecap:"round",children:a.jsx("path",{d:"M20 6L9 17l-5-5"})}):m.status==="in_progress"?a.jsx("span",{className:"w-3.5 h-3.5 flex items-center justify-center",children:a.jsx("span",{className:"w-2 h-2 rounded-full animate-pulse",style:{background:"var(--accent)"}})}):a.jsx("span",{className:"w-3.5 h-3.5 flex items-center justify-center",children:a.jsx("span",{className:"w-2 h-2 rounded-full",style:{background:"var(--text-muted)",opacity:.4}})}),a.jsx("span",{style:{color:m.status==="completed"?"var(--text-muted)":"var(--text-primary)",textDecoration:m.status==="completed"?"line-through":"none"},children:m.title})]},f))]})]})}function by(){const e=Zl(),t=sc(),[n,r]=N.useState(!1),[i,s]=N.useState(248),[o,l]=N.useState(!1),[u,c]=N.useState(380),[d,p]=N.useState(!1),{runs:m,selectedRunId:f,setRuns:h,upsertRun:b,selectRun:x,setTraces:y,setLogs:w,setChatMessages:T,setEntrypoints:j,setStateEvents:O,setGraphCache:_,setActiveNode:P,removeActiveNode:D}=Ee(),{section:R,view:S,runId:M,setupEntrypoint:L,setupMode:C,evalCreating:v,evalSetId:E,evalRunId:I,evalRunItemName:H,evaluatorCreateType:U,evaluatorId:V,evaluatorFilter:g,explorerFile:F,navigate:$}=st(),{setEvalSets:k,setEvaluators:ie,setLocalEvaluators:K,setEvalRuns:W}=Me();N.useEffect(()=>{R==="debug"&&S==="details"&&M&&M!==f&&x(M)},[R,S,M,f,x]);const re=zn(J=>J.init),de=vs(J=>J.init);N.useEffect(()=>{tc().then(h).catch(console.error),ks().then(J=>j(J.map(ge=>ge.name))).catch(console.error),re(),de()},[h,j,re,de]),N.useEffect(()=>{R==="evals"&&(Es().then(J=>k(J)).catch(console.error),gc().then(J=>W(J)).catch(console.error)),(R==="evals"||R==="evaluators")&&(cc().then(J=>ie(J)).catch(console.error),Qr().then(J=>K(J)).catch(console.error))},[R,k,ie,K,W]);const xe=Me(J=>J.evalSets),Oe=Me(J=>J.evalRuns);N.useEffect(()=>{if(R!=="evals"||v||E||I)return;const J=Object.values(Oe).sort((Re,fe)=>new Date(fe.start_time??0).getTime()-new Date(Re.start_time??0).getTime());if(J.length>0){$(`#/evals/runs/${J[0].id}`);return}const ge=Object.values(xe);ge.length>0&&$(`#/evals/sets/${ge[0].id}`)},[R,v,E,I,Oe,xe,$]),N.useEffect(()=>{const J=ge=>{ge.key==="Escape"&&n&&r(!1)};return window.addEventListener("keydown",J),()=>window.removeEventListener("keydown",J)},[n]);const Ie=f?m[f]:null,at=N.useCallback((J,ge)=>{b(ge),y(J,ge.traces),w(J,ge.logs);const Re=ge.messages.map(fe=>{const B=fe.contentParts??fe.content_parts??[],G=fe.toolCalls??fe.tool_calls??[];return{message_id:fe.messageId??fe.message_id,role:fe.role??"assistant",content:B.filter(ee=>{const ae=ee.mimeType??ee.mime_type??"";return ae.startsWith("text/")||ae==="application/json"}).map(ee=>{const ae=ee.data;return(ae==null?void 0:ae.inline)??""}).join(` +`).trim()??"",tool_calls:G.length>0?G.map(ee=>({name:ee.name??"",has_result:!!ee.result})):void 0}});if(T(J,Re),ge.graph&&ge.graph.nodes.length>0&&_(J,ge.graph),ge.states&&ge.states.length>0&&(O(J,ge.states.map(fe=>({node_name:fe.node_name,qualified_node_name:fe.qualified_node_name,phase:fe.phase,timestamp:new Date(fe.timestamp).getTime(),payload:fe.payload}))),ge.status!=="completed"&&ge.status!=="failed"))for(const fe of ge.states)fe.phase==="started"?P(J,fe.node_name,fe.qualified_node_name):fe.phase==="completed"&&D(J,fe.node_name)},[b,y,w,T,O,_,P,D]);N.useEffect(()=>{if(!f)return;e.subscribe(f),ur(f).then(ge=>at(f,ge)).catch(console.error);const J=setTimeout(()=>{const ge=Ee.getState().runs[f];ge&&(ge.status==="pending"||ge.status==="running")&&ur(f).then(Re=>at(f,Re)).catch(console.error)},2e3);return()=>{clearTimeout(J),e.unsubscribe(f)}},[f,e,at]);const St=N.useRef(null);N.useEffect(()=>{var Re,fe;if(!f)return;const J=Ie==null?void 0:Ie.status,ge=St.current;if(St.current=J??null,J&&(J==="completed"||J==="failed")&&ge!==J){const B=Ee.getState(),G=((Re=B.traces[f])==null?void 0:Re.length)??0,ee=((fe=B.logs[f])==null?void 0:fe.length)??0,ae=(Ie==null?void 0:Ie.trace_count)??0,we=(Ie==null?void 0:Ie.log_count)??0;(Gat(f,Ke)).catch(console.error)}},[f,Ie==null?void 0:Ie.status,at]);const Pt=J=>{$(`#/debug/runs/${J}/traces`),x(J),r(!1)},yt=J=>{$(`#/debug/runs/${J}/traces`),x(J),r(!1)},ve=()=>{$("#/debug/new"),r(!1)},lt=J=>{J==="debug"?$("#/debug/new"):J==="evals"?$("#/evals"):J==="evaluators"?$("#/evaluators"):J==="explorer"&&$("#/explorer")},rt=N.useCallback(J=>{J.preventDefault(),l(!0);const ge="touches"in J?J.touches[0].clientX:J.clientX,Re=i,fe=G=>{const ee="touches"in G?G.touches[0].clientX:G.clientX,ae=Math.max(200,Math.min(480,Re+(ee-ge)));s(ae)},B=()=>{l(!1),document.removeEventListener("mousemove",fe),document.removeEventListener("mouseup",B),document.removeEventListener("touchmove",fe),document.removeEventListener("touchend",B),document.body.style.cursor="",document.body.style.userSelect=""};document.body.style.cursor="col-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",fe),document.addEventListener("mouseup",B),document.addEventListener("touchmove",fe,{passive:!1}),document.addEventListener("touchend",B)},[i]),vt=N.useCallback(J=>{J.preventDefault(),p(!0);const ge="touches"in J?J.touches[0].clientX:J.clientX,Re=u,fe=G=>{const ee="touches"in G?G.touches[0].clientX:G.clientX,ae=Math.max(280,Math.min(700,Re-(ee-ge)));c(ae)},B=()=>{p(!1),document.removeEventListener("mousemove",fe),document.removeEventListener("mouseup",B),document.removeEventListener("touchmove",fe),document.removeEventListener("touchend",B),document.body.style.cursor="",document.body.style.userSelect=""};document.body.style.cursor="col-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",fe),document.addEventListener("mouseup",B),document.addEventListener("touchmove",fe,{passive:!1}),document.addEventListener("touchend",B)},[u]),Bt=be(J=>J.openTabs),qt=()=>R==="explorer"?Bt.length>0||F?a.jsx(Bu,{}):a.jsx("div",{className:"flex items-center justify-center h-full text-[var(--text-muted)]",children:"Select a file to view"}):R==="evals"?v?a.jsx(co,{}):I?a.jsx(wu,{evalRunId:I,itemName:H}):E?a.jsx(yu,{evalSetId:E}):a.jsx(co,{}):R==="evaluators"?U?a.jsx(Du,{category:U}):a.jsx(Ru,{evaluatorId:V,evaluatorFilter:g}):S==="new"?a.jsx(Nc,{}):S==="setup"&&L&&C?a.jsx(Xc,{entrypoint:L,mode:C,ws:e,onRunCreated:Pt,isMobile:t}):Ie?a.jsx(gu,{run:Ie,ws:e,isMobile:t}):a.jsx("div",{className:"flex items-center justify-center h-full text-[var(--text-muted)]",children:"Select a run or create a new one"});return t?a.jsxs("div",{className:"flex flex-col h-screen w-screen",children:[a.jsxs("div",{className:"flex flex-1 overflow-hidden relative",children:[!n&&a.jsx("button",{onClick:()=>r(!0),className:"fixed top-2 left-2 z-40 w-9 h-9 flex items-center justify-center rounded-lg cursor-pointer",style:{background:"var(--bg-secondary)",border:"1px solid var(--border)"},children:a.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[a.jsx("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),a.jsx("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),a.jsx("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]})}),n&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"fixed inset-0 z-50",style:{background:"rgba(0,0,0,0.5)"},onClick:()=>r(!1)}),a.jsxs("aside",{className:"fixed inset-y-0 left-0 z-50 w-64 bg-[var(--sidebar-bg)] border-r border-[var(--border)] flex flex-col",children:[a.jsxs("div",{className:"px-3 h-10 border-b border-[var(--border)] flex items-center justify-between",children:[a.jsxs("button",{onClick:()=>{$("#/debug/new"),r(!1)},className:"flex items-center gap-2 cursor-pointer",style:{background:"none",border:"none"},children:[a.jsx("img",{src:"/favicon.ico",width:"14",height:"14",alt:"UiPath"}),a.jsx("span",{className:"text-[10px] uppercase tracking-widest font-semibold",style:{color:"var(--text-muted)"},children:"Developer Console"})]}),a.jsx("button",{onClick:()=>r(!1),className:"w-6 h-6 flex items-center justify-center rounded cursor-pointer transition-colors",style:{color:"var(--text-muted)",background:"transparent",border:"none"},children:a.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[a.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),a.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),R==="debug"&&a.jsx(ji,{runs:Object.values(m),selectedRunId:f,onSelectRun:yt,onNewRun:ve}),R==="evals"&&a.jsx(ro,{}),R==="evaluators"&&a.jsx(uo,{}),R==="explorer"&&a.jsx(fo,{})]})]}),a.jsx("main",{className:"flex-1 overflow-hidden bg-[var(--bg-primary)]",children:qt()})]}),a.jsx(Di,{}),a.jsx(Ji,{}),a.jsx(to,{})]}):a.jsxs("div",{className:"flex flex-col h-screen w-screen",children:[a.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[a.jsxs("aside",{className:"shrink-0 flex flex-col",style:{width:i,background:"var(--sidebar-bg)"},children:[a.jsxs("div",{className:"flex h-10 border-b shrink-0",style:{borderColor:"var(--border)"},children:[a.jsx("button",{onClick:()=>$("#/debug/new"),className:"w-12 shrink-0 flex items-center justify-center cursor-pointer transition-colors border-r",style:{background:"var(--activity-bar-bg)",border:"none",borderRight:"1px solid var(--border)"},onMouseEnter:J=>{J.currentTarget.style.background="var(--bg-hover)"},onMouseLeave:J=>{J.currentTarget.style.background="var(--activity-bar-bg)"},children:a.jsx("img",{src:"/favicon.ico",width:"20",height:"20",alt:"UiPath"})}),a.jsx("div",{className:"flex-1 flex items-center px-3",style:{background:"var(--sidebar-bg)"},children:a.jsx("span",{className:"text-[11px] uppercase tracking-widest font-semibold",style:{color:"var(--text-muted)"},children:R==="debug"?"Developer Console":R==="evals"?"Evaluations":R==="evaluators"?"Evaluators":"Explorer"})})]}),a.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[a.jsx(lc,{section:R,onSectionChange:lt}),a.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[R==="debug"&&a.jsx(ji,{runs:Object.values(m),selectedRunId:f,onSelectRun:yt,onNewRun:ve}),R==="evals"&&a.jsx(ro,{}),R==="evaluators"&&a.jsx(uo,{}),R==="explorer"&&a.jsx(fo,{})]})]})]}),a.jsx("div",{onMouseDown:rt,onTouchStart:rt,className:"shrink-0 drag-handle-col",style:o?{background:"var(--accent)"}:void 0}),a.jsxs("main",{className:"flex-1 overflow-hidden bg-[var(--bg-primary)] flex",children:[a.jsx("div",{className:"flex-1 overflow-hidden",children:qt()}),R==="explorer"&&a.jsxs(a.Fragment,{children:[a.jsx("div",{onMouseDown:vt,onTouchStart:vt,className:"shrink-0 drag-handle-col",style:d?{background:"var(--accent)"}:void 0}),a.jsx("div",{className:"shrink-0 overflow-hidden",style:{width:u,borderLeft:"1px solid var(--border)"},children:a.jsx(my,{})})]})]})]}),a.jsx(Di,{}),a.jsx(Ji,{}),a.jsx(to,{})]})}Ml.createRoot(document.getElementById("root")).render(a.jsx(N.StrictMode,{children:a.jsx(by,{})}));export{eg as M,ny as a,Gh as r,Ee as u}; diff --git a/src/uipath/dev/server/static/assets/index-DcgkONKP.css b/src/uipath/dev/server/static/assets/index-DcgkONKP.css deleted file mode 100644 index 0771ed1..0000000 --- a/src/uipath/dev/server/static/assets/index-DcgkONKP.css +++ /dev/null @@ -1 +0,0 @@ -/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial;--tw-ease:initial;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--spacing:.25rem;--container-xs:20rem;--container-xl:36rem;--container-2xl:42rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-normal:0em;--tracking-wide:.025em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-normal:1.5;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:calc(var(--spacing)*0)}.inset-y-0{inset-block:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.top-1{top:calc(var(--spacing)*1)}.top-1\.5{top:calc(var(--spacing)*1.5)}.top-2{top:calc(var(--spacing)*2)}.top-4{top:calc(var(--spacing)*4)}.top-full{top:100%}.right-0{right:calc(var(--spacing)*0)}.right-1{right:calc(var(--spacing)*1)}.right-3{right:calc(var(--spacing)*3)}.right-4{right:calc(var(--spacing)*4)}.bottom-1\.5{bottom:calc(var(--spacing)*1.5)}.bottom-8{bottom:calc(var(--spacing)*8)}.bottom-full{bottom:100%}.left-0{left:calc(var(--spacing)*0)}.left-1\/2{left:50%}.left-2{left:calc(var(--spacing)*2)}.z-10{z-index:10}.z-40{z-index:40}.z-50{z-index:50}.z-\[100\]{z-index:100}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.m-0{margin:calc(var(--spacing)*0)}.mx-1{margin-inline:calc(var(--spacing)*1)}.mx-2{margin-inline:calc(var(--spacing)*2)}.mx-3{margin-inline:calc(var(--spacing)*3)}.mx-auto{margin-inline:auto}.my-2{margin-block:calc(var(--spacing)*2)}.mt-0\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-2\.5{margin-top:calc(var(--spacing)*2.5)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-auto{margin-top:auto}.mr-0\.5{margin-right:calc(var(--spacing)*.5)}.mr-1{margin-right:calc(var(--spacing)*1)}.mb-0\.5{margin-bottom:calc(var(--spacing)*.5)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-1\.5{margin-bottom:calc(var(--spacing)*1.5)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.mb-8{margin-bottom:calc(var(--spacing)*8)}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-2{margin-left:calc(var(--spacing)*2)}.ml-auto{margin-left:auto}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.h-1\.5{height:calc(var(--spacing)*1.5)}.h-2{height:calc(var(--spacing)*2)}.h-2\.5{height:calc(var(--spacing)*2.5)}.h-3{height:calc(var(--spacing)*3)}.h-3\.5{height:calc(var(--spacing)*3.5)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-7{height:calc(var(--spacing)*7)}.h-8{height:calc(var(--spacing)*8)}.h-9{height:calc(var(--spacing)*9)}.h-10{height:calc(var(--spacing)*10)}.h-\[14px\]{height:14px}.h-full{height:100%}.h-screen{height:100vh}.max-h-32{max-height:calc(var(--spacing)*32)}.max-h-40{max-height:calc(var(--spacing)*40)}.max-h-48{max-height:calc(var(--spacing)*48)}.max-h-64{max-height:calc(var(--spacing)*64)}.max-h-\[85vh\]{max-height:85vh}.min-h-0{min-height:calc(var(--spacing)*0)}.min-h-full{min-height:100%}.w-0\.5{width:calc(var(--spacing)*.5)}.w-1\.5{width:calc(var(--spacing)*1.5)}.w-2{width:calc(var(--spacing)*2)}.w-3{width:calc(var(--spacing)*3)}.w-3\.5{width:calc(var(--spacing)*3.5)}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-7{width:calc(var(--spacing)*7)}.w-8{width:calc(var(--spacing)*8)}.w-9{width:calc(var(--spacing)*9)}.w-10{width:calc(var(--spacing)*10)}.w-12{width:calc(var(--spacing)*12)}.w-14{width:calc(var(--spacing)*14)}.w-24{width:calc(var(--spacing)*24)}.w-32{width:calc(var(--spacing)*32)}.w-36{width:calc(var(--spacing)*36)}.w-44{width:calc(var(--spacing)*44)}.w-56{width:calc(var(--spacing)*56)}.w-64{width:calc(var(--spacing)*64)}.w-\[200px\]{width:200px}.w-\[calc\(100\%-24px\)\]{width:calc(100% - 24px)}.w-full{width:100%}.w-screen{width:100vw}.max-w-2xl{max-width:var(--container-2xl)}.max-w-\[160px\]{max-width:160px}.max-w-\[200px\]{max-width:200px}.max-w-prose{max-width:65ch}.max-w-xl{max-width:var(--container-xl)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-\[140px\]{min-width:140px}.min-w-\[180px\]{min-width:180px}.min-w-\[400px\]{min-width:400px}.flex-1{flex:1}.flex-shrink-0,.shrink-0{flex-shrink:0}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-\[slideIn_0\.2s_ease-out\]{animation:.2s ease-out slideIn}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-none{resize:none}.resize-y{resize:vertical}.appearance-auto{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0{gap:calc(var(--spacing)*0)}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-2\.5{gap:calc(var(--spacing)*2.5)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}:where(.space-y-0\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}.self-start{align-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.border{border-style:var(--tw-border-style);border-width:1px}.border-y{border-block-style:var(--tw-border-style);border-block-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-\[var\(--border\)\]{border-color:var(--border)}.bg-\[var\(--bg-primary\)\]{background-color:var(--bg-primary)}.bg-\[var\(--sidebar-bg\)\]{background-color:var(--sidebar-bg)}.bg-transparent{background-color:#0000}.p-0\.5{padding:calc(var(--spacing)*.5)}.p-1{padding:calc(var(--spacing)*1)}.p-1\.5{padding:calc(var(--spacing)*1.5)}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-6{padding:calc(var(--spacing)*6)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-1\.5{padding-inline:calc(var(--spacing)*1.5)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-2\.5{padding-inline:calc(var(--spacing)*2.5)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-5{padding-inline:calc(var(--spacing)*5)}.px-6{padding-inline:calc(var(--spacing)*6)}.py-0\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\.5{padding-block:calc(var(--spacing)*2.5)}.py-3{padding-block:calc(var(--spacing)*3)}.py-4{padding-block:calc(var(--spacing)*4)}.py-6{padding-block:calc(var(--spacing)*6)}.py-8{padding-block:calc(var(--spacing)*8)}.py-10{padding-block:calc(var(--spacing)*10)}.py-\[3px\]{padding-block:3px}.pt-0{padding-top:calc(var(--spacing)*0)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-1\.5{padding-top:calc(var(--spacing)*1.5)}.pt-2{padding-top:calc(var(--spacing)*2)}.pt-3{padding-top:calc(var(--spacing)*3)}.pt-4{padding-top:calc(var(--spacing)*4)}.pt-px{padding-top:1px}.pr-0{padding-right:calc(var(--spacing)*0)}.pr-1{padding-right:calc(var(--spacing)*1)}.pr-2{padding-right:calc(var(--spacing)*2)}.pb-0\.5{padding-bottom:calc(var(--spacing)*.5)}.pb-1{padding-bottom:calc(var(--spacing)*1)}.pb-2{padding-bottom:calc(var(--spacing)*2)}.pl-2{padding-left:calc(var(--spacing)*2)}.pl-2\.5{padding-left:calc(var(--spacing)*2.5)}.pl-\[22px\]{padding-left:22px}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[9px\]{font-size:9px}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[12px\]{font-size:12px}.text-\[13px\]{font-size:13px}.leading-none{--tw-leading:1;line-height:1}.leading-normal{--tw-leading:var(--leading-normal);line-height:var(--leading-normal)}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-normal{--tw-tracking:var(--tracking-normal);letter-spacing:var(--tracking-normal)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-\[var\(--text-muted\)\]{color:var(--text-muted)}.text-\[var\(--text-primary\)\]{color:var(--text-primary)}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.underline{text-decoration-line:underline}.accent-\[var\(--accent\)\]{accent-color:var(--accent)}.opacity-0{opacity:0}.opacity-40{opacity:.4}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[width\]{transition-property:width;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.outline-none{--tw-outline-style:none;outline-style:none}@media(hover:hover){.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}}.placeholder\:text-\[var\(--text-muted\)\]::placeholder{color:var(--text-muted)}@media(hover:hover){.hover\:bg-\[var\(--bg-hover\)\]:hover{background-color:var(--bg-hover)}.hover\:opacity-80:hover{opacity:.8}.hover\:opacity-100:hover{opacity:1}.hover\:brightness-125:hover{--tw-brightness:brightness(125%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}}.focus\:opacity-100:focus{opacity:1}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-30:disabled{opacity:.3}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}}pre code.hljs{padding:1em;display:block;overflow-x:auto}code.hljs{padding:3px 5px}.hljs{color:#c9d1d9;background:#0d1117}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#ff7b72}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#d2a8ff}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-variable,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id{color:#79c0ff}.hljs-regexp,.hljs-string,.hljs-meta .hljs-string{color:#a5d6ff}.hljs-built_in,.hljs-symbol{color:#ffa657}.hljs-comment,.hljs-code,.hljs-formula{color:#8b949e}.hljs-name,.hljs-quote,.hljs-selector-tag,.hljs-selector-pseudo{color:#7ee787}.hljs-subst{color:#c9d1d9}.hljs-section{color:#1f6feb;font-weight:700}.hljs-bullet{color:#f2cc60}.hljs-emphasis{color:#c9d1d9;font-style:italic}.hljs-strong{color:#c9d1d9;font-weight:700}.hljs-addition{color:#aff5b4;background-color:#033a16}.hljs-deletion{color:#ffdcd7;background-color:#67060c}:root,[data-theme=dark]{--bg-primary:#0f172a;--bg-secondary:#1e293b;--bg-tertiary:#334155;--bg-hover:#263348;--bg-elevated:#253041;--text-primary:#cbd5e1;--text-secondary:#94a3b8;--text-muted:#64748b;--border:#334155;--accent:#fa4616;--accent-hover:#e03d12;--accent-light:#ff6a3d;--success:#22c55e;--warning:#eab308;--error:#ef4444;--info:#3b82f6;--sidebar-bg:#0e1526;--activity-bar-bg:#0a1020;--card-bg:#1e293b;--input-bg:#0f172a;--code-bg:#0f172a;--tab-active:#fa4616;--tab-text:#94a3b8;--tab-text-active:#fa4616;--node-bg:#1e293b;--node-border:#475569;--scrollbar-thumb:#334155;color-scheme:dark}[data-theme=light]{--bg-primary:#f8fafc;--bg-secondary:#fff;--bg-tertiary:#cbd5e1;--bg-hover:#f1f5f9;--bg-elevated:#fff;--text-primary:#0f172a;--text-secondary:#475569;--text-muted:#94a3b8;--border:#e2e8f0;--accent:#fa4616;--accent-hover:#e03d12;--accent-light:#ff6a3d;--success:#22c55e;--warning:#ca8a04;--error:#ef4444;--info:#2563eb;--sidebar-bg:#fff;--activity-bar-bg:#f1f5f9;--card-bg:#fff;--input-bg:#f8fafc;--code-bg:#e8ecf1;--tab-active:#fa4616;--tab-text:#64748b;--tab-text-active:#fa4616;--node-bg:#fff;--node-border:#cbd5e1;--scrollbar-thumb:#d1d5db;color-scheme:light}body{background:var(--bg-primary);color:var(--text-primary);margin:0;font-family:Inter,system-ui,-apple-system,sans-serif;transition:background-color .2s,color .2s}#root{height:100dvh;display:flex}:focus-visible{outline:2px solid var(--accent);outline-offset:1px}button:focus-visible,[role=button]:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid var(--accent)}@supports (color:color-mix(in lab,red,red)){button:focus-visible,[role=button]:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid color-mix(in srgb,var(--accent)60%,transparent)}}button:focus-visible,[role=button]:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline-offset:0px;border-radius:3px}.drag-handle-row{cursor:row-resize;background:var(--border);height:3px;transition:background .15s;position:relative}.drag-handle-row:before{content:"";position:absolute;top:-5px;right:0;bottom:-5px;left:0}.drag-handle-row:hover,.drag-handle-row:active{background:var(--accent)}.drag-handle-col{cursor:col-resize;background:var(--border);width:3px;transition:background .15s;position:relative}.drag-handle-col:before{content:"";position:absolute;top:0;right:-5px;bottom:0;left:-5px}.drag-handle-col:hover,.drag-handle-col:active{background:var(--accent)}@keyframes skeleton-pulse{0%,to{opacity:.4}50%{opacity:.7}}.skeleton{background:var(--bg-tertiary);border-radius:4px;animation:1.5s ease-in-out infinite skeleton-pulse}.react-flow__node{font-size:12px}.react-flow__node-default{background:var(--node-bg)!important;color:var(--text-primary)!important;border-color:var(--node-border)!important}.react-flow__background{background:var(--bg-primary)!important}.react-flow__controls button{background:var(--bg-secondary)!important;color:var(--text-primary)!important;border-color:var(--border)!important}.react-flow__controls button:hover{background:var(--bg-hover)!important}.react-flow__controls button svg{fill:var(--text-primary)!important}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:var(--bg-secondary)}::-webkit-scrollbar-thumb{background:var(--scrollbar-thumb);border-radius:3px}select{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}select option{background:var(--bg-secondary);color:var(--text-primary)}.chat-markdown p{margin:.25em 0}.chat-markdown p:first-child{margin-top:0}.chat-markdown p:last-child{margin-bottom:0}.chat-markdown code{background:var(--code-bg);border:1px solid var(--border);border-radius:3px;padding:.1em .35em;font-size:.85em}.chat-markdown pre{background:var(--code-bg);border:1px solid var(--border);border-radius:6px;margin:.5em 0;padding:.75em;overflow-x:auto}.chat-markdown pre code{background:0 0;border:none;padding:0;font-size:.85em}.chat-markdown ul,.chat-markdown ol{margin:.25em 0;padding-left:1.5em}.chat-markdown li{margin:.1em 0}.chat-markdown h1,.chat-markdown h2,.chat-markdown h3{margin:.5em 0 .25em;font-weight:600}.chat-markdown h1{font-size:1.2em}.chat-markdown h2{font-size:1.1em}.chat-markdown h3{font-size:1em}.chat-markdown blockquote{border-left:3px solid var(--border);color:var(--text-secondary);margin:.25em 0;padding-left:.75em}.chat-markdown strong{font-weight:600}.chat-markdown a{color:var(--accent);text-decoration:underline}.chat-markdown table{border-collapse:collapse;width:100%;margin:.5em 0}.chat-markdown th,.chat-markdown td{border:1px solid var(--border);text-align:left;padding:.3em .6em}.chat-markdown th{background:var(--code-bg);font-weight:600}.chat-markdown tr:nth-child(2n){background:var(--code-bg)}.chat-markdown .hljs{background:0 0}[data-theme=light] .chat-markdown .hljs{color:#24292e}[data-theme=light] .chat-markdown .hljs-doctag,[data-theme=light] .chat-markdown .hljs-keyword,[data-theme=light] .chat-markdown .hljs-meta .hljs-keyword,[data-theme=light] .chat-markdown .hljs-template-tag,[data-theme=light] .chat-markdown .hljs-template-variable,[data-theme=light] .chat-markdown .hljs-type,[data-theme=light] .chat-markdown .hljs-variable.language_{color:#d73a49}[data-theme=light] .chat-markdown .hljs-title,[data-theme=light] .chat-markdown .hljs-title.class_,[data-theme=light] .chat-markdown .hljs-title.class_.inherited__,[data-theme=light] .chat-markdown .hljs-title.function_{color:#6f42c1}[data-theme=light] .chat-markdown .hljs-attr,[data-theme=light] .chat-markdown .hljs-attribute,[data-theme=light] .chat-markdown .hljs-literal,[data-theme=light] .chat-markdown .hljs-meta,[data-theme=light] .chat-markdown .hljs-number,[data-theme=light] .chat-markdown .hljs-operator,[data-theme=light] .chat-markdown .hljs-variable,[data-theme=light] .chat-markdown .hljs-selector-attr,[data-theme=light] .chat-markdown .hljs-selector-class,[data-theme=light] .chat-markdown .hljs-selector-id{color:#005cc5}[data-theme=light] .chat-markdown .hljs-regexp,[data-theme=light] .chat-markdown .hljs-string,[data-theme=light] .chat-markdown .hljs-meta .hljs-string{color:#032f62}[data-theme=light] .chat-markdown .hljs-built_in,[data-theme=light] .chat-markdown .hljs-symbol{color:#e36209}[data-theme=light] .chat-markdown .hljs-comment,[data-theme=light] .chat-markdown .hljs-code,[data-theme=light] .chat-markdown .hljs-formula{color:#6a737d}[data-theme=light] .chat-markdown .hljs-name,[data-theme=light] .chat-markdown .hljs-quote,[data-theme=light] .chat-markdown .hljs-selector-tag,[data-theme=light] .chat-markdown .hljs-selector-pseudo{color:#22863a}[data-theme=light] .chat-markdown .hljs-subst{color:#24292e}[data-theme=light] .chat-markdown .hljs-section{color:#005cc5}[data-theme=light] .chat-markdown .hljs-bullet{color:#735c0f}[data-theme=light] .chat-markdown .hljs-addition{color:#22863a;background-color:#f0fff4}[data-theme=light] .chat-markdown .hljs-deletion{color:#b31d28;background-color:#ffeef0}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}} diff --git a/src/uipath/dev/server/static/assets/index-tYuNMmSp.css b/src/uipath/dev/server/static/assets/index-tYuNMmSp.css new file mode 100644 index 0000000..4c85bb6 --- /dev/null +++ b/src/uipath/dev/server/static/assets/index-tYuNMmSp.css @@ -0,0 +1 @@ +/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial;--tw-ease:initial;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--spacing:.25rem;--container-xs:20rem;--container-xl:36rem;--container-2xl:42rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-normal:0em;--tracking-wide:.025em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-normal:1.5;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:calc(var(--spacing)*0)}.inset-y-0{inset-block:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.top-1{top:calc(var(--spacing)*1)}.top-1\.5{top:calc(var(--spacing)*1.5)}.top-2{top:calc(var(--spacing)*2)}.top-4{top:calc(var(--spacing)*4)}.top-full{top:100%}.right-0{right:calc(var(--spacing)*0)}.right-1{right:calc(var(--spacing)*1)}.right-3{right:calc(var(--spacing)*3)}.right-4{right:calc(var(--spacing)*4)}.bottom-1\.5{bottom:calc(var(--spacing)*1.5)}.bottom-8{bottom:calc(var(--spacing)*8)}.bottom-full{bottom:100%}.left-0{left:calc(var(--spacing)*0)}.left-1\/2{left:50%}.left-2{left:calc(var(--spacing)*2)}.z-10{z-index:10}.z-40{z-index:40}.z-50{z-index:50}.z-\[100\]{z-index:100}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.m-0{margin:calc(var(--spacing)*0)}.mx-1{margin-inline:calc(var(--spacing)*1)}.mx-2{margin-inline:calc(var(--spacing)*2)}.mx-3{margin-inline:calc(var(--spacing)*3)}.mx-auto{margin-inline:auto}.my-2{margin-block:calc(var(--spacing)*2)}.mt-0\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-2\.5{margin-top:calc(var(--spacing)*2.5)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-auto{margin-top:auto}.mr-0\.5{margin-right:calc(var(--spacing)*.5)}.mr-1{margin-right:calc(var(--spacing)*1)}.mb-0\.5{margin-bottom:calc(var(--spacing)*.5)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-1\.5{margin-bottom:calc(var(--spacing)*1.5)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.mb-8{margin-bottom:calc(var(--spacing)*8)}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-2{margin-left:calc(var(--spacing)*2)}.ml-auto{margin-left:auto}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.h-1\.5{height:calc(var(--spacing)*1.5)}.h-2{height:calc(var(--spacing)*2)}.h-2\.5{height:calc(var(--spacing)*2.5)}.h-3{height:calc(var(--spacing)*3)}.h-3\.5{height:calc(var(--spacing)*3.5)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-7{height:calc(var(--spacing)*7)}.h-8{height:calc(var(--spacing)*8)}.h-9{height:calc(var(--spacing)*9)}.h-10{height:calc(var(--spacing)*10)}.h-\[14px\]{height:14px}.h-full{height:100%}.h-screen{height:100vh}.max-h-32{max-height:calc(var(--spacing)*32)}.max-h-40{max-height:calc(var(--spacing)*40)}.max-h-48{max-height:calc(var(--spacing)*48)}.max-h-64{max-height:calc(var(--spacing)*64)}.max-h-\[85vh\]{max-height:85vh}.min-h-0{min-height:calc(var(--spacing)*0)}.min-h-full{min-height:100%}.w-0\.5{width:calc(var(--spacing)*.5)}.w-1\.5{width:calc(var(--spacing)*1.5)}.w-2{width:calc(var(--spacing)*2)}.w-3{width:calc(var(--spacing)*3)}.w-3\.5{width:calc(var(--spacing)*3.5)}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-7{width:calc(var(--spacing)*7)}.w-8{width:calc(var(--spacing)*8)}.w-9{width:calc(var(--spacing)*9)}.w-10{width:calc(var(--spacing)*10)}.w-12{width:calc(var(--spacing)*12)}.w-14{width:calc(var(--spacing)*14)}.w-24{width:calc(var(--spacing)*24)}.w-32{width:calc(var(--spacing)*32)}.w-36{width:calc(var(--spacing)*36)}.w-44{width:calc(var(--spacing)*44)}.w-56{width:calc(var(--spacing)*56)}.w-64{width:calc(var(--spacing)*64)}.w-\[200px\]{width:200px}.w-\[calc\(100\%-24px\)\]{width:calc(100% - 24px)}.w-full{width:100%}.w-screen{width:100vw}.max-w-2xl{max-width:var(--container-2xl)}.max-w-\[160px\]{max-width:160px}.max-w-\[200px\]{max-width:200px}.max-w-prose{max-width:65ch}.max-w-xl{max-width:var(--container-xl)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-\[140px\]{min-width:140px}.min-w-\[180px\]{min-width:180px}.min-w-\[400px\]{min-width:400px}.flex-1{flex:1}.flex-shrink-0,.shrink-0{flex-shrink:0}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-\[slideIn_0\.2s_ease-out\]{animation:.2s ease-out slideIn}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-none{resize:none}.resize-y{resize:vertical}.appearance-auto{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0{gap:calc(var(--spacing)*0)}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-2\.5{gap:calc(var(--spacing)*2.5)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}:where(.space-y-0\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}.self-start{align-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.border{border-style:var(--tw-border-style);border-width:1px}.border-y{border-block-style:var(--tw-border-style);border-block-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-\[var\(--border\)\]{border-color:var(--border)}.bg-\[var\(--bg-primary\)\]{background-color:var(--bg-primary)}.bg-\[var\(--sidebar-bg\)\]{background-color:var(--sidebar-bg)}.bg-transparent{background-color:#0000}.p-0\.5{padding:calc(var(--spacing)*.5)}.p-1{padding:calc(var(--spacing)*1)}.p-1\.5{padding:calc(var(--spacing)*1.5)}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-6{padding:calc(var(--spacing)*6)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-1\.5{padding-inline:calc(var(--spacing)*1.5)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-2\.5{padding-inline:calc(var(--spacing)*2.5)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-5{padding-inline:calc(var(--spacing)*5)}.px-6{padding-inline:calc(var(--spacing)*6)}.py-0\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\.5{padding-block:calc(var(--spacing)*2.5)}.py-3{padding-block:calc(var(--spacing)*3)}.py-4{padding-block:calc(var(--spacing)*4)}.py-6{padding-block:calc(var(--spacing)*6)}.py-8{padding-block:calc(var(--spacing)*8)}.py-10{padding-block:calc(var(--spacing)*10)}.py-\[3px\]{padding-block:3px}.pt-0{padding-top:calc(var(--spacing)*0)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-1\.5{padding-top:calc(var(--spacing)*1.5)}.pt-2{padding-top:calc(var(--spacing)*2)}.pt-3{padding-top:calc(var(--spacing)*3)}.pt-4{padding-top:calc(var(--spacing)*4)}.pt-px{padding-top:1px}.pr-0{padding-right:calc(var(--spacing)*0)}.pr-1{padding-right:calc(var(--spacing)*1)}.pr-2{padding-right:calc(var(--spacing)*2)}.pb-0\.5{padding-bottom:calc(var(--spacing)*.5)}.pb-1{padding-bottom:calc(var(--spacing)*1)}.pb-2{padding-bottom:calc(var(--spacing)*2)}.pl-2{padding-left:calc(var(--spacing)*2)}.pl-2\.5{padding-left:calc(var(--spacing)*2.5)}.pl-\[22px\]{padding-left:22px}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[9px\]{font-size:9px}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[12px\]{font-size:12px}.text-\[13px\]{font-size:13px}.leading-none{--tw-leading:1;line-height:1}.leading-normal{--tw-leading:var(--leading-normal);line-height:var(--leading-normal)}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-normal{--tw-tracking:var(--tracking-normal);letter-spacing:var(--tracking-normal)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-\[var\(--text-muted\)\]{color:var(--text-muted)}.text-\[var\(--text-primary\)\]{color:var(--text-primary)}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.underline{text-decoration-line:underline}.accent-\[var\(--accent\)\]{accent-color:var(--accent)}.opacity-0{opacity:0}.opacity-40{opacity:.4}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[width\]{transition-property:width;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.outline-none{--tw-outline-style:none;outline-style:none}@media(hover:hover){.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}}.placeholder\:text-\[var\(--text-muted\)\]::placeholder{color:var(--text-muted)}@media(hover:hover){.hover\:bg-\[var\(--bg-hover\)\]:hover{background-color:var(--bg-hover)}.hover\:opacity-80:hover{opacity:.8}.hover\:opacity-100:hover{opacity:1}.hover\:brightness-125:hover{--tw-brightness:brightness(125%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}}.focus\:opacity-100:focus{opacity:1}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-30:disabled{opacity:.3}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}}pre code.hljs{padding:1em;display:block;overflow-x:auto}code.hljs{padding:3px 5px}.hljs{color:#c9d1d9;background:#0d1117}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#ff7b72}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#d2a8ff}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-variable,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id{color:#79c0ff}.hljs-regexp,.hljs-string,.hljs-meta .hljs-string{color:#a5d6ff}.hljs-built_in,.hljs-symbol{color:#ffa657}.hljs-comment,.hljs-code,.hljs-formula{color:#8b949e}.hljs-name,.hljs-quote,.hljs-selector-tag,.hljs-selector-pseudo{color:#7ee787}.hljs-subst{color:#c9d1d9}.hljs-section{color:#1f6feb;font-weight:700}.hljs-bullet{color:#f2cc60}.hljs-emphasis{color:#c9d1d9;font-style:italic}.hljs-strong{color:#c9d1d9;font-weight:700}.hljs-addition{color:#aff5b4;background-color:#033a16}.hljs-deletion{color:#ffdcd7;background-color:#67060c}:root,[data-theme=dark]{--bg-primary:#0f172a;--bg-secondary:#1e293b;--bg-tertiary:#334155;--bg-hover:#263348;--bg-elevated:#253041;--text-primary:#cbd5e1;--text-secondary:#94a3b8;--text-muted:#64748b;--border:#334155;--accent:#fa4616;--accent-hover:#e03d12;--accent-light:#ff6a3d;--success:#22c55e;--warning:#eab308;--error:#ef4444;--info:#3b82f6;--sidebar-bg:#0e1526;--activity-bar-bg:#0a1020;--card-bg:#1e293b;--input-bg:#0f172a;--code-bg:#0f172a;--tab-active:#fa4616;--tab-text:#94a3b8;--tab-text-active:#fa4616;--node-bg:#1e293b;--node-border:#475569;--scrollbar-thumb:#334155;color-scheme:dark}[data-theme=light]{--bg-primary:#f8fafc;--bg-secondary:#fff;--bg-tertiary:#cbd5e1;--bg-hover:#f1f5f9;--bg-elevated:#fff;--text-primary:#0f172a;--text-secondary:#475569;--text-muted:#94a3b8;--border:#e2e8f0;--accent:#fa4616;--accent-hover:#e03d12;--accent-light:#ff6a3d;--success:#22c55e;--warning:#ca8a04;--error:#ef4444;--info:#2563eb;--sidebar-bg:#fff;--activity-bar-bg:#f1f5f9;--card-bg:#fff;--input-bg:#f8fafc;--code-bg:#e8ecf1;--tab-active:#fa4616;--tab-text:#64748b;--tab-text-active:#fa4616;--node-bg:#fff;--node-border:#cbd5e1;--scrollbar-thumb:#d1d5db;color-scheme:light}body{background:var(--bg-primary);color:var(--text-primary);margin:0;font-family:Inter,system-ui,-apple-system,sans-serif;transition:background-color .2s,color .2s}#root{height:100dvh;display:flex}:focus-visible{outline:2px solid var(--accent);outline-offset:1px}button:focus-visible,[role=button]:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid var(--accent)}@supports (color:color-mix(in lab,red,red)){button:focus-visible,[role=button]:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid color-mix(in srgb,var(--accent)60%,transparent)}}button:focus-visible,[role=button]:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline-offset:0px;border-radius:3px}.drag-handle-row{cursor:row-resize;background:var(--border);height:3px;transition:background .15s;position:relative}.drag-handle-row:before{content:"";position:absolute;top:-5px;right:0;bottom:-5px;left:0}.drag-handle-row:hover,.drag-handle-row:active{background:var(--accent)}.drag-handle-col{cursor:col-resize;background:var(--border);width:3px;transition:background .15s;position:relative}.drag-handle-col:before{content:"";position:absolute;top:0;right:-5px;bottom:0;left:-5px}.drag-handle-col:hover,.drag-handle-col:active{background:var(--accent)}@keyframes skeleton-pulse{0%,to{opacity:.4}50%{opacity:.7}}.skeleton{background:var(--bg-tertiary);border-radius:4px;animation:1.5s ease-in-out infinite skeleton-pulse}.react-flow__node{font-size:12px}.react-flow__node-default{background:var(--node-bg)!important;color:var(--text-primary)!important;border-color:var(--node-border)!important}.react-flow__background{background:var(--bg-primary)!important}.react-flow__controls button{background:var(--bg-secondary)!important;color:var(--text-primary)!important;border-color:var(--border)!important}.react-flow__controls button:hover{background:var(--bg-hover)!important}.react-flow__controls button svg{fill:var(--text-primary)!important}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:var(--bg-secondary)}::-webkit-scrollbar-thumb{background:var(--scrollbar-thumb);border-radius:3px}select{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}select option{background:var(--bg-secondary);color:var(--text-primary)}.chat-markdown p{margin:.25em 0}.chat-markdown p:first-child{margin-top:0}.chat-markdown p:last-child{margin-bottom:0}.chat-markdown code{background:var(--code-bg);border:1px solid var(--border);border-radius:3px;padding:.1em .35em;font-size:.85em}.chat-markdown pre{background:var(--code-bg);border:1px solid var(--border);border-radius:6px;margin:.5em 0;padding:.75em;overflow-x:auto}.chat-markdown pre code{background:0 0;border:none;padding:0;font-size:.85em}.chat-markdown ul,.chat-markdown ol{margin:.25em 0;padding-left:1.5em}.chat-markdown li{margin:.1em 0}.chat-markdown h1,.chat-markdown h2,.chat-markdown h3{margin:.5em 0 .25em;font-weight:600}.chat-markdown h1{font-size:1.2em}.chat-markdown h2{font-size:1.1em}.chat-markdown h3{font-size:1em}.chat-markdown blockquote{border-left:3px solid var(--border);color:var(--text-secondary);margin:.25em 0;padding-left:.75em}.chat-markdown strong{font-weight:600}.chat-markdown a{color:var(--accent);text-decoration:underline}.chat-markdown table{border-collapse:collapse;width:100%;margin:.5em 0}.chat-markdown th,.chat-markdown td{border:1px solid var(--border);text-align:left;padding:.3em .6em}.chat-markdown th{background:var(--code-bg);font-weight:600}.chat-markdown tr:nth-child(2n){background:var(--code-bg)}.chat-markdown .hljs{background:0 0}[data-theme=light] .chat-markdown .hljs{color:#24292e}[data-theme=light] .chat-markdown .hljs-doctag,[data-theme=light] .chat-markdown .hljs-keyword,[data-theme=light] .chat-markdown .hljs-meta .hljs-keyword,[data-theme=light] .chat-markdown .hljs-template-tag,[data-theme=light] .chat-markdown .hljs-template-variable,[data-theme=light] .chat-markdown .hljs-type,[data-theme=light] .chat-markdown .hljs-variable.language_{color:#d73a49}[data-theme=light] .chat-markdown .hljs-title,[data-theme=light] .chat-markdown .hljs-title.class_,[data-theme=light] .chat-markdown .hljs-title.class_.inherited__,[data-theme=light] .chat-markdown .hljs-title.function_{color:#6f42c1}[data-theme=light] .chat-markdown .hljs-attr,[data-theme=light] .chat-markdown .hljs-attribute,[data-theme=light] .chat-markdown .hljs-literal,[data-theme=light] .chat-markdown .hljs-meta,[data-theme=light] .chat-markdown .hljs-number,[data-theme=light] .chat-markdown .hljs-operator,[data-theme=light] .chat-markdown .hljs-variable,[data-theme=light] .chat-markdown .hljs-selector-attr,[data-theme=light] .chat-markdown .hljs-selector-class,[data-theme=light] .chat-markdown .hljs-selector-id{color:#005cc5}[data-theme=light] .chat-markdown .hljs-regexp,[data-theme=light] .chat-markdown .hljs-string,[data-theme=light] .chat-markdown .hljs-meta .hljs-string{color:#032f62}[data-theme=light] .chat-markdown .hljs-built_in,[data-theme=light] .chat-markdown .hljs-symbol{color:#e36209}[data-theme=light] .chat-markdown .hljs-comment,[data-theme=light] .chat-markdown .hljs-code,[data-theme=light] .chat-markdown .hljs-formula{color:#6a737d}[data-theme=light] .chat-markdown .hljs-name,[data-theme=light] .chat-markdown .hljs-quote,[data-theme=light] .chat-markdown .hljs-selector-tag,[data-theme=light] .chat-markdown .hljs-selector-pseudo{color:#22863a}[data-theme=light] .chat-markdown .hljs-subst{color:#24292e}[data-theme=light] .chat-markdown .hljs-section{color:#005cc5}[data-theme=light] .chat-markdown .hljs-bullet{color:#735c0f}[data-theme=light] .chat-markdown .hljs-addition{color:#22863a;background-color:#f0fff4}[data-theme=light] .chat-markdown .hljs-deletion{color:#b31d28;background-color:#ffeef0}@keyframes agent-changed-pulse{0%,to{box-shadow:inset 0 0 0 50px color-mix(in srgb,var(--success)20%,transparent)}50%{box-shadow:none}}.agent-changed-file{animation:2s ease-in-out 3 agent-changed-pulse}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}} diff --git a/src/uipath/dev/server/static/assets/vendor-elk-CzxJ-xdZ.js b/src/uipath/dev/server/static/assets/vendor-elk-CiLKfHel.js similarity index 99% rename from src/uipath/dev/server/static/assets/vendor-elk-CzxJ-xdZ.js rename to src/uipath/dev/server/static/assets/vendor-elk-CiLKfHel.js index 1a56201..4352ce3 100644 --- a/src/uipath/dev/server/static/assets/vendor-elk-CzxJ-xdZ.js +++ b/src/uipath/dev/server/static/assets/vendor-elk-CiLKfHel.js @@ -1,4 +1,4 @@ -import{c as Phe,g as _Ne}from"./vendor-react-BN_uQvcy.js";function GNe(W6,yU){for(var el=0;eleo[Zo]})}}}return Object.freeze(Object.defineProperty(W6,Symbol.toStringTag,{value:"Module"}))}function kU(W6){throw new Error('Could not dynamically require "'+W6+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var rbn={exports:{}},Ohe;function qNe(){return Ohe||(Ohe=1,(function(W6,yU){(function(el){W6.exports=el()})(function(){return(function(){function el(eo,Zo,ts){function j(il,X3){if(!Zo[il]){if(!eo[il]){var og=typeof kU=="function"&&kU;if(!X3&&og)return og(il,!0);if(tl)return tl(il,!0);var rc=new Error("Cannot find module '"+il+"'");throw rc.code="MODULE_NOT_FOUND",rc}var ir=Zo[il]={exports:{}};eo[il][0].call(ir.exports,function(kr){var In=eo[il][1][kr];return j(In||kr)},ir,ir.exports,el,eo,Zo,ts)}return Zo[il].exports}for(var tl=typeof kU=="function"&&kU,pb=0;pb0&&arguments[0]!==void 0?arguments[0]:{},In=kr.defaultLayoutOptions,Ms=In===void 0?{}:In,ur=kr.algorithms,Oi=ur===void 0?["layered","stress","mrtree","radial","force","disco","sporeOverlap","sporeCompaction","rectpacking","vertiflex"]:ur,is=kr.workerFactory,nh=kr.workerUrl;if(j(this,rc),this.defaultLayoutOptions=Ms,this.initialized=!1,typeof nh>"u"&&typeof is>"u")throw new Error("Cannot construct an ELK without both 'workerUrl' and 'workerFactory'.");var hg=is;typeof nh<"u"&&typeof is>"u"&&(hg=function(h7){return new Worker(h7)});var Q6=hg(nh);if(typeof Q6.postMessage!="function")throw new TypeError("Created worker does not provide the required 'postMessage' function.");this.worker=new og(Q6),this.worker.postMessage({cmd:"register",algorithms:Oi}).then(function(o7){return ir.initialized=!0}).catch(console.err)}return pb(rc,[{key:"layout",value:function(kr){var In=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ms=In.layoutOptions,ur=Ms===void 0?this.defaultLayoutOptions:Ms,Oi=In.logging,is=Oi===void 0?!1:Oi,nh=In.measureExecutionTime,hg=nh===void 0?!1:nh;return kr?this.worker.postMessage({cmd:"layout",graph:kr,layoutOptions:ur,options:{logging:is,measureExecutionTime:hg}}):Promise.reject(new Error("Missing mandatory parameter 'graph'."))}},{key:"knownLayoutAlgorithms",value:function(){return this.worker.postMessage({cmd:"algorithms"})}},{key:"knownLayoutOptions",value:function(){return this.worker.postMessage({cmd:"options"})}},{key:"knownLayoutCategories",value:function(){return this.worker.postMessage({cmd:"categories"})}},{key:"terminateWorker",value:function(){this.worker&&this.worker.terminate()}}])})();var og=(function(){function rc(ir){var kr=this;if(j(this,rc),ir===void 0)throw new Error("Missing mandatory parameter 'worker'.");this.resolvers={},this.worker=ir,this.worker.onmessage=function(In){setTimeout(function(){kr.receive(kr,In)},0)}}return pb(rc,[{key:"postMessage",value:function(kr){var In=this.id||0;this.id=In+1,kr.id=In;var Ms=this;return new Promise(function(ur,Oi){Ms.resolvers[In]=function(is,nh){is?(Ms.convertGwtStyleError(is),Oi(is)):ur(nh)},Ms.worker.postMessage(kr)})}},{key:"receive",value:function(kr,In){var Ms=In.data,ur=kr.resolvers[Ms.id];ur&&(delete kr.resolvers[Ms.id],Ms.error?ur(Ms.error):ur(null,Ms.data))}},{key:"terminate",value:function(){this.worker&&this.worker.terminate()}},{key:"convertGwtStyleError",value:function(kr){if(kr){var In=kr.__java$exception;In&&(In.cause&&In.cause.backingJsObject&&(kr.cause=In.cause.backingJsObject,this.convertGwtStyleError(kr.cause)),delete kr.__java$exception)}}}])})()},{}],2:[function(el,eo,Zo){(function(ts){(function(){var j;typeof window<"u"?j=window:typeof ts<"u"?j=ts:typeof self<"u"&&(j=self);var tl;function pb(){}function il(){}function X3(){}function og(){}function rc(){}function ir(){}function kr(){}function In(){}function Ms(){}function ur(){}function Oi(){}function is(){}function nh(){}function hg(){}function Q6(){}function o7(){}function h7(){}function V6(){}function cbn(){}function ubn(){}function U2(){}function x(){}function fbn(){}function OE(){}function sbn(){}function obn(){}function hbn(){}function lbn(){}function abn(){}function jU(){}function dbn(){}function bbn(){}function wbn(){}function WO(){}function gbn(){}function pbn(){}function vbn(){}function QO(){}function mbn(){}function kbn(){}function ybn(){}function EU(){}function jbn(){}function Ebn(){}function VO(){}function Abn(){}function Mbn(){}function Tbn(){}function Iu(){}function Su(){}function Cbn(){}function Pu(){}function Ibn(){}function Sbn(){}function Pbn(){}function Obn(){}function Lbn(){}function Dbn(){}function $bn(){}function Nbn(){}function Fbn(){}function xbn(){}function Bbn(){}function Rbn(){}function Jbn(){}function _bn(){}function Gbn(){}function qbn(){}function Hbn(){}function Ubn(){}function Kbn(){}function zbn(){}function Xbn(){}function Wbn(){}function Qbn(){}function Vbn(){}function Ybn(){}function Zbn(){}function nwn(){}function LE(){}function AU(){}function ewn(){}function YO(){}function twn(){}function iwn(){}function MU(){}function rwn(){}function cwn(){}function uwn(){}function fwn(){}function swn(){}function own(){}function hwn(){}function lwn(){}function awn(){}function dwn(){}function ZO(){}function bwn(){}function wwn(){}function gwn(){}function pwn(){}function vwn(){}function mwn(){}function kwn(){}function ywn(){}function jwn(){}function Ewn(){}function Awn(){}function TU(){}function CU(){}function Mwn(){}function Twn(){}function Cwn(){}function Iwn(){}function Swn(){}function Pwn(){}function Own(){}function Lwn(){}function Dwn(){}function $wn(){}function Nwn(){}function Fwn(){}function xwn(){}function Bwn(){}function Rwn(){}function Jwn(){}function _wn(){}function Gwn(){}function qwn(){}function Hwn(){}function Uwn(){}function Kwn(){}function zwn(){}function Xwn(){}function Wwn(){}function Qwn(){}function Vwn(){}function Ywn(){}function Zwn(){}function ngn(){}function egn(){}function tgn(){}function ign(){}function rgn(){}function cgn(){}function ugn(){}function fgn(){}function sgn(){}function ogn(){}function hgn(){}function lgn(){}function agn(){}function dgn(){}function bgn(){}function wgn(){}function ggn(){}function pgn(){}function vgn(){}function mgn(){}function kgn(){}function ygn(){}function jgn(){}function Egn(){}function Agn(){}function Mgn(){}function Tgn(){}function Cgn(){}function Ign(){}function Sgn(){}function Pgn(){}function Ogn(){}function Lgn(){}function Dgn(){}function $gn(){}function Ngn(){}function Fgn(){}function xgn(){}function Bgn(){}function Rgn(){}function Jgn(){}function _gn(){}function Ggn(){}function qgn(){}function Hgn(){}function Ugn(){}function Kgn(){}function zgn(){}function Xgn(){}function Wgn(){}function Qgn(){}function Vgn(){}function Ygn(){}function Zgn(){}function n2n(){}function e2n(){}function t2n(){}function i2n(){}function r2n(){}function c2n(){}function u2n(){}function f2n(){}function s2n(){}function o2n(){}function h2n(){}function l2n(){}function a2n(){}function d2n(){}function b2n(){}function w2n(){}function g2n(){}function IU(){}function p2n(){}function v2n(){}function m2n(){}function k2n(){}function y2n(){}function j2n(){}function E2n(){}function A2n(){}function M2n(){}function T2n(){}function C2n(){}function I2n(){}function S2n(){}function P2n(){}function O2n(){}function L2n(){}function D2n(){}function $2n(){}function N2n(){}function F2n(){}function x2n(){}function B2n(){}function R2n(){}function J2n(){}function _2n(){}function G2n(){}function q2n(){}function H2n(){}function U2n(){}function K2n(){}function z2n(){}function X2n(){}function W2n(){}function Q2n(){}function V2n(){}function Y2n(){}function Z2n(){}function npn(){}function epn(){}function tpn(){}function ipn(){}function rpn(){}function cpn(){}function upn(){}function fpn(){}function spn(){}function opn(){}function hpn(){}function lpn(){}function apn(){}function dpn(){}function bpn(){}function wpn(){}function gpn(){}function ppn(){}function vpn(){}function mpn(){}function kpn(){}function ypn(){}function jpn(){}function Epn(){}function Apn(){}function Mpn(){}function Tpn(){}function Cpn(){}function Ipn(){}function Spn(){}function Ppn(){}function Opn(){}function Lpn(){}function Dpn(){}function $pn(){}function Npn(){}function Fpn(){}function xpn(){}function SU(){}function Bpn(){}function Rpn(){}function Jpn(){}function _pn(){}function Gpn(){}function qpn(){}function Hpn(){}function Upn(){}function Kpn(){}function zpn(){}function DE(){}function $E(){}function Xpn(){}function Wpn(){}function PU(){}function Qpn(){}function Vpn(){}function Ypn(){}function Zpn(){}function n3n(){}function OU(){}function LU(){}function e3n(){}function DU(){}function $U(){}function t3n(){}function i3n(){}function l7(){}function r3n(){}function c3n(){}function u3n(){}function f3n(){}function s3n(){}function o3n(){}function h3n(){}function l3n(){}function a3n(){}function d3n(){}function b3n(){}function w3n(){}function g3n(){}function p3n(){}function v3n(){}function m3n(){}function k3n(){}function y3n(){}function j3n(){}function NU(){}function E3n(){}function A3n(){}function M3n(){}function T3n(){}function C3n(){}function I3n(){}function S3n(){}function P3n(){}function O3n(){}function L3n(){}function D3n(){}function $3n(){}function N3n(){}function F3n(){}function x3n(){}function B3n(){}function R3n(){}function J3n(){}function _3n(){}function G3n(){}function q3n(){}function H3n(){}function U3n(){}function K3n(){}function z3n(){}function X3n(){}function W3n(){}function Q3n(){}function V3n(){}function Y3n(){}function Z3n(){}function n4n(){}function e4n(){}function t4n(){}function i4n(){}function r4n(){}function c4n(){}function u4n(){}function f4n(){}function s4n(){}function o4n(){}function h4n(){}function l4n(){}function a4n(){}function d4n(){}function b4n(){}function w4n(){}function g4n(){}function p4n(){}function v4n(){}function m4n(){}function k4n(){}function y4n(){}function j4n(){}function E4n(){}function A4n(){}function M4n(){}function T4n(){}function C4n(){}function I4n(){}function S4n(){}function P4n(){}function O4n(){}function L4n(){}function D4n(){}function $4n(){}function N4n(){}function F4n(){}function Dhe(){}function x4n(){}function B4n(){}function R4n(){}function J4n(){}function _4n(){}function G4n(){}function q4n(){}function H4n(){}function U4n(){}function K4n(){}function z4n(){}function X4n(){}function W4n(){}function Q4n(){}function V4n(){}function Y4n(){}function Z4n(){}function nvn(){}function evn(){}function tvn(){}function ivn(){}function rvn(){}function cvn(){}function uvn(){}function fvn(){}function svn(){}function ovn(){}function hvn(){}function lvn(){}function avn(){}function dvn(){}function bvn(){}function wvn(){}function gvn(){}function pvn(){}function vvn(){}function mvn(){}function kvn(){}function nL(){}function eL(){}function yvn(){}function tL(){}function jvn(){}function Evn(){}function Avn(){}function Mvn(){}function Tvn(){}function Cvn(){}function Ivn(){}function Svn(){}function Pvn(){}function Ovn(){}function Lvn(){}function Dvn(){}function $vn(){}function Nvn(){}function $he(){}function Fvn(){}function FU(){}function xvn(){}function Bvn(){}function Rvn(){}function Jvn(){}function _vn(){}function Gvn(){}function qvn(){}function Hvn(){}function Uvn(){}function Kvn(){}function xa(){}function zvn(){}function K2(){}function xU(){}function Xvn(){}function Wvn(){}function Qvn(){}function Vvn(){}function Yvn(){}function Zvn(){}function n6n(){}function e6n(){}function t6n(){}function i6n(){}function r6n(){}function c6n(){}function u6n(){}function f6n(){}function s6n(){}function o6n(){}function h6n(){}function l6n(){}function a6n(){}function d6n(){}function hn(){}function b6n(){}function w6n(){}function g6n(){}function p6n(){}function v6n(){}function m6n(){}function k6n(){}function y6n(){}function j6n(){}function E6n(){}function A6n(){}function iL(){}function M6n(){}function T6n(){}function rL(){}function C6n(){}function I6n(){}function S6n(){}function P6n(){}function cL(){}function NE(){}function FE(){}function O6n(){}function BU(){}function L6n(){}function D6n(){}function xE(){}function $6n(){}function N6n(){}function F6n(){}function BE(){}function x6n(){}function B6n(){}function R6n(){}function J6n(){}function RE(){}function _6n(){}function RU(){}function G6n(){}function uL(){}function JU(){}function q6n(){}function H6n(){}function U6n(){}function K6n(){}function Nhe(){}function z6n(){}function X6n(){}function W6n(){}function Q6n(){}function V6n(){}function Y6n(){}function Z6n(){}function nmn(){}function emn(){}function tmn(){}function W3(){}function fL(){}function imn(){}function rmn(){}function cmn(){}function umn(){}function fmn(){}function smn(){}function omn(){}function hmn(){}function lmn(){}function amn(){}function dmn(){}function bmn(){}function wmn(){}function gmn(){}function pmn(){}function vmn(){}function mmn(){}function kmn(){}function ymn(){}function jmn(){}function Emn(){}function Amn(){}function Mmn(){}function Tmn(){}function Cmn(){}function Imn(){}function Smn(){}function Pmn(){}function Omn(){}function Lmn(){}function Dmn(){}function $mn(){}function Nmn(){}function Fmn(){}function xmn(){}function Bmn(){}function Rmn(){}function Jmn(){}function _mn(){}function Gmn(){}function qmn(){}function Hmn(){}function Umn(){}function Kmn(){}function zmn(){}function Xmn(){}function Wmn(){}function Qmn(){}function Vmn(){}function Ymn(){}function Zmn(){}function n5n(){}function e5n(){}function t5n(){}function i5n(){}function r5n(){}function c5n(){}function u5n(){}function f5n(){}function s5n(){}function o5n(){}function h5n(){}function l5n(){}function a5n(){}function d5n(){}function b5n(){}function w5n(){}function g5n(){}function p5n(){}function v5n(){}function m5n(){}function k5n(){}function y5n(){}function j5n(){}function E5n(){}function A5n(){}function M5n(){}function T5n(){}function C5n(){}function I5n(){}function S5n(){}function P5n(){}function O5n(){}function L5n(){}function D5n(){}function $5n(){}function N5n(){}function F5n(){}function x5n(){}function B5n(){}function R5n(){}function J5n(){}function _5n(){}function G5n(){}function q5n(){}function H5n(){}function U5n(){}function K5n(){}function z5n(){}function X5n(){}function W5n(){}function _U(){}function Q5n(){}function V5n(){}function sL(){rm()}function Y5n(){Hnn()}function Z5n(){I7()}function n9n(){_s()}function e9n(){nnn()}function t9n(){uy()}function i9n(){ek()}function r9n(){C7()}function c9n(){SAn()}function u9n(){Np()}function f9n(){o$n()}function s9n(){W4()}function o9n(){ra()}function h9n(){eY()}function l9n(){$Fn()}function a9n(){NFn()}function d9n(){bA()}function b9n(){Wtn()}function w9n(){YOn()}function g9n(){H$n()}function p9n(){nY()}function v9n(){QOn()}function m9n(){WOn()}function k9n(){VOn()}function y9n(){nLn()}function j9n(){en()}function E9n(){FFn()}function A9n(){JLn()}function M9n(){xFn()}function T9n(){eLn()}function C9n(){Dp()}function I9n(){sxn()}function S9n(){utn()}function P9n(){ca()}function O9n(){ZOn()}function L9n(){_Jn()}function D9n(){gUn()}function $9n(){yen()}function N9n(){Vr()}function F9n(){Fo()}function x9n(){ptn()}function B9n(){XBn()}function R9n(){ml()}function J9n(){ly()}function _9n(){qx()}function G9n(){ZF()}function q9n(){mZ()}function H9n(){Up()}function U9n(){jT()}function K9n(){HC()}function GU(){Me()}function z9n(){iC()}function X9n(){PZ()}function qU(){lI()}function HU(){VN()}function to(){OIn()}function W9n(){ktn()}function UU(n){Gn(n)}function Q9n(n){this.a=n}function JE(n){this.a=n}function V9n(n){this.a=n}function Y9n(n){this.a=n}function Z9n(n){this.a=n}function KU(n){this.a=n}function zU(n){this.a=n}function n8n(n){this.a=n}function oL(n){this.a=n}function e8n(n){this.a=n}function t8n(n){this.a=n}function i8n(n){this.a=n}function r8n(n){this.a=n}function c8n(n){this.c=n}function u8n(n){this.a=n}function hL(n){this.a=n}function f8n(n){this.a=n}function s8n(n){this.a=n}function o8n(n){this.a=n}function lL(n){this.a=n}function h8n(n){this.a=n}function l8n(n){this.a=n}function aL(n){this.a=n}function a8n(n){this.a=n}function dL(n){this.a=n}function d8n(n){this.a=n}function b8n(n){this.a=n}function w8n(n){this.a=n}function g8n(n){this.a=n}function p8n(n){this.a=n}function v8n(n){this.a=n}function m8n(n){this.a=n}function k8n(n){this.a=n}function y8n(n){this.a=n}function j8n(n){this.a=n}function E8n(n){this.a=n}function A8n(n){this.a=n}function M8n(n){this.a=n}function T8n(n){this.a=n}function XU(n){this.a=n}function WU(n){this.a=n}function _E(n){this.a=n}function a7(n){this.a=n}function QU(n){this.b=n}function Ba(){this.a=[]}function C8n(n,e){n.a=e}function Fhe(n,e){n.a=e}function xhe(n,e){n.b=e}function Bhe(n,e){n.c=e}function Rhe(n,e){n.c=e}function Jhe(n,e){n.d=e}function _he(n,e){n.d=e}function rl(n,e){n.k=e}function VU(n,e){n.j=e}function Ghe(n,e){n.c=e}function YU(n,e){n.c=e}function ZU(n,e){n.a=e}function qhe(n,e){n.a=e}function Hhe(n,e){n.f=e}function Uhe(n,e){n.a=e}function Khe(n,e){n.b=e}function bL(n,e){n.d=e}function GE(n,e){n.i=e}function nK(n,e){n.o=e}function zhe(n,e){n.r=e}function Xhe(n,e){n.a=e}function Whe(n,e){n.b=e}function I8n(n,e){n.e=e}function Qhe(n,e){n.f=e}function eK(n,e){n.g=e}function Vhe(n,e){n.e=e}function Yhe(n,e){n.f=e}function Zhe(n,e){n.f=e}function d7(n,e){n.b=e}function wL(n,e){n.b=e}function gL(n,e){n.a=e}function nle(n,e){n.n=e}function ele(n,e){n.a=e}function tle(n,e){n.c=e}function ile(n,e){n.c=e}function rle(n,e){n.c=e}function cle(n,e){n.a=e}function ule(n,e){n.a=e}function fle(n,e){n.d=e}function sle(n,e){n.d=e}function ole(n,e){n.e=e}function hle(n,e){n.e=e}function lle(n,e){n.g=e}function ale(n,e){n.f=e}function dle(n,e){n.j=e}function ble(n,e){n.a=e}function wle(n,e){n.a=e}function gle(n,e){n.b=e}function S8n(n){n.b=n.a}function P8n(n){n.c=n.d.d}function tK(n){this.a=n}function cl(n){this.a=n}function qE(n){this.a=n}function iK(n){this.a=n}function O8n(n){this.a=n}function b7(n){this.a=n}function w7(n){this.a=n}function rK(n){this.a=n}function cK(n){this.a=n}function vb(n){this.a=n}function pL(n){this.a=n}function ul(n){this.a=n}function mb(n){this.a=n}function L8n(n){this.a=n}function D8n(n){this.a=n}function uK(n){this.a=n}function $8n(n){this.a=n}function Ne(n){this.a=n}function Y6(n){this.d=n}function vL(n){this.b=n}function Q3(n){this.b=n}function lg(n){this.b=n}function mL(n){this.c=n}function A(n){this.c=n}function N8n(n){this.c=n}function F8n(n){this.a=n}function fK(n){this.a=n}function sK(n){this.a=n}function oK(n){this.a=n}function hK(n){this.a=n}function lK(n){this.a=n}function aK(n){this.a=n}function V3(n){this.a=n}function x8n(n){this.a=n}function B8n(n){this.a=n}function Y3(n){this.a=n}function R8n(n){this.a=n}function J8n(n){this.a=n}function _8n(n){this.a=n}function G8n(n){this.a=n}function q8n(n){this.a=n}function H8n(n){this.a=n}function U8n(n){this.a=n}function K8n(n){this.a=n}function z8n(n){this.a=n}function Z3(n){this.a=n}function X8n(n){this.a=n}function W8n(n){this.a=n}function Q8n(n){this.a=n}function V8n(n){this.a=n}function HE(n){this.a=n}function Y8n(n){this.a=n}function Z8n(n){this.a=n}function dK(n){this.a=n}function n7n(n){this.a=n}function e7n(n){this.a=n}function t7n(n){this.a=n}function bK(n){this.a=n}function wK(n){this.a=n}function gK(n){this.a=n}function Z6(n){this.a=n}function UE(n){this.e=n}function n4(n){this.a=n}function i7n(n){this.a=n}function z2(n){this.a=n}function pK(n){this.a=n}function r7n(n){this.a=n}function c7n(n){this.a=n}function u7n(n){this.a=n}function f7n(n){this.a=n}function s7n(n){this.a=n}function o7n(n){this.a=n}function h7n(n){this.a=n}function l7n(n){this.a=n}function a7n(n){this.a=n}function d7n(n){this.a=n}function b7n(n){this.a=n}function vK(n){this.a=n}function w7n(n){this.a=n}function g7n(n){this.a=n}function p7n(n){this.a=n}function v7n(n){this.a=n}function m7n(n){this.a=n}function k7n(n){this.a=n}function y7n(n){this.a=n}function j7n(n){this.a=n}function E7n(n){this.a=n}function A7n(n){this.a=n}function M7n(n){this.a=n}function T7n(n){this.a=n}function C7n(n){this.a=n}function I7n(n){this.a=n}function S7n(n){this.a=n}function P7n(n){this.a=n}function O7n(n){this.a=n}function L7n(n){this.a=n}function D7n(n){this.a=n}function $7n(n){this.a=n}function N7n(n){this.a=n}function F7n(n){this.a=n}function x7n(n){this.a=n}function B7n(n){this.a=n}function R7n(n){this.a=n}function J7n(n){this.a=n}function _7n(n){this.a=n}function G7n(n){this.a=n}function q7n(n){this.a=n}function H7n(n){this.a=n}function U7n(n){this.a=n}function K7n(n){this.a=n}function z7n(n){this.a=n}function X7n(n){this.a=n}function W7n(n){this.a=n}function Q7n(n){this.a=n}function V7n(n){this.a=n}function Y7n(n){this.a=n}function Z7n(n){this.a=n}function nkn(n){this.a=n}function ekn(n){this.a=n}function tkn(n){this.a=n}function ikn(n){this.c=n}function rkn(n){this.b=n}function ckn(n){this.a=n}function ukn(n){this.a=n}function fkn(n){this.a=n}function skn(n){this.a=n}function okn(n){this.a=n}function hkn(n){this.a=n}function lkn(n){this.a=n}function akn(n){this.a=n}function dkn(n){this.a=n}function bkn(n){this.a=n}function wkn(n){this.a=n}function gkn(n){this.a=n}function pkn(n){this.a=n}function vkn(n){this.a=n}function mkn(n){this.a=n}function kkn(n){this.a=n}function ykn(n){this.a=n}function jkn(n){this.a=n}function Ekn(n){this.a=n}function Akn(n){this.a=n}function Mkn(n){this.a=n}function Tkn(n){this.a=n}function Ckn(n){this.a=n}function Ikn(n){this.a=n}function Skn(n){this.a=n}function Pkn(n){this.a=n}function Okn(n){this.a=n}function fl(n){this.a=n}function ag(n){this.a=n}function Lkn(n){this.a=n}function Dkn(n){this.a=n}function $kn(n){this.a=n}function Nkn(n){this.a=n}function Fkn(n){this.a=n}function xkn(n){this.a=n}function Bkn(n){this.a=n}function Rkn(n){this.a=n}function Jkn(n){this.a=n}function _kn(n){this.a=n}function Gkn(n){this.a=n}function qkn(n){this.a=n}function Hkn(n){this.a=n}function Ukn(n){this.a=n}function Kkn(n){this.a=n}function zkn(n){this.a=n}function Xkn(n){this.a=n}function Wkn(n){this.a=n}function mK(n){this.a=n}function Qkn(n){this.a=n}function Vkn(n){this.a=n}function Ykn(n){this.a=n}function Zkn(n){this.a=n}function nyn(n){this.a=n}function eyn(n){this.a=n}function tyn(n){this.a=n}function iyn(n){this.a=n}function KE(n){this.a=n}function ryn(n){this.f=n}function cyn(n){this.a=n}function uyn(n){this.a=n}function fyn(n){this.a=n}function syn(n){this.a=n}function oyn(n){this.a=n}function hyn(n){this.a=n}function lyn(n){this.a=n}function ayn(n){this.a=n}function dyn(n){this.a=n}function byn(n){this.a=n}function wyn(n){this.a=n}function gyn(n){this.a=n}function pyn(n){this.a=n}function vyn(n){this.a=n}function myn(n){this.a=n}function kyn(n){this.a=n}function yyn(n){this.a=n}function jyn(n){this.a=n}function Eyn(n){this.a=n}function Ayn(n){this.a=n}function Myn(n){this.a=n}function Tyn(n){this.a=n}function Cyn(n){this.a=n}function Iyn(n){this.a=n}function Syn(n){this.a=n}function Pyn(n){this.a=n}function Oyn(n){this.a=n}function kL(n){this.a=n}function kK(n){this.a=n}function nt(n){this.b=n}function Lyn(n){this.a=n}function Dyn(n){this.a=n}function $yn(n){this.a=n}function Nyn(n){this.a=n}function Fyn(n){this.a=n}function xyn(n){this.a=n}function Byn(n){this.a=n}function Ryn(n){this.a=n}function g7(n){this.a=n}function Jyn(n){this.a=n}function _yn(n){this.b=n}function yK(n){this.c=n}function zE(n){this.e=n}function Gyn(n){this.a=n}function XE(n){this.a=n}function WE(n){this.a=n}function yL(n){this.a=n}function qyn(n){this.d=n}function Hyn(n){this.a=n}function jK(n){this.a=n}function EK(n){this.a=n}function Wd(n){this.e=n}function ple(){this.a=0}function Z(){xD(this)}function de(){hc(this)}function jL(){PPn(this)}function Uyn(){}function Qd(){this.c=C0n}function Kyn(n,e){n.b+=e}function vle(n,e){e.Wb(n)}function mle(n){return n.a}function kle(n){return n.a}function yle(n){return n.a}function jle(n){return n.a}function Ele(n){return n.a}function M(n){return n.e}function Ale(){return null}function Mle(){return null}function Tle(n){throw M(n)}function X2(n){this.a=Ce(n)}function zyn(){this.a=this}function Ra(){wCn.call(this)}function Cle(n){n.b.Mf(n.e)}function Xyn(n){n.b=new RL}function nm(n,e){n.b=e-n.b}function em(n,e){n.a=e-n.a}function Wyn(n,e){e.gd(n.a)}function Ile(n,e){oi(e,n)}function Rn(n,e){n.push(e)}function Qyn(n,e){n.sort(e)}function Sle(n,e,t){n.Wd(t,e)}function p7(n,e){n.e=e,e.b=n}function Ple(){tz(),j$e()}function Vyn(n){O4(),b_.je(n)}function AK(){wCn.call(this)}function MK(){Ra.call(this)}function EL(){Ra.call(this)}function Yyn(){Ra.call(this)}function v7(){Ra.call(this)}function gu(){Ra.call(this)}function W2(){Ra.call(this)}function Ie(){Ra.call(this)}function Lf(){Ra.call(this)}function Zyn(){Ra.call(this)}function Fr(){Ra.call(this)}function njn(){Ra.call(this)}function QE(){this.Bb|=256}function ejn(){this.b=new lTn}function TK(){TK=x,new de}function tjn(){MK.call(this)}function kb(n,e){n.length=e}function VE(n,e){nn(n.a,e)}function Ole(n,e){Knn(n.c,e)}function Lle(n,e){Yt(n.b,e)}function Dle(n,e){SC(n.a,e)}function $le(n,e){MF(n.a,e)}function e4(n,e){rt(n.e,e)}function Q2(n){XC(n.c,n.b)}function Nle(n,e){n.kc().Nb(e)}function CK(n){this.a=r8e(n)}function Vt(){this.a=new de}function ijn(){this.a=new de}function YE(){this.a=new Z}function AL(){this.a=new Z}function IK(){this.a=new Z}function rs(){this.a=new Fbn}function Ja(){this.a=new f$n}function ML(){this.a=new jAn}function SK(){this.a=new GOn}function PK(){this.a=new rIn}function OK(){this.a=new AU}function rjn(){this.a=new vLn}function cjn(){this.a=new Z}function ujn(){this.a=new Z}function fjn(){this.a=new Z}function LK(){this.a=new Z}function sjn(){this.d=new Z}function ojn(){this.a=new Vt}function hjn(){this.a=new de}function ljn(){this.b=new de}function ajn(){this.b=new Z}function DK(){this.e=new Z}function djn(){this.d=new Z}function bjn(){this.a=new o9n}function wjn(){vOn.call(this)}function gjn(){vOn.call(this)}function pjn(){BK.call(this)}function vjn(){BK.call(this)}function mjn(){BK.call(this)}function kjn(){Z.call(this)}function yjn(){LK.call(this)}function ZE(){YE.call(this)}function jjn(){hM.call(this)}function tm(){Uyn.call(this)}function TL(){tm.call(this)}function V2(){Uyn.call(this)}function $K(){V2.call(this)}function _u(){dt.call(this)}function Ejn(){RK.call(this)}function im(){P6n.call(this)}function NK(){P6n.call(this)}function Ajn(){Bjn.call(this)}function Mjn(){Bjn.call(this)}function Tjn(){de.call(this)}function Cjn(){de.call(this)}function Ijn(){de.call(this)}function CL(){PFn.call(this)}function Sjn(){Vt.call(this)}function Pjn(){QE.call(this)}function IL(){jX.call(this)}function FK(){de.call(this)}function SL(){jX.call(this)}function PL(){de.call(this)}function Ojn(){de.call(this)}function xK(){RE.call(this)}function Ljn(){xK.call(this)}function Djn(){RE.call(this)}function $jn(){_U.call(this)}function BK(){this.a=new Vt}function Njn(){this.a=new de}function RK(){this.a=new de}function Y2(){this.a=new dt}function Fjn(){this.a=new Z}function xjn(){this.j=new Z}function Bjn(){this.a=new x6n}function JK(){this.a=new dvn}function Rjn(){this.a=new NEn}function rm(){rm=x,u_=new il}function OL(){OL=x,f_=new _jn}function LL(){LL=x,s_=new Jjn}function Jjn(){aL.call(this,"")}function _jn(){aL.call(this,"")}function Gjn(n){tFn.call(this,n)}function qjn(n){tFn.call(this,n)}function _K(n){KU.call(this,n)}function GK(n){dAn.call(this,n)}function Fle(n){dAn.call(this,n)}function xle(n){GK.call(this,n)}function Ble(n){GK.call(this,n)}function Rle(n){GK.call(this,n)}function Hjn(n){wN.call(this,n)}function Ujn(n){wN.call(this,n)}function Kjn(n){WTn.call(this,n)}function zjn(n){sz.call(this,n)}function cm(n){hA.call(this,n)}function qK(n){hA.call(this,n)}function Xjn(n){hA.call(this,n)}function xr(n){HSn.call(this,n)}function Wjn(n){xr.call(this,n)}function Z2(){a7.call(this,{})}function DL(n){d4(),this.a=n}function Qjn(n){n.b=null,n.c=0}function Jle(n,e){n.e=e,bHn(n,e)}function _le(n,e){n.a=e,pAe(n)}function $L(n,e,t){n.a[e.g]=t}function Gle(n,e,t){xye(t,n,e)}function qle(n,e){O0e(e.i,n.n)}function Vjn(n,e){X5e(n).Ad(e)}function Hle(n,e){return n*n/e}function Yjn(n,e){return n.g-e.g}function Ule(n,e){n.a.ec().Kc(e)}function Kle(n){return new _E(n)}function zle(n){return new Bb(n)}function Zjn(){Zjn=x,Gun=new pb}function HK(){HK=x,qun=new hg}function nA(){nA=x,$9=new h7}function eA(){eA=x,h_=new XTn}function nEn(){nEn=x,PYn=new cbn}function tA(n){mY(),this.a=n}function eEn(n){PIn(),this.a=n}function Hl(n){v$(),this.f=n}function NL(n){v$(),this.f=n}function iA(n){xr.call(this,n)}function xc(n){xr.call(this,n)}function tEn(n){xr.call(this,n)}function FL(n){HSn.call(this,n)}function t4(n){xr.call(this,n)}function qn(n){xr.call(this,n)}function yr(n){xr.call(this,n)}function iEn(n){xr.call(this,n)}function np(n){xr.call(this,n)}function Ul(n){xr.call(this,n)}function Xr(n){Gn(n),this.a=n}function um(n){nQ(n,n.length)}function UK(n){return hd(n),n}function yb(n){return!!n&&n.b}function Xle(n){return!!n&&n.k}function Wle(n){return!!n&&n.j}function fm(n){return n.b==n.c}function sn(n){return Gn(n),n}function $(n){return Gn(n),n}function m7(n){return Gn(n),n}function KK(n){return Gn(n),n}function Qle(n){return Gn(n),n}function eh(n){xr.call(this,n)}function ep(n){xr.call(this,n)}function th(n){xr.call(this,n)}function De(n){xr.call(this,n)}function xL(n){xr.call(this,n)}function BL(n){PX.call(this,n,0)}function RL(){JQ.call(this,12,3)}function JL(){this.a=Pe(Ce(Hc))}function rEn(){throw M(new Ie)}function zK(){throw M(new Ie)}function cEn(){throw M(new Ie)}function Vle(){throw M(new Ie)}function Yle(){throw M(new Ie)}function Zle(){throw M(new Ie)}function rA(){rA=x,O4()}function Kl(){b7.call(this,"")}function sm(){b7.call(this,"")}function $1(){b7.call(this,"")}function tp(){b7.call(this,"")}function XK(n){xc.call(this,n)}function WK(n){xc.call(this,n)}function ih(n){qn.call(this,n)}function i4(n){Q3.call(this,n)}function uEn(n){i4.call(this,n)}function _L(n){cM.call(this,n)}function n1e(n,e,t){n.c.Cf(e,t)}function e1e(n,e,t){e.Ad(n.a[t])}function t1e(n,e,t){e.Ne(n.a[t])}function i1e(n,e){return n.a-e.a}function r1e(n,e){return n.a-e.a}function c1e(n,e){return n.a-e.a}function cA(n,e){return PN(n,e)}function C(n,e){return zOn(n,e)}function u1e(n,e){return e in n.a}function fEn(n){return n.a?n.b:0}function f1e(n){return n.a?n.b:0}function sEn(n,e){return n.f=e,n}function s1e(n,e){return n.b=e,n}function oEn(n,e){return n.c=e,n}function o1e(n,e){return n.g=e,n}function QK(n,e){return n.a=e,n}function VK(n,e){return n.f=e,n}function h1e(n,e){return n.k=e,n}function YK(n,e){return n.e=e,n}function l1e(n,e){return n.e=e,n}function ZK(n,e){return n.a=e,n}function a1e(n,e){return n.f=e,n}function d1e(n,e){n.b=new zi(e)}function hEn(n,e){n._d(e),e.$d(n)}function b1e(n,e){df(),e.n.a+=n}function w1e(n,e){ra(),Jr(e,n)}function nz(n){QPn.call(this,n)}function lEn(n){QPn.call(this,n)}function aEn(){sX.call(this,"")}function dEn(){this.b=0,this.a=0}function bEn(){bEn=x,qYn=hje()}function Vd(n,e){return n.b=e,n}function k7(n,e){return n.a=e,n}function Yd(n,e){return n.c=e,n}function Zd(n,e){return n.d=e,n}function n0(n,e){return n.e=e,n}function GL(n,e){return n.f=e,n}function om(n,e){return n.a=e,n}function r4(n,e){return n.b=e,n}function c4(n,e){return n.c=e,n}function an(n,e){return n.c=e,n}function Mn(n,e){return n.b=e,n}function dn(n,e){return n.d=e,n}function bn(n,e){return n.e=e,n}function g1e(n,e){return n.f=e,n}function wn(n,e){return n.g=e,n}function gn(n,e){return n.a=e,n}function pn(n,e){return n.i=e,n}function vn(n,e){return n.j=e,n}function p1e(n,e){return n.g-e.g}function v1e(n,e){return n.b-e.b}function m1e(n,e){return n.s-e.s}function k1e(n,e){return n?0:e-1}function wEn(n,e){return n?0:e-1}function y1e(n,e){return n?e-1:0}function j1e(n,e){return e.pg(n)}function gEn(n,e){return n.k=e,n}function E1e(n,e){return n.j=e,n}function Li(){this.a=0,this.b=0}function uA(n){t$.call(this,n)}function N1(n){m0.call(this,n)}function pEn(n){K$.call(this,n)}function vEn(n){K$.call(this,n)}function mEn(n,e){n.b=0,Xb(n,e)}function A1e(n,e){n.c=e,n.b=!0}function M1e(n,e,t){Dge(n.a,e,t)}function kEn(n,e){return n.c._b(e)}function io(n){return n.e&&n.e()}function qL(n){return n?n.d:null}function yEn(n,e){return _Bn(n.b,e)}function T1e(n){return n?n.g:null}function C1e(n){return n?n.i:null}function jEn(n,e){return Q1e(n.a,e)}function ez(n,e){for(;n.zd(e););}function EEn(){throw M(new Ie)}function F1(){F1=x,goe=yye()}function AEn(){AEn=x,mi=Oje()}function tz(){tz=x,La=l5()}function u4(){u4=x,T0n=jye()}function MEn(){MEn=x,nhe=Eye()}function iz(){iz=x,oc=bAe()}function _a(n){return hl(n),n.o}function dg(n,e){return n.a+=e,n}function HL(n,e){return n.a+=e,n}function zl(n,e){return n.a+=e,n}function e0(n,e){return n.a+=e,n}function rz(n){VKn(),N$e(this,n)}function fA(n){this.a=new ip(n)}function Xl(n){this.a=new A$(n)}function TEn(){throw M(new Ie)}function CEn(){throw M(new Ie)}function IEn(){throw M(new Ie)}function SEn(){throw M(new Ie)}function PEn(){throw M(new Ie)}function OEn(){this.b=new vv(Tln)}function LEn(){this.a=new vv(f1n)}function sA(n){this.a=0,this.b=n}function DEn(){this.a=new vv(O1n)}function $En(){this.b=new vv(oH)}function NEn(){this.b=new vv(oH)}function FEn(){this.a=new vv(Oan)}function xEn(n,e){return WCe(n,e)}function I1e(n,e){return POe(e,n)}function cz(n,e){return n.d[e.p]}function y7(n){return n.b!=n.d.c}function BEn(n){return n.l|n.m<<22}function f4(n){return H1(n),n.a}function REn(n){n.c?PHn(n):OHn(n)}function bg(n,e){for(;n.Pe(e););}function uz(n,e,t){n.splice(e,t)}function JEn(){throw M(new Ie)}function _En(){throw M(new Ie)}function GEn(){throw M(new Ie)}function qEn(){throw M(new Ie)}function HEn(){throw M(new Ie)}function UEn(){throw M(new Ie)}function KEn(){throw M(new Ie)}function zEn(){throw M(new Ie)}function XEn(){throw M(new Ie)}function WEn(){throw M(new Ie)}function S1e(){throw M(new Fr)}function P1e(){throw M(new Fr)}function j7(n){this.a=new QEn(n)}function QEn(n){jme(this,n,DEe())}function E7(n){return!n||CPn(n)}function A7(n){return Yo[n]!=-1}function O1e(){IS!=0&&(IS=0),SS=-1}function VEn(){c_==null&&(c_=[])}function M7(n,e){Cg.call(this,n,e)}function s4(n,e){M7.call(this,n,e)}function YEn(n,e){this.a=n,this.b=e}function ZEn(n,e){this.a=n,this.b=e}function nAn(n,e){this.a=n,this.b=e}function eAn(n,e){this.a=n,this.b=e}function tAn(n,e){this.a=n,this.b=e}function iAn(n,e){this.a=n,this.b=e}function rAn(n,e){this.a=n,this.b=e}function o4(n,e){this.e=n,this.d=e}function fz(n,e){this.b=n,this.c=e}function cAn(n,e){this.b=n,this.a=e}function uAn(n,e){this.b=n,this.a=e}function fAn(n,e){this.b=n,this.a=e}function sAn(n,e){this.b=n,this.a=e}function oAn(n,e){this.a=n,this.b=e}function hAn(n,e){this.a=n,this.b=e}function UL(n,e){this.a=n,this.b=e}function lAn(n,e){this.a=n,this.f=e}function t0(n,e){this.g=n,this.i=e}function pe(n,e){this.f=n,this.g=e}function aAn(n,e){this.b=n,this.c=e}function dAn(n){vX(n.dc()),this.c=n}function L1e(n,e){this.a=n,this.b=e}function bAn(n,e){this.a=n,this.b=e}function wAn(n){this.a=u(Ce(n),16)}function sz(n){this.a=u(Ce(n),16)}function gAn(n){this.a=u(Ce(n),93)}function oA(n){this.b=u(Ce(n),93)}function hA(n){this.b=u(Ce(n),51)}function lA(){this.q=new j.Date}function KL(n,e){this.a=n,this.b=e}function pAn(n,e){return Tc(n.b,e)}function hm(n,e){return n.b.Gc(e)}function oz(n,e){return n.b.Hc(e)}function hz(n,e){return n.b.Oc(e)}function vAn(n,e){return n.b.Gc(e)}function mAn(n,e){return n.c.uc(e)}function kAn(n,e){return ct(n.c,e)}function cs(n,e){return n.a._b(e)}function yAn(n,e){return n>e&&e0}function VL(n,e){return Pc(n,e)<0}function FAn(n,e){return g$(n.a,e)}function Q1e(n,e){return n.a.a.cc(e)}function YL(n){return n.b=0}function Pm(n,e){return Pc(n,e)!=0}function J1(n,e){return n.Pd().Xb(e)}function XA(n,e){return Wme(n.Jc(),e)}function hae(n){return""+(Gn(n),n)}function Yz(n,e){return n.a+=""+e,n}function Om(n,e){return n.a+=""+e,n}function wr(n,e){return n.a+=""+e,n}function Lm(n,e){return n.a+=""+e,n}function Mc(n,e){return n.a+=""+e,n}function Je(n,e){return n.a+=""+e,n}function WA(n){return _m(n==null),n}function Zz(n){return kn(n,0),null}function iTn(n){return Ku(n),n.d.gc()}function lae(n){j.clearTimeout(n)}function rTn(n,e){n.q.setTime(td(e))}function aae(n,e){x6e(new re(n),e)}function cTn(n,e){QW.call(this,n,e)}function uTn(n,e){QW.call(this,n,e)}function QA(n,e){QW.call(this,n,e)}function Ki(n,e){Dt(n,e,n.c.b,n.c)}function mg(n,e){Dt(n,e,n.a,n.a.a)}function dae(n,e){return n.j[e.p]==2}function fTn(n,e){return n.a=e.g+1,n}function ro(n){return n.a=0,n.b=0,n}function sTn(){sTn=x,$Zn=me(qF())}function oTn(){oTn=x,Gne=me(cHn())}function hTn(){hTn=x,$ce=me(dxn())}function lTn(){this.b=new ip(Vb(12))}function aTn(){this.b=0,this.a=!1}function dTn(){this.b=0,this.a=!1}function Dm(n){this.a=n,sL.call(this)}function bTn(n){this.a=n,sL.call(this)}function An(n,e){At.call(this,n,e)}function OD(n,e){Lb.call(this,n,e)}function kg(n,e){Wz.call(this,n,e)}function wTn(n,e){z7.call(this,n,e)}function LD(n,e){U4.call(this,n,e)}function Xe(n,e){kA(),Ke(JO,n,e)}function DD(n,e){return ss(n.a,0,e)}function gTn(n,e){return R(n)===R(e)}function bae(n,e){return ht(n.a,e.a)}function nX(n,e){return bc(n.a,e.a)}function wae(n,e){return sPn(n.a,e.a)}function op(n){return _i((Gn(n),n))}function gae(n){return _i((Gn(n),n))}function pTn(n){return Xc(n.l,n.m,n.h)}function pae(n){return Ce(n),new Dm(n)}function rh(n,e){return n.indexOf(e)}function Lr(n){return typeof n===Vtn}function VA(n){return n<10?"0"+n:""+n}function vae(n){return n==Y0||n==Aw}function mae(n){return n==Y0||n==Ew}function vTn(n,e){return bc(n.g,e.g)}function eX(n){return _r(n.b.b,n,0)}function mTn(n){hc(this),w5(this,n)}function kTn(n){this.a=cMn(),this.b=n}function yTn(n){this.a=cMn(),this.b=n}function jTn(n,e){return nn(n.a,e),e}function tX(n,e){F4(n,0,n.length,e)}function kae(n,e){return bc(n.g,e.g)}function yae(n,e){return ht(e.f,n.f)}function jae(n,e){return df(),e.a+=n}function Eae(n,e){return df(),e.a+=n}function Aae(n,e){return df(),e.c+=n}function iX(n,e){return mf(n.a,e),n}function Mae(n,e){return nn(n.c,e),n}function YA(n){return mf(new Kt,n)}function sl(n){return n==Ir||n==Or}function yg(n){return n==Vf||n==zo}function ETn(n){return n==I2||n==C2}function jg(n){return n!=Wo&&n!=Sa}function Yu(n){return n.sh()&&n.th()}function ATn(n){return R$(u(n,127))}function hp(){Ls.call(this,0,0,0,0)}function MTn(){CM.call(this,0,0,0,0)}function Ih(){fK.call(this,new z1)}function $D(n){WMn.call(this,n,!0)}function zi(n){this.a=n.a,this.b=n.b}function ND(n,e){V4(n,e),J4(n,n.D)}function FD(n,e,t){NT(n,e),$T(n,t)}function c0(n,e,t){cd(n,e),rd(n,t)}function Df(n,e,t){Sc(n,e),yu(n,t)}function q7(n,e,t){k0(n,e),y0(n,t)}function H7(n,e,t){j0(n,e),E0(n,t)}function TTn(n,e,t){BX.call(this,n,e,t)}function CTn(){AA.call(this,"Head",1)}function ITn(){AA.call(this,"Tail",3)}function _1(n){dh(),Yme.call(this,n)}function Eg(n){return n!=null?kt(n):0}function STn(n,e){return new U4(e,n)}function Tae(n,e){return new U4(e,n)}function Cae(n,e){return zb(e,To(n))}function Iae(n,e){return zb(e,To(n))}function Sae(n,e){return n[n.length]=e}function Pae(n,e){return n[n.length]=e}function rX(n){return zwe(n.b.Jc(),n.a)}function Oae(n,e){return JT(N$(n.f),e)}function Lae(n,e){return JT(N$(n.n),e)}function Dae(n,e){return JT(N$(n.p),e)}function bi(n,e){At.call(this,n.b,e)}function qa(n){CM.call(this,n,n,n,n)}function xD(n){n.c=J(hi,Bn,1,0,5,1)}function PTn(n,e,t){qt(n.c[e.g],e.g,t)}function $ae(n,e,t){u(n.c,72).Ei(e,t)}function Nae(n,e,t){Df(t,t.i+n,t.j+e)}function Fae(n,e){Ee(pc(n.a),fLn(e))}function xae(n,e){Ee(Uu(n.a),sLn(e))}function Bae(n,e){_o||(n.b=e)}function BD(n,e,t){return qt(n,e,t),t}function OTn(n){_c(n.Qf(),new V8n(n))}function LTn(){LTn=x,jq=new C5(QH)}function cX(){cX=x,TK(),Hun=new de}function Se(){Se=x,new DTn,new Z}function DTn(){new de,new de,new de}function Rae(){throw M(new Ul(bYn))}function Jae(){throw M(new Ul(bYn))}function _ae(){throw M(new Ul(wYn))}function Gae(){throw M(new Ul(wYn))}function $m(n){it(),Wd.call(this,n)}function $Tn(n){this.a=n,jW.call(this,n)}function RD(n){this.a=n,oA.call(this,n)}function JD(n){this.a=n,oA.call(this,n)}function qae(n){return n==null?0:kt(n)}function Rr(n){return n.a0?n:e}function bc(n,e){return ne?1:0}function NTn(n,e){return n.a?n.b:e.Ue()}function Xc(n,e,t){return{l:n,m:e,h:t}}function Hae(n,e){n.a!=null&&$Mn(e,n.a)}function Uae(n,e){Ce(e),Sg(n).Ic(new Oi)}function si(n,e){w$(n.c,n.c.length,e)}function FTn(n){n.a=new WO,n.c=new WO}function ZA(n){this.b=n,this.a=new Z}function xTn(n){this.b=new nwn,this.a=n}function sX(n){ZX.call(this),this.a=n}function BTn(n){SQ.call(this),this.b=n}function RTn(){AA.call(this,"Range",2)}function JTn(){lnn(),this.a=new vv(Jfn)}function Eo(){Eo=x,j.Math.log(2)}function $f(){$f=x,nl=(DAn(),joe)}function nM(n){n.j=J(ifn,Y,325,0,0,1)}function _Tn(n){n.a=new de,n.e=new de}function oX(n){return new V(n.c,n.d)}function Kae(n){return new V(n.c,n.d)}function Xi(n){return new V(n.a,n.b)}function zae(n,e){return Ke(n.a,e.a,e)}function Xae(n,e,t){return Ke(n.g,t,e)}function Wae(n,e,t){return Ke(n.k,t,e)}function Ag(n,e,t){return OZ(e,t,n.c)}function GTn(n,e){return nDe(n.a,e,null)}function hX(n,e){return N(zn(n.i,e))}function lX(n,e){return N(zn(n.j,e))}function qTn(n,e){ke(n),n.Fc(u(e,16))}function Qae(n,e,t){n.c._c(e,u(t,138))}function Vae(n,e,t){n.c.Si(e,u(t,138))}function Yae(n,e,t){return YLe(n,e,t),t}function Zae(n,e){return wf(),e.n.b+=n}function Nm(n,e){return sLe(n.c,n.b,e)}function _D(n,e){return S5e(n.Jc(),e)!=-1}function D(n,e){return n!=null&&zF(n,e)}function nde(n,e){return new aCn(n.Jc(),e)}function eM(n){return n.Ob()?n.Pb():null}function HTn(n){return lh(n,0,n.length)}function ede(n){Gi(n,null),Ti(n,null)}function UTn(n){iN(n,null),rN(n,null)}function KTn(){z7.call(this,null,null)}function zTn(){fM.call(this,null,null)}function XTn(){pe.call(this,"INSTANCE",0)}function Mg(){this.a=J(hi,Bn,1,8,5,1)}function aX(n){this.a=n,de.call(this)}function WTn(n){this.a=(Dn(),new i4(n))}function tde(n){this.b=(Dn(),new mL(n))}function d4(){d4=x,dfn=new DL(null)}function dX(){dX=x,dX(),KYn=new vbn}function nn(n,e){return Rn(n.c,e),!0}function QTn(n,e){n.c&&(LW(e),SOn(e))}function ide(n,e){n.q.setHours(e),Q5(n,e)}function bX(n,e){return n.a.Ac(e)!=null}function GD(n,e){return n.a.Ac(e)!=null}function Ao(n,e){return n.a[e.c.p][e.p]}function rde(n,e){return n.c[e.c.p][e.p]}function cde(n,e){return n.e[e.c.p][e.p]}function qD(n,e,t){return n.a[e.g][t.g]}function ude(n,e){return n.j[e.p]=DTe(e)}function lp(n,e){return n.a*e.a+n.b*e.b}function fde(n,e){return n.a=n}function ade(n,e,t){return t?e!=0:e!=n-1}function VTn(n,e,t){n.a=e^1502,n.b=t^VB}function dde(n,e,t){return n.a=e,n.b=t,n}function ol(n,e){return n.a*=e,n.b*=e,n}function Fm(n,e,t){return qt(n.g,e,t),t}function bde(n,e,t,i){qt(n.a[e.g],t.g,i)}function ti(n,e,t){ck.call(this,n,e,t)}function tM(n,e,t){ti.call(this,n,e,t)}function pu(n,e,t){ti.call(this,n,e,t)}function YTn(n,e,t){tM.call(this,n,e,t)}function wX(n,e,t){ck.call(this,n,e,t)}function Tg(n,e,t){ck.call(this,n,e,t)}function ZTn(n,e,t){gX.call(this,n,e,t)}function nCn(n,e,t){wX.call(this,n,e,t)}function gX(n,e,t){vM.call(this,n,e,t)}function eCn(n,e,t){vM.call(this,n,e,t)}function G1(n){this.c=n,this.a=this.c.a}function re(n){this.i=n,this.f=this.i.j}function Cg(n,e){this.a=n,oA.call(this,e)}function tCn(n,e){this.a=n,BL.call(this,e)}function iCn(n,e){this.a=n,BL.call(this,e)}function rCn(n,e){this.a=n,BL.call(this,e)}function pX(n){this.a=n,c8n.call(this,n.d)}function cCn(n){n.b.Qb(),--n.d.f.d,OM(n.d)}function uCn(n){n.a=u(Vn(n.b.a,4),131)}function fCn(n){n.a=u(Vn(n.b.a,4),131)}function wde(n){lk(n,_Qn),nI(n,WDe(n))}function sCn(n){aL.call(this,u(Ce(n),34))}function oCn(n){aL.call(this,u(Ce(n),34))}function vX(n){if(!n)throw M(new v7)}function mX(n){if(!n)throw M(new gu)}function kX(n,e){return l8e(n,new $1,e).a}function hCn(n,e){return new bGn(n.a,n.b,e)}function Qn(n,e){return Ce(e),new lCn(n,e)}function lCn(n,e){this.a=e,hA.call(this,n)}function aCn(n,e){this.a=e,hA.call(this,n)}function yX(n,e){this.a=e,BL.call(this,n)}function dCn(n,e){this.a=e,wN.call(this,n)}function bCn(n,e){this.a=n,wN.call(this,e)}function wCn(){nM(this),KM(this),this.he()}function jX(){this.Bb|=256,this.Bb|=512}function _n(){_n=x,wa=!1,f6=!0}function gCn(){gCn=x,WL(),Voe=new W9n}function gde(n){return y7(n.a)?oLn(n):null}function pde(n){return n.l+n.m*r3+n.h*md}function vde(n){return n==null?null:n.name}function xm(n){return n==null?su:$r(n)}function iM(n,e){return n.lastIndexOf(e)}function EX(n,e,t){return n.indexOf(e,t)}function vu(n,e){return!!e&&n.b[e.g]==e}function ap(n){return n.a!=null?n.a:null}function Zu(n){return oe(n.a!=null),n.a}function U7(n,e,t){return eF(n,e,e,t),n}function pCn(n,e){return nn(e.a,n.a),n.a}function vCn(n,e){return nn(e.b,n.a),n.a}function rM(n,e){return++n.b,nn(n.a,e)}function AX(n,e){return++n.b,ru(n.a,e)}function u0(n,e){return nn(e.a,n.a),n.a}function cM(n){Q3.call(this,n),this.a=n}function MX(n){lg.call(this,n),this.a=n}function TX(n){i4.call(this,n),this.a=n}function CX(n){ML.call(this),qi(this,n)}function us(n){b7.call(this,(Gn(n),n))}function af(n){b7.call(this,(Gn(n),n))}function HD(n){fK.call(this,new MV(n))}function IX(n,e){JZ.call(this,n,e,null)}function mde(n,e){return ht(n.n.a,e.n.a)}function kde(n,e){return ht(n.c.d,e.c.d)}function yde(n,e){return ht(n.c.c,e.c.c)}function tu(n,e){return u(ot(n.b,e),16)}function jde(n,e){return n.n.b=(Gn(e),e)}function Ede(n,e){return n.n.b=(Gn(e),e)}function Ade(n,e){return ht(n.e.b,e.e.b)}function Mde(n,e){return ht(n.e.a,e.e.a)}function Tde(n,e,t){return hDn(n,e,t,n.b)}function SX(n,e,t){return hDn(n,e,t,n.c)}function Cde(n){return df(),!!n&&!n.dc()}function mCn(){dm(),this.b=new D7n(this)}function kCn(n){this.a=n,vL.call(this,n)}function K7(n){this.c=n,bp.call(this,n)}function dp(n){this.c=n,re.call(this,n)}function bp(n){this.d=n,re.call(this,n)}function uM(n,e){v$(),this.f=e,this.d=n}function z7(n,e){pm(),this.a=n,this.b=e}function fM(n,e){Ql(),this.b=n,this.c=e}function PX(n,e){pV(e,n),this.c=n,this.b=e}function Vl(n){var e;e=n.a,n.a=n.b,n.b=e}function Bm(n){return Rr(n.a)||Rr(n.b)}function f0(n){return n.$H||(n.$H=++vNe)}function UD(n,e){return new AIn(n,n.gc(),e)}function Ide(n,e){return j$(n.c).Kd().Xb(e)}function b4(n,e,t){var i;i=n.dd(e),i.Rb(t)}function OX(n,e,t){u(Ik(n,e),24).Ec(t)}function Sde(n,e,t){MF(n.a,t),SC(n.a,e)}function yCn(n,e,t,i){XW.call(this,n,e,t,i)}function w4(n,e,t){return EX(n,uu(e),t)}function Pde(n){return eA(),ve((XOn(),EYn),n)}function Ode(n){return new Hb(3,n)}function Sh(n){return vf(n,ww),new Jc(n)}function g4(n){return oe(n.b!=0),n.a.a.c}function Ps(n){return oe(n.b!=0),n.c.b.c}function Lde(n,e){return eF(n,e,e+1,""),n}function jCn(n){if(!n)throw M(new Lf)}function ECn(n){n.d=new TCn(n),n.e=new de}function LX(n){if(!n)throw M(new v7)}function Dde(n){if(!n)throw M(new EL)}function oe(n){if(!n)throw M(new Fr)}function Cb(n){if(!n)throw M(new gu)}function ACn(n){return n.b=u(AQ(n.a),45)}function ut(n,e){return!!n.q&&Tc(n.q,e)}function $de(n,e){return n>0?e*e/n:e*e*100}function Nde(n,e){return n>0?e/(n*n):e*100}function Ib(n,e){return u(So(n.a,e),34)}function Fde(n){return n.f!=null?n.f:""+n.g}function KD(n){return n.f!=null?n.f:""+n.g}function MCn(n){return O4(),parseInt(n)||-1}function xde(n){return ml(),n.e.a+n.f.a/2}function Bde(n,e,t){return ml(),t.e.a-n*e}function Rde(n,e,t){return dA(),t.Lg(n,e)}function Jde(n,e,t){return ml(),t.e.b-n*e}function _de(n){return ml(),n.e.b+n.f.b/2}function Gde(n,e){return ra(),Sn(n,e.e,e)}function X7(n){D(n,162)&&u(n,162).mi()}function TCn(n){EW.call(this,n,null,null)}function CCn(){pe.call(this,"GROW_TREE",0)}function ICn(n){this.c=n,this.a=1,this.b=1}function zD(n){jb(),this.b=n,this.a=!0}function SCn(n){aA(),this.b=n,this.a=!0}function PCn(n){vB(),Xyn(this),this.Df(n)}function OCn(n){dt.call(this),a5(this,n)}function LCn(n){this.c=n,Sc(n,0),yu(n,0)}function sM(n){return n.a=-n.a,n.b=-n.b,n}function DX(n,e){return n.a=e.a,n.b=e.b,n}function Sb(n,e,t){return n.a+=e,n.b+=t,n}function DCn(n,e,t){return n.a-=e,n.b-=t,n}function qde(n,e,t){jT(),n.nf(e)&&t.Ad(n)}function Hde(n,e,t){M5(pc(n.a),e,fLn(t))}function Ude(n,e,t){return nn(e,sRn(n,t))}function Kde(n,e){return u(zn(n.e,e),19)}function zde(n,e){return u(zn(n.e,e),19)}function Xde(n,e){return n.c.Ec(u(e,138))}function $Cn(n,e){pm(),z7.call(this,n,e)}function $X(n,e){Ql(),fM.call(this,n,e)}function NCn(n,e){Ql(),fM.call(this,n,e)}function FCn(n,e){Ql(),$X.call(this,n,e)}function XD(n,e){$f(),SM.call(this,n,e)}function xCn(n,e){$f(),XD.call(this,n,e)}function NX(n,e){$f(),XD.call(this,n,e)}function BCn(n,e){$f(),NX.call(this,n,e)}function FX(n,e){$f(),SM.call(this,n,e)}function RCn(n,e){$f(),SM.call(this,n,e)}function JCn(n,e){$f(),FX.call(this,n,e)}function nf(n,e,t){ku.call(this,n,e,t,2)}function Wde(n,e,t){M5(Uu(n.a),e,sLn(t))}function WD(n,e){return na(n.e,u(e,52))}function Qde(n,e,t){return e.xl(n.e,n.c,t)}function Vde(n,e,t){return e.yl(n.e,n.c,t)}function xX(n,e,t){return wI(Sk(n,e),t)}function _Cn(n,e){return Gn(n),n+e$(e)}function Yde(n){return n==null?null:$r(n)}function Zde(n){return n==null?null:$r(n)}function n0e(n){return n==null?null:JDe(n)}function e0e(n){return n==null?null:REe(n)}function hl(n){n.o==null&&uTe(n)}function fn(n){return _m(n==null||Mb(n)),n}function N(n){return _m(n==null||Tb(n)),n}function Pe(n){return _m(n==null||ki(n)),n}function GCn(){this.a=new p0,this.b=new p0}function t0e(n,e){this.d=n,P8n(this),this.b=e}function W7(n,e){this.c=n,o4.call(this,n,e)}function Rm(n,e){this.a=n,W7.call(this,n,e)}function BX(n,e,t){kT.call(this,n,e,t,null)}function qCn(n,e,t){kT.call(this,n,e,t,null)}function RX(){PFn.call(this),this.Bb|=Zi}function JX(n,e){MN.call(this,n),this.a=e}function _X(n,e){MN.call(this,n),this.a=e}function HCn(n,e){_o||nn(n.a,e)}function i0e(n,e){return ex(n,e),new RPn(n,e)}function r0e(n,e,t){return n.Le(e,t)<=0?t:e}function c0e(n,e,t){return n.Le(e,t)<=0?e:t}function UCn(n){return Gn(n),n?1231:1237}function QD(n){return u(rn(n.a,n.b),296)}function KCn(n){return wf(),ETn(u(n,205))}function u0e(n,e){return u(So(n.b,e),144)}function f0e(n,e){return u(So(n.c,e),236)}function zCn(n){return new V(n.c,n.d+n.a)}function s0e(n,e){return Np(),new eUn(e,n)}function o0e(n,e){return I7(),H4(e.d.i,n)}function h0e(n,e){e.a?TMe(n,e):GD(n.a,e.b)}function GX(n,e){return u(zn(n.b,e),280)}function At(n,e){nt.call(this,n),this.a=e}function qX(n,e,t){return t=jf(n,e,3,t),t}function HX(n,e,t){return t=jf(n,e,6,t),t}function UX(n,e,t){return t=jf(n,e,9,t),t}function ch(n,e){return lk(e,gin),n.f=e,n}function KX(n,e){return(e&Ze)%n.d.length}function XCn(n,e,t){++n.j,n.oj(e,n.Xi(e,t))}function Q7(n,e,t){++n.j,n.rj(),AN(n,e,t)}function WCn(n,e,t){var i;i=n.dd(e),i.Rb(t)}function QCn(n,e){this.c=n,m0.call(this,e)}function VCn(n,e){this.a=n,_yn.call(this,e)}function V7(n,e){this.a=n,_yn.call(this,e)}function zX(n){this.q=new j.Date(td(n))}function YCn(n){this.a=(vf(n,ww),new Jc(n))}function ZCn(n){this.a=(vf(n,ww),new Jc(n))}function VD(n){this.a=(Dn(),new pL(Ce(n)))}function oM(){oM=x,xS=new At(EXn,0)}function Ig(){Ig=x,O2=new nt("root")}function p4(){p4=x,ME=new Ajn,new Mjn}function Pb(){Pb=x,kfn=yn((of(),qd))}function l0e(n){return Le(Xa(n,32))^Le(n)}function YD(n){return String.fromCharCode(n)}function a0e(n){return n==null?null:n.message}function d0e(n,e,t){return n.apply(e,t)}function nIn(n,e,t){return Ptn(n.c,n.b,e,t)}function XX(n,e,t){return jp(n,u(e,23),t)}function Ha(n,e){return _n(),n==e?0:n?1:-1}function WX(n,e){var t;return t=e,!!n.De(t)}function QX(n,e){var t;return t=n.e,n.e=e,t}function b0e(n,e){var t;t=n[QB],t.call(n,e)}function w0e(n,e){var t;t=n[QB],t.call(n,e)}function Ob(n,e){n.a._c(n.b,e),++n.b,n.c=-1}function eIn(n){hc(n.e),n.d.b=n.d,n.d.a=n.d}function Y7(n){n.b?Y7(n.b):n.f.c.yc(n.e,n.d)}function Z7(n){return!n.a&&(n.a=new ubn),n.a}function tIn(n,e,t){return n.a+=lh(e,0,t),n}function g0e(n,e,t){Ga(),C8n(n,e.Te(n.a,t))}function VX(n,e,t,i){CM.call(this,n,e,t,i)}function YX(n,e){yK.call(this,n),this.a=e}function ZD(n,e){yK.call(this,n),this.a=e}function iIn(){hM.call(this),this.a=new Li}function ZX(){this.n=new Li,this.o=new Li}function rIn(){this.b=new Li,this.c=new Z}function cIn(){this.a=new Z,this.b=new Z}function uIn(){this.a=new AU,this.b=new ejn}function nW(){this.b=new z1,this.a=new z1}function fIn(){this.b=new Vt,this.a=new Vt}function sIn(){this.b=new de,this.a=new de}function oIn(){this.a=new Z,this.d=new Z}function hIn(){this.a=new d9n,this.b=new Upn}function lIn(){this.b=new OEn,this.a=new t4n}function hM(){this.n=new V2,this.i=new hp}function ft(n,e){return n.a+=e.a,n.b+=e.b,n}function ai(n,e){return n.a-=e.a,n.b-=e.b,n}function p0e(n){return kb(n.j.c,0),n.a=-1,n}function eW(n,e,t){return t=jf(n,e,11,t),t}function aIn(n,e,t){t!=null&&_T(e,rx(n,t))}function dIn(n,e,t){t!=null&>(e,rx(n,t))}function wp(n,e,t,i){U.call(this,n,e,t,i)}function Lb(n,e){xc.call(this,M9+n+Md+e)}function tW(n,e,t,i){U.call(this,n,e,t,i)}function bIn(n,e,t,i){tW.call(this,n,e,t,i)}function wIn(n,e,t,i){xM.call(this,n,e,t,i)}function n$(n,e,t,i){xM.call(this,n,e,t,i)}function gIn(n,e,t,i){n$.call(this,n,e,t,i)}function iW(n,e,t,i){xM.call(this,n,e,t,i)}function Ln(n,e,t,i){iW.call(this,n,e,t,i)}function rW(n,e,t,i){n$.call(this,n,e,t,i)}function pIn(n,e,t,i){rW.call(this,n,e,t,i)}function vIn(n,e,t,i){YW.call(this,n,e,t,i)}function cW(n,e){return n.hk().ti().oi(n,e)}function uW(n,e){return n.hk().ti().qi(n,e)}function v0e(n,e){return n.n.a=(Gn(e),e+10)}function m0e(n,e){return n.n.a=(Gn(e),e+10)}function k0e(n,e){return n.e=u(n.d.Kb(e),163)}function y0e(n,e){return e==n||av(ZC(e),n)}function Os(n,e){return cA(new Array(e),n)}function mIn(n,e){return Gn(n),R(n)===R(e)}function Cn(n,e){return Gn(n),R(n)===R(e)}function kIn(n,e){return Ke(n.a,e,"")==null}function fW(n,e,t){return n.lastIndexOf(e,t)}function j0e(n,e){return n.b.zd(new JAn(n,e))}function E0e(n,e){return n.b.zd(new _An(n,e))}function yIn(n,e){return n.b.zd(new GAn(n,e))}function A0e(n){return n<100?null:new N1(n)}function M0e(n,e){return H(e,(en(),Dj),n)}function T0e(n,e,t){return ht(n[e.a],n[t.a])}function C0e(n,e){return bc(n.a.d.p,e.a.d.p)}function I0e(n,e){return bc(e.a.d.p,n.a.d.p)}function S0e(n,e){return I7(),!H4(e.d.i,n)}function P0e(n,e){_o||e&&(n.d=e)}function O0e(n,e){sl(n.f)?YMe(n,e):Gje(n,e)}function jIn(n,e){Xwe.call(this,n,n.length,e)}function EIn(n){this.c=n,QA.call(this,$y,0)}function sW(n,e){this.c=n,P$.call(this,n,e)}function AIn(n,e,t){this.a=n,PX.call(this,e,t)}function MIn(n,e,t){this.c=e,this.b=t,this.a=n}function nk(n){m4(),this.d=n,this.a=new Mg}function L0e(n,e){var t;return t=e.ni(n.a),t}function D0e(n,e){return ht(n.c-n.s,e.c-e.s)}function $0e(n,e){return ht(n.c.e.a,e.c.e.a)}function N0e(n,e){return ht(n.b.e.a,e.b.e.a)}function TIn(n,e){return D(e,16)&&NHn(n.c,e)}function F0e(n,e,t){return u(n.c,72).Uk(e,t)}function lM(n,e,t){return u(n.c,72).Vk(e,t)}function x0e(n,e,t){return Qde(n,u(e,345),t)}function oW(n,e,t){return Vde(n,u(e,345),t)}function B0e(n,e,t){return p_n(n,u(e,345),t)}function CIn(n,e,t){return nEe(n,u(e,345),t)}function Jm(n,e){return e==null?null:Zb(n.b,e)}function gp(n){return n==Gd||n==Yh||n==Ac}function IIn(n){return n.c?_r(n.c.a,n,0):-1}function e$(n){return Tb(n)?(Gn(n),n):n.se()}function aM(n){return!isNaN(n)&&!isFinite(n)}function t$(n){FTn(this),rf(this),qi(this,n)}function Ou(n){xD(this),OW(this.c,0,n.Nc())}function SIn(n){Gu(n.a),EV(n.c,n.b),n.b=null}function i$(){i$=x,afn=new gbn,HYn=new pbn}function PIn(){PIn=x,Coe=J(hi,Bn,1,0,5,1)}function OIn(){OIn=x,Uoe=J(hi,Bn,1,0,5,1)}function hW(){hW=x,Koe=J(hi,Bn,1,0,5,1)}function R0e(n){return x4(),ve((Z$n(),zYn),n)}function J0e(n){return Gf(),ve((d$n(),ZYn),n)}function _0e(n){return so(),ve((b$n(),fZn),n)}function G0e(n){return Du(),ve((w$n(),oZn),n)}function q0e(n){return cu(),ve((g$n(),lZn),n)}function H0e(n){return kI(),ve((sTn(),$Zn),n)}function lW(n,e){if(!n)throw M(new qn(e))}function v4(n){if(!n)throw M(new yr(Ytn))}function r$(n,e){if(n!=e)throw M(new Lf)}function Nf(n,e,t){this.a=n,this.b=e,this.c=t}function LIn(n,e,t){this.a=n,this.b=e,this.c=t}function DIn(n,e,t){this.a=n,this.b=e,this.c=t}function aW(n,e,t){this.b=n,this.c=e,this.a=t}function $In(n,e,t){this.d=n,this.b=t,this.a=e}function U0e(n,e,t){return Ga(),n.a.Wd(e,t),e}function c$(n){var e;return e=new qbn,e.e=n,e}function dW(n){var e;return e=new sjn,e.b=n,e}function dM(n,e,t){this.e=e,this.b=n,this.d=t}function bM(n,e,t){this.b=n,this.a=e,this.c=t}function NIn(n){this.a=n,Wl(),cc(Date.now())}function FIn(n,e,t){this.a=n,this.b=e,this.c=t}function u$(n){CM.call(this,n.d,n.c,n.a,n.b)}function bW(n){CM.call(this,n.d,n.c,n.a,n.b)}function K0e(n){return Xn(),ve((oxn(),Fne),n)}function z0e(n){return M0(),ve((nNn(),FZn),n)}function X0e(n){return z4(),ve((eNn(),Tne),n)}function W0e(n){return ST(),ve((EDn(),UZn),n)}function Q0e(n){return s5(),ve((p$n(),pne),n)}function V0e(n){return Ei(),ve((BNn(),yne),n)}function Y0e(n){return _p(),ve((tNn(),Lne),n)}function Z0e(n){return G4(),ve((ADn(),_ne),n)}function nbe(n){return Ii(),ve((oTn(),Gne),n)}function ebe(n){return eC(),ve((iNn(),Une),n)}function tbe(n){return Bs(),ve((rNn(),tee),n)}function ibe(n){return rw(),ve((QNn(),ree),n)}function rbe(n){return yT(),ve((TDn(),aee),n)}function cbe(n){return Kp(),ve((wFn(),lee),n)}function ube(n){return A0(),ve((N$n(),oee),n)}function fbe(n){return uI(),ve((hxn(),hee),n)}function sbe(n){return I5(),ve((sNn(),dee),n)}function obe(n){return xT(),ve((y$n(),bee),n)}function hbe(n){return py(),ve((Mxn(),wee),n)}function lbe(n){return Dk(),ve((MDn(),gee),n)}function abe(n){return od(),ve((j$n(),vee),n)}function dbe(n){return UC(),ve((bFn(),mee),n)}function bbe(n){return Tk(),ve((CDn(),kee),n)}function wbe(n){return hy(),ve((aFn(),yee),n)}function gbe(n){return bv(),ve((dFn(),jee),n)}function pbe(n){return sr(),ve((Rxn(),Eee),n)}function vbe(n){return K4(),ve((k$n(),Aee),n)}function mbe(n){return V1(),ve((v$n(),Mee),n)}function kbe(n){return vl(),ve((m$n(),Cee),n)}function ybe(n){return fT(),ve((IDn(),Iee),n)}function jbe(n){return ff(),ve((YNn(),Pee),n)}function Ebe(n){return hT(),ve((SDn(),Oee),n)}function Abe(n){return iw(),ve((uNn(),kre),n)}function Mbe(n){return y5(),ve((S$n(),mre),n)}function Tbe(n){return O5(),ve((ZNn(),yre),n)}function Cbe(n){return fa(),ve((Bxn(),jre),n)}function Ibe(n){return my(),ve((Txn(),vre),n)}function Sbe(n){return Al(),ve((fNn(),Ere),n)}function Pbe(n){return Ok(),ve((PDn(),Are),n)}function Obe(n){return fr(),ve((E$n(),Tre),n)}function Lbe(n){return YT(),ve((A$n(),Cre),n)}function Dbe(n){return k5(),ve((M$n(),Ire),n)}function $be(n){return Y4(),ve((T$n(),Sre),n)}function Nbe(n){return FT(),ve((C$n(),Pre),n)}function Fbe(n){return ZT(),ve((I$n(),Ore),n)}function xbe(n){return ld(),ve((cNn(),Qre),n)}function Bbe(n){return u5(),ve((ODn(),ece),n)}function Rbe(n){return uh(),ve((LDn(),sce),n)}function Jbe(n){return Mo(),ve((DDn(),hce),n)}function _be(n){return uo(),ve(($Dn(),Mce),n)}function Gbe(n,e){return Gn(n),n+(Gn(e),e)}function qbe(n){return g0(),ve((NDn(),Lce),n)}function Hbe(n){return Gp(),ve((aNn(),Dce),n)}function Ube(n){return X5(),ve((hTn(),$ce),n)}function Kbe(n){return v5(),ve((F$n(),Nce),n)}function zbe(n){return m5(),ve((oNn(),rue),n)}function Xbe(n){return rT(),ve((FDn(),cue),n)}function Wbe(n){return UT(),ve((xDn(),hue),n)}function Qbe(n){return JC(),ve((VNn(),aue),n)}function Vbe(n){return ET(),ve((BDn(),due),n)}function Ybe(n){return zk(),ve((x$n(),bue),n)}function Zbe(n){return OC(),ve((hNn(),$ue),n)}function nwe(n){return QT(),ve((P$n(),Nue),n)}function ewe(n){return vC(),ve((O$n(),Fue),n)}function twe(n){return GC(),ve((lNn(),Bue),n)}function iwe(n){return dC(),ve((B$n(),_ue),n)}function m4(){m4=x,Aln=(tn(),Zn),VP=te}function df(){df=x,Yne=new epn,Zne=new tpn}function ek(){ek=x,qS=new vgn,HS=new mgn}function wM(){wM=x,zne=new Kgn,Kne=new zgn}function rwe(n){return!n.e&&(n.e=new Z),n.e}function cwe(n){return H5(),ve((nFn(),dfe),n)}function uwe(n){return wA(),ve((VLn(),wfe),n)}function fwe(n){return Vk(),ve((L$n(),bfe),n)}function swe(n){return gA(),ve((YLn(),pfe),n)}function owe(n){return yk(),ve((JDn(),vfe),n)}function hwe(n){return ay(),ve((eFn(),mfe),n)}function lwe(n){return bT(),ve((RDn(),ofe),n)}function awe(n){return AT(),ve((D$n(),hfe),n)}function dwe(n){return fC(),ve(($$n(),lfe),n)}function bwe(n){return bm(),ve((ZLn(),Nfe),n)}function wwe(n){return Gk(),ve((_Dn(),Ffe),n)}function gwe(n){return oT(),ve((GDn(),xfe),n)}function pwe(n){return NC(),ve((dNn(),Rfe),n)}function vwe(n){return pA(),ve((nDn(),Xfe),n)}function mwe(n){return vA(),ve((eDn(),Qfe),n)}function kwe(n){return mA(),ve((tDn(),Yfe),n)}function ywe(n){return $k(),ve((qDn(),nse),n)}function jwe(n){return Lo(),ve((WNn(),use),n)}function Ewe(n){return ua(),ve((lxn(),sse),n)}function Awe(n){return xh(),ve((vFn(),ose),n)}function Mwe(n){return wd(),ve((pFn(),wse),n)}function Twe(n){return ii(),ve((xNn(),_se),n)}function Cwe(n){return Z4(),ve((bNn(),Gse),n)}function Iwe(n){return Po(),ve((J$n(),qse),n)}function Swe(n){return El(),ve((wNn(),Hse),n)}function Pwe(n){return qC(),ve((gFn(),Use),n)}function Owe(n){return jl(),ve((R$n(),zse),n)}function Lwe(n){return kf(),ve((gNn(),Wse),n)}function Dwe(n){return sw(),ve((Axn(),Qse),n)}function $we(n){return _g(),ve((XNn(),Vse),n)}function Nwe(n){return ji(),ve((mFn(),Yse),n)}function Fwe(n){return $u(),ve((kFn(),Zse),n)}function xwe(n){return h5(),ve((G$n(),coe),n)}function Bwe(n){return tn(),ve((FNn(),noe),n)}function Rwe(n){return of(),ve((vNn(),uoe),n)}function Jwe(n){return Xu(),ve((Exn(),foe),n)}function _we(n){return Bp(),ve((_$n(),soe),n)}function Gwe(n){return lT(),ve((pNn(),ooe),n)}function qwe(n){return bC(),ve((mNn(),hoe),n)}function Hwe(n){return tC(),ve((kNn(),doe),n)}function f$(n,e){this.c=n,this.a=e,this.b=e-n}function ef(n,e,t){this.c=n,this.a=e,this.b=t}function xIn(n,e,t){this.a=n,this.c=e,this.b=t}function BIn(n,e,t){this.a=n,this.c=e,this.b=t}function RIn(n,e,t){this.a=n,this.b=e,this.c=t}function wW(n,e,t){this.a=n,this.b=e,this.c=t}function gW(n,e,t){this.a=n,this.b=e,this.c=t}function s$(n,e,t){this.a=n,this.b=e,this.c=t}function JIn(n,e,t){this.a=n,this.b=e,this.c=t}function pW(n,e,t){this.a=n,this.b=e,this.c=t}function _In(n,e,t){this.a=n,this.b=e,this.c=t}function GIn(n,e,t){this.b=n,this.a=e,this.c=t}function Yl(n,e,t){this.e=n,this.a=e,this.c=t}function qIn(n,e,t){$f(),LQ.call(this,n,e,t)}function o$(n,e,t){$f(),dQ.call(this,n,e,t)}function vW(n,e,t){$f(),dQ.call(this,n,e,t)}function mW(n,e,t){$f(),dQ.call(this,n,e,t)}function HIn(n,e,t){$f(),o$.call(this,n,e,t)}function kW(n,e,t){$f(),o$.call(this,n,e,t)}function UIn(n,e,t){$f(),kW.call(this,n,e,t)}function KIn(n,e,t){$f(),vW.call(this,n,e,t)}function zIn(n,e,t){$f(),mW.call(this,n,e,t)}function Uwe(n){return Yp(),ve((axn(),Toe),n)}function tk(n,e){return Ce(n),Ce(e),new ZEn(n,e)}function pp(n,e){return Ce(n),Ce(e),new eSn(n,e)}function Kwe(n,e){return Ce(n),Ce(e),new tSn(n,e)}function zwe(n,e){return Ce(n),Ce(e),new sAn(n,e)}function yW(n,e){L1e.call(this,n,lC(new Xr(e)))}function XIn(n,e){this.c=n,this.b=e,this.a=!1}function jW(n){this.d=n,P8n(this),this.b=Bge(n.d)}function EW(n,e,t){this.c=n,yA.call(this,e,t)}function Xwe(n,e,t){zSn.call(this,e,t),this.a=n}function WIn(){this.a=";,;",this.b="",this.c=""}function QIn(n,e,t){this.b=n,cTn.call(this,e,t)}function Wwe(n,e){e&&(n.b=e,n.a=(H1(e),e.a))}function h$(n){return oe(n.b!=0),Rf(n,n.a.a)}function Qwe(n){return oe(n.b!=0),Rf(n,n.c.b)}function Vwe(n){return!n.c&&(n.c=new W3),n.c}function VIn(n){var e;return e=new ML,WN(e,n),e}function ik(n){var e;return e=new dt,WN(e,n),e}function k4(n){var e;return e=new Z,FN(e,n),e}function Ywe(n){var e;return e=new Vt,FN(e,n),e}function u(n,e){return _m(n==null||zF(n,e)),n}function gM(n,e){return e&&GM(n,e.d)?e:null}function rk(n,e){if(!n)throw M(new qn(e))}function AW(n,e){if(!n)throw M(new tEn(e))}function vp(n,e){if(!n)throw M(new yr(e))}function Zwe(n,e){return bA(),bc(n.d.p,e.d.p)}function nge(n,e){return ml(),ht(n.e.b,e.e.b)}function ege(n,e){return ml(),ht(n.e.a,e.e.a)}function tge(n,e){return bc(lSn(n.d),lSn(e.d))}function ige(n,e){return e==(tn(),Zn)?n.c:n.d}function rge(n){return new V(n.c+n.b,n.d+n.a)}function MW(n){var e,t;t=n.d,e=n.a,n.d=e,n.a=t}function TW(n){var e,t;e=n.b,t=n.c,n.b=t,n.c=e}function Ph(n,e,t,i,r){n.b=e,n.c=t,n.d=i,n.a=r}function CW(n,e,t,i,r){n.d=e,n.c=t,n.a=i,n.b=r}function YIn(n,e,t,i,r){n.c=e,n.d=t,n.b=i,n.a=r}function pM(n,e){return ime(n),n.a*=e,n.b*=e,n}function IW(n,e){return e<0?n.g=-1:n.g=e,n}function ck(n,e,t){Qz.call(this,n,e),this.c=t}function SW(n,e,t){a4.call(this,n,e),this.b=t}function PW(n){hW(),RE.call(this),this._h(n)}function vM(n,e,t){Qz.call(this,n,e),this.c=t}function ZIn(n,e,t){this.a=n,kg.call(this,e,t)}function nSn(n,e,t){this.a=n,kg.call(this,e,t)}function l$(n){this.b=n,this.a=Ka(this.b.a).Md()}function eSn(n,e){this.b=n,this.a=e,sL.call(this)}function tSn(n,e){this.a=n,this.b=e,sL.call(this)}function iSn(n){PX.call(this,n.length,0),this.a=n}function OW(n,e,t){gen(t,0,n,e,t.length,!1)}function y4(n,e,t){var i;i=new Bb(t),Ns(n,e,i)}function cge(n,e){var t;return t=n.c,rY(n,e),t}function uge(n,e){return(UBn(n)<<4|UBn(e))&ri}function rSn(n){return n!=null&&!LF(n,Q8,V8)}function uk(n){return n==0||isNaN(n)?n:n<0?-1:1}function LW(n){n.a.b=n.b,n.b.a=n.a,n.a=n.b=null}function _e(n,e){return Dt(n,e,n.c.b,n.c),!0}function mM(n){var e;return e=n.slice(),PN(e,n)}function kM(n){var e;return e=n.n,n.a.b+e.d+e.a}function cSn(n){var e;return e=n.n,n.e.b+e.d+e.a}function DW(n){var e;return e=n.n,n.e.a+e.b+e.c}function uSn(n){return it(),new Oh(0,n)}function fSn(){fSn=x,dU=(Dn(),new pL(QJ))}function yM(){yM=x,new qZ((LL(),s_),(OL(),f_))}function sSn(){$4(),v2e.call(this,(B1(),Es))}function oSn(n,e){zSn.call(this,e,1040),this.a=n}function s0(n,e){return N5(n,new a4(e.a,e.b))}function fge(n){return!Ri(n)&&n.c.i.c==n.d.i.c}function sge(n,e){return n.c=e)throw M(new tjn)}function hc(n){n.f=new kTn(n),n.i=new yTn(n),++n.g}function NM(n){this.b=new Jc(11),this.a=(b0(),n)}function A$(n){this.b=null,this.a=(b0(),n||hfn)}function QW(n,e){this.e=n,this.d=(e&64)!=0?e|wh:e}function zSn(n,e){this.c=0,this.d=n,this.b=e|64|wh}function XSn(n){this.a=uJn(n.a),this.b=new Ou(n.b)}function Zl(n,e,t,i){var r;r=n.i,r.i=e,r.a=t,r.b=i}function VW(n){var e;for(e=n;e.f;)e=e.f;return e}function Hge(n){return n.e?mV(n.e):null}function Uge(n,e){return Np(),ht(e.a.o.a,n.a.o.a)}function WSn(n,e,t){return mv(),nF(n,e)&&nF(n,t)}function Um(n){return $u(),!n.Gc(Rl)&&!n.Gc(Pa)}function QSn(n,e,t){return Szn(n,u(e,12),u(t,12))}function VSn(n){return ju(),u(n,12).g.c.length!=0}function YSn(n){return ju(),u(n,12).e.c.length!=0}function FM(n){return new V(n.c+n.b/2,n.d+n.a/2)}function M$(n,e){return e.Sh()?na(n.b,u(e,52)):e}function Kge(n,e,t){e.of(t,$(N(zn(n.b,t)))*n.a)}function zge(n,e){e.Tg("General 'Rotator",1),TDe(n)}function wi(n,e,t,i,r){CN.call(this,n,e,t,i,r,-1)}function Km(n,e,t,i,r){Ek.call(this,n,e,t,i,r,-1)}function U(n,e,t,i){ti.call(this,n,e,t),this.b=i}function xM(n,e,t,i){ck.call(this,n,e,t),this.b=i}function ZSn(n){WMn.call(this,n,!1),this.a=!1}function nPn(){PD.call(this,"LOOKAHEAD_LAYOUT",1)}function ePn(){PD.call(this,"LAYOUT_NEXT_LEVEL",3)}function tPn(){pe.call(this,"ABSOLUTE_XPLACING",0)}function iPn(n){this.b=n,bp.call(this,n),uCn(this)}function rPn(n){this.b=n,K7.call(this,n),fCn(this)}function cPn(n,e){this.b=n,c8n.call(this,n.b),this.a=e}function Fb(n,e,t){this.a=n,wp.call(this,e,t,5,6)}function YW(n,e,t,i){this.b=n,ti.call(this,e,t,i)}function Wa(n,e,t){dh(),this.e=n,this.d=e,this.a=t}function Ni(n,e){for(Gn(e);n.Ob();)e.Ad(n.Pb())}function BM(n,e){return it(),new aQ(n,e,0)}function T$(n,e){return it(),new aQ(6,n,e)}function Xge(n,e){return Cn(n.substr(0,e.length),e)}function Tc(n,e){return ki(e)?W$(n,e):!!jr(n.f,e)}function Wge(n){return Xc(~n.l&Wu,~n.m&Wu,~n.h&Sl)}function C$(n){return typeof n===Py||typeof n===yB}function Dh(n){return new Hn(new yX(n.a.length,n.a))}function I$(n){return new Pn(null,i2e(n,n.length))}function uPn(n){if(!n)throw M(new Fr);return n.d}function yp(n){var e;return e=p5(n),oe(e!=null),e}function Qge(n){var e;return e=H9e(n),oe(e!=null),e}function E4(n,e){var t;return t=n.a.gc(),pV(e,t),t-e}function Yt(n,e){var t;return t=n.a.yc(e,n),t==null}function fk(n,e){return n.a.yc(e,(_n(),wa))==null}function Vge(n,e){return n>0?j.Math.log(n/e):-100}function ZW(n,e){return e?qi(n,e):!1}function jp(n,e,t){return xs(n.a,e),FW(n.b,e.g,t)}function Yge(n,e,t){j4(t,n.a.c.length),cf(n.a,t,e)}function B(n,e,t,i){bBn(e,t,n.length),Zge(n,e,t,i)}function Zge(n,e,t,i){var r;for(r=e;r0?1:0}function r2e(n,e){return ht(n.c.c+n.c.b,e.c.c+e.c.b)}function RM(n,e){Dt(n.d,e,n.b.b,n.b),++n.a,n.c=null}function oPn(n,e){return n.c?oPn(n.c,e):nn(n.b,e),n}function h0(n,e){Rt(Rc(n.Mc(),new Apn),new H7n(e))}function A4(n,e,t,i,r){vx(n,u(ot(e.k,t),16),t,i,r)}function hPn(n,e,t,i,r){for(;e=n.g}function Qm(n){return j.Math.sqrt(n.a*n.a+n.b*n.b)}function jPn(n){return D(n,104)&&(u(n,20).Bb&sc)!=0}function l0(n){return!n.d&&(n.d=new ti(br,n,1)),n.d}function p2e(n){return!n.a&&(n.a=new ti(Oa,n,4)),n.a}function EPn(n){this.c=n,this.a=new dt,this.b=new dt}function v2e(n){this.a=(Gn(Be),Be),this.b=n,new FK}function APn(n,e,t){this.a=n,QQ.call(this,8,e,null,t)}function lQ(n,e,t){this.a=n,yK.call(this,e),this.b=t}function aQ(n,e,t){Wd.call(this,n),this.a=e,this.b=t}function dQ(n,e,t){zE.call(this,e),this.a=n,this.b=t}function m2e(n,e,t){u(e.b,68),_c(e.a,new wW(n,t,e))}function B$(n,e){for(Gn(e);n.c=n?new lz:Eme(n-1)}function fs(n){if(n==null)throw M(new W2);return n}function Gn(n){if(n==null)throw M(new W2);return n}function gi(n){return!n.a&&n.c?n.c.b:n.a}function IPn(n){var e,t;return e=n.c.i.c,t=n.d.i.c,e==t}function E2e(n,e){return bc(e.j.c.length,n.j.c.length)}function SPn(n){kQ(n.a),n.b=J(hi,Bn,1,n.b.length,5,1)}function Vm(n){n.c?n.c.Ye():(n.d=!0,bCe(n))}function H1(n){n.c?H1(n.c):(ea(n),n.d=!0)}function Gu(n){Cb(n.c!=-1),n.d.ed(n.c),n.b=n.c,n.c=-1}function PPn(n){n.b=!1,n.c=!1,n.d=!1,n.a=!1}function OPn(n){this.c=n,this.b=this.c.a,this.a=this.c.e}function Kt(){xjn.call(this),kb(this.j.c,0),this.a=-1}function LPn(){pe.call(this,"DELAUNAY_TRIANGULATION",0)}function bQ(n){for(;n.a.b!=0;)hDe(n,u(POn(n.a),9))}function A2e(n,e){Ee((!n.a&&(n.a=new V7(n,n)),n.a),e)}function wQ(n,e){n.c<0||n.b.b=0?n.hi(t):fen(n,e)}function DPn(n,e){this.b=n,P$.call(this,n,e),uCn(this)}function $Pn(n,e){this.b=n,sW.call(this,n,e),fCn(this)}function NPn(){Bnn.call(this,bs,(u4(),T0n)),jOe(this)}function gQ(n){return!n.b&&(n.b=new XE(new PL)),n.b}function T2e(n){if(n.p!=3)throw M(new gu);return n.e}function C2e(n){if(n.p!=4)throw M(new gu);return n.e}function I2e(n){if(n.p!=4)throw M(new gu);return n.j}function S2e(n){if(n.p!=3)throw M(new gu);return n.j}function P2e(n){if(n.p!=6)throw M(new gu);return n.f}function O2e(n){if(n.p!=6)throw M(new gu);return n.k}function d0(n){return n.c==-2&&rle(n,iEe(n.g,n.b)),n.c}function T4(n,e){var t;return t=F$("",n),t.n=e,t.i=1,t}function $h(n,e){for(;e-- >0;)n=n<<1|(n<0?1:0);return n}function L2e(n,e){k$(u(e.b,68),n),_c(e.a,new dK(n))}function FPn(n,e){return yM(),new qZ(new oCn(n),new sCn(e))}function D2e(n,e,t){return xp(),t.Kg(n,u(e.jd(),149))}function $2e(n){return vf(n,MB),PT(Wi(Wi(5,n),n/10|0))}function pQ(n){return Dn(),n?n.Me():(b0(),b0(),lfn)}function Ke(n,e,t){return ki(e)?Er(n,e,t):fu(n.f,e,t)}function N2e(n){return String.fromCharCode.apply(null,n)}function xPn(n){return!n.d&&(n.d=new Q3(n.c.Bc())),n.d}function C4(n){return!n.a&&(n.a=new uEn(n.c.vc())),n.a}function BPn(n){return!n.b&&(n.b=new i4(n.c.ec())),n.b}function RPn(n,e){tde.call(this,Ame(Ce(n),Ce(e))),this.a=e}function vQ(n,e,t,i){t0.call(this,n,e),this.d=t,this.a=i}function qM(n,e,t,i){t0.call(this,n,t),this.a=e,this.f=i}function Ym(n){this.d=n,this.a=this.d.b,this.b=this.d.c}function JPn(){Bnn.call(this,Cd,(MEn(),nhe)),dLe(this)}function _Pn(){xr.call(this,"There is no more element.")}function xi(n,e){return ne(e,n.length),n.charCodeAt(e)}function GPn(n,e){n.u.Gc(($u(),Rl))&&nMe(n,e),qve(n,e)}function gc(n,e){return R(n)===R(e)||n!=null&&ct(n,e)}function gr(n,e){return g$(n.a,e)?n.b[u(e,23).g]:null}function qPn(n,e){var t;return t=new wc(n),Rn(e.c,t),t}function Zm(n){return n.j.c.length=0,kQ(n.c),p0e(n.a),n}function F2e(n){return!n.b&&(n.b=new Ln(be,n,4,7)),n.b}function I4(n){return!n.c&&(n.c=new Ln(be,n,5,8)),n.c}function mQ(n){return!n.c&&(n.c=new U(Vu,n,9,9)),n.c}function R$(n){return!n.n&&(n.n=new U(zr,n,1,7)),n.n}function Qe(n,e,t,i){return fxn(n,e,t,!1),sC(n,i),n}function HPn(n,e){IF(n,$(kl(e,"x")),$(kl(e,"y")))}function UPn(n,e){IF(n,$(kl(e,"x")),$(kl(e,"y")))}function x2e(){return pA(),I(C(zfe,1),z,557,0,[TH])}function B2e(){return vA(),I(C(Wfe,1),z,558,0,[CH])}function R2e(){return mA(),I(C(Vfe,1),z,559,0,[IH])}function J2e(){return gA(),I(C(gfe,1),z,550,0,[lH])}function _2e(){return wA(),I(C(can,1),z,480,0,[hH])}function G2e(){return bm(),I(C(Tan,1),z,531,0,[Vj])}function J$(){J$=x,MYn=new vz(I(C(Id,1),yI,45,0,[]))}function q2e(n,e){return new wOn(u(Ce(n),50),u(Ce(e),50))}function H2e(n){return n!=null&&hm(_O,n.toLowerCase())}function S4(n){return n.e==r6&&hle(n,o7e(n.g,n.b)),n.e}function ok(n){return n.f==r6&&ale(n,cye(n.g,n.b)),n.f}function Sg(n){var e;return e=n.b,!e&&(n.b=e=new n8n(n)),e}function kQ(n){var e;for(e=n.Jc();e.Ob();)e.Pb(),e.Qb()}function U2e(n,e,t){var i;i=u(n.d.Kb(t),163),i&&i.Nb(e)}function K2e(n,e){return ht(n.d.c+n.d.b/2,e.d.c+e.d.b/2)}function z2e(n,e){return ht(n.g.c+n.g.b/2,e.g.c+e.g.b/2)}function X2e(n,e){return bz(),ht((Gn(n),n),(Gn(e),e))}function Rc(n,e){return ea(n),new Pn(n,new vV(e,n.a))}function et(n,e){return ea(n),new Pn(n,new OV(e,n.a))}function Rb(n,e){return ea(n),new JX(n,new t$n(e,n.a))}function HM(n,e){return ea(n),new _X(n,new i$n(e,n.a))}function yQ(n,e){this.b=n,this.c=e,this.a=new rp(this.b)}function _$(n,e,t,i){this.a=n,this.e=e,this.d=t,this.c=i}function G$(n,e,t){this.a=rin,this.d=n,this.b=e,this.c=t}function UM(n,e,t,i){this.a=n,this.c=e,this.b=t,this.d=i}function jQ(n,e,t,i){this.c=n,this.b=e,this.a=t,this.d=i}function KPn(n,e,t,i){this.c=n,this.b=e,this.d=t,this.a=i}function zPn(n,e,t,i){this.a=n,this.d=e,this.c=t,this.b=i}function Ls(n,e,t,i){this.c=n,this.d=e,this.b=t,this.a=i}function Ap(n,e,t,i){pe.call(this,n,e),this.a=t,this.b=i}function XPn(n,e,t,i){Yxn.call(this,n,t,i,!1),this.f=e}function WPn(n,e){this.d=(Gn(n),n),this.a=16449,this.c=e}function QPn(n){this.a=new Z,this.e=J(Oe,Y,54,n,0,2)}function W2e(n){n.Tg("No crossing minimization",1),n.Ug()}function al(n){var e,t;return t=(e=new Qd,e),R4(t,n),t}function q$(n){var e,t;return t=(e=new Qd,e),_nn(t,n),t}function H$(n,e,t){var i,r;return i=Utn(n),r=e.qi(t,i),r}function U$(n){var e;return e=Tme(n),e||null}function VPn(n){return!n.b&&(n.b=new U(mt,n,12,3)),n.b}function P4(n){if(Ku(n.d),n.d.d!=n.c)throw M(new Lf)}function YPn(n,e,t,i){this.a=n,this.c=e,this.d=t,this.b=i}function ZPn(n,e,t,i){this.a=n,this.b=e,this.d=t,this.c=i}function nOn(n,e,t,i){this.a=n,this.b=e,this.c=t,this.d=i}function eOn(n,e,t,i){this.a=n,this.b=e,this.c=t,this.d=i}function Va(n,e,t,i){this.e=n,this.a=e,this.c=t,this.d=i}function tOn(n,e,t,i){$f(),r$n.call(this,e,t,i),this.a=n}function iOn(n,e,t,i){$f(),r$n.call(this,e,t,i),this.a=n}function rOn(n,e){this.a=n,t0e.call(this,n,u(n.d,16).dd(e))}function K$(n){this.f=n,this.c=this.f.e,n.f>0&&e_n(this)}function KM(n){return n.n&&(n.e!==qzn&&n.he(),n.j=null),n}function cOn(n){return _m(n==null||C$(n)&&n.Rm!==U2),n}function Q2e(n,e,t){return nn(n.a,(ex(e,t),new t0(e,t))),n}function V2e(n,e,t){gOe(n.a,t),j5e(t),BMe(n.b,t),xOe(e,t)}function Y2e(n,e){return ht(mu(n)*tf(n),mu(e)*tf(e))}function Z2e(n,e){return ht(mu(n)*tf(n),mu(e)*tf(e))}function npe(n){df();var e;e=u(n.g,9),e.n.a=n.d.c+e.d.b}function rf(n){n.a.a=n.c,n.c.b=n.a,n.a.b=n.c.a=null,n.b=0}function EQ(n,e){return n.b=e.b,n.c=e.c,n.d=e.d,n.a=e.a,n}function AQ(n){return oe(n.b0?$s(n):new Z}function tpe(n,e){return u(m(n,(X(),E3)),16).Ec(e),e}function ipe(n,e){return Sn(n,u(m(e,(en(),$w)),15),e)}function rpe(n){return L0(n)&&sn(fn(G(n,(en(),Dd))))}function Mp(n){var e;return e=n.f,e||(n.f=new o4(n,n.c))}function cpe(n,e,t){return dm(),g8e(u(zn(n.e,e),520),t)}function upe(n,e,t){n.i=0,n.e=0,e!=t&&Zxn(n,e,t)}function fpe(n,e,t){n.i=0,n.e=0,e!=t&&nBn(n,e,t)}function uOn(n,e,t,i){this.b=n,this.c=i,QA.call(this,e,t)}function fOn(n,e){this.g=n,this.d=I(C(Xh,1),w1,9,0,[e])}function sOn(n,e){n.d&&!n.d.a&&(Kyn(n.d,e),sOn(n.d,e))}function oOn(n,e){n.e&&!n.e.a&&(Kyn(n.e,e),oOn(n.e,e))}function hOn(n,e){return Jg(n.j,e.s,e.c)+Jg(e.e,n.s,n.c)}function spe(n){return u(n.jd(),149).Og()+":"+$r(n.kd())}function ope(n,e){return-ht(mu(n)*tf(n),mu(e)*tf(e))}function hpe(n,e){return uf(n),uf(e),Yjn(u(n,23),u(e,23))}function Ya(n,e,t){var i,r;i=e$(t),r=new _E(i),Ns(n,e,r)}function lpe(n){rA(),j.setTimeout(function(){throw n},0)}function lOn(n){this.b=new Z,Xt(this.b,this.b),this.a=n}function aOn(n){this.b=new l3n,this.a=n,j.Math.random()}function MQ(n,e){new dt,this.a=new _u,this.b=n,this.c=e}function dOn(n,e,t,i){Qz.call(this,e,t),this.b=n,this.a=i}function z$(n,e,t,i,r,c){Ek.call(this,n,e,t,i,r,c?-2:-1)}function bOn(){Ax(this,new qU),this.wb=(q1(),Kn),u4()}function TQ(){TQ=x,tZn=new Obn,rZn=new _W,iZn=new Lbn}function Dn(){Dn=x,nr=new obn,Kh=new lbn,DS=new sbn}function b0(){b0=x,hfn=new jU,m_=new jU,lfn=new dbn}function lt(n){return!n.q&&(n.q=new U(js,n,11,10)),n.q}function K(n){return!n.s&&(n.s=new U(bu,n,21,17)),n.s}function zM(n){return!n.a&&(n.a=new U(ye,n,10,11)),n.a}function XM(n,e){if(n==null)throw M(new np(e));return n}function wOn(n,e){xle.call(this,new A$(n)),this.a=n,this.b=e}function CQ(n){this.b=n,this.c=n,n.e=null,n.c=null,this.a=1}function IQ(n){return n&&n.hashCode?n.hashCode():f0(n)}function ape(n){return new tCn(n,n.e.Pd().gc()*n.c.Pd().gc())}function dpe(n){return new iCn(n,n.e.Pd().gc()*n.c.Pd().gc())}function X$(n){return D(n,18)?new Db(u(n,18)):Ywe(n.Jc())}function WM(n){return Dn(),D(n,59)?new _L(n):new cM(n)}function bpe(n){return Ce(n),pJn(new Hn(Qn(n.a.Jc(),new In)))}function W$(n,e){return e==null?!!jr(n.f,null):Pge(n.i,e)}function wpe(n,e){var t;return t=bX(n.a,e),t&&(e.d=null),t}function gOn(n,e,t){return n.f?n.f.cf(e,t):!1}function hk(n,e,t,i){qt(n.c[e.g],t.g,i),qt(n.c[t.g],e.g,i)}function Q$(n,e,t,i){qt(n.c[e.g],e.g,t),qt(n.b[e.g],e.g,i)}function gpe(n,e,t){return $(N(t.a))<=n&&$(N(t.b))>=e}function pOn(){this.d=new dt,this.b=new de,this.c=new Z}function vOn(){this.b=new Vt,this.d=new dt,this.e=new ZE}function SQ(){this.c=new Li,this.d=new Li,this.e=new Li}function w0(){this.a=new _u,this.b=(vf(3,ww),new Jc(3))}function mOn(n){this.c=n,this.b=new Xl(u(Ce(new Dbn),50))}function kOn(n){this.c=n,this.b=new Xl(u(Ce(new pwn),50))}function yOn(n){this.b=n,this.a=new Xl(u(Ce(new Zbn),50))}function n1(n,e){this.e=n,this.a=hi,this.b=VHn(e),this.c=e}function QM(n){this.c=n.c,this.d=n.d,this.b=n.b,this.a=n.a}function jOn(n,e,t,i,r,c){this.a=n,GN.call(this,e,t,i,r,c)}function EOn(n,e,t,i,r,c){this.a=n,GN.call(this,e,t,i,r,c)}function U1(n,e,t,i,r,c,f){return new bN(n.e,e,t,i,r,c,f)}function ppe(n,e,t){return t>=0&&Cn(n.substr(t,e.length),e)}function AOn(n,e){return D(e,149)&&Cn(n.b,u(e,149).Og())}function vpe(n,e){return n.a?e.Dh().Jc():u(e.Dh(),72).Gi()}function MOn(n,e){var t;return t=n.b.Oc(e),vDn(t,n.b.gc()),t}function lk(n,e){if(n==null)throw M(new np(e));return n}function Pr(n){return n.u||(qu(n),n.u=new VCn(n,n)),n.u}function O4(){O4=x;var n,e;e=!Q8e(),n=new o7,b_=e?new Q6:n}function iu(n){var e;return e=u(Vn(n,16),29),e||n.fi()}function VM(n,e){var t;return t=_a(n.Pm),e==null?t:t+": "+e}function ss(n,e,t){return Di(e,t,n.length),n.substr(e,t-e)}function TOn(n,e){hM.call(this),GV(this),this.a=n,this.c=e}function COn(){PD.call(this,"FIXED_INTEGER_RATIO_BOXES",2)}function mpe(){return fT(),I(C(hon,1),z,425,0,[TG,oon])}function kpe(){return hT(),I(C(Aon,1),z,428,0,[FG,NG])}function ype(){return Ok(),I(C(lln,1),z,426,0,[bq,wq])}function jpe(){return yT(),I(C(Bsn,1),z,427,0,[xsn,cG])}function Epe(){return Dk(),I(C(zsn,1),z,424,0,[bP,Ksn])}function Ape(){return Tk(),I(C(Qsn,1),z,479,0,[Wsn,gP])}function Mpe(){return Mo(),I(C(oce,1),z,512,0,[Bd,qo])}function Tpe(){return uh(),I(C(fce,1),z,513,0,[sb,j1])}function Cpe(){return uo(),I(C(Ace,1),z,519,0,[Gw,Ea])}function Ipe(){return u5(),I(C(nce,1),z,522,0,[p8,g8])}function Spe(){return g0(),I(C(Oce,1),z,457,0,[Aa,S2])}function Ppe(){return rT(),I(C(u1n,1),z,430,0,[xq,c1n])}function Ope(){return UT(),I(C(f1n,1),z,490,0,[uO,L2])}function Lpe(){return ET(),I(C(o1n,1),z,431,0,[s1n,qq])}function Dpe(){return yk(),I(C(uan,1),z,433,0,[aH,pO])}function $pe(){return bT(),I(C(Y1n,1),z,481,0,[uH,V1n])}function Npe(){return Gk(),I(C(Ian,1),z,432,0,[mO,Can])}function Fpe(){return $k(),I(C(Zfe,1),z,498,0,[PH,SH])}function xpe(){return oT(),I(C(Pan,1),z,389,0,[vH,San])}function Bpe(){return ST(),I(C(Afn,1),z,429,0,[O_,BS])}function Rpe(){return G4(),I(C(Jne,1),z,506,0,[kj,H_])}function YM(n,e,t,i){return t>=0?n.Rh(e,t,i):n.zh(null,t,i)}function ak(n){return n.b.b==0?n.a.uf():h$(n.b)}function Jpe(n){if(n.p!=5)throw M(new gu);return Le(n.f)}function _pe(n){if(n.p!=5)throw M(new gu);return Le(n.k)}function PQ(n){return R(n.a)===R((VN(),hU))&&fLe(n),n.a}function Gpe(n){n&&VM(n,n.ge())}function IOn(n,e){Xhe(this,new V(n.a,n.b)),Whe(this,ik(e))}function g0(){g0=x,Aa=new Bz(c3,0),S2=new Bz(u3,1)}function uh(){uh=x,sb=new $z(u3,0),j1=new $z(c3,1)}function qpe(n,e){n.c=e,n.c>0&&n.b>0&&(n.g=TM(n.c,n.b,n.a))}function Hpe(n,e){n.b=e,n.c>0&&n.b>0&&(n.g=TM(n.c,n.b,n.a))}function SOn(n){var e;e=n.c.d.b,n.b=e,n.a=n.c.d,e.a=n.c.d.b=n}function POn(n){return n.b==0?null:(oe(n.b!=0),Rf(n,n.a.a))}function Cc(n,e){return e==null?Br(jr(n.f,null)):vm(n.i,e)}function OOn(n,e,t,i,r){return new Tx(n,(x4(),E_),e,t,i,r)}function ZM(n,e){return kDn(e),lme(n,J(Oe,ze,30,e,15,1),e)}function nT(n,e){return XM(n,"set1"),XM(e,"set2"),new bAn(n,e)}function Upe(n,e){var t=d_[n.charCodeAt(0)];return t??n}function LOn(n,e){var t,i;return t=e,i=new QO,xKn(n,t,i),i.d}function V$(n,e,t,i){var r;r=new iIn,e.a[t.g]=r,jp(n.b,i,r)}function Kpe(n,e){var t;return t=fme(n.f,e),ft(sM(t),n.f.d)}function n5(n){var e;mme(n.a),OTn(n.a),e=new HE(n.a),EZ(e)}function zpe(n,e){JHn(n,!0),_c(n.e.Pf(),new aW(n,!0,e))}function DOn(n){this.a=u(Ce(n),279),this.b=(Dn(),new TX(n))}function $On(n,e,t){this.i=new Z,this.b=n,this.g=e,this.a=t}function eT(n,e,t){this.c=new Z,this.e=n,this.f=e,this.b=t}function OQ(n,e,t){this.a=new Z,this.e=n,this.f=e,this.c=t}function Y$(n,e,t){it(),Wd.call(this,n),this.b=e,this.a=t}function LQ(n,e,t){$f(),zE.call(this,e),this.a=n,this.b=t}function NOn(n){hM.call(this),GV(this),this.a=n,this.c=!0}function p0(){Ble.call(this,new ip(Vb(12))),vX(!0),this.a=2}function Mo(){Mo=x,Bd=new Nz(iR,0),qo=new Nz("UP",1)}function Jb(n){return n.Db>>16!=3?null:u(n.Cb,19)}function To(n){return n.Db>>16!=9?null:u(n.Cb,19)}function FOn(n){return n.Db>>16!=6?null:u(n.Cb,74)}function Xpe(n){if(n.ye())return null;var e=n.n;return CS[e]}function Wpe(n){function e(){}return e.prototype=n||{},new e}function xOn(n){var e;return e=new fA(Vb(n.length)),NY(e,n),e}function dk(n,e){var t;t=n.q.getHours(),n.q.setDate(e),Q5(n,t)}function DQ(n,e,t){var i;i=n.Fh(e),i>=0?n.$h(i,t):Fen(n,e,t)}function Pg(n,e,t){tT(),n&&Ke(fU,n,e),n&&Ke(EE,n,t)}function Qpe(n,e){return ml(),u(m(e,(Vr(),Th)),15).a==n}function Vpe(n,e){return wM(),_n(),u(e.b,15).a=0?n.Th(t):Lx(n,e)}function Z$(n,e,t){var i;i=Wxn(n,e,t),n.b=new XT(i.c.length)}function _On(n){this.a=n,this.b=J(Vre,Y,2022,n.e.length,0,2)}function GOn(){this.a=new Ih,this.e=new Vt,this.g=0,this.i=0}function qOn(n,e){nM(this),this.f=e,this.g=n,KM(this),this.he()}function nN(n,e){return j.Math.abs(n)0}function $Q(n){var e;return e=n.d,e=n._i(n.f),Ee(n,e),e.Ob()}function HOn(n,e){var t;return t=new JW(e),P_n(t,n),new Ou(t)}function e3e(n){if(n.p!=0)throw M(new gu);return Pm(n.f,0)}function t3e(n){if(n.p!=0)throw M(new gu);return Pm(n.k,0)}function UOn(n){return n.Db>>16!=7?null:u(n.Cb,244)}function L4(n){return n.Db>>16!=6?null:u(n.Cb,244)}function NQ(n){return n.Db>>16!=7?null:u(n.Cb,176)}function It(n){return n.Db>>16!=11?null:u(n.Cb,19)}function _b(n){return n.Db>>16!=17?null:u(n.Cb,29)}function KOn(n){return n.Db>>16!=3?null:u(n.Cb,159)}function FQ(n){var e;return ea(n),e=new Vt,et(n,new H8n(e))}function zOn(n,e){var t=n.a=n.a||[];return t[e]||(t[e]=n.te(e))}function i3e(n,e){var t;t=n.q.getHours(),n.q.setMonth(e),Q5(n,t)}function Gi(n,e){n.c&&ru(n.c.g,n),n.c=e,n.c&&nn(n.c.g,n)}function Ti(n,e){n.d&&ru(n.d.e,n),n.d=e,n.d&&nn(n.d.e,n)}function li(n,e){n.c&&ru(n.c.a,n),n.c=e,n.c&&nn(n.c.a,n)}function Jr(n,e){n.i&&ru(n.i.j,n),n.i=e,n.i&&nn(n.i.j,n)}function Er(n,e,t){return e==null?fu(n.f,null,t):T0(n.i,e,t)}function e5(n,e,t,i,r,c){return new pl(n.e,e,n.Jj(),t,i,r,c)}function r3e(n){return pF(),_n(),u(n.a,84).d.e!=0}function XOn(){XOn=x,EYn=me((eA(),I(C(jYn,1),z,541,0,[h_])))}function WOn(){WOn=x,Lre=Bc(new Kt,(Ei(),ar),(Ii(),v3))}function QOn(){QOn=x,Dre=Bc(new Kt,(Ei(),ar),(Ii(),v3))}function VOn(){VOn=x,$re=Bc(new Kt,(Ei(),ar),(Ii(),v3))}function xQ(){xQ=x,Nre=Bc(new Kt,(Ei(),ar),(Ii(),v3))}function YOn(){YOn=x,xre=Bc(new Kt,(Ei(),ar),(Ii(),v3))}function BQ(){BQ=x,Bre=Bc(new Kt,(Ei(),ar),(Ii(),v3))}function ZOn(){ZOn=x,tce=xe(new Kt,(Ei(),ar),(Ii(),q9))}function wf(){wf=x,cce=xe(new Kt,(Ei(),ar),(Ii(),q9))}function nLn(){nLn=x,uce=xe(new Kt,(Ei(),ar),(Ii(),q9))}function eN(){eN=x,lce=xe(new Kt,(Ei(),ar),(Ii(),q9))}function eLn(){eLn=x,uue=Bc(new Kt,(Gp(),m8),(X5(),Iln))}function tT(){tT=x,fU=new de,EE=new de,oae(GYn,new N6n)}function tLn(n,e,t){this.a=e,this.c=n,this.b=(Ce(t),new Ou(t))}function iLn(n,e,t){this.a=e,this.c=n,this.b=(Ce(t),new Ou(t))}function rLn(n,e){this.a=n,this.c=Xi(this.a),this.b=new QM(e)}function Za(n,e,t,i){this.c=n,this.d=i,iN(this,e),rN(this,t)}function Tp(n){this.c=new dt,this.b=n.b,this.d=n.c,this.a=n.a}function tN(n){this.a=j.Math.cos(n),this.b=j.Math.sin(n)}function iN(n,e){n.a&&ru(n.a.k,n),n.a=e,n.a&&nn(n.a.k,n)}function rN(n,e){n.b&&ru(n.b.f,n),n.b=e,n.b&&nn(n.b.f,n)}function cLn(n,e){m2e(n,n.b,n.c),u(n.b.b,68),e&&u(e.b,68).b}function c3e(n,e){dZ(n,e),D(n.Cb,89)&&fw(qu(u(n.Cb,89)),2)}function cN(n,e){D(n.Cb,89)&&fw(qu(u(n.Cb,89)),4),Gc(n,e)}function iT(n,e){D(n.Cb,187)&&(u(n.Cb,187).tb=null),Gc(n,e)}function uLn(n,e){var t;return t=u(Zb(Mp(n.a),e),18),t?t.gc():0}function u3e(n,e){var t,i;t=e.c,i=t!=null,i&&Ep(n,new Bb(e.c))}function fLn(n){var e,t;return t=(u4(),e=new Qd,e),R4(t,n),t}function sLn(n){var e,t;return t=(u4(),e=new Qd,e),R4(t,n),t}function oLn(n){for(var e;;)if(e=n.Pb(),!n.Ob())return e}function Ic(n,e){return rr(),NN(e)?new jM(e,n):new G7(e,n)}function f3e(n,e){return ht(u(n.c,65).c.e.b,u(e.c,65).c.e.b)}function s3e(n,e){return ht(u(n.c,65).c.e.a,u(e.c,65).c.e.a)}function hLn(n,e,t){return new Tx(n,(x4(),A_),e,t,null,!1)}function lLn(n,e,t){return new Tx(n,(x4(),j_),null,!1,e,t)}function bk(n){return dh(),Pc(n,0)>=0?ta(n):Xm(ta(i1(n)))}function o3e(){return Gf(),I(C(hu,1),z,132,0,[pfn,ou,vfn])}function h3e(){return so(),I(C(jw,1),z,240,0,[nc,Kc,ec])}function l3e(){return Du(),I(C(sZn,1),z,464,0,[Eh,ga,qs])}function a3e(){return cu(),I(C(hZn,1),z,465,0,[wo,pa,Hs])}function d3e(n,e){VTn(n,Le(yi(o0(e,24),MI)),Le(yi(e,MI)))}function Gb(n,e){if(n<0||n>e)throw M(new xc(din+n+bin+e))}function kn(n,e){if(n<0||n>=e)throw M(new xc(din+n+bin+e))}function ne(n,e){if(n<0||n>=e)throw M(new XK(din+n+bin+e))}function On(n,e){this.b=(Gn(n),n),this.a=(e&gw)==0?e|64|wh:e}function fh(n,e,t){GBn(e,t,n.gc()),this.c=n,this.a=e,this.b=t-e}function aLn(n,e,t){var i;GBn(e,t,n.c.length),i=t-e,uz(n.c,e,i)}function b3e(n,e,t){var i;i=new zi(t.d),ft(i,n),IF(e,i.a,i.b)}function RQ(n){var e;return ea(n),e=(b0(),b0(),m_),OT(n,e)}function Og(n){return dm(),D(n.g,9)?u(n.g,9):null}function Co(n){return Gr(I(C(vi,1),Y,8,0,[n.i.n,n.n,n.a]))}function w3e(){return s5(),I(C(Rfn,1),z,385,0,[N_,$_,F_])}function g3e(){return V1(),I(C(MG,1),z,330,0,[Tj,son,Sw])}function p3e(){return vl(),I(C(Tee,1),z,316,0,[Cj,m2,m3])}function v3e(){return K4(),I(C(AG,1),z,303,0,[jG,EG,Mj])}function m3e(){return xT(),I(C(qsn,1),z,351,0,[Gsn,dP,uG])}function k3e(){return od(),I(C(pee,1),z,452,0,[bG,p6,p2])}function y3e(){return fr(),I(C(Mre,1),z,455,0,[d8,xu,zc])}function j3e(){return YT(),I(C(bln,1),z,382,0,[aln,gq,dln])}function E3e(){return k5(),I(C(wln,1),z,349,0,[vq,pq,Jj])}function A3e(){return Y4(),I(C(pln,1),z,350,0,[mq,gln,b8])}function M3e(){return y5(),I(C(eln,1),z,353,0,[fq,nln,UP])}function T3e(){return FT(),I(C(kln,1),z,352,0,[mln,kq,vln])}function C3e(){return ZT(),I(C(yln,1),z,383,0,[yq,S6,_w])}function I3e(){return v5(),I(C(Bln,1),z,386,0,[xln,Aq,qj])}function S3e(){return zk(),I(C(a1n,1),z,387,0,[fO,h1n,l1n])}function P3e(){return dC(),I(C($1n,1),z,388,0,[D1n,tH,L1n])}function O3e(){return A0(),I(C(Q_,1),z,369,0,[nb,va,Z0])}function L3e(){return fC(),I(C(ran,1),z,435,0,[tan,ian,sH])}function D3e(){return AT(),I(C(ean,1),z,434,0,[fH,nan,Z1n])}function $3e(){return Vk(),I(C(oH,1),z,440,0,[bO,wO,gO])}function N3e(){return vC(),I(C(O1n,1),z,441,0,[A8,hO,Wq])}function F3e(){return QT(),I(C(P1n,1),z,304,0,[Xq,S1n,I1n])}function x3e(){return h5(),I(C(Qdn,1),z,301,0,[lE,YH,Wdn])}function B3e(){return Po(),I(C(Ldn,1),z,281,0,[J6,Vw,_6])}function R3e(){return Bp(),I(C(Zdn,1),z,283,0,[Ydn,Zw,NO])}function J3e(){return jl(),I(C(Hdn,1),z,348,0,[SO,M1,_8])}function gf(n){it(),Wd.call(this,n),this.c=!1,this.a=!1}function dLn(n,e,t){Wd.call(this,25),this.b=n,this.a=e,this.c=t}function JQ(n,e){Fle.call(this,new ip(Vb(n))),vf(e,xzn),this.a=e}function _3e(n,e){var t;return t=(Gn(n),n).g,LX(!!t),Gn(e),t(e)}function bLn(n,e){var t,i;return i=E4(n,e),t=n.a.dd(i),new aAn(n,t)}function G3e(n,e,t){var i;return i=Z5(n,e,!1),i.b<=e&&i.a<=t}function wLn(n,e,t){var i;i=new x3n,i.b=e,i.a=t,++e.b,nn(n.d,i)}function rT(){rT=x,xq=new Rz("DFS",0),c1n=new Rz("BFS",1)}function q3e(n){if(n.p!=2)throw M(new gu);return Le(n.f)&ri}function H3e(n){if(n.p!=2)throw M(new gu);return Le(n.k)&ri}function U3e(n){return n.Db>>16!=6?null:u(Nx(n),244)}function E(n){return oe(n.ai?1:0}function t4e(n,e){var t;t=u(zn(n.g,e),60),_c(e.d,new ZAn(n,t))}function pLn(n,e){var t;for(t=n+"";t.length0&&n.a[--n.d]==0;);n.a[n.d++]==0&&(n.e=0)}function $Ln(n){return n.a?n.e.length==0?n.a.a:n.a.a+(""+n.e):n.c}function NLn(n){return oe(n.b.b!=n.d.a),n.c=n.b=n.b.b,--n.a,n.c.c}function FLn(n,e){var t;return t=1-e,n.a[t]=HT(n.a[t],t),HT(n,e)}function xLn(n,e){var t,i;return i=yi(n,or),t=Lh(e,32),sh(t,i)}function s4e(n,e,t){var i;return i=u(n.Zb().xc(e),18),!!i&&i.Gc(t)}function BLn(n,e,t){var i;return i=u(n.Zb().xc(e),18),!!i&&i.Kc(t)}function RLn(n,e,t){var i;i=(Ce(n),new Ou(n)),Kke(new tLn(i,e,t))}function gk(n,e,t){var i;i=(Ce(n),new Ou(n)),zke(new iLn(i,e,t))}function JLn(){JLn=x,Eln=FPn(W(1),W(4)),jln=FPn(W(1),W(2))}function _Ln(n){QN.call(this,n,(x4(),y_),null,!1,null,!1)}function GLn(n,e){Wa.call(this,1,2,I(C(Oe,1),ze,30,15,[n,e]))}function Ci(n,e){this.a=n,Y6.call(this,n),Gb(e,n.gc()),this.b=e}function qLn(n,e){var t;n.e=new JK,t=ow(e),si(t,n.c),IHn(n,t,0)}function o4e(n,e,t){n.a=e,n.c=t,n.b.a.$b(),rf(n.d),kb(n.e.a.c,0)}function Ot(n,e,t,i){var r;r=new xU,r.a=e,r.b=t,r.c=i,_e(n.a,r)}function Q(n,e,t,i){var r;r=new xU,r.a=e,r.b=t,r.c=i,_e(n.b,r)}function HLn(n,e,t,i){return n.a+=""+ss(e==null?su:$r(e),t,i),n}function Wr(n,e,t,i,r,c){return fxn(n,e,t,c),cZ(n,i),uZ(n,r),n}function zQ(){var n,e,t;return e=(t=(n=new Qd,n),t),nn(F0n,e),e}function pk(n,e){if(n<0||n>=e)throw M(new xc(DAe(n,e)));return n}function ULn(n,e,t){if(n<0||et)throw M(new xc(nAe(n,e,t)))}function h4e(n){if(!("stack"in n))try{throw n}catch{}return n}function l4e(n){return Sg(n).dc()?!1:(Uae(n,new is),!0)}function td(n){var e;return Lr(n)?(e=n,e==-0?0:e):S6e(n)}function KLn(n,e){return D(e,45)?ix(n.a,u(e,45)):!1}function zLn(n,e){return D(e,45)?ix(n.a,u(e,45)):!1}function XLn(n,e){return D(e,45)?ix(n.a,u(e,45)):!1}function a4e(n,e){return Dp(),u(m(e,(Vr(),P2)),15).a>=n.gc()}function d4e(n){return wf(),!Ri(n)&&!(!Ri(n)&&n.c.i.c==n.d.i.c)}function oh(n){return u(Oo(n,J(h6,Hv,17,n.c.length,0,1)),324)}function cT(n){return new Jc((vf(n,MB),PT(Wi(Wi(5,n),n/10|0))))}function b4e(n,e){return new s$(e,DCn(Xi(e.e),n,n),(_n(),!0))}function w4e(n){return d$(n.e.Pd().gc()*n.c.Pd().gc(),273,new t8n(n))}function WLn(n){return u(Oo(n,J(xne,NXn,12,n.c.length,0,1)),2021)}function QLn(n){this.a=J(hi,Bn,1,DY(j.Math.max(8,n))<<1,5,1)}function XQ(n){var e;return H1(n),e=new bbn,bg(n.a,new _8n(e)),e}function uT(n){var e;return H1(n),e=new wbn,bg(n.a,new G8n(e)),e}function g4e(n,e){return n.a<=n.b?(e.Bd(n.a++),!0):!1}function p4e(n,e,t){n.d&&ru(n.d.e,n),n.d=e,n.d&&Ua(n.d.e,t,n)}function WQ(n,e,t){this.d=new ekn(this),this.e=n,this.i=e,this.f=t}function fT(){fT=x,TG=new Oz(Nv,0),oon=new Oz("TOP_LEFT",1)}function VLn(){VLn=x,wfe=me((wA(),I(C(can,1),z,480,0,[hH])))}function YLn(){YLn=x,pfe=me((gA(),I(C(gfe,1),z,550,0,[lH])))}function ZLn(){ZLn=x,Nfe=me((bm(),I(C(Tan,1),z,531,0,[Vj])))}function nDn(){nDn=x,Xfe=me((pA(),I(C(zfe,1),z,557,0,[TH])))}function eDn(){eDn=x,Qfe=me((vA(),I(C(Wfe,1),z,558,0,[CH])))}function tDn(){tDn=x,Yfe=me((mA(),I(C(Vfe,1),z,559,0,[IH])))}function v4e(n){cRn((!n.a&&(n.a=new U(ye,n,10,11)),n.a),new vvn)}function i5(n,e){A$e(e,n),TW(n.d),TW(u(m(n,(en(),BP)),216))}function hN(n,e){M$e(e,n),MW(n.d),MW(u(m(n,(en(),BP)),216))}function v0(n,e){var t,i;return t=dl(n,e),i=null,t&&(i=t.ne()),i}function r5(n,e){var t,i;return t=dl(n,e),i=null,t&&(i=t.qe()),i}function D4(n,e){var t,i;return t=Kb(n,e),i=null,t&&(i=t.qe()),i}function bl(n,e){var t,i;return t=dl(n,e),i=null,t&&(i=Xnn(t)),i}function m4e(n,e,t){var i;return i=fv(t),sI(n.n,i,e),sI(n.o,e,t),e}function k4e(n,e,t){var i;i=g7e();try{return d0e(n,e,t)}finally{kve(i)}}function iDn(n,e,t,i){return D(t,59)?new yCn(n,e,t,i):new XW(n,e,t,i)}function QQ(n,e,t,i){this.d=n,this.n=e,this.g=t,this.o=i,this.p=-1}function rDn(n,e,t,i){this.e=null,this.c=n,this.d=e,this.a=t,this.b=i}function cDn(n){var e;e=n.Dh(),this.a=D(e,72)?u(e,72).Gi():e.Jc()}function y4e(n){return new On(cme(u(n.a.kd(),18).gc(),n.a.jd()),16)}function qb(n){return D(n,18)?u(n,18).dc():!n.Jc().Ob()}function uDn(n){if(n.e.g!=n.b)throw M(new Lf);return!!n.c&&n.d>0}function je(n){return oe(n.b!=n.d.c),n.c=n.b,n.b=n.b.a,++n.a,n.c.c}function VQ(n,e){Gn(e),qt(n.a,n.c,e),n.c=n.c+1&n.a.length-1,$Jn(n)}function K1(n,e){Gn(e),n.b=n.b-1&n.a.length-1,qt(n.a,n.b,e),$Jn(n)}function YQ(n,e){var t;return t=u(So(n.b,e),66),!t&&(t=new dt),t}function j4e(n,e){var t;t=e.a,Gi(t,e.c.d),Ti(t,e.d.d),Wb(t.a,n.n)}function fDn(n,e){return u(Zu(Nb(u(ot(n.k,e),16).Mc(),b2)),114)}function sDn(n,e){return u(Zu(kp(u(ot(n.k,e),16).Mc(),b2)),114)}function E4e(){return z4(),I(C(Mne,1),z,413,0,[Y0,Aw,Ew,a2])}function A4e(){return M0(),I(C(NZn,1),z,414,0,[gj,wj,S_,P_])}function M4e(){return x4(),I(C($S,1),z,310,0,[y_,j_,E_,A_])}function T4e(){return _p(),I(C(qfn,1),z,384,0,[_9,Gfn,__,G_])}function C4e(){return eC(),I(C(Hne,1),z,368,0,[X_,fP,sP,yj])}function I4e(){return Bs(),I(C(eee,1),z,418,0,[Cw,a6,d6,W_])}function S4e(){return ld(),I(C(Wre,1),z,409,0,[_j,w8,QP,WP])}function P4e(){return iw(),I(C(oq,1),z,205,0,[KP,sq,I2,C2])}function O4e(){return Al(),I(C(hln,1),z,270,0,[ja,oln,aq,dq])}function L4e(){return I5(),I(C(_sn,1),z,302,0,[U9,Rsn,Ej,Jsn])}function D4e(){return m5(),I(C(r1n,1),z,354,0,[Fq,cO,Nq,$q])}function $4e(){return OC(),I(C(C1n,1),z,355,0,[zq,M1n,T1n,A1n])}function N4e(){return GC(),I(C(xue,1),z,406,0,[Zq,Qq,Yq,Vq])}function F4e(){return Gp(),I(C(Tln,1),z,402,0,[nO,v8,m8,k8])}function x4e(){return NC(),I(C(Oan,1),z,396,0,[kH,yH,jH,EH])}function B4e(){return Z4(),I(C(Odn,1),z,280,0,[cE,IO,Sdn,Pdn])}function R4e(){return El(),I(C(QH,1),z,225,0,[WH,uE,G6,R3])}function J4e(){return kf(),I(C(Xse,1),z,293,0,[sE,Qh,Ca,fE])}function _4e(){return of(),I(C(K8,1),z,381,0,[dE,qd,aE,Yw])}function G4e(){return lT(),I(C(gE,1),z,290,0,[n0n,t0n,nU,e0n])}function q4e(){return bC(),I(C(u0n,1),z,327,0,[eU,i0n,c0n,r0n])}function H4e(){return tC(),I(C(aoe,1),z,412,0,[tU,s0n,f0n,o0n])}function U4e(n){var e;return n.j==(tn(),le)&&(e=wqn(n),vu(e,te))}function oDn(n,e){var t;for(t=n.j.c.length;t0&&kc(n.g,0,e,0,n.i),e}function Ip(n){return dm(),D(n.g,157)?u(n.g,157):null}function X4e(n){return tT(),Tc(fU,n)?u(zn(fU,n),343).Pg():null}function Ff(n,e,t){return e<0?Lx(n,t):u(t,69).uk().zk(n,n.ei(),e)}function W4e(n,e){return lp(new V(e.e.a+e.f.a/2,e.e.b+e.f.b/2),n)}function aDn(n,e){return R(e)===R(n)?"(this Map)":e==null?su:$r(e)}function dDn(n,e){kA();var t;return t=u(zn(JO,n),58),!t||t.dk(e)}function Q4e(n){if(n.p!=1)throw M(new gu);return Le(n.f)<<24>>24}function V4e(n){if(n.p!=1)throw M(new gu);return Le(n.k)<<24>>24}function Y4e(n){if(n.p!=7)throw M(new gu);return Le(n.k)<<16>>16}function Z4e(n){if(n.p!=7)throw M(new gu);return Le(n.f)<<16>>16}function Lg(n,e){return e.e==0||n.e==0?F9:(kv(),Bx(n,e))}function nve(n,e,t){if(t){var i=t.me();n.a[e]=i(t)}else delete n.a[e]}function bDn(n,e){var t;return t=new tp,n.Ed(t),t.a+="..",e.Fd(t),t.a}function co(n){var e;for(e=0;n.Ob();)n.Pb(),e=Wi(e,1);return PT(e)}function eve(n,e,t){var i;i=u(zn(n.g,t),60),nn(n.a.c,new Yi(e,i))}function tve(n,e,t,i,r){var c;c=ETe(r,t,i),nn(e,MAe(r,c)),vEe(n,r,e)}function wDn(n,e,t){n.i=0,n.e=0,e!=t&&(nBn(n,e,t),Zxn(n,e,t))}function ive(n){n.a=null,n.e=null,kb(n.b.c,0),kb(n.f.c,0),n.c=null}function rve(n,e){return u(e==null?Br(jr(n.f,null)):vm(n.i,e),291)}function cve(n,e,t){return E$(N(Br(jr(n.f,e))),N(Br(jr(n.f,t))))}function sT(n,e,t){return hI(n,e,t,D(e,104)&&(u(e,20).Bb&Zi)!=0)}function uve(n,e,t){return Ev(n,e,t,D(e,104)&&(u(e,20).Bb&Zi)!=0)}function fve(n,e,t){return bTe(n,e,t,D(e,104)&&(u(e,20).Bb&Zi)!=0)}function nV(n,e){return n==(Xn(),xt)&&e==xt?4:n==xt||e==xt?8:32}function gDn(n,e){SQ.call(this),this.a=n,this.b=e,nn(this.a.b,this)}function Hb(n,e){it(),Wd.call(this,n),this.a=e,this.c=-1,this.b=-1}function eV(n,e,t,i,r){this.i=n,this.a=e,this.e=t,this.j=i,this.f=r}function wl(n,e){dh(),Wa.call(this,n,1,I(C(Oe,1),ze,30,15,[e]))}function Nh(n,e){rr();var t;return t=u(n,69).tk(),OEe(t,e),t.vl(e)}function pDn(n,e){var t;for(t=e;t;)Sb(n,t.i,t.j),t=It(t);return n}function vDn(n,e){var t;for(t=0;t"+GQ(n.d):"e_"+f0(n)}function yDn(n){D(n,209)&&!sn(fn(n.mf((Me(),AO))))&&TPe(u(n,19))}function iV(n){n.b!=n.c&&(n.a=J(hi,Bn,1,8,5,1),n.b=0,n.c=0)}function id(n,e,t){this.e=n,this.a=hi,this.b=VHn(e),this.c=e,this.d=t}function Ub(n,e,t,i){kLn.call(this,1,t,i),this.c=n,this.b=e}function dN(n,e,t,i){yLn.call(this,1,t,i),this.c=n,this.b=e}function bN(n,e,t,i,r,c,f){GN.call(this,e,i,r,c,f),this.c=n,this.a=t}function wN(n){this.e=n,this.c=this.e.a,this.b=this.e.g,this.d=this.e.i}function jDn(n){this.c=n,this.a=u(ls(n),160),this.b=this.a.hk().ti()}function hve(n,e){return Wl(),Ee(K(n.a),e)}function lve(n,e){return Wl(),Ee(K(n.a),e)}function oT(){oT=x,vH=new Uz("STRAIGHT",0),San=new Uz("BEND",1)}function u5(){u5=x,p8=new Fz("UPPER",0),g8=new Fz("LOWER",1)}function hT(){hT=x,FG=new Lz(lo,0),NG=new Lz("ALTERNATING",1)}function lT(){lT=x,n0n=new gSn,t0n=new nPn,nU=new COn,e0n=new ePn}function aT(n){var e;return n?new JW(n):(e=new Ih,WN(e,n),e)}function ave(n,e){var t;for(t=n.d-1;t>=0&&n.a[t]===e[t];t--);return t<0}function dve(n,e){var t;return kDn(e),t=n.slice(0,e),t.length=e,PN(t,n)}function Lu(n,e){var t;return e.b.Kb(ENn(n,e.c.Ve(),(t=new K8n(e),t)))}function dT(n){Lnn(),VTn(this,Le(yi(o0(n,24),MI)),Le(yi(n,MI)))}function EDn(){EDn=x,UZn=me((ST(),I(C(Afn,1),z,429,0,[O_,BS])))}function ADn(){ADn=x,_ne=me((G4(),I(C(Jne,1),z,506,0,[kj,H_])))}function MDn(){MDn=x,gee=me((Dk(),I(C(zsn,1),z,424,0,[bP,Ksn])))}function TDn(){TDn=x,aee=me((yT(),I(C(Bsn,1),z,427,0,[xsn,cG])))}function CDn(){CDn=x,kee=me((Tk(),I(C(Qsn,1),z,479,0,[Wsn,gP])))}function IDn(){IDn=x,Iee=me((fT(),I(C(hon,1),z,425,0,[TG,oon])))}function SDn(){SDn=x,Oee=me((hT(),I(C(Aon,1),z,428,0,[FG,NG])))}function PDn(){PDn=x,Are=me((Ok(),I(C(lln,1),z,426,0,[bq,wq])))}function ODn(){ODn=x,ece=me((u5(),I(C(nce,1),z,522,0,[p8,g8])))}function LDn(){LDn=x,sce=me((uh(),I(C(fce,1),z,513,0,[sb,j1])))}function DDn(){DDn=x,hce=me((Mo(),I(C(oce,1),z,512,0,[Bd,qo])))}function $Dn(){$Dn=x,Mce=me((uo(),I(C(Ace,1),z,519,0,[Gw,Ea])))}function NDn(){NDn=x,Lce=me((g0(),I(C(Oce,1),z,457,0,[Aa,S2])))}function FDn(){FDn=x,cue=me((rT(),I(C(u1n,1),z,430,0,[xq,c1n])))}function xDn(){xDn=x,hue=me((UT(),I(C(f1n,1),z,490,0,[uO,L2])))}function BDn(){BDn=x,due=me((ET(),I(C(o1n,1),z,431,0,[s1n,qq])))}function bT(){bT=x,uH=new Gz(Pin,0),V1n=new Gz("TARGET_WIDTH",1)}function RDn(){RDn=x,ofe=me((bT(),I(C(Y1n,1),z,481,0,[uH,V1n])))}function JDn(){JDn=x,vfe=me((yk(),I(C(uan,1),z,433,0,[aH,pO])))}function _Dn(){_Dn=x,Ffe=me((Gk(),I(C(Ian,1),z,432,0,[mO,Can])))}function GDn(){GDn=x,xfe=me((oT(),I(C(Pan,1),z,389,0,[vH,San])))}function qDn(){qDn=x,nse=me(($k(),I(C(Zfe,1),z,498,0,[PH,SH])))}function bve(){return ii(),I(C(R8,1),z,87,0,[Xo,Or,Ir,zo,Vf])}function wve(){return tn(),I(C(er,1),ac,64,0,[Kr,Yn,te,le,Zn])}function gve(n){return(n.k==(Xn(),xt)||n.k==ei)&&ut(n,(X(),W9))}function pve(n,e,t){return u(e==null?fu(n.f,null,t):T0(n.i,e,t),291)}function rV(n,e,t){n.a.c.length=0,aLe(n,e,t),n.a.c.length==0||xSe(n,e)}function Dt(n,e,t,i){var r;r=new WO,r.c=e,r.b=t,r.a=i,i.b=t.a=r,++n.b}function cV(n,e){var t,i;for(t=e,i=0;t>0;)i+=n.a[t],t-=t&-t;return i}function HDn(n,e){var t;for(t=e;t;)Sb(n,-t.i,-t.j),t=It(t);return n}function vve(n,e){var t,i;i=!1;do t=_xn(n,e),i=i|t;while(t);return i}function Bi(n,e){var t,i;for(Gn(e),i=n.Jc();i.Ob();)t=i.Pb(),e.Ad(t)}function UDn(n,e){var t,i;return t=e.jd(),i=n.De(t),!!i&&gc(i.e,e.kd())}function KDn(n,e){var t;return t=e.jd(),new t0(t,n.e.pc(t,u(e.kd(),18)))}function mve(n,e){var t;return t=n.a.get(e),t??J(hi,Bn,1,0,5,1)}function cf(n,e,t){var i;return i=(kn(e,n.c.length),n.c[e]),n.c[e]=t,i}function zDn(n,e){this.c=0,this.b=e,uTn.call(this,n,17493),this.a=this.c}function uV(n){this.d=n,this.b=this.d.a.entries(),this.a=this.b.next()}function z1(){de.call(this),ECn(this),this.d.b=this.d,this.d.a=this.d}function gN(n){wT(),!_o&&(this.c=n,this.e=!0,this.a=new Z)}function XDn(n){Azn(),Xyn(this),this.a=new dt,_Y(this,n),_e(this.a,n)}function WDn(){xD(this),this.b=new V($t,$t),this.a=new V(di,di)}function fV(n){W1e.call(this,n==null?su:$r(n),D(n,81)?u(n,81):null)}function kve(n){n&&F6e((HK(),qun)),--IS,n&&SS!=-1&&(lae(SS),SS=-1)}function vk(n){n.i=0,S7(n.b,null),S7(n.c,null),n.a=null,n.e=null,++n.g}function wT(){wT=x,_o=!0,WYn=!1,QYn=!1,YYn=!1,VYn=!1}function Ri(n){return!n.c||!n.d?!1:!!n.c.i&&n.c.i==n.d.i}function sV(n,e){return D(e,144)?Cn(n.c,u(e,144).c):!1}function pN(n,e){var t;return t=u(So(n.d,e),21),t||u(So(n.e,e),21)}function Dg(n,e){return(ea(n),f4(new Pn(n,new OV(e,n.a)))).zd(w3)}function yve(){return Ei(),I(C(Jfn,1),z,364,0,[Us,zh,jc,Ec,ar])}function jve(){return JC(),I(C(lue,1),z,365,0,[_q,Bq,Gq,Rq,Jq])}function Eve(){return rw(),I(C(iee,1),z,372,0,[jj,lP,aP,hP,oP])}function Ave(){return H5(),I(C(afe,1),z,370,0,[D2,L3,P8,S8,Qj])}function Mve(){return ay(),I(C(han,1),z,331,0,[fan,dH,oan,bH,san])}function Tve(){return O5(),I(C(iln,1),z,329,0,[tln,hq,lq,h8,l8])}function Cve(){return ff(),I(C(Eon,1),z,166,0,[Oj,Y9,$l,Z9,Ld])}function Ive(){return Lo(),I(C(Ho,1),z,161,0,[Nn,Gt,vo,A1,Fl])}function Sve(){return _g(),I(C(q8,1),z,260,0,[Ia,oE,Udn,G8,Kdn])}function Pve(n){return rA(),function(){return k4e(n,this,arguments)}}function qu(n){return n.t||(n.t=new xyn(n),M5(new eEn(n),0,n.t)),n.t}function QDn(n){var e;return n.c||(e=n.r,D(e,89)&&(n.c=u(e,29))),n.c}function Ove(n){return n.e=3,n.d=n.Yb(),n.e!=2?(n.e=0,!0):!1}function vN(n){var e,t,i;return e=n&Wu,t=n>>22&Wu,i=n<0?Sl:0,Xc(e,t,i)}function VDn(n){var e;return e=n.length,Cn(Un.substr(Un.length-e,e),n)}function ie(n){if(se(n))return n.c=n.a,n.a.Pb();throw M(new Fr)}function Sp(n,e){return e==0||n.e==0?n:e>0?ARn(n,e):wHn(n,-e)}function oV(n,e){return e==0||n.e==0?n:e>0?wHn(n,e):ARn(n,-e)}function YDn(n){this.b=n,re.call(this,n),this.a=u(Vn(this.b.a,4),131)}function ZDn(n){this.b=n,dp.call(this,n),this.a=u(Vn(this.b.a,4),131)}function Ds(n,e,t,i,r){c$n.call(this,e,i,r),this.c=n,this.b=t}function hV(n,e,t,i,r){kLn.call(this,e,i,r),this.c=n,this.a=t}function lV(n,e,t,i,r){yLn.call(this,e,i,r),this.c=n,this.a=t}function aV(n,e,t,i,r){c$n.call(this,e,i,r),this.c=n,this.a=t}function Lve(n,e,t){return ht(lp(sv(n),Xi(e.b)),lp(sv(n),Xi(t.b)))}function Dve(n,e,t){return ht(lp(sv(n),Xi(e.e)),lp(sv(n),Xi(t.e)))}function $ve(n,e){return j.Math.min(X1(e.a,n.d.d.c),X1(e.b,n.d.d.c))}function mN(n,e,t){var i;return i=n.Fh(e),i>=0?n.Ih(i,t,!0):D0(n,e,t)}function Nve(n,e){var t,i;t=u(m9e(n.c,e),18),t&&(i=t.gc(),t.$b(),n.d-=i)}function n$n(n){var e,t;return e=n.c.i,t=n.d.i,e.k==(Xn(),ei)&&t.k==ei}function f5(n){var e,t;++n.j,e=n.g,t=n.i,n.g=null,n.i=0,n.Mi(t,e),n.Li()}function mk(n,e){n.Zi(n.i+1),Fm(n,n.i,n.Xi(n.i,e)),n.Ki(n.i++,e),n.Li()}function e$n(n,e,t){var i;i=new aX(n.a),w5(i,n.a.a),fu(i.f,e,t),n.a.a=i}function dV(n,e,t,i){var r;for(r=0;re)throw M(new xc(ien(n,e,"index")));return n}function xve(n,e){var t;t=n.q.getHours()+(e/60|0),n.q.setMinutes(e),Q5(n,t)}function Pp(n,e){return ki(e)?e==null?ken(n.f,null):kxn(n.i,e):ken(n.f,e)}function t$n(n,e){cTn.call(this,e.xd(),e.wd()&-6),Gn(n),this.a=n,this.b=e}function i$n(n,e){uTn.call(this,e.xd(),e.wd()&-6),Gn(n),this.a=n,this.b=e}function vV(n,e){QA.call(this,e.xd(),e.wd()&-6),Gn(n),this.a=n,this.b=e}function r$n(n,e,t){zE.call(this,t),this.b=n,this.c=e,this.d=(FF(),aU)}function c$n(n,e,t){this.d=n,this.k=e?1:0,this.f=t?1:0,this.o=-1,this.p=0}function u$n(n,e,t){this.a=n,this.c=e,this.d=t,nn(e.e,this),nn(t.b,this)}function Io(n){this.c=n,this.a=new A(this.c.a),this.b=new A(this.c.b)}function gT(){this.e=new Z,this.c=new Z,this.d=new Z,this.b=new Z}function f$n(){this.g=new IK,this.b=new IK,this.a=new Z,this.k=new Z}function s$n(){this.a=new LK,this.b=new yjn,this.d=new ywn,this.e=new kwn}function pT(n,e,t){this.a=n,this.b=e,this.c=t,nn(n.t,this),nn(e.i,this)}function kk(){this.b=new dt,this.a=new dt,this.b=new dt,this.a=new dt}function $4(){$4=x;var n,e;HO=(u4(),e=new QE,e),UO=(n=new CL,n)}function vT(){vT=x,L8=new nt("org.eclipse.elk.labels.labelManager")}function o$n(){o$n=x,Lsn=new At("separateLayerConnections",(eC(),X_))}function yk(){yk=x,aH=new qz("FIXED",0),pO=new qz("CENTER_NODE",1)}function uo(){uo=x,Gw=new xz("REGULAR",0),Ea=new xz("CRITICAL",1)}function Bve(n,e){var t;return t=ILe(n,e),n.b=new XT(t.c.length),KOe(n,t)}function Rve(n,e,t){var i;return++n.e,--n.f,i=u(n.d[e].ed(t),138),i.kd()}function Jve(n){var e,t;return e=n.jd(),t=u(n.kd(),18),tk(t.Lc(),new Z9n(e))}function jN(n){var e;return e=n.b,e.b==0?null:u(vc(e,0),65).b}function mV(n){if(n.a){if(n.e)return mV(n.e)}else return n;return null}function _ve(n,e){return n.pe.p?-1:0}function mT(n,e){return Gn(e),n.ct||e=0?n.Ih(t,!0,!0):D0(n,e,!0)}function a6e(n,e){return ht($(N(m(n,(X(),ib)))),$(N(m(e,ib))))}function OV(n,e){QA.call(this,e.xd(),e.wd()&-16449),Gn(n),this.a=n,this.c=e}function LV(n,e,t,i,r){_Tn(this),this.b=n,this.d=e,this.f=t,this.g=i,this.c=r}function Jc(n){xD(this),rk(n>=0,"Initial capacity must not be negative")}function Lp(n){var e;return Ce(n),D(n,206)?(e=u(n,206),e):new b8n(n)}function d6e(n){for(;!n.a;)if(!yIn(n.c,new q8n(n)))return!1;return!0}function b6e(n){var e;if(!n.a)throw M(new _Pn);return e=n.a,n.a=It(n.a),e}function w6e(n){if(n.b<=0)throw M(new Fr);return--n.b,n.a-=n.c.c,W(n.a)}function DV(n,e){if(n.g==null||e>=n.i)throw M(new OD(e,n.i));return n.g[e]}function z$n(n,e,t){if(Q4(n,t),t!=null&&!n.dk(t))throw M(new EL);return t}function g6e(n,e,t){var i;return i=Wxn(n,e,t),n.b=new XT(i.c.length),Xen(n,i)}function X$n(n){var e;if(n.ll())for(e=n.i-1;e>=0;--e)O(n,e);return ZQ(n)}function p6e(n){jT(),u(n.mf((Me(),Xw)),185).Ec(($u(),hE)),n.of(KH,null)}function jT(){jT=x,ise=new Uvn,cse=new Kvn,rse=O5e((Me(),KH),ise,Ta,cse)}function W$n(){W$n=x,lI(),H0n=$t,whe=di,U0n=new w7($t),ghe=new w7(di)}function ET(){ET=x,s1n=new _z("LEAF_NUMBER",0),qq=new _z("NODE_SIZE",1)}function IN(n){n.a=J(Oe,ze,30,n.b+1,15,1),n.c=J(Oe,ze,30,n.b,15,1),n.d=0}function v6e(n,e){n.a.Le(e.d,n.b)>0&&(nn(n.c,new SW(e.c,e.d,n.d)),n.b=e.d)}function F4(n,e,t,i){var r;i=(b0(),i||hfn),r=n.slice(e,t),ren(r,n,e,t,-e,i)}function Bf(n,e,t,i,r){return e<0?D0(n,t,i):u(t,69).uk().wk(n,n.ei(),e,i,r)}function Q$n(n,e){var t,i;return i=e/n.c.Pd().gc()|0,t=e%n.c.Pd().gc(),Op(n,i,t)}function $V(n){var e,t;if(!n.b)return null;for(t=n.b;e=t.a[0];)t=e;return t}function V$n(n){var e,t;if(!n.b)return null;for(t=n.b;e=t.a[1];)t=e;return t}function m6e(n){return D(n,183)?""+u(n,183).a:n==null?null:$r(n)}function k6e(n){return D(n,183)?""+u(n,183).a:n==null?null:$r(n)}function Y$n(n,e){if(e.a)throw M(new xr(fXn));Yt(n.a,e),e.a=n,!n.j&&(n.j=e)}function Du(){Du=x,Eh=new eD(c3,0),ga=new eD(Nv,1),qs=new eD(u3,2)}function x4(){x4=x,y_=new AA("All",0),j_=new CTn,E_=new RTn,A_=new ITn}function Z$n(){Z$n=x,zYn=me((x4(),I(C($S,1),z,310,0,[y_,j_,E_,A_])))}function nNn(){nNn=x,FZn=me((M0(),I(C(NZn,1),z,414,0,[gj,wj,S_,P_])))}function eNn(){eNn=x,Tne=me((z4(),I(C(Mne,1),z,413,0,[Y0,Aw,Ew,a2])))}function tNn(){tNn=x,Lne=me((_p(),I(C(qfn,1),z,384,0,[_9,Gfn,__,G_])))}function iNn(){iNn=x,Une=me((eC(),I(C(Hne,1),z,368,0,[X_,fP,sP,yj])))}function rNn(){rNn=x,tee=me((Bs(),I(C(eee,1),z,418,0,[Cw,a6,d6,W_])))}function cNn(){cNn=x,Qre=me((ld(),I(C(Wre,1),z,409,0,[_j,w8,QP,WP])))}function uNn(){uNn=x,kre=me((iw(),I(C(oq,1),z,205,0,[KP,sq,I2,C2])))}function fNn(){fNn=x,Ere=me((Al(),I(C(hln,1),z,270,0,[ja,oln,aq,dq])))}function sNn(){sNn=x,dee=me((I5(),I(C(_sn,1),z,302,0,[U9,Rsn,Ej,Jsn])))}function oNn(){oNn=x,rue=me((m5(),I(C(r1n,1),z,354,0,[Fq,cO,Nq,$q])))}function hNn(){hNn=x,$ue=me((OC(),I(C(C1n,1),z,355,0,[zq,M1n,T1n,A1n])))}function lNn(){lNn=x,Bue=me((GC(),I(C(xue,1),z,406,0,[Zq,Qq,Yq,Vq])))}function aNn(){aNn=x,Dce=me((Gp(),I(C(Tln,1),z,402,0,[nO,v8,m8,k8])))}function dNn(){dNn=x,Rfe=me((NC(),I(C(Oan,1),z,396,0,[kH,yH,jH,EH])))}function bNn(){bNn=x,Gse=me((Z4(),I(C(Odn,1),z,280,0,[cE,IO,Sdn,Pdn])))}function wNn(){wNn=x,Hse=me((El(),I(C(QH,1),z,225,0,[WH,uE,G6,R3])))}function gNn(){gNn=x,Wse=me((kf(),I(C(Xse,1),z,293,0,[sE,Qh,Ca,fE])))}function pNn(){pNn=x,ooe=me((lT(),I(C(gE,1),z,290,0,[n0n,t0n,nU,e0n])))}function vNn(){vNn=x,uoe=me((of(),I(C(K8,1),z,381,0,[dE,qd,aE,Yw])))}function mNn(){mNn=x,hoe=me((bC(),I(C(u0n,1),z,327,0,[eU,i0n,c0n,r0n])))}function kNn(){kNn=x,doe=me((tC(),I(C(aoe,1),z,412,0,[tU,s0n,f0n,o0n])))}function Tk(){Tk=x,Wsn=new Pz(lo,0),gP=new Pz("IMPROVE_STRAIGHTNESS",1)}function AT(){AT=x,fH=new ED(TWn,0),nan=new ED(Zrn,1),Z1n=new ED(lo,2)}function NV(n){var e;if(!UN(n))throw M(new Fr);return n.e=1,e=n.d,n.d=null,e}function i1(n){var e;return Lr(n)&&(e=0-n,!isNaN(e))?e:Q1(X4(n))}function _r(n,e,t){for(;teo[Zo]})}}}return Object.freeze(Object.defineProperty(W6,Symbol.toStringTag,{value:"Module"}))}function kU(W6){throw new Error('Could not dynamically require "'+W6+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var rbn={exports:{}},Ohe;function qNe(){return Ohe||(Ohe=1,(function(W6,yU){(function(el){W6.exports=el()})(function(){return(function(){function el(eo,Zo,ts){function j(il,X3){if(!Zo[il]){if(!eo[il]){var og=typeof kU=="function"&&kU;if(!X3&&og)return og(il,!0);if(tl)return tl(il,!0);var rc=new Error("Cannot find module '"+il+"'");throw rc.code="MODULE_NOT_FOUND",rc}var ir=Zo[il]={exports:{}};eo[il][0].call(ir.exports,function(kr){var In=eo[il][1][kr];return j(In||kr)},ir,ir.exports,el,eo,Zo,ts)}return Zo[il].exports}for(var tl=typeof kU=="function"&&kU,pb=0;pb0&&arguments[0]!==void 0?arguments[0]:{},In=kr.defaultLayoutOptions,Ms=In===void 0?{}:In,ur=kr.algorithms,Oi=ur===void 0?["layered","stress","mrtree","radial","force","disco","sporeOverlap","sporeCompaction","rectpacking","vertiflex"]:ur,is=kr.workerFactory,nh=kr.workerUrl;if(j(this,rc),this.defaultLayoutOptions=Ms,this.initialized=!1,typeof nh>"u"&&typeof is>"u")throw new Error("Cannot construct an ELK without both 'workerUrl' and 'workerFactory'.");var hg=is;typeof nh<"u"&&typeof is>"u"&&(hg=function(h7){return new Worker(h7)});var Q6=hg(nh);if(typeof Q6.postMessage!="function")throw new TypeError("Created worker does not provide the required 'postMessage' function.");this.worker=new og(Q6),this.worker.postMessage({cmd:"register",algorithms:Oi}).then(function(o7){return ir.initialized=!0}).catch(console.err)}return pb(rc,[{key:"layout",value:function(kr){var In=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ms=In.layoutOptions,ur=Ms===void 0?this.defaultLayoutOptions:Ms,Oi=In.logging,is=Oi===void 0?!1:Oi,nh=In.measureExecutionTime,hg=nh===void 0?!1:nh;return kr?this.worker.postMessage({cmd:"layout",graph:kr,layoutOptions:ur,options:{logging:is,measureExecutionTime:hg}}):Promise.reject(new Error("Missing mandatory parameter 'graph'."))}},{key:"knownLayoutAlgorithms",value:function(){return this.worker.postMessage({cmd:"algorithms"})}},{key:"knownLayoutOptions",value:function(){return this.worker.postMessage({cmd:"options"})}},{key:"knownLayoutCategories",value:function(){return this.worker.postMessage({cmd:"categories"})}},{key:"terminateWorker",value:function(){this.worker&&this.worker.terminate()}}])})();var og=(function(){function rc(ir){var kr=this;if(j(this,rc),ir===void 0)throw new Error("Missing mandatory parameter 'worker'.");this.resolvers={},this.worker=ir,this.worker.onmessage=function(In){setTimeout(function(){kr.receive(kr,In)},0)}}return pb(rc,[{key:"postMessage",value:function(kr){var In=this.id||0;this.id=In+1,kr.id=In;var Ms=this;return new Promise(function(ur,Oi){Ms.resolvers[In]=function(is,nh){is?(Ms.convertGwtStyleError(is),Oi(is)):ur(nh)},Ms.worker.postMessage(kr)})}},{key:"receive",value:function(kr,In){var Ms=In.data,ur=kr.resolvers[Ms.id];ur&&(delete kr.resolvers[Ms.id],Ms.error?ur(Ms.error):ur(null,Ms.data))}},{key:"terminate",value:function(){this.worker&&this.worker.terminate()}},{key:"convertGwtStyleError",value:function(kr){if(kr){var In=kr.__java$exception;In&&(In.cause&&In.cause.backingJsObject&&(kr.cause=In.cause.backingJsObject,this.convertGwtStyleError(kr.cause)),delete kr.__java$exception)}}}])})()},{}],2:[function(el,eo,Zo){(function(ts){(function(){var j;typeof window<"u"?j=window:typeof ts<"u"?j=ts:typeof self<"u"&&(j=self);var tl;function pb(){}function il(){}function X3(){}function og(){}function rc(){}function ir(){}function kr(){}function In(){}function Ms(){}function ur(){}function Oi(){}function is(){}function nh(){}function hg(){}function Q6(){}function o7(){}function h7(){}function V6(){}function cbn(){}function ubn(){}function U2(){}function x(){}function fbn(){}function OE(){}function sbn(){}function obn(){}function hbn(){}function lbn(){}function abn(){}function jU(){}function dbn(){}function bbn(){}function wbn(){}function WO(){}function gbn(){}function pbn(){}function vbn(){}function QO(){}function mbn(){}function kbn(){}function ybn(){}function EU(){}function jbn(){}function Ebn(){}function VO(){}function Abn(){}function Mbn(){}function Tbn(){}function Iu(){}function Su(){}function Cbn(){}function Pu(){}function Ibn(){}function Sbn(){}function Pbn(){}function Obn(){}function Lbn(){}function Dbn(){}function $bn(){}function Nbn(){}function Fbn(){}function xbn(){}function Bbn(){}function Rbn(){}function Jbn(){}function _bn(){}function Gbn(){}function qbn(){}function Hbn(){}function Ubn(){}function Kbn(){}function zbn(){}function Xbn(){}function Wbn(){}function Qbn(){}function Vbn(){}function Ybn(){}function Zbn(){}function nwn(){}function LE(){}function AU(){}function ewn(){}function YO(){}function twn(){}function iwn(){}function MU(){}function rwn(){}function cwn(){}function uwn(){}function fwn(){}function swn(){}function own(){}function hwn(){}function lwn(){}function awn(){}function dwn(){}function ZO(){}function bwn(){}function wwn(){}function gwn(){}function pwn(){}function vwn(){}function mwn(){}function kwn(){}function ywn(){}function jwn(){}function Ewn(){}function Awn(){}function TU(){}function CU(){}function Mwn(){}function Twn(){}function Cwn(){}function Iwn(){}function Swn(){}function Pwn(){}function Own(){}function Lwn(){}function Dwn(){}function $wn(){}function Nwn(){}function Fwn(){}function xwn(){}function Bwn(){}function Rwn(){}function Jwn(){}function _wn(){}function Gwn(){}function qwn(){}function Hwn(){}function Uwn(){}function Kwn(){}function zwn(){}function Xwn(){}function Wwn(){}function Qwn(){}function Vwn(){}function Ywn(){}function Zwn(){}function ngn(){}function egn(){}function tgn(){}function ign(){}function rgn(){}function cgn(){}function ugn(){}function fgn(){}function sgn(){}function ogn(){}function hgn(){}function lgn(){}function agn(){}function dgn(){}function bgn(){}function wgn(){}function ggn(){}function pgn(){}function vgn(){}function mgn(){}function kgn(){}function ygn(){}function jgn(){}function Egn(){}function Agn(){}function Mgn(){}function Tgn(){}function Cgn(){}function Ign(){}function Sgn(){}function Pgn(){}function Ogn(){}function Lgn(){}function Dgn(){}function $gn(){}function Ngn(){}function Fgn(){}function xgn(){}function Bgn(){}function Rgn(){}function Jgn(){}function _gn(){}function Ggn(){}function qgn(){}function Hgn(){}function Ugn(){}function Kgn(){}function zgn(){}function Xgn(){}function Wgn(){}function Qgn(){}function Vgn(){}function Ygn(){}function Zgn(){}function n2n(){}function e2n(){}function t2n(){}function i2n(){}function r2n(){}function c2n(){}function u2n(){}function f2n(){}function s2n(){}function o2n(){}function h2n(){}function l2n(){}function a2n(){}function d2n(){}function b2n(){}function w2n(){}function g2n(){}function IU(){}function p2n(){}function v2n(){}function m2n(){}function k2n(){}function y2n(){}function j2n(){}function E2n(){}function A2n(){}function M2n(){}function T2n(){}function C2n(){}function I2n(){}function S2n(){}function P2n(){}function O2n(){}function L2n(){}function D2n(){}function $2n(){}function N2n(){}function F2n(){}function x2n(){}function B2n(){}function R2n(){}function J2n(){}function _2n(){}function G2n(){}function q2n(){}function H2n(){}function U2n(){}function K2n(){}function z2n(){}function X2n(){}function W2n(){}function Q2n(){}function V2n(){}function Y2n(){}function Z2n(){}function npn(){}function epn(){}function tpn(){}function ipn(){}function rpn(){}function cpn(){}function upn(){}function fpn(){}function spn(){}function opn(){}function hpn(){}function lpn(){}function apn(){}function dpn(){}function bpn(){}function wpn(){}function gpn(){}function ppn(){}function vpn(){}function mpn(){}function kpn(){}function ypn(){}function jpn(){}function Epn(){}function Apn(){}function Mpn(){}function Tpn(){}function Cpn(){}function Ipn(){}function Spn(){}function Ppn(){}function Opn(){}function Lpn(){}function Dpn(){}function $pn(){}function Npn(){}function Fpn(){}function xpn(){}function SU(){}function Bpn(){}function Rpn(){}function Jpn(){}function _pn(){}function Gpn(){}function qpn(){}function Hpn(){}function Upn(){}function Kpn(){}function zpn(){}function DE(){}function $E(){}function Xpn(){}function Wpn(){}function PU(){}function Qpn(){}function Vpn(){}function Ypn(){}function Zpn(){}function n3n(){}function OU(){}function LU(){}function e3n(){}function DU(){}function $U(){}function t3n(){}function i3n(){}function l7(){}function r3n(){}function c3n(){}function u3n(){}function f3n(){}function s3n(){}function o3n(){}function h3n(){}function l3n(){}function a3n(){}function d3n(){}function b3n(){}function w3n(){}function g3n(){}function p3n(){}function v3n(){}function m3n(){}function k3n(){}function y3n(){}function j3n(){}function NU(){}function E3n(){}function A3n(){}function M3n(){}function T3n(){}function C3n(){}function I3n(){}function S3n(){}function P3n(){}function O3n(){}function L3n(){}function D3n(){}function $3n(){}function N3n(){}function F3n(){}function x3n(){}function B3n(){}function R3n(){}function J3n(){}function _3n(){}function G3n(){}function q3n(){}function H3n(){}function U3n(){}function K3n(){}function z3n(){}function X3n(){}function W3n(){}function Q3n(){}function V3n(){}function Y3n(){}function Z3n(){}function n4n(){}function e4n(){}function t4n(){}function i4n(){}function r4n(){}function c4n(){}function u4n(){}function f4n(){}function s4n(){}function o4n(){}function h4n(){}function l4n(){}function a4n(){}function d4n(){}function b4n(){}function w4n(){}function g4n(){}function p4n(){}function v4n(){}function m4n(){}function k4n(){}function y4n(){}function j4n(){}function E4n(){}function A4n(){}function M4n(){}function T4n(){}function C4n(){}function I4n(){}function S4n(){}function P4n(){}function O4n(){}function L4n(){}function D4n(){}function $4n(){}function N4n(){}function F4n(){}function Dhe(){}function x4n(){}function B4n(){}function R4n(){}function J4n(){}function _4n(){}function G4n(){}function q4n(){}function H4n(){}function U4n(){}function K4n(){}function z4n(){}function X4n(){}function W4n(){}function Q4n(){}function V4n(){}function Y4n(){}function Z4n(){}function nvn(){}function evn(){}function tvn(){}function ivn(){}function rvn(){}function cvn(){}function uvn(){}function fvn(){}function svn(){}function ovn(){}function hvn(){}function lvn(){}function avn(){}function dvn(){}function bvn(){}function wvn(){}function gvn(){}function pvn(){}function vvn(){}function mvn(){}function kvn(){}function nL(){}function eL(){}function yvn(){}function tL(){}function jvn(){}function Evn(){}function Avn(){}function Mvn(){}function Tvn(){}function Cvn(){}function Ivn(){}function Svn(){}function Pvn(){}function Ovn(){}function Lvn(){}function Dvn(){}function $vn(){}function Nvn(){}function $he(){}function Fvn(){}function FU(){}function xvn(){}function Bvn(){}function Rvn(){}function Jvn(){}function _vn(){}function Gvn(){}function qvn(){}function Hvn(){}function Uvn(){}function Kvn(){}function xa(){}function zvn(){}function K2(){}function xU(){}function Xvn(){}function Wvn(){}function Qvn(){}function Vvn(){}function Yvn(){}function Zvn(){}function n6n(){}function e6n(){}function t6n(){}function i6n(){}function r6n(){}function c6n(){}function u6n(){}function f6n(){}function s6n(){}function o6n(){}function h6n(){}function l6n(){}function a6n(){}function d6n(){}function hn(){}function b6n(){}function w6n(){}function g6n(){}function p6n(){}function v6n(){}function m6n(){}function k6n(){}function y6n(){}function j6n(){}function E6n(){}function A6n(){}function iL(){}function M6n(){}function T6n(){}function rL(){}function C6n(){}function I6n(){}function S6n(){}function P6n(){}function cL(){}function NE(){}function FE(){}function O6n(){}function BU(){}function L6n(){}function D6n(){}function xE(){}function $6n(){}function N6n(){}function F6n(){}function BE(){}function x6n(){}function B6n(){}function R6n(){}function J6n(){}function RE(){}function _6n(){}function RU(){}function G6n(){}function uL(){}function JU(){}function q6n(){}function H6n(){}function U6n(){}function K6n(){}function Nhe(){}function z6n(){}function X6n(){}function W6n(){}function Q6n(){}function V6n(){}function Y6n(){}function Z6n(){}function nmn(){}function emn(){}function tmn(){}function W3(){}function fL(){}function imn(){}function rmn(){}function cmn(){}function umn(){}function fmn(){}function smn(){}function omn(){}function hmn(){}function lmn(){}function amn(){}function dmn(){}function bmn(){}function wmn(){}function gmn(){}function pmn(){}function vmn(){}function mmn(){}function kmn(){}function ymn(){}function jmn(){}function Emn(){}function Amn(){}function Mmn(){}function Tmn(){}function Cmn(){}function Imn(){}function Smn(){}function Pmn(){}function Omn(){}function Lmn(){}function Dmn(){}function $mn(){}function Nmn(){}function Fmn(){}function xmn(){}function Bmn(){}function Rmn(){}function Jmn(){}function _mn(){}function Gmn(){}function qmn(){}function Hmn(){}function Umn(){}function Kmn(){}function zmn(){}function Xmn(){}function Wmn(){}function Qmn(){}function Vmn(){}function Ymn(){}function Zmn(){}function n5n(){}function e5n(){}function t5n(){}function i5n(){}function r5n(){}function c5n(){}function u5n(){}function f5n(){}function s5n(){}function o5n(){}function h5n(){}function l5n(){}function a5n(){}function d5n(){}function b5n(){}function w5n(){}function g5n(){}function p5n(){}function v5n(){}function m5n(){}function k5n(){}function y5n(){}function j5n(){}function E5n(){}function A5n(){}function M5n(){}function T5n(){}function C5n(){}function I5n(){}function S5n(){}function P5n(){}function O5n(){}function L5n(){}function D5n(){}function $5n(){}function N5n(){}function F5n(){}function x5n(){}function B5n(){}function R5n(){}function J5n(){}function _5n(){}function G5n(){}function q5n(){}function H5n(){}function U5n(){}function K5n(){}function z5n(){}function X5n(){}function W5n(){}function _U(){}function Q5n(){}function V5n(){}function sL(){rm()}function Y5n(){Hnn()}function Z5n(){I7()}function n9n(){_s()}function e9n(){nnn()}function t9n(){uy()}function i9n(){ek()}function r9n(){C7()}function c9n(){SAn()}function u9n(){Np()}function f9n(){o$n()}function s9n(){W4()}function o9n(){ra()}function h9n(){eY()}function l9n(){$Fn()}function a9n(){NFn()}function d9n(){bA()}function b9n(){Wtn()}function w9n(){YOn()}function g9n(){H$n()}function p9n(){nY()}function v9n(){QOn()}function m9n(){WOn()}function k9n(){VOn()}function y9n(){nLn()}function j9n(){en()}function E9n(){FFn()}function A9n(){JLn()}function M9n(){xFn()}function T9n(){eLn()}function C9n(){Dp()}function I9n(){sxn()}function S9n(){utn()}function P9n(){ca()}function O9n(){ZOn()}function L9n(){_Jn()}function D9n(){gUn()}function $9n(){yen()}function N9n(){Vr()}function F9n(){Fo()}function x9n(){ptn()}function B9n(){XBn()}function R9n(){ml()}function J9n(){ly()}function _9n(){qx()}function G9n(){ZF()}function q9n(){mZ()}function H9n(){Up()}function U9n(){jT()}function K9n(){HC()}function GU(){Me()}function z9n(){iC()}function X9n(){PZ()}function qU(){lI()}function HU(){VN()}function to(){OIn()}function W9n(){ktn()}function UU(n){Gn(n)}function Q9n(n){this.a=n}function JE(n){this.a=n}function V9n(n){this.a=n}function Y9n(n){this.a=n}function Z9n(n){this.a=n}function KU(n){this.a=n}function zU(n){this.a=n}function n8n(n){this.a=n}function oL(n){this.a=n}function e8n(n){this.a=n}function t8n(n){this.a=n}function i8n(n){this.a=n}function r8n(n){this.a=n}function c8n(n){this.c=n}function u8n(n){this.a=n}function hL(n){this.a=n}function f8n(n){this.a=n}function s8n(n){this.a=n}function o8n(n){this.a=n}function lL(n){this.a=n}function h8n(n){this.a=n}function l8n(n){this.a=n}function aL(n){this.a=n}function a8n(n){this.a=n}function dL(n){this.a=n}function d8n(n){this.a=n}function b8n(n){this.a=n}function w8n(n){this.a=n}function g8n(n){this.a=n}function p8n(n){this.a=n}function v8n(n){this.a=n}function m8n(n){this.a=n}function k8n(n){this.a=n}function y8n(n){this.a=n}function j8n(n){this.a=n}function E8n(n){this.a=n}function A8n(n){this.a=n}function M8n(n){this.a=n}function T8n(n){this.a=n}function XU(n){this.a=n}function WU(n){this.a=n}function _E(n){this.a=n}function a7(n){this.a=n}function QU(n){this.b=n}function Ba(){this.a=[]}function C8n(n,e){n.a=e}function Fhe(n,e){n.a=e}function xhe(n,e){n.b=e}function Bhe(n,e){n.c=e}function Rhe(n,e){n.c=e}function Jhe(n,e){n.d=e}function _he(n,e){n.d=e}function rl(n,e){n.k=e}function VU(n,e){n.j=e}function Ghe(n,e){n.c=e}function YU(n,e){n.c=e}function ZU(n,e){n.a=e}function qhe(n,e){n.a=e}function Hhe(n,e){n.f=e}function Uhe(n,e){n.a=e}function Khe(n,e){n.b=e}function bL(n,e){n.d=e}function GE(n,e){n.i=e}function nK(n,e){n.o=e}function zhe(n,e){n.r=e}function Xhe(n,e){n.a=e}function Whe(n,e){n.b=e}function I8n(n,e){n.e=e}function Qhe(n,e){n.f=e}function eK(n,e){n.g=e}function Vhe(n,e){n.e=e}function Yhe(n,e){n.f=e}function Zhe(n,e){n.f=e}function d7(n,e){n.b=e}function wL(n,e){n.b=e}function gL(n,e){n.a=e}function nle(n,e){n.n=e}function ele(n,e){n.a=e}function tle(n,e){n.c=e}function ile(n,e){n.c=e}function rle(n,e){n.c=e}function cle(n,e){n.a=e}function ule(n,e){n.a=e}function fle(n,e){n.d=e}function sle(n,e){n.d=e}function ole(n,e){n.e=e}function hle(n,e){n.e=e}function lle(n,e){n.g=e}function ale(n,e){n.f=e}function dle(n,e){n.j=e}function ble(n,e){n.a=e}function wle(n,e){n.a=e}function gle(n,e){n.b=e}function S8n(n){n.b=n.a}function P8n(n){n.c=n.d.d}function tK(n){this.a=n}function cl(n){this.a=n}function qE(n){this.a=n}function iK(n){this.a=n}function O8n(n){this.a=n}function b7(n){this.a=n}function w7(n){this.a=n}function rK(n){this.a=n}function cK(n){this.a=n}function vb(n){this.a=n}function pL(n){this.a=n}function ul(n){this.a=n}function mb(n){this.a=n}function L8n(n){this.a=n}function D8n(n){this.a=n}function uK(n){this.a=n}function $8n(n){this.a=n}function Ne(n){this.a=n}function Y6(n){this.d=n}function vL(n){this.b=n}function Q3(n){this.b=n}function lg(n){this.b=n}function mL(n){this.c=n}function A(n){this.c=n}function N8n(n){this.c=n}function F8n(n){this.a=n}function fK(n){this.a=n}function sK(n){this.a=n}function oK(n){this.a=n}function hK(n){this.a=n}function lK(n){this.a=n}function aK(n){this.a=n}function V3(n){this.a=n}function x8n(n){this.a=n}function B8n(n){this.a=n}function Y3(n){this.a=n}function R8n(n){this.a=n}function J8n(n){this.a=n}function _8n(n){this.a=n}function G8n(n){this.a=n}function q8n(n){this.a=n}function H8n(n){this.a=n}function U8n(n){this.a=n}function K8n(n){this.a=n}function z8n(n){this.a=n}function Z3(n){this.a=n}function X8n(n){this.a=n}function W8n(n){this.a=n}function Q8n(n){this.a=n}function V8n(n){this.a=n}function HE(n){this.a=n}function Y8n(n){this.a=n}function Z8n(n){this.a=n}function dK(n){this.a=n}function n7n(n){this.a=n}function e7n(n){this.a=n}function t7n(n){this.a=n}function bK(n){this.a=n}function wK(n){this.a=n}function gK(n){this.a=n}function Z6(n){this.a=n}function UE(n){this.e=n}function n4(n){this.a=n}function i7n(n){this.a=n}function z2(n){this.a=n}function pK(n){this.a=n}function r7n(n){this.a=n}function c7n(n){this.a=n}function u7n(n){this.a=n}function f7n(n){this.a=n}function s7n(n){this.a=n}function o7n(n){this.a=n}function h7n(n){this.a=n}function l7n(n){this.a=n}function a7n(n){this.a=n}function d7n(n){this.a=n}function b7n(n){this.a=n}function vK(n){this.a=n}function w7n(n){this.a=n}function g7n(n){this.a=n}function p7n(n){this.a=n}function v7n(n){this.a=n}function m7n(n){this.a=n}function k7n(n){this.a=n}function y7n(n){this.a=n}function j7n(n){this.a=n}function E7n(n){this.a=n}function A7n(n){this.a=n}function M7n(n){this.a=n}function T7n(n){this.a=n}function C7n(n){this.a=n}function I7n(n){this.a=n}function S7n(n){this.a=n}function P7n(n){this.a=n}function O7n(n){this.a=n}function L7n(n){this.a=n}function D7n(n){this.a=n}function $7n(n){this.a=n}function N7n(n){this.a=n}function F7n(n){this.a=n}function x7n(n){this.a=n}function B7n(n){this.a=n}function R7n(n){this.a=n}function J7n(n){this.a=n}function _7n(n){this.a=n}function G7n(n){this.a=n}function q7n(n){this.a=n}function H7n(n){this.a=n}function U7n(n){this.a=n}function K7n(n){this.a=n}function z7n(n){this.a=n}function X7n(n){this.a=n}function W7n(n){this.a=n}function Q7n(n){this.a=n}function V7n(n){this.a=n}function Y7n(n){this.a=n}function Z7n(n){this.a=n}function nkn(n){this.a=n}function ekn(n){this.a=n}function tkn(n){this.a=n}function ikn(n){this.c=n}function rkn(n){this.b=n}function ckn(n){this.a=n}function ukn(n){this.a=n}function fkn(n){this.a=n}function skn(n){this.a=n}function okn(n){this.a=n}function hkn(n){this.a=n}function lkn(n){this.a=n}function akn(n){this.a=n}function dkn(n){this.a=n}function bkn(n){this.a=n}function wkn(n){this.a=n}function gkn(n){this.a=n}function pkn(n){this.a=n}function vkn(n){this.a=n}function mkn(n){this.a=n}function kkn(n){this.a=n}function ykn(n){this.a=n}function jkn(n){this.a=n}function Ekn(n){this.a=n}function Akn(n){this.a=n}function Mkn(n){this.a=n}function Tkn(n){this.a=n}function Ckn(n){this.a=n}function Ikn(n){this.a=n}function Skn(n){this.a=n}function Pkn(n){this.a=n}function Okn(n){this.a=n}function fl(n){this.a=n}function ag(n){this.a=n}function Lkn(n){this.a=n}function Dkn(n){this.a=n}function $kn(n){this.a=n}function Nkn(n){this.a=n}function Fkn(n){this.a=n}function xkn(n){this.a=n}function Bkn(n){this.a=n}function Rkn(n){this.a=n}function Jkn(n){this.a=n}function _kn(n){this.a=n}function Gkn(n){this.a=n}function qkn(n){this.a=n}function Hkn(n){this.a=n}function Ukn(n){this.a=n}function Kkn(n){this.a=n}function zkn(n){this.a=n}function Xkn(n){this.a=n}function Wkn(n){this.a=n}function mK(n){this.a=n}function Qkn(n){this.a=n}function Vkn(n){this.a=n}function Ykn(n){this.a=n}function Zkn(n){this.a=n}function nyn(n){this.a=n}function eyn(n){this.a=n}function tyn(n){this.a=n}function iyn(n){this.a=n}function KE(n){this.a=n}function ryn(n){this.f=n}function cyn(n){this.a=n}function uyn(n){this.a=n}function fyn(n){this.a=n}function syn(n){this.a=n}function oyn(n){this.a=n}function hyn(n){this.a=n}function lyn(n){this.a=n}function ayn(n){this.a=n}function dyn(n){this.a=n}function byn(n){this.a=n}function wyn(n){this.a=n}function gyn(n){this.a=n}function pyn(n){this.a=n}function vyn(n){this.a=n}function myn(n){this.a=n}function kyn(n){this.a=n}function yyn(n){this.a=n}function jyn(n){this.a=n}function Eyn(n){this.a=n}function Ayn(n){this.a=n}function Myn(n){this.a=n}function Tyn(n){this.a=n}function Cyn(n){this.a=n}function Iyn(n){this.a=n}function Syn(n){this.a=n}function Pyn(n){this.a=n}function Oyn(n){this.a=n}function kL(n){this.a=n}function kK(n){this.a=n}function nt(n){this.b=n}function Lyn(n){this.a=n}function Dyn(n){this.a=n}function $yn(n){this.a=n}function Nyn(n){this.a=n}function Fyn(n){this.a=n}function xyn(n){this.a=n}function Byn(n){this.a=n}function Ryn(n){this.a=n}function g7(n){this.a=n}function Jyn(n){this.a=n}function _yn(n){this.b=n}function yK(n){this.c=n}function zE(n){this.e=n}function Gyn(n){this.a=n}function XE(n){this.a=n}function WE(n){this.a=n}function yL(n){this.a=n}function qyn(n){this.d=n}function Hyn(n){this.a=n}function jK(n){this.a=n}function EK(n){this.a=n}function Wd(n){this.e=n}function ple(){this.a=0}function Z(){xD(this)}function de(){hc(this)}function jL(){PPn(this)}function Uyn(){}function Qd(){this.c=C0n}function Kyn(n,e){n.b+=e}function vle(n,e){e.Wb(n)}function mle(n){return n.a}function kle(n){return n.a}function yle(n){return n.a}function jle(n){return n.a}function Ele(n){return n.a}function M(n){return n.e}function Ale(){return null}function Mle(){return null}function Tle(n){throw M(n)}function X2(n){this.a=Ce(n)}function zyn(){this.a=this}function Ra(){wCn.call(this)}function Cle(n){n.b.Mf(n.e)}function Xyn(n){n.b=new RL}function nm(n,e){n.b=e-n.b}function em(n,e){n.a=e-n.a}function Wyn(n,e){e.gd(n.a)}function Ile(n,e){oi(e,n)}function Rn(n,e){n.push(e)}function Qyn(n,e){n.sort(e)}function Sle(n,e,t){n.Wd(t,e)}function p7(n,e){n.e=e,e.b=n}function Ple(){tz(),j$e()}function Vyn(n){O4(),b_.je(n)}function AK(){wCn.call(this)}function MK(){Ra.call(this)}function EL(){Ra.call(this)}function Yyn(){Ra.call(this)}function v7(){Ra.call(this)}function gu(){Ra.call(this)}function W2(){Ra.call(this)}function Ie(){Ra.call(this)}function Lf(){Ra.call(this)}function Zyn(){Ra.call(this)}function Fr(){Ra.call(this)}function njn(){Ra.call(this)}function QE(){this.Bb|=256}function ejn(){this.b=new lTn}function TK(){TK=x,new de}function tjn(){MK.call(this)}function kb(n,e){n.length=e}function VE(n,e){nn(n.a,e)}function Ole(n,e){Knn(n.c,e)}function Lle(n,e){Yt(n.b,e)}function Dle(n,e){SC(n.a,e)}function $le(n,e){MF(n.a,e)}function e4(n,e){rt(n.e,e)}function Q2(n){XC(n.c,n.b)}function Nle(n,e){n.kc().Nb(e)}function CK(n){this.a=r8e(n)}function Vt(){this.a=new de}function ijn(){this.a=new de}function YE(){this.a=new Z}function AL(){this.a=new Z}function IK(){this.a=new Z}function rs(){this.a=new Fbn}function Ja(){this.a=new f$n}function ML(){this.a=new jAn}function SK(){this.a=new GOn}function PK(){this.a=new rIn}function OK(){this.a=new AU}function rjn(){this.a=new vLn}function cjn(){this.a=new Z}function ujn(){this.a=new Z}function fjn(){this.a=new Z}function LK(){this.a=new Z}function sjn(){this.d=new Z}function ojn(){this.a=new Vt}function hjn(){this.a=new de}function ljn(){this.b=new de}function ajn(){this.b=new Z}function DK(){this.e=new Z}function djn(){this.d=new Z}function bjn(){this.a=new o9n}function wjn(){vOn.call(this)}function gjn(){vOn.call(this)}function pjn(){BK.call(this)}function vjn(){BK.call(this)}function mjn(){BK.call(this)}function kjn(){Z.call(this)}function yjn(){LK.call(this)}function ZE(){YE.call(this)}function jjn(){hM.call(this)}function tm(){Uyn.call(this)}function TL(){tm.call(this)}function V2(){Uyn.call(this)}function $K(){V2.call(this)}function _u(){dt.call(this)}function Ejn(){RK.call(this)}function im(){P6n.call(this)}function NK(){P6n.call(this)}function Ajn(){Bjn.call(this)}function Mjn(){Bjn.call(this)}function Tjn(){de.call(this)}function Cjn(){de.call(this)}function Ijn(){de.call(this)}function CL(){PFn.call(this)}function Sjn(){Vt.call(this)}function Pjn(){QE.call(this)}function IL(){jX.call(this)}function FK(){de.call(this)}function SL(){jX.call(this)}function PL(){de.call(this)}function Ojn(){de.call(this)}function xK(){RE.call(this)}function Ljn(){xK.call(this)}function Djn(){RE.call(this)}function $jn(){_U.call(this)}function BK(){this.a=new Vt}function Njn(){this.a=new de}function RK(){this.a=new de}function Y2(){this.a=new dt}function Fjn(){this.a=new Z}function xjn(){this.j=new Z}function Bjn(){this.a=new x6n}function JK(){this.a=new dvn}function Rjn(){this.a=new NEn}function rm(){rm=x,u_=new il}function OL(){OL=x,f_=new _jn}function LL(){LL=x,s_=new Jjn}function Jjn(){aL.call(this,"")}function _jn(){aL.call(this,"")}function Gjn(n){tFn.call(this,n)}function qjn(n){tFn.call(this,n)}function _K(n){KU.call(this,n)}function GK(n){dAn.call(this,n)}function Fle(n){dAn.call(this,n)}function xle(n){GK.call(this,n)}function Ble(n){GK.call(this,n)}function Rle(n){GK.call(this,n)}function Hjn(n){wN.call(this,n)}function Ujn(n){wN.call(this,n)}function Kjn(n){WTn.call(this,n)}function zjn(n){sz.call(this,n)}function cm(n){hA.call(this,n)}function qK(n){hA.call(this,n)}function Xjn(n){hA.call(this,n)}function xr(n){HSn.call(this,n)}function Wjn(n){xr.call(this,n)}function Z2(){a7.call(this,{})}function DL(n){d4(),this.a=n}function Qjn(n){n.b=null,n.c=0}function Jle(n,e){n.e=e,bHn(n,e)}function _le(n,e){n.a=e,pAe(n)}function $L(n,e,t){n.a[e.g]=t}function Gle(n,e,t){xye(t,n,e)}function qle(n,e){O0e(e.i,n.n)}function Vjn(n,e){X5e(n).Ad(e)}function Hle(n,e){return n*n/e}function Yjn(n,e){return n.g-e.g}function Ule(n,e){n.a.ec().Kc(e)}function Kle(n){return new _E(n)}function zle(n){return new Bb(n)}function Zjn(){Zjn=x,Gun=new pb}function HK(){HK=x,qun=new hg}function nA(){nA=x,$9=new h7}function eA(){eA=x,h_=new XTn}function nEn(){nEn=x,PYn=new cbn}function tA(n){mY(),this.a=n}function eEn(n){PIn(),this.a=n}function Hl(n){v$(),this.f=n}function NL(n){v$(),this.f=n}function iA(n){xr.call(this,n)}function xc(n){xr.call(this,n)}function tEn(n){xr.call(this,n)}function FL(n){HSn.call(this,n)}function t4(n){xr.call(this,n)}function qn(n){xr.call(this,n)}function yr(n){xr.call(this,n)}function iEn(n){xr.call(this,n)}function np(n){xr.call(this,n)}function Ul(n){xr.call(this,n)}function Xr(n){Gn(n),this.a=n}function um(n){nQ(n,n.length)}function UK(n){return hd(n),n}function yb(n){return!!n&&n.b}function Xle(n){return!!n&&n.k}function Wle(n){return!!n&&n.j}function fm(n){return n.b==n.c}function sn(n){return Gn(n),n}function $(n){return Gn(n),n}function m7(n){return Gn(n),n}function KK(n){return Gn(n),n}function Qle(n){return Gn(n),n}function eh(n){xr.call(this,n)}function ep(n){xr.call(this,n)}function th(n){xr.call(this,n)}function De(n){xr.call(this,n)}function xL(n){xr.call(this,n)}function BL(n){PX.call(this,n,0)}function RL(){JQ.call(this,12,3)}function JL(){this.a=Pe(Ce(Hc))}function rEn(){throw M(new Ie)}function zK(){throw M(new Ie)}function cEn(){throw M(new Ie)}function Vle(){throw M(new Ie)}function Yle(){throw M(new Ie)}function Zle(){throw M(new Ie)}function rA(){rA=x,O4()}function Kl(){b7.call(this,"")}function sm(){b7.call(this,"")}function $1(){b7.call(this,"")}function tp(){b7.call(this,"")}function XK(n){xc.call(this,n)}function WK(n){xc.call(this,n)}function ih(n){qn.call(this,n)}function i4(n){Q3.call(this,n)}function uEn(n){i4.call(this,n)}function _L(n){cM.call(this,n)}function n1e(n,e,t){n.c.Cf(e,t)}function e1e(n,e,t){e.Ad(n.a[t])}function t1e(n,e,t){e.Ne(n.a[t])}function i1e(n,e){return n.a-e.a}function r1e(n,e){return n.a-e.a}function c1e(n,e){return n.a-e.a}function cA(n,e){return PN(n,e)}function C(n,e){return zOn(n,e)}function u1e(n,e){return e in n.a}function fEn(n){return n.a?n.b:0}function f1e(n){return n.a?n.b:0}function sEn(n,e){return n.f=e,n}function s1e(n,e){return n.b=e,n}function oEn(n,e){return n.c=e,n}function o1e(n,e){return n.g=e,n}function QK(n,e){return n.a=e,n}function VK(n,e){return n.f=e,n}function h1e(n,e){return n.k=e,n}function YK(n,e){return n.e=e,n}function l1e(n,e){return n.e=e,n}function ZK(n,e){return n.a=e,n}function a1e(n,e){return n.f=e,n}function d1e(n,e){n.b=new zi(e)}function hEn(n,e){n._d(e),e.$d(n)}function b1e(n,e){df(),e.n.a+=n}function w1e(n,e){ra(),Jr(e,n)}function nz(n){QPn.call(this,n)}function lEn(n){QPn.call(this,n)}function aEn(){sX.call(this,"")}function dEn(){this.b=0,this.a=0}function bEn(){bEn=x,qYn=hje()}function Vd(n,e){return n.b=e,n}function k7(n,e){return n.a=e,n}function Yd(n,e){return n.c=e,n}function Zd(n,e){return n.d=e,n}function n0(n,e){return n.e=e,n}function GL(n,e){return n.f=e,n}function om(n,e){return n.a=e,n}function r4(n,e){return n.b=e,n}function c4(n,e){return n.c=e,n}function an(n,e){return n.c=e,n}function Mn(n,e){return n.b=e,n}function dn(n,e){return n.d=e,n}function bn(n,e){return n.e=e,n}function g1e(n,e){return n.f=e,n}function wn(n,e){return n.g=e,n}function gn(n,e){return n.a=e,n}function pn(n,e){return n.i=e,n}function vn(n,e){return n.j=e,n}function p1e(n,e){return n.g-e.g}function v1e(n,e){return n.b-e.b}function m1e(n,e){return n.s-e.s}function k1e(n,e){return n?0:e-1}function wEn(n,e){return n?0:e-1}function y1e(n,e){return n?e-1:0}function j1e(n,e){return e.pg(n)}function gEn(n,e){return n.k=e,n}function E1e(n,e){return n.j=e,n}function Li(){this.a=0,this.b=0}function uA(n){t$.call(this,n)}function N1(n){m0.call(this,n)}function pEn(n){K$.call(this,n)}function vEn(n){K$.call(this,n)}function mEn(n,e){n.b=0,Xb(n,e)}function A1e(n,e){n.c=e,n.b=!0}function M1e(n,e,t){Dge(n.a,e,t)}function kEn(n,e){return n.c._b(e)}function io(n){return n.e&&n.e()}function qL(n){return n?n.d:null}function yEn(n,e){return _Bn(n.b,e)}function T1e(n){return n?n.g:null}function C1e(n){return n?n.i:null}function jEn(n,e){return Q1e(n.a,e)}function ez(n,e){for(;n.zd(e););}function EEn(){throw M(new Ie)}function F1(){F1=x,goe=yye()}function AEn(){AEn=x,mi=Oje()}function tz(){tz=x,La=l5()}function u4(){u4=x,T0n=jye()}function MEn(){MEn=x,nhe=Eye()}function iz(){iz=x,oc=bAe()}function _a(n){return hl(n),n.o}function dg(n,e){return n.a+=e,n}function HL(n,e){return n.a+=e,n}function zl(n,e){return n.a+=e,n}function e0(n,e){return n.a+=e,n}function rz(n){VKn(),N$e(this,n)}function fA(n){this.a=new ip(n)}function Xl(n){this.a=new A$(n)}function TEn(){throw M(new Ie)}function CEn(){throw M(new Ie)}function IEn(){throw M(new Ie)}function SEn(){throw M(new Ie)}function PEn(){throw M(new Ie)}function OEn(){this.b=new vv(Tln)}function LEn(){this.a=new vv(f1n)}function sA(n){this.a=0,this.b=n}function DEn(){this.a=new vv(O1n)}function $En(){this.b=new vv(oH)}function NEn(){this.b=new vv(oH)}function FEn(){this.a=new vv(Oan)}function xEn(n,e){return WCe(n,e)}function I1e(n,e){return POe(e,n)}function cz(n,e){return n.d[e.p]}function y7(n){return n.b!=n.d.c}function BEn(n){return n.l|n.m<<22}function f4(n){return H1(n),n.a}function REn(n){n.c?PHn(n):OHn(n)}function bg(n,e){for(;n.Pe(e););}function uz(n,e,t){n.splice(e,t)}function JEn(){throw M(new Ie)}function _En(){throw M(new Ie)}function GEn(){throw M(new Ie)}function qEn(){throw M(new Ie)}function HEn(){throw M(new Ie)}function UEn(){throw M(new Ie)}function KEn(){throw M(new Ie)}function zEn(){throw M(new Ie)}function XEn(){throw M(new Ie)}function WEn(){throw M(new Ie)}function S1e(){throw M(new Fr)}function P1e(){throw M(new Fr)}function j7(n){this.a=new QEn(n)}function QEn(n){jme(this,n,DEe())}function E7(n){return!n||CPn(n)}function A7(n){return Yo[n]!=-1}function O1e(){IS!=0&&(IS=0),SS=-1}function VEn(){c_==null&&(c_=[])}function M7(n,e){Cg.call(this,n,e)}function s4(n,e){M7.call(this,n,e)}function YEn(n,e){this.a=n,this.b=e}function ZEn(n,e){this.a=n,this.b=e}function nAn(n,e){this.a=n,this.b=e}function eAn(n,e){this.a=n,this.b=e}function tAn(n,e){this.a=n,this.b=e}function iAn(n,e){this.a=n,this.b=e}function rAn(n,e){this.a=n,this.b=e}function o4(n,e){this.e=n,this.d=e}function fz(n,e){this.b=n,this.c=e}function cAn(n,e){this.b=n,this.a=e}function uAn(n,e){this.b=n,this.a=e}function fAn(n,e){this.b=n,this.a=e}function sAn(n,e){this.b=n,this.a=e}function oAn(n,e){this.a=n,this.b=e}function hAn(n,e){this.a=n,this.b=e}function UL(n,e){this.a=n,this.b=e}function lAn(n,e){this.a=n,this.f=e}function t0(n,e){this.g=n,this.i=e}function pe(n,e){this.f=n,this.g=e}function aAn(n,e){this.b=n,this.c=e}function dAn(n){vX(n.dc()),this.c=n}function L1e(n,e){this.a=n,this.b=e}function bAn(n,e){this.a=n,this.b=e}function wAn(n){this.a=u(Ce(n),16)}function sz(n){this.a=u(Ce(n),16)}function gAn(n){this.a=u(Ce(n),93)}function oA(n){this.b=u(Ce(n),93)}function hA(n){this.b=u(Ce(n),51)}function lA(){this.q=new j.Date}function KL(n,e){this.a=n,this.b=e}function pAn(n,e){return Tc(n.b,e)}function hm(n,e){return n.b.Gc(e)}function oz(n,e){return n.b.Hc(e)}function hz(n,e){return n.b.Oc(e)}function vAn(n,e){return n.b.Gc(e)}function mAn(n,e){return n.c.uc(e)}function kAn(n,e){return ct(n.c,e)}function cs(n,e){return n.a._b(e)}function yAn(n,e){return n>e&&e0}function VL(n,e){return Pc(n,e)<0}function FAn(n,e){return g$(n.a,e)}function Q1e(n,e){return n.a.a.cc(e)}function YL(n){return n.b=0}function Pm(n,e){return Pc(n,e)!=0}function J1(n,e){return n.Pd().Xb(e)}function XA(n,e){return Wme(n.Jc(),e)}function hae(n){return""+(Gn(n),n)}function Yz(n,e){return n.a+=""+e,n}function Om(n,e){return n.a+=""+e,n}function wr(n,e){return n.a+=""+e,n}function Lm(n,e){return n.a+=""+e,n}function Mc(n,e){return n.a+=""+e,n}function Je(n,e){return n.a+=""+e,n}function WA(n){return _m(n==null),n}function Zz(n){return kn(n,0),null}function iTn(n){return Ku(n),n.d.gc()}function lae(n){j.clearTimeout(n)}function rTn(n,e){n.q.setTime(td(e))}function aae(n,e){x6e(new re(n),e)}function cTn(n,e){QW.call(this,n,e)}function uTn(n,e){QW.call(this,n,e)}function QA(n,e){QW.call(this,n,e)}function Ki(n,e){Dt(n,e,n.c.b,n.c)}function mg(n,e){Dt(n,e,n.a,n.a.a)}function dae(n,e){return n.j[e.p]==2}function fTn(n,e){return n.a=e.g+1,n}function ro(n){return n.a=0,n.b=0,n}function sTn(){sTn=x,$Zn=me(qF())}function oTn(){oTn=x,Gne=me(cHn())}function hTn(){hTn=x,$ce=me(dxn())}function lTn(){this.b=new ip(Vb(12))}function aTn(){this.b=0,this.a=!1}function dTn(){this.b=0,this.a=!1}function Dm(n){this.a=n,sL.call(this)}function bTn(n){this.a=n,sL.call(this)}function An(n,e){At.call(this,n,e)}function OD(n,e){Lb.call(this,n,e)}function kg(n,e){Wz.call(this,n,e)}function wTn(n,e){z7.call(this,n,e)}function LD(n,e){U4.call(this,n,e)}function Xe(n,e){kA(),Ke(JO,n,e)}function DD(n,e){return ss(n.a,0,e)}function gTn(n,e){return R(n)===R(e)}function bae(n,e){return ht(n.a,e.a)}function nX(n,e){return bc(n.a,e.a)}function wae(n,e){return sPn(n.a,e.a)}function op(n){return _i((Gn(n),n))}function gae(n){return _i((Gn(n),n))}function pTn(n){return Xc(n.l,n.m,n.h)}function pae(n){return Ce(n),new Dm(n)}function rh(n,e){return n.indexOf(e)}function Lr(n){return typeof n===Vtn}function VA(n){return n<10?"0"+n:""+n}function vae(n){return n==Y0||n==Aw}function mae(n){return n==Y0||n==Ew}function vTn(n,e){return bc(n.g,e.g)}function eX(n){return _r(n.b.b,n,0)}function mTn(n){hc(this),w5(this,n)}function kTn(n){this.a=cMn(),this.b=n}function yTn(n){this.a=cMn(),this.b=n}function jTn(n,e){return nn(n.a,e),e}function tX(n,e){F4(n,0,n.length,e)}function kae(n,e){return bc(n.g,e.g)}function yae(n,e){return ht(e.f,n.f)}function jae(n,e){return df(),e.a+=n}function Eae(n,e){return df(),e.a+=n}function Aae(n,e){return df(),e.c+=n}function iX(n,e){return mf(n.a,e),n}function Mae(n,e){return nn(n.c,e),n}function YA(n){return mf(new Kt,n)}function sl(n){return n==Ir||n==Or}function yg(n){return n==Vf||n==zo}function ETn(n){return n==I2||n==C2}function jg(n){return n!=Wo&&n!=Sa}function Yu(n){return n.sh()&&n.th()}function ATn(n){return R$(u(n,127))}function hp(){Ls.call(this,0,0,0,0)}function MTn(){CM.call(this,0,0,0,0)}function Ih(){fK.call(this,new z1)}function $D(n){WMn.call(this,n,!0)}function zi(n){this.a=n.a,this.b=n.b}function ND(n,e){V4(n,e),J4(n,n.D)}function FD(n,e,t){NT(n,e),$T(n,t)}function c0(n,e,t){cd(n,e),rd(n,t)}function Df(n,e,t){Sc(n,e),yu(n,t)}function q7(n,e,t){k0(n,e),y0(n,t)}function H7(n,e,t){j0(n,e),E0(n,t)}function TTn(n,e,t){BX.call(this,n,e,t)}function CTn(){AA.call(this,"Head",1)}function ITn(){AA.call(this,"Tail",3)}function _1(n){dh(),Yme.call(this,n)}function Eg(n){return n!=null?kt(n):0}function STn(n,e){return new U4(e,n)}function Tae(n,e){return new U4(e,n)}function Cae(n,e){return zb(e,To(n))}function Iae(n,e){return zb(e,To(n))}function Sae(n,e){return n[n.length]=e}function Pae(n,e){return n[n.length]=e}function rX(n){return zwe(n.b.Jc(),n.a)}function Oae(n,e){return JT(N$(n.f),e)}function Lae(n,e){return JT(N$(n.n),e)}function Dae(n,e){return JT(N$(n.p),e)}function bi(n,e){At.call(this,n.b,e)}function qa(n){CM.call(this,n,n,n,n)}function xD(n){n.c=J(hi,Bn,1,0,5,1)}function PTn(n,e,t){qt(n.c[e.g],e.g,t)}function $ae(n,e,t){u(n.c,72).Ei(e,t)}function Nae(n,e,t){Df(t,t.i+n,t.j+e)}function Fae(n,e){Ee(pc(n.a),fLn(e))}function xae(n,e){Ee(Uu(n.a),sLn(e))}function Bae(n,e){_o||(n.b=e)}function BD(n,e,t){return qt(n,e,t),t}function OTn(n){_c(n.Qf(),new V8n(n))}function LTn(){LTn=x,jq=new C5(QH)}function cX(){cX=x,TK(),Hun=new de}function Se(){Se=x,new DTn,new Z}function DTn(){new de,new de,new de}function Rae(){throw M(new Ul(bYn))}function Jae(){throw M(new Ul(bYn))}function _ae(){throw M(new Ul(wYn))}function Gae(){throw M(new Ul(wYn))}function $m(n){it(),Wd.call(this,n)}function $Tn(n){this.a=n,jW.call(this,n)}function RD(n){this.a=n,oA.call(this,n)}function JD(n){this.a=n,oA.call(this,n)}function qae(n){return n==null?0:kt(n)}function Rr(n){return n.a0?n:e}function bc(n,e){return ne?1:0}function NTn(n,e){return n.a?n.b:e.Ue()}function Xc(n,e,t){return{l:n,m:e,h:t}}function Hae(n,e){n.a!=null&&$Mn(e,n.a)}function Uae(n,e){Ce(e),Sg(n).Ic(new Oi)}function si(n,e){w$(n.c,n.c.length,e)}function FTn(n){n.a=new WO,n.c=new WO}function ZA(n){this.b=n,this.a=new Z}function xTn(n){this.b=new nwn,this.a=n}function sX(n){ZX.call(this),this.a=n}function BTn(n){SQ.call(this),this.b=n}function RTn(){AA.call(this,"Range",2)}function JTn(){lnn(),this.a=new vv(Jfn)}function Eo(){Eo=x,j.Math.log(2)}function $f(){$f=x,nl=(DAn(),joe)}function nM(n){n.j=J(ifn,Y,325,0,0,1)}function _Tn(n){n.a=new de,n.e=new de}function oX(n){return new V(n.c,n.d)}function Kae(n){return new V(n.c,n.d)}function Xi(n){return new V(n.a,n.b)}function zae(n,e){return Ke(n.a,e.a,e)}function Xae(n,e,t){return Ke(n.g,t,e)}function Wae(n,e,t){return Ke(n.k,t,e)}function Ag(n,e,t){return OZ(e,t,n.c)}function GTn(n,e){return nDe(n.a,e,null)}function hX(n,e){return N(zn(n.i,e))}function lX(n,e){return N(zn(n.j,e))}function qTn(n,e){ke(n),n.Fc(u(e,16))}function Qae(n,e,t){n.c._c(e,u(t,138))}function Vae(n,e,t){n.c.Si(e,u(t,138))}function Yae(n,e,t){return YLe(n,e,t),t}function Zae(n,e){return wf(),e.n.b+=n}function Nm(n,e){return sLe(n.c,n.b,e)}function _D(n,e){return S5e(n.Jc(),e)!=-1}function D(n,e){return n!=null&&zF(n,e)}function nde(n,e){return new aCn(n.Jc(),e)}function eM(n){return n.Ob()?n.Pb():null}function HTn(n){return lh(n,0,n.length)}function ede(n){Gi(n,null),Ti(n,null)}function UTn(n){iN(n,null),rN(n,null)}function KTn(){z7.call(this,null,null)}function zTn(){fM.call(this,null,null)}function XTn(){pe.call(this,"INSTANCE",0)}function Mg(){this.a=J(hi,Bn,1,8,5,1)}function aX(n){this.a=n,de.call(this)}function WTn(n){this.a=(Dn(),new i4(n))}function tde(n){this.b=(Dn(),new mL(n))}function d4(){d4=x,dfn=new DL(null)}function dX(){dX=x,dX(),KYn=new vbn}function nn(n,e){return Rn(n.c,e),!0}function QTn(n,e){n.c&&(LW(e),SOn(e))}function ide(n,e){n.q.setHours(e),Q5(n,e)}function bX(n,e){return n.a.Ac(e)!=null}function GD(n,e){return n.a.Ac(e)!=null}function Ao(n,e){return n.a[e.c.p][e.p]}function rde(n,e){return n.c[e.c.p][e.p]}function cde(n,e){return n.e[e.c.p][e.p]}function qD(n,e,t){return n.a[e.g][t.g]}function ude(n,e){return n.j[e.p]=DTe(e)}function lp(n,e){return n.a*e.a+n.b*e.b}function fde(n,e){return n.a=n}function ade(n,e,t){return t?e!=0:e!=n-1}function VTn(n,e,t){n.a=e^1502,n.b=t^VB}function dde(n,e,t){return n.a=e,n.b=t,n}function ol(n,e){return n.a*=e,n.b*=e,n}function Fm(n,e,t){return qt(n.g,e,t),t}function bde(n,e,t,i){qt(n.a[e.g],t.g,i)}function ti(n,e,t){ck.call(this,n,e,t)}function tM(n,e,t){ti.call(this,n,e,t)}function pu(n,e,t){ti.call(this,n,e,t)}function YTn(n,e,t){tM.call(this,n,e,t)}function wX(n,e,t){ck.call(this,n,e,t)}function Tg(n,e,t){ck.call(this,n,e,t)}function ZTn(n,e,t){gX.call(this,n,e,t)}function nCn(n,e,t){wX.call(this,n,e,t)}function gX(n,e,t){vM.call(this,n,e,t)}function eCn(n,e,t){vM.call(this,n,e,t)}function G1(n){this.c=n,this.a=this.c.a}function re(n){this.i=n,this.f=this.i.j}function Cg(n,e){this.a=n,oA.call(this,e)}function tCn(n,e){this.a=n,BL.call(this,e)}function iCn(n,e){this.a=n,BL.call(this,e)}function rCn(n,e){this.a=n,BL.call(this,e)}function pX(n){this.a=n,c8n.call(this,n.d)}function cCn(n){n.b.Qb(),--n.d.f.d,OM(n.d)}function uCn(n){n.a=u(Vn(n.b.a,4),131)}function fCn(n){n.a=u(Vn(n.b.a,4),131)}function wde(n){lk(n,_Qn),nI(n,WDe(n))}function sCn(n){aL.call(this,u(Ce(n),34))}function oCn(n){aL.call(this,u(Ce(n),34))}function vX(n){if(!n)throw M(new v7)}function mX(n){if(!n)throw M(new gu)}function kX(n,e){return l8e(n,new $1,e).a}function hCn(n,e){return new bGn(n.a,n.b,e)}function Qn(n,e){return Ce(e),new lCn(n,e)}function lCn(n,e){this.a=e,hA.call(this,n)}function aCn(n,e){this.a=e,hA.call(this,n)}function yX(n,e){this.a=e,BL.call(this,n)}function dCn(n,e){this.a=e,wN.call(this,n)}function bCn(n,e){this.a=n,wN.call(this,e)}function wCn(){nM(this),KM(this),this.he()}function jX(){this.Bb|=256,this.Bb|=512}function _n(){_n=x,wa=!1,f6=!0}function gCn(){gCn=x,WL(),Voe=new W9n}function gde(n){return y7(n.a)?oLn(n):null}function pde(n){return n.l+n.m*r3+n.h*md}function vde(n){return n==null?null:n.name}function xm(n){return n==null?su:$r(n)}function iM(n,e){return n.lastIndexOf(e)}function EX(n,e,t){return n.indexOf(e,t)}function vu(n,e){return!!e&&n.b[e.g]==e}function ap(n){return n.a!=null?n.a:null}function Zu(n){return oe(n.a!=null),n.a}function U7(n,e,t){return eF(n,e,e,t),n}function pCn(n,e){return nn(e.a,n.a),n.a}function vCn(n,e){return nn(e.b,n.a),n.a}function rM(n,e){return++n.b,nn(n.a,e)}function AX(n,e){return++n.b,ru(n.a,e)}function u0(n,e){return nn(e.a,n.a),n.a}function cM(n){Q3.call(this,n),this.a=n}function MX(n){lg.call(this,n),this.a=n}function TX(n){i4.call(this,n),this.a=n}function CX(n){ML.call(this),qi(this,n)}function us(n){b7.call(this,(Gn(n),n))}function af(n){b7.call(this,(Gn(n),n))}function HD(n){fK.call(this,new MV(n))}function IX(n,e){JZ.call(this,n,e,null)}function mde(n,e){return ht(n.n.a,e.n.a)}function kde(n,e){return ht(n.c.d,e.c.d)}function yde(n,e){return ht(n.c.c,e.c.c)}function tu(n,e){return u(ot(n.b,e),16)}function jde(n,e){return n.n.b=(Gn(e),e)}function Ede(n,e){return n.n.b=(Gn(e),e)}function Ade(n,e){return ht(n.e.b,e.e.b)}function Mde(n,e){return ht(n.e.a,e.e.a)}function Tde(n,e,t){return hDn(n,e,t,n.b)}function SX(n,e,t){return hDn(n,e,t,n.c)}function Cde(n){return df(),!!n&&!n.dc()}function mCn(){dm(),this.b=new D7n(this)}function kCn(n){this.a=n,vL.call(this,n)}function K7(n){this.c=n,bp.call(this,n)}function dp(n){this.c=n,re.call(this,n)}function bp(n){this.d=n,re.call(this,n)}function uM(n,e){v$(),this.f=e,this.d=n}function z7(n,e){pm(),this.a=n,this.b=e}function fM(n,e){Ql(),this.b=n,this.c=e}function PX(n,e){pV(e,n),this.c=n,this.b=e}function Vl(n){var e;e=n.a,n.a=n.b,n.b=e}function Bm(n){return Rr(n.a)||Rr(n.b)}function f0(n){return n.$H||(n.$H=++vNe)}function UD(n,e){return new AIn(n,n.gc(),e)}function Ide(n,e){return j$(n.c).Kd().Xb(e)}function b4(n,e,t){var i;i=n.dd(e),i.Rb(t)}function OX(n,e,t){u(Ik(n,e),24).Ec(t)}function Sde(n,e,t){MF(n.a,t),SC(n.a,e)}function yCn(n,e,t,i){XW.call(this,n,e,t,i)}function w4(n,e,t){return EX(n,uu(e),t)}function Pde(n){return eA(),ve((XOn(),EYn),n)}function Ode(n){return new Hb(3,n)}function Sh(n){return vf(n,ww),new Jc(n)}function g4(n){return oe(n.b!=0),n.a.a.c}function Ps(n){return oe(n.b!=0),n.c.b.c}function Lde(n,e){return eF(n,e,e+1,""),n}function jCn(n){if(!n)throw M(new Lf)}function ECn(n){n.d=new TCn(n),n.e=new de}function LX(n){if(!n)throw M(new v7)}function Dde(n){if(!n)throw M(new EL)}function oe(n){if(!n)throw M(new Fr)}function Cb(n){if(!n)throw M(new gu)}function ACn(n){return n.b=u(AQ(n.a),45)}function ut(n,e){return!!n.q&&Tc(n.q,e)}function $de(n,e){return n>0?e*e/n:e*e*100}function Nde(n,e){return n>0?e/(n*n):e*100}function Ib(n,e){return u(So(n.a,e),34)}function Fde(n){return n.f!=null?n.f:""+n.g}function KD(n){return n.f!=null?n.f:""+n.g}function MCn(n){return O4(),parseInt(n)||-1}function xde(n){return ml(),n.e.a+n.f.a/2}function Bde(n,e,t){return ml(),t.e.a-n*e}function Rde(n,e,t){return dA(),t.Lg(n,e)}function Jde(n,e,t){return ml(),t.e.b-n*e}function _de(n){return ml(),n.e.b+n.f.b/2}function Gde(n,e){return ra(),Sn(n,e.e,e)}function X7(n){D(n,162)&&u(n,162).mi()}function TCn(n){EW.call(this,n,null,null)}function CCn(){pe.call(this,"GROW_TREE",0)}function ICn(n){this.c=n,this.a=1,this.b=1}function zD(n){jb(),this.b=n,this.a=!0}function SCn(n){aA(),this.b=n,this.a=!0}function PCn(n){vB(),Xyn(this),this.Df(n)}function OCn(n){dt.call(this),a5(this,n)}function LCn(n){this.c=n,Sc(n,0),yu(n,0)}function sM(n){return n.a=-n.a,n.b=-n.b,n}function DX(n,e){return n.a=e.a,n.b=e.b,n}function Sb(n,e,t){return n.a+=e,n.b+=t,n}function DCn(n,e,t){return n.a-=e,n.b-=t,n}function qde(n,e,t){jT(),n.nf(e)&&t.Ad(n)}function Hde(n,e,t){M5(pc(n.a),e,fLn(t))}function Ude(n,e,t){return nn(e,sRn(n,t))}function Kde(n,e){return u(zn(n.e,e),19)}function zde(n,e){return u(zn(n.e,e),19)}function Xde(n,e){return n.c.Ec(u(e,138))}function $Cn(n,e){pm(),z7.call(this,n,e)}function $X(n,e){Ql(),fM.call(this,n,e)}function NCn(n,e){Ql(),fM.call(this,n,e)}function FCn(n,e){Ql(),$X.call(this,n,e)}function XD(n,e){$f(),SM.call(this,n,e)}function xCn(n,e){$f(),XD.call(this,n,e)}function NX(n,e){$f(),XD.call(this,n,e)}function BCn(n,e){$f(),NX.call(this,n,e)}function FX(n,e){$f(),SM.call(this,n,e)}function RCn(n,e){$f(),SM.call(this,n,e)}function JCn(n,e){$f(),FX.call(this,n,e)}function nf(n,e,t){ku.call(this,n,e,t,2)}function Wde(n,e,t){M5(Uu(n.a),e,sLn(t))}function WD(n,e){return na(n.e,u(e,52))}function Qde(n,e,t){return e.xl(n.e,n.c,t)}function Vde(n,e,t){return e.yl(n.e,n.c,t)}function xX(n,e,t){return wI(Sk(n,e),t)}function _Cn(n,e){return Gn(n),n+e$(e)}function Yde(n){return n==null?null:$r(n)}function Zde(n){return n==null?null:$r(n)}function n0e(n){return n==null?null:JDe(n)}function e0e(n){return n==null?null:REe(n)}function hl(n){n.o==null&&uTe(n)}function fn(n){return _m(n==null||Mb(n)),n}function N(n){return _m(n==null||Tb(n)),n}function Pe(n){return _m(n==null||ki(n)),n}function GCn(){this.a=new p0,this.b=new p0}function t0e(n,e){this.d=n,P8n(this),this.b=e}function W7(n,e){this.c=n,o4.call(this,n,e)}function Rm(n,e){this.a=n,W7.call(this,n,e)}function BX(n,e,t){kT.call(this,n,e,t,null)}function qCn(n,e,t){kT.call(this,n,e,t,null)}function RX(){PFn.call(this),this.Bb|=Zi}function JX(n,e){MN.call(this,n),this.a=e}function _X(n,e){MN.call(this,n),this.a=e}function HCn(n,e){_o||nn(n.a,e)}function i0e(n,e){return ex(n,e),new RPn(n,e)}function r0e(n,e,t){return n.Le(e,t)<=0?t:e}function c0e(n,e,t){return n.Le(e,t)<=0?e:t}function UCn(n){return Gn(n),n?1231:1237}function QD(n){return u(rn(n.a,n.b),296)}function KCn(n){return wf(),ETn(u(n,205))}function u0e(n,e){return u(So(n.b,e),144)}function f0e(n,e){return u(So(n.c,e),236)}function zCn(n){return new V(n.c,n.d+n.a)}function s0e(n,e){return Np(),new eUn(e,n)}function o0e(n,e){return I7(),H4(e.d.i,n)}function h0e(n,e){e.a?TMe(n,e):GD(n.a,e.b)}function GX(n,e){return u(zn(n.b,e),280)}function At(n,e){nt.call(this,n),this.a=e}function qX(n,e,t){return t=jf(n,e,3,t),t}function HX(n,e,t){return t=jf(n,e,6,t),t}function UX(n,e,t){return t=jf(n,e,9,t),t}function ch(n,e){return lk(e,gin),n.f=e,n}function KX(n,e){return(e&Ze)%n.d.length}function XCn(n,e,t){++n.j,n.oj(e,n.Xi(e,t))}function Q7(n,e,t){++n.j,n.rj(),AN(n,e,t)}function WCn(n,e,t){var i;i=n.dd(e),i.Rb(t)}function QCn(n,e){this.c=n,m0.call(this,e)}function VCn(n,e){this.a=n,_yn.call(this,e)}function V7(n,e){this.a=n,_yn.call(this,e)}function zX(n){this.q=new j.Date(td(n))}function YCn(n){this.a=(vf(n,ww),new Jc(n))}function ZCn(n){this.a=(vf(n,ww),new Jc(n))}function VD(n){this.a=(Dn(),new pL(Ce(n)))}function oM(){oM=x,xS=new At(EXn,0)}function Ig(){Ig=x,O2=new nt("root")}function p4(){p4=x,ME=new Ajn,new Mjn}function Pb(){Pb=x,kfn=yn((of(),qd))}function l0e(n){return Le(Xa(n,32))^Le(n)}function YD(n){return String.fromCharCode(n)}function a0e(n){return n==null?null:n.message}function d0e(n,e,t){return n.apply(e,t)}function nIn(n,e,t){return Ptn(n.c,n.b,e,t)}function XX(n,e,t){return jp(n,u(e,23),t)}function Ha(n,e){return _n(),n==e?0:n?1:-1}function WX(n,e){var t;return t=e,!!n.De(t)}function QX(n,e){var t;return t=n.e,n.e=e,t}function b0e(n,e){var t;t=n[QB],t.call(n,e)}function w0e(n,e){var t;t=n[QB],t.call(n,e)}function Ob(n,e){n.a._c(n.b,e),++n.b,n.c=-1}function eIn(n){hc(n.e),n.d.b=n.d,n.d.a=n.d}function Y7(n){n.b?Y7(n.b):n.f.c.yc(n.e,n.d)}function Z7(n){return!n.a&&(n.a=new ubn),n.a}function tIn(n,e,t){return n.a+=lh(e,0,t),n}function g0e(n,e,t){Ga(),C8n(n,e.Te(n.a,t))}function VX(n,e,t,i){CM.call(this,n,e,t,i)}function YX(n,e){yK.call(this,n),this.a=e}function ZD(n,e){yK.call(this,n),this.a=e}function iIn(){hM.call(this),this.a=new Li}function ZX(){this.n=new Li,this.o=new Li}function rIn(){this.b=new Li,this.c=new Z}function cIn(){this.a=new Z,this.b=new Z}function uIn(){this.a=new AU,this.b=new ejn}function nW(){this.b=new z1,this.a=new z1}function fIn(){this.b=new Vt,this.a=new Vt}function sIn(){this.b=new de,this.a=new de}function oIn(){this.a=new Z,this.d=new Z}function hIn(){this.a=new d9n,this.b=new Upn}function lIn(){this.b=new OEn,this.a=new t4n}function hM(){this.n=new V2,this.i=new hp}function ft(n,e){return n.a+=e.a,n.b+=e.b,n}function ai(n,e){return n.a-=e.a,n.b-=e.b,n}function p0e(n){return kb(n.j.c,0),n.a=-1,n}function eW(n,e,t){return t=jf(n,e,11,t),t}function aIn(n,e,t){t!=null&&_T(e,rx(n,t))}function dIn(n,e,t){t!=null&>(e,rx(n,t))}function wp(n,e,t,i){U.call(this,n,e,t,i)}function Lb(n,e){xc.call(this,M9+n+Md+e)}function tW(n,e,t,i){U.call(this,n,e,t,i)}function bIn(n,e,t,i){tW.call(this,n,e,t,i)}function wIn(n,e,t,i){xM.call(this,n,e,t,i)}function n$(n,e,t,i){xM.call(this,n,e,t,i)}function gIn(n,e,t,i){n$.call(this,n,e,t,i)}function iW(n,e,t,i){xM.call(this,n,e,t,i)}function Ln(n,e,t,i){iW.call(this,n,e,t,i)}function rW(n,e,t,i){n$.call(this,n,e,t,i)}function pIn(n,e,t,i){rW.call(this,n,e,t,i)}function vIn(n,e,t,i){YW.call(this,n,e,t,i)}function cW(n,e){return n.hk().ti().oi(n,e)}function uW(n,e){return n.hk().ti().qi(n,e)}function v0e(n,e){return n.n.a=(Gn(e),e+10)}function m0e(n,e){return n.n.a=(Gn(e),e+10)}function k0e(n,e){return n.e=u(n.d.Kb(e),163)}function y0e(n,e){return e==n||av(ZC(e),n)}function Os(n,e){return cA(new Array(e),n)}function mIn(n,e){return Gn(n),R(n)===R(e)}function Cn(n,e){return Gn(n),R(n)===R(e)}function kIn(n,e){return Ke(n.a,e,"")==null}function fW(n,e,t){return n.lastIndexOf(e,t)}function j0e(n,e){return n.b.zd(new JAn(n,e))}function E0e(n,e){return n.b.zd(new _An(n,e))}function yIn(n,e){return n.b.zd(new GAn(n,e))}function A0e(n){return n<100?null:new N1(n)}function M0e(n,e){return H(e,(en(),Dj),n)}function T0e(n,e,t){return ht(n[e.a],n[t.a])}function C0e(n,e){return bc(n.a.d.p,e.a.d.p)}function I0e(n,e){return bc(e.a.d.p,n.a.d.p)}function S0e(n,e){return I7(),!H4(e.d.i,n)}function P0e(n,e){_o||e&&(n.d=e)}function O0e(n,e){sl(n.f)?YMe(n,e):Gje(n,e)}function jIn(n,e){Xwe.call(this,n,n.length,e)}function EIn(n){this.c=n,QA.call(this,$y,0)}function sW(n,e){this.c=n,P$.call(this,n,e)}function AIn(n,e,t){this.a=n,PX.call(this,e,t)}function MIn(n,e,t){this.c=e,this.b=t,this.a=n}function nk(n){m4(),this.d=n,this.a=new Mg}function L0e(n,e){var t;return t=e.ni(n.a),t}function D0e(n,e){return ht(n.c-n.s,e.c-e.s)}function $0e(n,e){return ht(n.c.e.a,e.c.e.a)}function N0e(n,e){return ht(n.b.e.a,e.b.e.a)}function TIn(n,e){return D(e,16)&&NHn(n.c,e)}function F0e(n,e,t){return u(n.c,72).Uk(e,t)}function lM(n,e,t){return u(n.c,72).Vk(e,t)}function x0e(n,e,t){return Qde(n,u(e,345),t)}function oW(n,e,t){return Vde(n,u(e,345),t)}function B0e(n,e,t){return p_n(n,u(e,345),t)}function CIn(n,e,t){return nEe(n,u(e,345),t)}function Jm(n,e){return e==null?null:Zb(n.b,e)}function gp(n){return n==Gd||n==Yh||n==Ac}function IIn(n){return n.c?_r(n.c.a,n,0):-1}function e$(n){return Tb(n)?(Gn(n),n):n.se()}function aM(n){return!isNaN(n)&&!isFinite(n)}function t$(n){FTn(this),rf(this),qi(this,n)}function Ou(n){xD(this),OW(this.c,0,n.Nc())}function SIn(n){Gu(n.a),EV(n.c,n.b),n.b=null}function i$(){i$=x,afn=new gbn,HYn=new pbn}function PIn(){PIn=x,Coe=J(hi,Bn,1,0,5,1)}function OIn(){OIn=x,Uoe=J(hi,Bn,1,0,5,1)}function hW(){hW=x,Koe=J(hi,Bn,1,0,5,1)}function R0e(n){return x4(),ve((Z$n(),zYn),n)}function J0e(n){return Gf(),ve((d$n(),ZYn),n)}function _0e(n){return so(),ve((b$n(),fZn),n)}function G0e(n){return Du(),ve((w$n(),oZn),n)}function q0e(n){return cu(),ve((g$n(),lZn),n)}function H0e(n){return kI(),ve((sTn(),$Zn),n)}function lW(n,e){if(!n)throw M(new qn(e))}function v4(n){if(!n)throw M(new yr(Ytn))}function r$(n,e){if(n!=e)throw M(new Lf)}function Nf(n,e,t){this.a=n,this.b=e,this.c=t}function LIn(n,e,t){this.a=n,this.b=e,this.c=t}function DIn(n,e,t){this.a=n,this.b=e,this.c=t}function aW(n,e,t){this.b=n,this.c=e,this.a=t}function $In(n,e,t){this.d=n,this.b=t,this.a=e}function U0e(n,e,t){return Ga(),n.a.Wd(e,t),e}function c$(n){var e;return e=new qbn,e.e=n,e}function dW(n){var e;return e=new sjn,e.b=n,e}function dM(n,e,t){this.e=e,this.b=n,this.d=t}function bM(n,e,t){this.b=n,this.a=e,this.c=t}function NIn(n){this.a=n,Wl(),cc(Date.now())}function FIn(n,e,t){this.a=n,this.b=e,this.c=t}function u$(n){CM.call(this,n.d,n.c,n.a,n.b)}function bW(n){CM.call(this,n.d,n.c,n.a,n.b)}function K0e(n){return Xn(),ve((oxn(),Fne),n)}function z0e(n){return M0(),ve((nNn(),FZn),n)}function X0e(n){return z4(),ve((eNn(),Tne),n)}function W0e(n){return ST(),ve((EDn(),UZn),n)}function Q0e(n){return s5(),ve((p$n(),pne),n)}function V0e(n){return Ei(),ve((BNn(),yne),n)}function Y0e(n){return _p(),ve((tNn(),Lne),n)}function Z0e(n){return G4(),ve((ADn(),_ne),n)}function nbe(n){return Ii(),ve((oTn(),Gne),n)}function ebe(n){return eC(),ve((iNn(),Une),n)}function tbe(n){return Bs(),ve((rNn(),tee),n)}function ibe(n){return rw(),ve((QNn(),ree),n)}function rbe(n){return yT(),ve((TDn(),aee),n)}function cbe(n){return Kp(),ve((wFn(),lee),n)}function ube(n){return A0(),ve((N$n(),oee),n)}function fbe(n){return uI(),ve((hxn(),hee),n)}function sbe(n){return I5(),ve((sNn(),dee),n)}function obe(n){return xT(),ve((y$n(),bee),n)}function hbe(n){return py(),ve((Mxn(),wee),n)}function lbe(n){return Dk(),ve((MDn(),gee),n)}function abe(n){return od(),ve((j$n(),vee),n)}function dbe(n){return UC(),ve((bFn(),mee),n)}function bbe(n){return Tk(),ve((CDn(),kee),n)}function wbe(n){return hy(),ve((aFn(),yee),n)}function gbe(n){return bv(),ve((dFn(),jee),n)}function pbe(n){return sr(),ve((Rxn(),Eee),n)}function vbe(n){return K4(),ve((k$n(),Aee),n)}function mbe(n){return V1(),ve((v$n(),Mee),n)}function kbe(n){return vl(),ve((m$n(),Cee),n)}function ybe(n){return fT(),ve((IDn(),Iee),n)}function jbe(n){return ff(),ve((YNn(),Pee),n)}function Ebe(n){return hT(),ve((SDn(),Oee),n)}function Abe(n){return iw(),ve((uNn(),kre),n)}function Mbe(n){return y5(),ve((S$n(),mre),n)}function Tbe(n){return O5(),ve((ZNn(),yre),n)}function Cbe(n){return fa(),ve((Bxn(),jre),n)}function Ibe(n){return my(),ve((Txn(),vre),n)}function Sbe(n){return Al(),ve((fNn(),Ere),n)}function Pbe(n){return Ok(),ve((PDn(),Are),n)}function Obe(n){return fr(),ve((E$n(),Tre),n)}function Lbe(n){return YT(),ve((A$n(),Cre),n)}function Dbe(n){return k5(),ve((M$n(),Ire),n)}function $be(n){return Y4(),ve((T$n(),Sre),n)}function Nbe(n){return FT(),ve((C$n(),Pre),n)}function Fbe(n){return ZT(),ve((I$n(),Ore),n)}function xbe(n){return ld(),ve((cNn(),Qre),n)}function Bbe(n){return u5(),ve((ODn(),ece),n)}function Rbe(n){return uh(),ve((LDn(),sce),n)}function Jbe(n){return Mo(),ve((DDn(),hce),n)}function _be(n){return uo(),ve(($Dn(),Mce),n)}function Gbe(n,e){return Gn(n),n+(Gn(e),e)}function qbe(n){return g0(),ve((NDn(),Lce),n)}function Hbe(n){return Gp(),ve((aNn(),Dce),n)}function Ube(n){return X5(),ve((hTn(),$ce),n)}function Kbe(n){return v5(),ve((F$n(),Nce),n)}function zbe(n){return m5(),ve((oNn(),rue),n)}function Xbe(n){return rT(),ve((FDn(),cue),n)}function Wbe(n){return UT(),ve((xDn(),hue),n)}function Qbe(n){return JC(),ve((VNn(),aue),n)}function Vbe(n){return ET(),ve((BDn(),due),n)}function Ybe(n){return zk(),ve((x$n(),bue),n)}function Zbe(n){return OC(),ve((hNn(),$ue),n)}function nwe(n){return QT(),ve((P$n(),Nue),n)}function ewe(n){return vC(),ve((O$n(),Fue),n)}function twe(n){return GC(),ve((lNn(),Bue),n)}function iwe(n){return dC(),ve((B$n(),_ue),n)}function m4(){m4=x,Aln=(tn(),Zn),VP=te}function df(){df=x,Yne=new epn,Zne=new tpn}function ek(){ek=x,qS=new vgn,HS=new mgn}function wM(){wM=x,zne=new Kgn,Kne=new zgn}function rwe(n){return!n.e&&(n.e=new Z),n.e}function cwe(n){return H5(),ve((nFn(),dfe),n)}function uwe(n){return wA(),ve((VLn(),wfe),n)}function fwe(n){return Vk(),ve((L$n(),bfe),n)}function swe(n){return gA(),ve((YLn(),pfe),n)}function owe(n){return yk(),ve((JDn(),vfe),n)}function hwe(n){return ay(),ve((eFn(),mfe),n)}function lwe(n){return bT(),ve((RDn(),ofe),n)}function awe(n){return AT(),ve((D$n(),hfe),n)}function dwe(n){return fC(),ve(($$n(),lfe),n)}function bwe(n){return bm(),ve((ZLn(),Nfe),n)}function wwe(n){return Gk(),ve((_Dn(),Ffe),n)}function gwe(n){return oT(),ve((GDn(),xfe),n)}function pwe(n){return NC(),ve((dNn(),Rfe),n)}function vwe(n){return pA(),ve((nDn(),Xfe),n)}function mwe(n){return vA(),ve((eDn(),Qfe),n)}function kwe(n){return mA(),ve((tDn(),Yfe),n)}function ywe(n){return $k(),ve((qDn(),nse),n)}function jwe(n){return Lo(),ve((WNn(),use),n)}function Ewe(n){return ua(),ve((lxn(),sse),n)}function Awe(n){return xh(),ve((vFn(),ose),n)}function Mwe(n){return wd(),ve((pFn(),wse),n)}function Twe(n){return ii(),ve((xNn(),_se),n)}function Cwe(n){return Z4(),ve((bNn(),Gse),n)}function Iwe(n){return Po(),ve((J$n(),qse),n)}function Swe(n){return El(),ve((wNn(),Hse),n)}function Pwe(n){return qC(),ve((gFn(),Use),n)}function Owe(n){return jl(),ve((R$n(),zse),n)}function Lwe(n){return kf(),ve((gNn(),Wse),n)}function Dwe(n){return sw(),ve((Axn(),Qse),n)}function $we(n){return _g(),ve((XNn(),Vse),n)}function Nwe(n){return ji(),ve((mFn(),Yse),n)}function Fwe(n){return $u(),ve((kFn(),Zse),n)}function xwe(n){return h5(),ve((G$n(),coe),n)}function Bwe(n){return tn(),ve((FNn(),noe),n)}function Rwe(n){return of(),ve((vNn(),uoe),n)}function Jwe(n){return Xu(),ve((Exn(),foe),n)}function _we(n){return Bp(),ve((_$n(),soe),n)}function Gwe(n){return lT(),ve((pNn(),ooe),n)}function qwe(n){return bC(),ve((mNn(),hoe),n)}function Hwe(n){return tC(),ve((kNn(),doe),n)}function f$(n,e){this.c=n,this.a=e,this.b=e-n}function ef(n,e,t){this.c=n,this.a=e,this.b=t}function xIn(n,e,t){this.a=n,this.c=e,this.b=t}function BIn(n,e,t){this.a=n,this.c=e,this.b=t}function RIn(n,e,t){this.a=n,this.b=e,this.c=t}function wW(n,e,t){this.a=n,this.b=e,this.c=t}function gW(n,e,t){this.a=n,this.b=e,this.c=t}function s$(n,e,t){this.a=n,this.b=e,this.c=t}function JIn(n,e,t){this.a=n,this.b=e,this.c=t}function pW(n,e,t){this.a=n,this.b=e,this.c=t}function _In(n,e,t){this.a=n,this.b=e,this.c=t}function GIn(n,e,t){this.b=n,this.a=e,this.c=t}function Yl(n,e,t){this.e=n,this.a=e,this.c=t}function qIn(n,e,t){$f(),LQ.call(this,n,e,t)}function o$(n,e,t){$f(),dQ.call(this,n,e,t)}function vW(n,e,t){$f(),dQ.call(this,n,e,t)}function mW(n,e,t){$f(),dQ.call(this,n,e,t)}function HIn(n,e,t){$f(),o$.call(this,n,e,t)}function kW(n,e,t){$f(),o$.call(this,n,e,t)}function UIn(n,e,t){$f(),kW.call(this,n,e,t)}function KIn(n,e,t){$f(),vW.call(this,n,e,t)}function zIn(n,e,t){$f(),mW.call(this,n,e,t)}function Uwe(n){return Yp(),ve((axn(),Toe),n)}function tk(n,e){return Ce(n),Ce(e),new ZEn(n,e)}function pp(n,e){return Ce(n),Ce(e),new eSn(n,e)}function Kwe(n,e){return Ce(n),Ce(e),new tSn(n,e)}function zwe(n,e){return Ce(n),Ce(e),new sAn(n,e)}function yW(n,e){L1e.call(this,n,lC(new Xr(e)))}function XIn(n,e){this.c=n,this.b=e,this.a=!1}function jW(n){this.d=n,P8n(this),this.b=Bge(n.d)}function EW(n,e,t){this.c=n,yA.call(this,e,t)}function Xwe(n,e,t){zSn.call(this,e,t),this.a=n}function WIn(){this.a=";,;",this.b="",this.c=""}function QIn(n,e,t){this.b=n,cTn.call(this,e,t)}function Wwe(n,e){e&&(n.b=e,n.a=(H1(e),e.a))}function h$(n){return oe(n.b!=0),Rf(n,n.a.a)}function Qwe(n){return oe(n.b!=0),Rf(n,n.c.b)}function Vwe(n){return!n.c&&(n.c=new W3),n.c}function VIn(n){var e;return e=new ML,WN(e,n),e}function ik(n){var e;return e=new dt,WN(e,n),e}function k4(n){var e;return e=new Z,FN(e,n),e}function Ywe(n){var e;return e=new Vt,FN(e,n),e}function u(n,e){return _m(n==null||zF(n,e)),n}function gM(n,e){return e&&GM(n,e.d)?e:null}function rk(n,e){if(!n)throw M(new qn(e))}function AW(n,e){if(!n)throw M(new tEn(e))}function vp(n,e){if(!n)throw M(new yr(e))}function Zwe(n,e){return bA(),bc(n.d.p,e.d.p)}function nge(n,e){return ml(),ht(n.e.b,e.e.b)}function ege(n,e){return ml(),ht(n.e.a,e.e.a)}function tge(n,e){return bc(lSn(n.d),lSn(e.d))}function ige(n,e){return e==(tn(),Zn)?n.c:n.d}function rge(n){return new V(n.c+n.b,n.d+n.a)}function MW(n){var e,t;t=n.d,e=n.a,n.d=e,n.a=t}function TW(n){var e,t;e=n.b,t=n.c,n.b=t,n.c=e}function Ph(n,e,t,i,r){n.b=e,n.c=t,n.d=i,n.a=r}function CW(n,e,t,i,r){n.d=e,n.c=t,n.a=i,n.b=r}function YIn(n,e,t,i,r){n.c=e,n.d=t,n.b=i,n.a=r}function pM(n,e){return ime(n),n.a*=e,n.b*=e,n}function IW(n,e){return e<0?n.g=-1:n.g=e,n}function ck(n,e,t){Qz.call(this,n,e),this.c=t}function SW(n,e,t){a4.call(this,n,e),this.b=t}function PW(n){hW(),RE.call(this),this._h(n)}function vM(n,e,t){Qz.call(this,n,e),this.c=t}function ZIn(n,e,t){this.a=n,kg.call(this,e,t)}function nSn(n,e,t){this.a=n,kg.call(this,e,t)}function l$(n){this.b=n,this.a=Ka(this.b.a).Md()}function eSn(n,e){this.b=n,this.a=e,sL.call(this)}function tSn(n,e){this.a=n,this.b=e,sL.call(this)}function iSn(n){PX.call(this,n.length,0),this.a=n}function OW(n,e,t){gen(t,0,n,e,t.length,!1)}function y4(n,e,t){var i;i=new Bb(t),Ns(n,e,i)}function cge(n,e){var t;return t=n.c,rY(n,e),t}function uge(n,e){return(UBn(n)<<4|UBn(e))&ri}function rSn(n){return n!=null&&!LF(n,Q8,V8)}function uk(n){return n==0||isNaN(n)?n:n<0?-1:1}function LW(n){n.a.b=n.b,n.b.a=n.a,n.a=n.b=null}function _e(n,e){return Dt(n,e,n.c.b,n.c),!0}function mM(n){var e;return e=n.slice(),PN(e,n)}function kM(n){var e;return e=n.n,n.a.b+e.d+e.a}function cSn(n){var e;return e=n.n,n.e.b+e.d+e.a}function DW(n){var e;return e=n.n,n.e.a+e.b+e.c}function uSn(n){return it(),new Oh(0,n)}function fSn(){fSn=x,dU=(Dn(),new pL(QJ))}function yM(){yM=x,new qZ((LL(),s_),(OL(),f_))}function sSn(){$4(),v2e.call(this,(B1(),Es))}function oSn(n,e){zSn.call(this,e,1040),this.a=n}function s0(n,e){return N5(n,new a4(e.a,e.b))}function fge(n){return!Ri(n)&&n.c.i.c==n.d.i.c}function sge(n,e){return n.c=e)throw M(new tjn)}function hc(n){n.f=new kTn(n),n.i=new yTn(n),++n.g}function NM(n){this.b=new Jc(11),this.a=(b0(),n)}function A$(n){this.b=null,this.a=(b0(),n||hfn)}function QW(n,e){this.e=n,this.d=(e&64)!=0?e|wh:e}function zSn(n,e){this.c=0,this.d=n,this.b=e|64|wh}function XSn(n){this.a=uJn(n.a),this.b=new Ou(n.b)}function Zl(n,e,t,i){var r;r=n.i,r.i=e,r.a=t,r.b=i}function VW(n){var e;for(e=n;e.f;)e=e.f;return e}function Hge(n){return n.e?mV(n.e):null}function Uge(n,e){return Np(),ht(e.a.o.a,n.a.o.a)}function WSn(n,e,t){return mv(),nF(n,e)&&nF(n,t)}function Um(n){return $u(),!n.Gc(Rl)&&!n.Gc(Pa)}function QSn(n,e,t){return Szn(n,u(e,12),u(t,12))}function VSn(n){return ju(),u(n,12).g.c.length!=0}function YSn(n){return ju(),u(n,12).e.c.length!=0}function FM(n){return new V(n.c+n.b/2,n.d+n.a/2)}function M$(n,e){return e.Sh()?na(n.b,u(e,52)):e}function Kge(n,e,t){e.of(t,$(N(zn(n.b,t)))*n.a)}function zge(n,e){e.Tg("General 'Rotator",1),TDe(n)}function wi(n,e,t,i,r){CN.call(this,n,e,t,i,r,-1)}function Km(n,e,t,i,r){Ek.call(this,n,e,t,i,r,-1)}function U(n,e,t,i){ti.call(this,n,e,t),this.b=i}function xM(n,e,t,i){ck.call(this,n,e,t),this.b=i}function ZSn(n){WMn.call(this,n,!1),this.a=!1}function nPn(){PD.call(this,"LOOKAHEAD_LAYOUT",1)}function ePn(){PD.call(this,"LAYOUT_NEXT_LEVEL",3)}function tPn(){pe.call(this,"ABSOLUTE_XPLACING",0)}function iPn(n){this.b=n,bp.call(this,n),uCn(this)}function rPn(n){this.b=n,K7.call(this,n),fCn(this)}function cPn(n,e){this.b=n,c8n.call(this,n.b),this.a=e}function Fb(n,e,t){this.a=n,wp.call(this,e,t,5,6)}function YW(n,e,t,i){this.b=n,ti.call(this,e,t,i)}function Wa(n,e,t){dh(),this.e=n,this.d=e,this.a=t}function Ni(n,e){for(Gn(e);n.Ob();)e.Ad(n.Pb())}function BM(n,e){return it(),new aQ(n,e,0)}function T$(n,e){return it(),new aQ(6,n,e)}function Xge(n,e){return Cn(n.substr(0,e.length),e)}function Tc(n,e){return ki(e)?W$(n,e):!!jr(n.f,e)}function Wge(n){return Xc(~n.l&Wu,~n.m&Wu,~n.h&Sl)}function C$(n){return typeof n===Py||typeof n===yB}function Dh(n){return new Hn(new yX(n.a.length,n.a))}function I$(n){return new Pn(null,i2e(n,n.length))}function uPn(n){if(!n)throw M(new Fr);return n.d}function yp(n){var e;return e=p5(n),oe(e!=null),e}function Qge(n){var e;return e=H9e(n),oe(e!=null),e}function E4(n,e){var t;return t=n.a.gc(),pV(e,t),t-e}function Yt(n,e){var t;return t=n.a.yc(e,n),t==null}function fk(n,e){return n.a.yc(e,(_n(),wa))==null}function Vge(n,e){return n>0?j.Math.log(n/e):-100}function ZW(n,e){return e?qi(n,e):!1}function jp(n,e,t){return xs(n.a,e),FW(n.b,e.g,t)}function Yge(n,e,t){j4(t,n.a.c.length),cf(n.a,t,e)}function B(n,e,t,i){bBn(e,t,n.length),Zge(n,e,t,i)}function Zge(n,e,t,i){var r;for(r=e;r0?1:0}function r2e(n,e){return ht(n.c.c+n.c.b,e.c.c+e.c.b)}function RM(n,e){Dt(n.d,e,n.b.b,n.b),++n.a,n.c=null}function oPn(n,e){return n.c?oPn(n.c,e):nn(n.b,e),n}function h0(n,e){Rt(Rc(n.Mc(),new Apn),new H7n(e))}function A4(n,e,t,i,r){vx(n,u(ot(e.k,t),16),t,i,r)}function hPn(n,e,t,i,r){for(;e=n.g}function Qm(n){return j.Math.sqrt(n.a*n.a+n.b*n.b)}function jPn(n){return D(n,104)&&(u(n,20).Bb&sc)!=0}function l0(n){return!n.d&&(n.d=new ti(br,n,1)),n.d}function p2e(n){return!n.a&&(n.a=new ti(Oa,n,4)),n.a}function EPn(n){this.c=n,this.a=new dt,this.b=new dt}function v2e(n){this.a=(Gn(Be),Be),this.b=n,new FK}function APn(n,e,t){this.a=n,QQ.call(this,8,e,null,t)}function lQ(n,e,t){this.a=n,yK.call(this,e),this.b=t}function aQ(n,e,t){Wd.call(this,n),this.a=e,this.b=t}function dQ(n,e,t){zE.call(this,e),this.a=n,this.b=t}function m2e(n,e,t){u(e.b,68),_c(e.a,new wW(n,t,e))}function B$(n,e){for(Gn(e);n.c=n?new lz:Eme(n-1)}function fs(n){if(n==null)throw M(new W2);return n}function Gn(n){if(n==null)throw M(new W2);return n}function gi(n){return!n.a&&n.c?n.c.b:n.a}function IPn(n){var e,t;return e=n.c.i.c,t=n.d.i.c,e==t}function E2e(n,e){return bc(e.j.c.length,n.j.c.length)}function SPn(n){kQ(n.a),n.b=J(hi,Bn,1,n.b.length,5,1)}function Vm(n){n.c?n.c.Ye():(n.d=!0,bCe(n))}function H1(n){n.c?H1(n.c):(ea(n),n.d=!0)}function Gu(n){Cb(n.c!=-1),n.d.ed(n.c),n.b=n.c,n.c=-1}function PPn(n){n.b=!1,n.c=!1,n.d=!1,n.a=!1}function OPn(n){this.c=n,this.b=this.c.a,this.a=this.c.e}function Kt(){xjn.call(this),kb(this.j.c,0),this.a=-1}function LPn(){pe.call(this,"DELAUNAY_TRIANGULATION",0)}function bQ(n){for(;n.a.b!=0;)hDe(n,u(POn(n.a),9))}function A2e(n,e){Ee((!n.a&&(n.a=new V7(n,n)),n.a),e)}function wQ(n,e){n.c<0||n.b.b=0?n.hi(t):fen(n,e)}function DPn(n,e){this.b=n,P$.call(this,n,e),uCn(this)}function $Pn(n,e){this.b=n,sW.call(this,n,e),fCn(this)}function NPn(){Bnn.call(this,bs,(u4(),T0n)),jOe(this)}function gQ(n){return!n.b&&(n.b=new XE(new PL)),n.b}function T2e(n){if(n.p!=3)throw M(new gu);return n.e}function C2e(n){if(n.p!=4)throw M(new gu);return n.e}function I2e(n){if(n.p!=4)throw M(new gu);return n.j}function S2e(n){if(n.p!=3)throw M(new gu);return n.j}function P2e(n){if(n.p!=6)throw M(new gu);return n.f}function O2e(n){if(n.p!=6)throw M(new gu);return n.k}function d0(n){return n.c==-2&&rle(n,iEe(n.g,n.b)),n.c}function T4(n,e){var t;return t=F$("",n),t.n=e,t.i=1,t}function $h(n,e){for(;e-- >0;)n=n<<1|(n<0?1:0);return n}function L2e(n,e){k$(u(e.b,68),n),_c(e.a,new dK(n))}function FPn(n,e){return yM(),new qZ(new oCn(n),new sCn(e))}function D2e(n,e,t){return xp(),t.Kg(n,u(e.jd(),149))}function $2e(n){return vf(n,MB),PT(Wi(Wi(5,n),n/10|0))}function pQ(n){return Dn(),n?n.Me():(b0(),b0(),lfn)}function Ke(n,e,t){return ki(e)?Er(n,e,t):fu(n.f,e,t)}function N2e(n){return String.fromCharCode.apply(null,n)}function xPn(n){return!n.d&&(n.d=new Q3(n.c.Bc())),n.d}function C4(n){return!n.a&&(n.a=new uEn(n.c.vc())),n.a}function BPn(n){return!n.b&&(n.b=new i4(n.c.ec())),n.b}function RPn(n,e){tde.call(this,Ame(Ce(n),Ce(e))),this.a=e}function vQ(n,e,t,i){t0.call(this,n,e),this.d=t,this.a=i}function qM(n,e,t,i){t0.call(this,n,t),this.a=e,this.f=i}function Ym(n){this.d=n,this.a=this.d.b,this.b=this.d.c}function JPn(){Bnn.call(this,Cd,(MEn(),nhe)),dLe(this)}function _Pn(){xr.call(this,"There is no more element.")}function xi(n,e){return ne(e,n.length),n.charCodeAt(e)}function GPn(n,e){n.u.Gc(($u(),Rl))&&nMe(n,e),qve(n,e)}function gc(n,e){return R(n)===R(e)||n!=null&&ct(n,e)}function gr(n,e){return g$(n.a,e)?n.b[u(e,23).g]:null}function qPn(n,e){var t;return t=new wc(n),Rn(e.c,t),t}function Zm(n){return n.j.c.length=0,kQ(n.c),p0e(n.a),n}function F2e(n){return!n.b&&(n.b=new Ln(be,n,4,7)),n.b}function I4(n){return!n.c&&(n.c=new Ln(be,n,5,8)),n.c}function mQ(n){return!n.c&&(n.c=new U(Vu,n,9,9)),n.c}function R$(n){return!n.n&&(n.n=new U(zr,n,1,7)),n.n}function Qe(n,e,t,i){return fxn(n,e,t,!1),sC(n,i),n}function HPn(n,e){IF(n,$(kl(e,"x")),$(kl(e,"y")))}function UPn(n,e){IF(n,$(kl(e,"x")),$(kl(e,"y")))}function x2e(){return pA(),I(C(zfe,1),z,557,0,[TH])}function B2e(){return vA(),I(C(Wfe,1),z,558,0,[CH])}function R2e(){return mA(),I(C(Vfe,1),z,559,0,[IH])}function J2e(){return gA(),I(C(gfe,1),z,550,0,[lH])}function _2e(){return wA(),I(C(can,1),z,480,0,[hH])}function G2e(){return bm(),I(C(Tan,1),z,531,0,[Vj])}function J$(){J$=x,MYn=new vz(I(C(Id,1),yI,45,0,[]))}function q2e(n,e){return new wOn(u(Ce(n),50),u(Ce(e),50))}function H2e(n){return n!=null&&hm(_O,n.toLowerCase())}function S4(n){return n.e==r6&&hle(n,o7e(n.g,n.b)),n.e}function ok(n){return n.f==r6&&ale(n,cye(n.g,n.b)),n.f}function Sg(n){var e;return e=n.b,!e&&(n.b=e=new n8n(n)),e}function kQ(n){var e;for(e=n.Jc();e.Ob();)e.Pb(),e.Qb()}function U2e(n,e,t){var i;i=u(n.d.Kb(t),163),i&&i.Nb(e)}function K2e(n,e){return ht(n.d.c+n.d.b/2,e.d.c+e.d.b/2)}function z2e(n,e){return ht(n.g.c+n.g.b/2,e.g.c+e.g.b/2)}function X2e(n,e){return bz(),ht((Gn(n),n),(Gn(e),e))}function Rc(n,e){return ea(n),new Pn(n,new vV(e,n.a))}function et(n,e){return ea(n),new Pn(n,new OV(e,n.a))}function Rb(n,e){return ea(n),new JX(n,new t$n(e,n.a))}function HM(n,e){return ea(n),new _X(n,new i$n(e,n.a))}function yQ(n,e){this.b=n,this.c=e,this.a=new rp(this.b)}function _$(n,e,t,i){this.a=n,this.e=e,this.d=t,this.c=i}function G$(n,e,t){this.a=rin,this.d=n,this.b=e,this.c=t}function UM(n,e,t,i){this.a=n,this.c=e,this.b=t,this.d=i}function jQ(n,e,t,i){this.c=n,this.b=e,this.a=t,this.d=i}function KPn(n,e,t,i){this.c=n,this.b=e,this.d=t,this.a=i}function zPn(n,e,t,i){this.a=n,this.d=e,this.c=t,this.b=i}function Ls(n,e,t,i){this.c=n,this.d=e,this.b=t,this.a=i}function Ap(n,e,t,i){pe.call(this,n,e),this.a=t,this.b=i}function XPn(n,e,t,i){Yxn.call(this,n,t,i,!1),this.f=e}function WPn(n,e){this.d=(Gn(n),n),this.a=16449,this.c=e}function QPn(n){this.a=new Z,this.e=J(Oe,Y,54,n,0,2)}function W2e(n){n.Tg("No crossing minimization",1),n.Ug()}function al(n){var e,t;return t=(e=new Qd,e),R4(t,n),t}function q$(n){var e,t;return t=(e=new Qd,e),_nn(t,n),t}function H$(n,e,t){var i,r;return i=Utn(n),r=e.qi(t,i),r}function U$(n){var e;return e=Tme(n),e||null}function VPn(n){return!n.b&&(n.b=new U(mt,n,12,3)),n.b}function P4(n){if(Ku(n.d),n.d.d!=n.c)throw M(new Lf)}function YPn(n,e,t,i){this.a=n,this.c=e,this.d=t,this.b=i}function ZPn(n,e,t,i){this.a=n,this.b=e,this.d=t,this.c=i}function nOn(n,e,t,i){this.a=n,this.b=e,this.c=t,this.d=i}function eOn(n,e,t,i){this.a=n,this.b=e,this.c=t,this.d=i}function Va(n,e,t,i){this.e=n,this.a=e,this.c=t,this.d=i}function tOn(n,e,t,i){$f(),r$n.call(this,e,t,i),this.a=n}function iOn(n,e,t,i){$f(),r$n.call(this,e,t,i),this.a=n}function rOn(n,e){this.a=n,t0e.call(this,n,u(n.d,16).dd(e))}function K$(n){this.f=n,this.c=this.f.e,n.f>0&&e_n(this)}function KM(n){return n.n&&(n.e!==qzn&&n.he(),n.j=null),n}function cOn(n){return _m(n==null||C$(n)&&n.Rm!==U2),n}function Q2e(n,e,t){return nn(n.a,(ex(e,t),new t0(e,t))),n}function V2e(n,e,t){gOe(n.a,t),j5e(t),BMe(n.b,t),xOe(e,t)}function Y2e(n,e){return ht(mu(n)*tf(n),mu(e)*tf(e))}function Z2e(n,e){return ht(mu(n)*tf(n),mu(e)*tf(e))}function npe(n){df();var e;e=u(n.g,9),e.n.a=n.d.c+e.d.b}function rf(n){n.a.a=n.c,n.c.b=n.a,n.a.b=n.c.a=null,n.b=0}function EQ(n,e){return n.b=e.b,n.c=e.c,n.d=e.d,n.a=e.a,n}function AQ(n){return oe(n.b0?$s(n):new Z}function tpe(n,e){return u(m(n,(X(),E3)),16).Ec(e),e}function ipe(n,e){return Sn(n,u(m(e,(en(),$w)),15),e)}function rpe(n){return L0(n)&&sn(fn(G(n,(en(),Dd))))}function Mp(n){var e;return e=n.f,e||(n.f=new o4(n,n.c))}function cpe(n,e,t){return dm(),g8e(u(zn(n.e,e),520),t)}function upe(n,e,t){n.i=0,n.e=0,e!=t&&Zxn(n,e,t)}function fpe(n,e,t){n.i=0,n.e=0,e!=t&&nBn(n,e,t)}function uOn(n,e,t,i){this.b=n,this.c=i,QA.call(this,e,t)}function fOn(n,e){this.g=n,this.d=I(C(Xh,1),w1,9,0,[e])}function sOn(n,e){n.d&&!n.d.a&&(Kyn(n.d,e),sOn(n.d,e))}function oOn(n,e){n.e&&!n.e.a&&(Kyn(n.e,e),oOn(n.e,e))}function hOn(n,e){return Jg(n.j,e.s,e.c)+Jg(e.e,n.s,n.c)}function spe(n){return u(n.jd(),149).Og()+":"+$r(n.kd())}function ope(n,e){return-ht(mu(n)*tf(n),mu(e)*tf(e))}function hpe(n,e){return uf(n),uf(e),Yjn(u(n,23),u(e,23))}function Ya(n,e,t){var i,r;i=e$(t),r=new _E(i),Ns(n,e,r)}function lpe(n){rA(),j.setTimeout(function(){throw n},0)}function lOn(n){this.b=new Z,Xt(this.b,this.b),this.a=n}function aOn(n){this.b=new l3n,this.a=n,j.Math.random()}function MQ(n,e){new dt,this.a=new _u,this.b=n,this.c=e}function dOn(n,e,t,i){Qz.call(this,e,t),this.b=n,this.a=i}function z$(n,e,t,i,r,c){Ek.call(this,n,e,t,i,r,c?-2:-1)}function bOn(){Ax(this,new qU),this.wb=(q1(),Kn),u4()}function TQ(){TQ=x,tZn=new Obn,rZn=new _W,iZn=new Lbn}function Dn(){Dn=x,nr=new obn,Kh=new lbn,DS=new sbn}function b0(){b0=x,hfn=new jU,m_=new jU,lfn=new dbn}function lt(n){return!n.q&&(n.q=new U(js,n,11,10)),n.q}function K(n){return!n.s&&(n.s=new U(bu,n,21,17)),n.s}function zM(n){return!n.a&&(n.a=new U(ye,n,10,11)),n.a}function XM(n,e){if(n==null)throw M(new np(e));return n}function wOn(n,e){xle.call(this,new A$(n)),this.a=n,this.b=e}function CQ(n){this.b=n,this.c=n,n.e=null,n.c=null,this.a=1}function IQ(n){return n&&n.hashCode?n.hashCode():f0(n)}function ape(n){return new tCn(n,n.e.Pd().gc()*n.c.Pd().gc())}function dpe(n){return new iCn(n,n.e.Pd().gc()*n.c.Pd().gc())}function X$(n){return D(n,18)?new Db(u(n,18)):Ywe(n.Jc())}function WM(n){return Dn(),D(n,59)?new _L(n):new cM(n)}function bpe(n){return Ce(n),pJn(new Hn(Qn(n.a.Jc(),new In)))}function W$(n,e){return e==null?!!jr(n.f,null):Pge(n.i,e)}function wpe(n,e){var t;return t=bX(n.a,e),t&&(e.d=null),t}function gOn(n,e,t){return n.f?n.f.cf(e,t):!1}function hk(n,e,t,i){qt(n.c[e.g],t.g,i),qt(n.c[t.g],e.g,i)}function Q$(n,e,t,i){qt(n.c[e.g],e.g,t),qt(n.b[e.g],e.g,i)}function gpe(n,e,t){return $(N(t.a))<=n&&$(N(t.b))>=e}function pOn(){this.d=new dt,this.b=new de,this.c=new Z}function vOn(){this.b=new Vt,this.d=new dt,this.e=new ZE}function SQ(){this.c=new Li,this.d=new Li,this.e=new Li}function w0(){this.a=new _u,this.b=(vf(3,ww),new Jc(3))}function mOn(n){this.c=n,this.b=new Xl(u(Ce(new Dbn),50))}function kOn(n){this.c=n,this.b=new Xl(u(Ce(new pwn),50))}function yOn(n){this.b=n,this.a=new Xl(u(Ce(new Zbn),50))}function n1(n,e){this.e=n,this.a=hi,this.b=VHn(e),this.c=e}function QM(n){this.c=n.c,this.d=n.d,this.b=n.b,this.a=n.a}function jOn(n,e,t,i,r,c){this.a=n,GN.call(this,e,t,i,r,c)}function EOn(n,e,t,i,r,c){this.a=n,GN.call(this,e,t,i,r,c)}function U1(n,e,t,i,r,c,f){return new bN(n.e,e,t,i,r,c,f)}function ppe(n,e,t){return t>=0&&Cn(n.substr(t,e.length),e)}function AOn(n,e){return D(e,149)&&Cn(n.b,u(e,149).Og())}function vpe(n,e){return n.a?e.Dh().Jc():u(e.Dh(),72).Gi()}function MOn(n,e){var t;return t=n.b.Oc(e),vDn(t,n.b.gc()),t}function lk(n,e){if(n==null)throw M(new np(e));return n}function Pr(n){return n.u||(qu(n),n.u=new VCn(n,n)),n.u}function O4(){O4=x;var n,e;e=!Q8e(),n=new o7,b_=e?new Q6:n}function iu(n){var e;return e=u(Vn(n,16),29),e||n.fi()}function VM(n,e){var t;return t=_a(n.Pm),e==null?t:t+": "+e}function ss(n,e,t){return Di(e,t,n.length),n.substr(e,t-e)}function TOn(n,e){hM.call(this),GV(this),this.a=n,this.c=e}function COn(){PD.call(this,"FIXED_INTEGER_RATIO_BOXES",2)}function mpe(){return fT(),I(C(hon,1),z,425,0,[TG,oon])}function kpe(){return hT(),I(C(Aon,1),z,428,0,[FG,NG])}function ype(){return Ok(),I(C(lln,1),z,426,0,[bq,wq])}function jpe(){return yT(),I(C(Bsn,1),z,427,0,[xsn,cG])}function Epe(){return Dk(),I(C(zsn,1),z,424,0,[bP,Ksn])}function Ape(){return Tk(),I(C(Qsn,1),z,479,0,[Wsn,gP])}function Mpe(){return Mo(),I(C(oce,1),z,512,0,[Bd,qo])}function Tpe(){return uh(),I(C(fce,1),z,513,0,[sb,j1])}function Cpe(){return uo(),I(C(Ace,1),z,519,0,[Gw,Ea])}function Ipe(){return u5(),I(C(nce,1),z,522,0,[p8,g8])}function Spe(){return g0(),I(C(Oce,1),z,457,0,[Aa,S2])}function Ppe(){return rT(),I(C(u1n,1),z,430,0,[xq,c1n])}function Ope(){return UT(),I(C(f1n,1),z,490,0,[uO,L2])}function Lpe(){return ET(),I(C(o1n,1),z,431,0,[s1n,qq])}function Dpe(){return yk(),I(C(uan,1),z,433,0,[aH,pO])}function $pe(){return bT(),I(C(Y1n,1),z,481,0,[uH,V1n])}function Npe(){return Gk(),I(C(Ian,1),z,432,0,[mO,Can])}function Fpe(){return $k(),I(C(Zfe,1),z,498,0,[PH,SH])}function xpe(){return oT(),I(C(Pan,1),z,389,0,[vH,San])}function Bpe(){return ST(),I(C(Afn,1),z,429,0,[O_,BS])}function Rpe(){return G4(),I(C(Jne,1),z,506,0,[kj,H_])}function YM(n,e,t,i){return t>=0?n.Rh(e,t,i):n.zh(null,t,i)}function ak(n){return n.b.b==0?n.a.uf():h$(n.b)}function Jpe(n){if(n.p!=5)throw M(new gu);return Le(n.f)}function _pe(n){if(n.p!=5)throw M(new gu);return Le(n.k)}function PQ(n){return R(n.a)===R((VN(),hU))&&fLe(n),n.a}function Gpe(n){n&&VM(n,n.ge())}function IOn(n,e){Xhe(this,new V(n.a,n.b)),Whe(this,ik(e))}function g0(){g0=x,Aa=new Bz(c3,0),S2=new Bz(u3,1)}function uh(){uh=x,sb=new $z(u3,0),j1=new $z(c3,1)}function qpe(n,e){n.c=e,n.c>0&&n.b>0&&(n.g=TM(n.c,n.b,n.a))}function Hpe(n,e){n.b=e,n.c>0&&n.b>0&&(n.g=TM(n.c,n.b,n.a))}function SOn(n){var e;e=n.c.d.b,n.b=e,n.a=n.c.d,e.a=n.c.d.b=n}function POn(n){return n.b==0?null:(oe(n.b!=0),Rf(n,n.a.a))}function Cc(n,e){return e==null?Br(jr(n.f,null)):vm(n.i,e)}function OOn(n,e,t,i,r){return new Tx(n,(x4(),E_),e,t,i,r)}function ZM(n,e){return kDn(e),lme(n,J(Oe,ze,30,e,15,1),e)}function nT(n,e){return XM(n,"set1"),XM(e,"set2"),new bAn(n,e)}function Upe(n,e){var t=d_[n.charCodeAt(0)];return t??n}function LOn(n,e){var t,i;return t=e,i=new QO,xKn(n,t,i),i.d}function V$(n,e,t,i){var r;r=new iIn,e.a[t.g]=r,jp(n.b,i,r)}function Kpe(n,e){var t;return t=fme(n.f,e),ft(sM(t),n.f.d)}function n5(n){var e;mme(n.a),OTn(n.a),e=new HE(n.a),EZ(e)}function zpe(n,e){JHn(n,!0),_c(n.e.Pf(),new aW(n,!0,e))}function DOn(n){this.a=u(Ce(n),279),this.b=(Dn(),new TX(n))}function $On(n,e,t){this.i=new Z,this.b=n,this.g=e,this.a=t}function eT(n,e,t){this.c=new Z,this.e=n,this.f=e,this.b=t}function OQ(n,e,t){this.a=new Z,this.e=n,this.f=e,this.c=t}function Y$(n,e,t){it(),Wd.call(this,n),this.b=e,this.a=t}function LQ(n,e,t){$f(),zE.call(this,e),this.a=n,this.b=t}function NOn(n){hM.call(this),GV(this),this.a=n,this.c=!0}function p0(){Ble.call(this,new ip(Vb(12))),vX(!0),this.a=2}function Mo(){Mo=x,Bd=new Nz(iR,0),qo=new Nz("UP",1)}function Jb(n){return n.Db>>16!=3?null:u(n.Cb,19)}function To(n){return n.Db>>16!=9?null:u(n.Cb,19)}function FOn(n){return n.Db>>16!=6?null:u(n.Cb,74)}function Xpe(n){if(n.ye())return null;var e=n.n;return CS[e]}function Wpe(n){function e(){}return e.prototype=n||{},new e}function xOn(n){var e;return e=new fA(Vb(n.length)),NY(e,n),e}function dk(n,e){var t;t=n.q.getHours(),n.q.setDate(e),Q5(n,t)}function DQ(n,e,t){var i;i=n.Fh(e),i>=0?n.$h(i,t):Fen(n,e,t)}function Pg(n,e,t){tT(),n&&Ke(fU,n,e),n&&Ke(EE,n,t)}function Qpe(n,e){return ml(),u(m(e,(Vr(),Th)),15).a==n}function Vpe(n,e){return wM(),_n(),u(e.b,15).a=0?n.Th(t):Lx(n,e)}function Z$(n,e,t){var i;i=Wxn(n,e,t),n.b=new XT(i.c.length)}function _On(n){this.a=n,this.b=J(Vre,Y,2022,n.e.length,0,2)}function GOn(){this.a=new Ih,this.e=new Vt,this.g=0,this.i=0}function qOn(n,e){nM(this),this.f=e,this.g=n,KM(this),this.he()}function nN(n,e){return j.Math.abs(n)0}function $Q(n){var e;return e=n.d,e=n._i(n.f),Ee(n,e),e.Ob()}function HOn(n,e){var t;return t=new JW(e),P_n(t,n),new Ou(t)}function e3e(n){if(n.p!=0)throw M(new gu);return Pm(n.f,0)}function t3e(n){if(n.p!=0)throw M(new gu);return Pm(n.k,0)}function UOn(n){return n.Db>>16!=7?null:u(n.Cb,244)}function L4(n){return n.Db>>16!=6?null:u(n.Cb,244)}function NQ(n){return n.Db>>16!=7?null:u(n.Cb,176)}function It(n){return n.Db>>16!=11?null:u(n.Cb,19)}function _b(n){return n.Db>>16!=17?null:u(n.Cb,29)}function KOn(n){return n.Db>>16!=3?null:u(n.Cb,159)}function FQ(n){var e;return ea(n),e=new Vt,et(n,new H8n(e))}function zOn(n,e){var t=n.a=n.a||[];return t[e]||(t[e]=n.te(e))}function i3e(n,e){var t;t=n.q.getHours(),n.q.setMonth(e),Q5(n,t)}function Gi(n,e){n.c&&ru(n.c.g,n),n.c=e,n.c&&nn(n.c.g,n)}function Ti(n,e){n.d&&ru(n.d.e,n),n.d=e,n.d&&nn(n.d.e,n)}function li(n,e){n.c&&ru(n.c.a,n),n.c=e,n.c&&nn(n.c.a,n)}function Jr(n,e){n.i&&ru(n.i.j,n),n.i=e,n.i&&nn(n.i.j,n)}function Er(n,e,t){return e==null?fu(n.f,null,t):T0(n.i,e,t)}function e5(n,e,t,i,r,c){return new pl(n.e,e,n.Jj(),t,i,r,c)}function r3e(n){return pF(),_n(),u(n.a,84).d.e!=0}function XOn(){XOn=x,EYn=me((eA(),I(C(jYn,1),z,541,0,[h_])))}function WOn(){WOn=x,Lre=Bc(new Kt,(Ei(),ar),(Ii(),v3))}function QOn(){QOn=x,Dre=Bc(new Kt,(Ei(),ar),(Ii(),v3))}function VOn(){VOn=x,$re=Bc(new Kt,(Ei(),ar),(Ii(),v3))}function xQ(){xQ=x,Nre=Bc(new Kt,(Ei(),ar),(Ii(),v3))}function YOn(){YOn=x,xre=Bc(new Kt,(Ei(),ar),(Ii(),v3))}function BQ(){BQ=x,Bre=Bc(new Kt,(Ei(),ar),(Ii(),v3))}function ZOn(){ZOn=x,tce=xe(new Kt,(Ei(),ar),(Ii(),q9))}function wf(){wf=x,cce=xe(new Kt,(Ei(),ar),(Ii(),q9))}function nLn(){nLn=x,uce=xe(new Kt,(Ei(),ar),(Ii(),q9))}function eN(){eN=x,lce=xe(new Kt,(Ei(),ar),(Ii(),q9))}function eLn(){eLn=x,uue=Bc(new Kt,(Gp(),m8),(X5(),Iln))}function tT(){tT=x,fU=new de,EE=new de,oae(GYn,new N6n)}function tLn(n,e,t){this.a=e,this.c=n,this.b=(Ce(t),new Ou(t))}function iLn(n,e,t){this.a=e,this.c=n,this.b=(Ce(t),new Ou(t))}function rLn(n,e){this.a=n,this.c=Xi(this.a),this.b=new QM(e)}function Za(n,e,t,i){this.c=n,this.d=i,iN(this,e),rN(this,t)}function Tp(n){this.c=new dt,this.b=n.b,this.d=n.c,this.a=n.a}function tN(n){this.a=j.Math.cos(n),this.b=j.Math.sin(n)}function iN(n,e){n.a&&ru(n.a.k,n),n.a=e,n.a&&nn(n.a.k,n)}function rN(n,e){n.b&&ru(n.b.f,n),n.b=e,n.b&&nn(n.b.f,n)}function cLn(n,e){m2e(n,n.b,n.c),u(n.b.b,68),e&&u(e.b,68).b}function c3e(n,e){dZ(n,e),D(n.Cb,89)&&fw(qu(u(n.Cb,89)),2)}function cN(n,e){D(n.Cb,89)&&fw(qu(u(n.Cb,89)),4),Gc(n,e)}function iT(n,e){D(n.Cb,187)&&(u(n.Cb,187).tb=null),Gc(n,e)}function uLn(n,e){var t;return t=u(Zb(Mp(n.a),e),18),t?t.gc():0}function u3e(n,e){var t,i;t=e.c,i=t!=null,i&&Ep(n,new Bb(e.c))}function fLn(n){var e,t;return t=(u4(),e=new Qd,e),R4(t,n),t}function sLn(n){var e,t;return t=(u4(),e=new Qd,e),R4(t,n),t}function oLn(n){for(var e;;)if(e=n.Pb(),!n.Ob())return e}function Ic(n,e){return rr(),NN(e)?new jM(e,n):new G7(e,n)}function f3e(n,e){return ht(u(n.c,65).c.e.b,u(e.c,65).c.e.b)}function s3e(n,e){return ht(u(n.c,65).c.e.a,u(e.c,65).c.e.a)}function hLn(n,e,t){return new Tx(n,(x4(),A_),e,t,null,!1)}function lLn(n,e,t){return new Tx(n,(x4(),j_),null,!1,e,t)}function bk(n){return dh(),Pc(n,0)>=0?ta(n):Xm(ta(i1(n)))}function o3e(){return Gf(),I(C(hu,1),z,132,0,[pfn,ou,vfn])}function h3e(){return so(),I(C(jw,1),z,240,0,[nc,Kc,ec])}function l3e(){return Du(),I(C(sZn,1),z,464,0,[Eh,ga,qs])}function a3e(){return cu(),I(C(hZn,1),z,465,0,[wo,pa,Hs])}function d3e(n,e){VTn(n,Le(yi(o0(e,24),MI)),Le(yi(e,MI)))}function Gb(n,e){if(n<0||n>e)throw M(new xc(din+n+bin+e))}function kn(n,e){if(n<0||n>=e)throw M(new xc(din+n+bin+e))}function ne(n,e){if(n<0||n>=e)throw M(new XK(din+n+bin+e))}function On(n,e){this.b=(Gn(n),n),this.a=(e&gw)==0?e|64|wh:e}function fh(n,e,t){GBn(e,t,n.gc()),this.c=n,this.a=e,this.b=t-e}function aLn(n,e,t){var i;GBn(e,t,n.c.length),i=t-e,uz(n.c,e,i)}function b3e(n,e,t){var i;i=new zi(t.d),ft(i,n),IF(e,i.a,i.b)}function RQ(n){var e;return ea(n),e=(b0(),b0(),m_),OT(n,e)}function Og(n){return dm(),D(n.g,9)?u(n.g,9):null}function Co(n){return Gr(I(C(vi,1),Y,8,0,[n.i.n,n.n,n.a]))}function w3e(){return s5(),I(C(Rfn,1),z,385,0,[N_,$_,F_])}function g3e(){return V1(),I(C(MG,1),z,330,0,[Tj,son,Sw])}function p3e(){return vl(),I(C(Tee,1),z,316,0,[Cj,m2,m3])}function v3e(){return K4(),I(C(AG,1),z,303,0,[jG,EG,Mj])}function m3e(){return xT(),I(C(qsn,1),z,351,0,[Gsn,dP,uG])}function k3e(){return od(),I(C(pee,1),z,452,0,[bG,p6,p2])}function y3e(){return fr(),I(C(Mre,1),z,455,0,[d8,xu,zc])}function j3e(){return YT(),I(C(bln,1),z,382,0,[aln,gq,dln])}function E3e(){return k5(),I(C(wln,1),z,349,0,[vq,pq,Jj])}function A3e(){return Y4(),I(C(pln,1),z,350,0,[mq,gln,b8])}function M3e(){return y5(),I(C(eln,1),z,353,0,[fq,nln,UP])}function T3e(){return FT(),I(C(kln,1),z,352,0,[mln,kq,vln])}function C3e(){return ZT(),I(C(yln,1),z,383,0,[yq,S6,_w])}function I3e(){return v5(),I(C(Bln,1),z,386,0,[xln,Aq,qj])}function S3e(){return zk(),I(C(a1n,1),z,387,0,[fO,h1n,l1n])}function P3e(){return dC(),I(C($1n,1),z,388,0,[D1n,tH,L1n])}function O3e(){return A0(),I(C(Q_,1),z,369,0,[nb,va,Z0])}function L3e(){return fC(),I(C(ran,1),z,435,0,[tan,ian,sH])}function D3e(){return AT(),I(C(ean,1),z,434,0,[fH,nan,Z1n])}function $3e(){return Vk(),I(C(oH,1),z,440,0,[bO,wO,gO])}function N3e(){return vC(),I(C(O1n,1),z,441,0,[A8,hO,Wq])}function F3e(){return QT(),I(C(P1n,1),z,304,0,[Xq,S1n,I1n])}function x3e(){return h5(),I(C(Qdn,1),z,301,0,[lE,YH,Wdn])}function B3e(){return Po(),I(C(Ldn,1),z,281,0,[J6,Vw,_6])}function R3e(){return Bp(),I(C(Zdn,1),z,283,0,[Ydn,Zw,NO])}function J3e(){return jl(),I(C(Hdn,1),z,348,0,[SO,M1,_8])}function gf(n){it(),Wd.call(this,n),this.c=!1,this.a=!1}function dLn(n,e,t){Wd.call(this,25),this.b=n,this.a=e,this.c=t}function JQ(n,e){Fle.call(this,new ip(Vb(n))),vf(e,xzn),this.a=e}function _3e(n,e){var t;return t=(Gn(n),n).g,LX(!!t),Gn(e),t(e)}function bLn(n,e){var t,i;return i=E4(n,e),t=n.a.dd(i),new aAn(n,t)}function G3e(n,e,t){var i;return i=Z5(n,e,!1),i.b<=e&&i.a<=t}function wLn(n,e,t){var i;i=new x3n,i.b=e,i.a=t,++e.b,nn(n.d,i)}function rT(){rT=x,xq=new Rz("DFS",0),c1n=new Rz("BFS",1)}function q3e(n){if(n.p!=2)throw M(new gu);return Le(n.f)&ri}function H3e(n){if(n.p!=2)throw M(new gu);return Le(n.k)&ri}function U3e(n){return n.Db>>16!=6?null:u(Nx(n),244)}function E(n){return oe(n.ai?1:0}function t4e(n,e){var t;t=u(zn(n.g,e),60),_c(e.d,new ZAn(n,t))}function pLn(n,e){var t;for(t=n+"";t.length0&&n.a[--n.d]==0;);n.a[n.d++]==0&&(n.e=0)}function $Ln(n){return n.a?n.e.length==0?n.a.a:n.a.a+(""+n.e):n.c}function NLn(n){return oe(n.b.b!=n.d.a),n.c=n.b=n.b.b,--n.a,n.c.c}function FLn(n,e){var t;return t=1-e,n.a[t]=HT(n.a[t],t),HT(n,e)}function xLn(n,e){var t,i;return i=yi(n,or),t=Lh(e,32),sh(t,i)}function s4e(n,e,t){var i;return i=u(n.Zb().xc(e),18),!!i&&i.Gc(t)}function BLn(n,e,t){var i;return i=u(n.Zb().xc(e),18),!!i&&i.Kc(t)}function RLn(n,e,t){var i;i=(Ce(n),new Ou(n)),Kke(new tLn(i,e,t))}function gk(n,e,t){var i;i=(Ce(n),new Ou(n)),zke(new iLn(i,e,t))}function JLn(){JLn=x,Eln=FPn(W(1),W(4)),jln=FPn(W(1),W(2))}function _Ln(n){QN.call(this,n,(x4(),y_),null,!1,null,!1)}function GLn(n,e){Wa.call(this,1,2,I(C(Oe,1),ze,30,15,[n,e]))}function Ci(n,e){this.a=n,Y6.call(this,n),Gb(e,n.gc()),this.b=e}function qLn(n,e){var t;n.e=new JK,t=ow(e),si(t,n.c),IHn(n,t,0)}function o4e(n,e,t){n.a=e,n.c=t,n.b.a.$b(),rf(n.d),kb(n.e.a.c,0)}function Ot(n,e,t,i){var r;r=new xU,r.a=e,r.b=t,r.c=i,_e(n.a,r)}function Q(n,e,t,i){var r;r=new xU,r.a=e,r.b=t,r.c=i,_e(n.b,r)}function HLn(n,e,t,i){return n.a+=""+ss(e==null?su:$r(e),t,i),n}function Wr(n,e,t,i,r,c){return fxn(n,e,t,c),cZ(n,i),uZ(n,r),n}function zQ(){var n,e,t;return e=(t=(n=new Qd,n),t),nn(F0n,e),e}function pk(n,e){if(n<0||n>=e)throw M(new xc(DAe(n,e)));return n}function ULn(n,e,t){if(n<0||et)throw M(new xc(nAe(n,e,t)))}function h4e(n){if(!("stack"in n))try{throw n}catch{}return n}function l4e(n){return Sg(n).dc()?!1:(Uae(n,new is),!0)}function td(n){var e;return Lr(n)?(e=n,e==-0?0:e):S6e(n)}function KLn(n,e){return D(e,45)?ix(n.a,u(e,45)):!1}function zLn(n,e){return D(e,45)?ix(n.a,u(e,45)):!1}function XLn(n,e){return D(e,45)?ix(n.a,u(e,45)):!1}function a4e(n,e){return Dp(),u(m(e,(Vr(),P2)),15).a>=n.gc()}function d4e(n){return wf(),!Ri(n)&&!(!Ri(n)&&n.c.i.c==n.d.i.c)}function oh(n){return u(Oo(n,J(h6,Hv,17,n.c.length,0,1)),324)}function cT(n){return new Jc((vf(n,MB),PT(Wi(Wi(5,n),n/10|0))))}function b4e(n,e){return new s$(e,DCn(Xi(e.e),n,n),(_n(),!0))}function w4e(n){return d$(n.e.Pd().gc()*n.c.Pd().gc(),273,new t8n(n))}function WLn(n){return u(Oo(n,J(xne,NXn,12,n.c.length,0,1)),2021)}function QLn(n){this.a=J(hi,Bn,1,DY(j.Math.max(8,n))<<1,5,1)}function XQ(n){var e;return H1(n),e=new bbn,bg(n.a,new _8n(e)),e}function uT(n){var e;return H1(n),e=new wbn,bg(n.a,new G8n(e)),e}function g4e(n,e){return n.a<=n.b?(e.Bd(n.a++),!0):!1}function p4e(n,e,t){n.d&&ru(n.d.e,n),n.d=e,n.d&&Ua(n.d.e,t,n)}function WQ(n,e,t){this.d=new ekn(this),this.e=n,this.i=e,this.f=t}function fT(){fT=x,TG=new Oz(Nv,0),oon=new Oz("TOP_LEFT",1)}function VLn(){VLn=x,wfe=me((wA(),I(C(can,1),z,480,0,[hH])))}function YLn(){YLn=x,pfe=me((gA(),I(C(gfe,1),z,550,0,[lH])))}function ZLn(){ZLn=x,Nfe=me((bm(),I(C(Tan,1),z,531,0,[Vj])))}function nDn(){nDn=x,Xfe=me((pA(),I(C(zfe,1),z,557,0,[TH])))}function eDn(){eDn=x,Qfe=me((vA(),I(C(Wfe,1),z,558,0,[CH])))}function tDn(){tDn=x,Yfe=me((mA(),I(C(Vfe,1),z,559,0,[IH])))}function v4e(n){cRn((!n.a&&(n.a=new U(ye,n,10,11)),n.a),new vvn)}function i5(n,e){A$e(e,n),TW(n.d),TW(u(m(n,(en(),BP)),216))}function hN(n,e){M$e(e,n),MW(n.d),MW(u(m(n,(en(),BP)),216))}function v0(n,e){var t,i;return t=dl(n,e),i=null,t&&(i=t.ne()),i}function r5(n,e){var t,i;return t=dl(n,e),i=null,t&&(i=t.qe()),i}function D4(n,e){var t,i;return t=Kb(n,e),i=null,t&&(i=t.qe()),i}function bl(n,e){var t,i;return t=dl(n,e),i=null,t&&(i=Xnn(t)),i}function m4e(n,e,t){var i;return i=fv(t),sI(n.n,i,e),sI(n.o,e,t),e}function k4e(n,e,t){var i;i=g7e();try{return d0e(n,e,t)}finally{kve(i)}}function iDn(n,e,t,i){return D(t,59)?new yCn(n,e,t,i):new XW(n,e,t,i)}function QQ(n,e,t,i){this.d=n,this.n=e,this.g=t,this.o=i,this.p=-1}function rDn(n,e,t,i){this.e=null,this.c=n,this.d=e,this.a=t,this.b=i}function cDn(n){var e;e=n.Dh(),this.a=D(e,72)?u(e,72).Gi():e.Jc()}function y4e(n){return new On(cme(u(n.a.kd(),18).gc(),n.a.jd()),16)}function qb(n){return D(n,18)?u(n,18).dc():!n.Jc().Ob()}function uDn(n){if(n.e.g!=n.b)throw M(new Lf);return!!n.c&&n.d>0}function je(n){return oe(n.b!=n.d.c),n.c=n.b,n.b=n.b.a,++n.a,n.c.c}function VQ(n,e){Gn(e),qt(n.a,n.c,e),n.c=n.c+1&n.a.length-1,$Jn(n)}function K1(n,e){Gn(e),n.b=n.b-1&n.a.length-1,qt(n.a,n.b,e),$Jn(n)}function YQ(n,e){var t;return t=u(So(n.b,e),66),!t&&(t=new dt),t}function j4e(n,e){var t;t=e.a,Gi(t,e.c.d),Ti(t,e.d.d),Wb(t.a,n.n)}function fDn(n,e){return u(Zu(Nb(u(ot(n.k,e),16).Mc(),b2)),114)}function sDn(n,e){return u(Zu(kp(u(ot(n.k,e),16).Mc(),b2)),114)}function E4e(){return z4(),I(C(Mne,1),z,413,0,[Y0,Aw,Ew,a2])}function A4e(){return M0(),I(C(NZn,1),z,414,0,[gj,wj,S_,P_])}function M4e(){return x4(),I(C($S,1),z,310,0,[y_,j_,E_,A_])}function T4e(){return _p(),I(C(qfn,1),z,384,0,[_9,Gfn,__,G_])}function C4e(){return eC(),I(C(Hne,1),z,368,0,[X_,fP,sP,yj])}function I4e(){return Bs(),I(C(eee,1),z,418,0,[Cw,a6,d6,W_])}function S4e(){return ld(),I(C(Wre,1),z,409,0,[_j,w8,QP,WP])}function P4e(){return iw(),I(C(oq,1),z,205,0,[KP,sq,I2,C2])}function O4e(){return Al(),I(C(hln,1),z,270,0,[ja,oln,aq,dq])}function L4e(){return I5(),I(C(_sn,1),z,302,0,[U9,Rsn,Ej,Jsn])}function D4e(){return m5(),I(C(r1n,1),z,354,0,[Fq,cO,Nq,$q])}function $4e(){return OC(),I(C(C1n,1),z,355,0,[zq,M1n,T1n,A1n])}function N4e(){return GC(),I(C(xue,1),z,406,0,[Zq,Qq,Yq,Vq])}function F4e(){return Gp(),I(C(Tln,1),z,402,0,[nO,v8,m8,k8])}function x4e(){return NC(),I(C(Oan,1),z,396,0,[kH,yH,jH,EH])}function B4e(){return Z4(),I(C(Odn,1),z,280,0,[cE,IO,Sdn,Pdn])}function R4e(){return El(),I(C(QH,1),z,225,0,[WH,uE,G6,R3])}function J4e(){return kf(),I(C(Xse,1),z,293,0,[sE,Qh,Ca,fE])}function _4e(){return of(),I(C(K8,1),z,381,0,[dE,qd,aE,Yw])}function G4e(){return lT(),I(C(gE,1),z,290,0,[n0n,t0n,nU,e0n])}function q4e(){return bC(),I(C(u0n,1),z,327,0,[eU,i0n,c0n,r0n])}function H4e(){return tC(),I(C(aoe,1),z,412,0,[tU,s0n,f0n,o0n])}function U4e(n){var e;return n.j==(tn(),le)&&(e=wqn(n),vu(e,te))}function oDn(n,e){var t;for(t=n.j.c.length;t0&&kc(n.g,0,e,0,n.i),e}function Ip(n){return dm(),D(n.g,157)?u(n.g,157):null}function X4e(n){return tT(),Tc(fU,n)?u(zn(fU,n),343).Pg():null}function Ff(n,e,t){return e<0?Lx(n,t):u(t,69).uk().zk(n,n.ei(),e)}function W4e(n,e){return lp(new V(e.e.a+e.f.a/2,e.e.b+e.f.b/2),n)}function aDn(n,e){return R(e)===R(n)?"(this Map)":e==null?su:$r(e)}function dDn(n,e){kA();var t;return t=u(zn(JO,n),58),!t||t.dk(e)}function Q4e(n){if(n.p!=1)throw M(new gu);return Le(n.f)<<24>>24}function V4e(n){if(n.p!=1)throw M(new gu);return Le(n.k)<<24>>24}function Y4e(n){if(n.p!=7)throw M(new gu);return Le(n.k)<<16>>16}function Z4e(n){if(n.p!=7)throw M(new gu);return Le(n.f)<<16>>16}function Lg(n,e){return e.e==0||n.e==0?F9:(kv(),Bx(n,e))}function nve(n,e,t){if(t){var i=t.me();n.a[e]=i(t)}else delete n.a[e]}function bDn(n,e){var t;return t=new tp,n.Ed(t),t.a+="..",e.Fd(t),t.a}function co(n){var e;for(e=0;n.Ob();)n.Pb(),e=Wi(e,1);return PT(e)}function eve(n,e,t){var i;i=u(zn(n.g,t),60),nn(n.a.c,new Yi(e,i))}function tve(n,e,t,i,r){var c;c=ETe(r,t,i),nn(e,MAe(r,c)),vEe(n,r,e)}function wDn(n,e,t){n.i=0,n.e=0,e!=t&&(nBn(n,e,t),Zxn(n,e,t))}function ive(n){n.a=null,n.e=null,kb(n.b.c,0),kb(n.f.c,0),n.c=null}function rve(n,e){return u(e==null?Br(jr(n.f,null)):vm(n.i,e),291)}function cve(n,e,t){return E$(N(Br(jr(n.f,e))),N(Br(jr(n.f,t))))}function sT(n,e,t){return hI(n,e,t,D(e,104)&&(u(e,20).Bb&Zi)!=0)}function uve(n,e,t){return Ev(n,e,t,D(e,104)&&(u(e,20).Bb&Zi)!=0)}function fve(n,e,t){return bTe(n,e,t,D(e,104)&&(u(e,20).Bb&Zi)!=0)}function nV(n,e){return n==(Xn(),xt)&&e==xt?4:n==xt||e==xt?8:32}function gDn(n,e){SQ.call(this),this.a=n,this.b=e,nn(this.a.b,this)}function Hb(n,e){it(),Wd.call(this,n),this.a=e,this.c=-1,this.b=-1}function eV(n,e,t,i,r){this.i=n,this.a=e,this.e=t,this.j=i,this.f=r}function wl(n,e){dh(),Wa.call(this,n,1,I(C(Oe,1),ze,30,15,[e]))}function Nh(n,e){rr();var t;return t=u(n,69).tk(),OEe(t,e),t.vl(e)}function pDn(n,e){var t;for(t=e;t;)Sb(n,t.i,t.j),t=It(t);return n}function vDn(n,e){var t;for(t=0;t"+GQ(n.d):"e_"+f0(n)}function yDn(n){D(n,209)&&!sn(fn(n.mf((Me(),AO))))&&TPe(u(n,19))}function iV(n){n.b!=n.c&&(n.a=J(hi,Bn,1,8,5,1),n.b=0,n.c=0)}function id(n,e,t){this.e=n,this.a=hi,this.b=VHn(e),this.c=e,this.d=t}function Ub(n,e,t,i){kLn.call(this,1,t,i),this.c=n,this.b=e}function dN(n,e,t,i){yLn.call(this,1,t,i),this.c=n,this.b=e}function bN(n,e,t,i,r,c,f){GN.call(this,e,i,r,c,f),this.c=n,this.a=t}function wN(n){this.e=n,this.c=this.e.a,this.b=this.e.g,this.d=this.e.i}function jDn(n){this.c=n,this.a=u(ls(n),160),this.b=this.a.hk().ti()}function hve(n,e){return Wl(),Ee(K(n.a),e)}function lve(n,e){return Wl(),Ee(K(n.a),e)}function oT(){oT=x,vH=new Uz("STRAIGHT",0),San=new Uz("BEND",1)}function u5(){u5=x,p8=new Fz("UPPER",0),g8=new Fz("LOWER",1)}function hT(){hT=x,FG=new Lz(lo,0),NG=new Lz("ALTERNATING",1)}function lT(){lT=x,n0n=new gSn,t0n=new nPn,nU=new COn,e0n=new ePn}function aT(n){var e;return n?new JW(n):(e=new Ih,WN(e,n),e)}function ave(n,e){var t;for(t=n.d-1;t>=0&&n.a[t]===e[t];t--);return t<0}function dve(n,e){var t;return kDn(e),t=n.slice(0,e),t.length=e,PN(t,n)}function Lu(n,e){var t;return e.b.Kb(ENn(n,e.c.Ve(),(t=new K8n(e),t)))}function dT(n){Lnn(),VTn(this,Le(yi(o0(n,24),MI)),Le(yi(n,MI)))}function EDn(){EDn=x,UZn=me((ST(),I(C(Afn,1),z,429,0,[O_,BS])))}function ADn(){ADn=x,_ne=me((G4(),I(C(Jne,1),z,506,0,[kj,H_])))}function MDn(){MDn=x,gee=me((Dk(),I(C(zsn,1),z,424,0,[bP,Ksn])))}function TDn(){TDn=x,aee=me((yT(),I(C(Bsn,1),z,427,0,[xsn,cG])))}function CDn(){CDn=x,kee=me((Tk(),I(C(Qsn,1),z,479,0,[Wsn,gP])))}function IDn(){IDn=x,Iee=me((fT(),I(C(hon,1),z,425,0,[TG,oon])))}function SDn(){SDn=x,Oee=me((hT(),I(C(Aon,1),z,428,0,[FG,NG])))}function PDn(){PDn=x,Are=me((Ok(),I(C(lln,1),z,426,0,[bq,wq])))}function ODn(){ODn=x,ece=me((u5(),I(C(nce,1),z,522,0,[p8,g8])))}function LDn(){LDn=x,sce=me((uh(),I(C(fce,1),z,513,0,[sb,j1])))}function DDn(){DDn=x,hce=me((Mo(),I(C(oce,1),z,512,0,[Bd,qo])))}function $Dn(){$Dn=x,Mce=me((uo(),I(C(Ace,1),z,519,0,[Gw,Ea])))}function NDn(){NDn=x,Lce=me((g0(),I(C(Oce,1),z,457,0,[Aa,S2])))}function FDn(){FDn=x,cue=me((rT(),I(C(u1n,1),z,430,0,[xq,c1n])))}function xDn(){xDn=x,hue=me((UT(),I(C(f1n,1),z,490,0,[uO,L2])))}function BDn(){BDn=x,due=me((ET(),I(C(o1n,1),z,431,0,[s1n,qq])))}function bT(){bT=x,uH=new Gz(Pin,0),V1n=new Gz("TARGET_WIDTH",1)}function RDn(){RDn=x,ofe=me((bT(),I(C(Y1n,1),z,481,0,[uH,V1n])))}function JDn(){JDn=x,vfe=me((yk(),I(C(uan,1),z,433,0,[aH,pO])))}function _Dn(){_Dn=x,Ffe=me((Gk(),I(C(Ian,1),z,432,0,[mO,Can])))}function GDn(){GDn=x,xfe=me((oT(),I(C(Pan,1),z,389,0,[vH,San])))}function qDn(){qDn=x,nse=me(($k(),I(C(Zfe,1),z,498,0,[PH,SH])))}function bve(){return ii(),I(C(R8,1),z,87,0,[Xo,Or,Ir,zo,Vf])}function wve(){return tn(),I(C(er,1),ac,64,0,[Kr,Yn,te,le,Zn])}function gve(n){return(n.k==(Xn(),xt)||n.k==ei)&&ut(n,(X(),W9))}function pve(n,e,t){return u(e==null?fu(n.f,null,t):T0(n.i,e,t),291)}function rV(n,e,t){n.a.c.length=0,aLe(n,e,t),n.a.c.length==0||xSe(n,e)}function Dt(n,e,t,i){var r;r=new WO,r.c=e,r.b=t,r.a=i,i.b=t.a=r,++n.b}function cV(n,e){var t,i;for(t=e,i=0;t>0;)i+=n.a[t],t-=t&-t;return i}function HDn(n,e){var t;for(t=e;t;)Sb(n,-t.i,-t.j),t=It(t);return n}function vve(n,e){var t,i;i=!1;do t=_xn(n,e),i=i|t;while(t);return i}function Bi(n,e){var t,i;for(Gn(e),i=n.Jc();i.Ob();)t=i.Pb(),e.Ad(t)}function UDn(n,e){var t,i;return t=e.jd(),i=n.De(t),!!i&&gc(i.e,e.kd())}function KDn(n,e){var t;return t=e.jd(),new t0(t,n.e.pc(t,u(e.kd(),18)))}function mve(n,e){var t;return t=n.a.get(e),t??J(hi,Bn,1,0,5,1)}function cf(n,e,t){var i;return i=(kn(e,n.c.length),n.c[e]),n.c[e]=t,i}function zDn(n,e){this.c=0,this.b=e,uTn.call(this,n,17493),this.a=this.c}function uV(n){this.d=n,this.b=this.d.a.entries(),this.a=this.b.next()}function z1(){de.call(this),ECn(this),this.d.b=this.d,this.d.a=this.d}function gN(n){wT(),!_o&&(this.c=n,this.e=!0,this.a=new Z)}function XDn(n){Azn(),Xyn(this),this.a=new dt,_Y(this,n),_e(this.a,n)}function WDn(){xD(this),this.b=new V($t,$t),this.a=new V(di,di)}function fV(n){W1e.call(this,n==null?su:$r(n),D(n,81)?u(n,81):null)}function kve(n){n&&F6e((HK(),qun)),--IS,n&&SS!=-1&&(lae(SS),SS=-1)}function vk(n){n.i=0,S7(n.b,null),S7(n.c,null),n.a=null,n.e=null,++n.g}function wT(){wT=x,_o=!0,WYn=!1,QYn=!1,YYn=!1,VYn=!1}function Ri(n){return!n.c||!n.d?!1:!!n.c.i&&n.c.i==n.d.i}function sV(n,e){return D(e,144)?Cn(n.c,u(e,144).c):!1}function pN(n,e){var t;return t=u(So(n.d,e),21),t||u(So(n.e,e),21)}function Dg(n,e){return(ea(n),f4(new Pn(n,new OV(e,n.a)))).zd(w3)}function yve(){return Ei(),I(C(Jfn,1),z,364,0,[Us,zh,jc,Ec,ar])}function jve(){return JC(),I(C(lue,1),z,365,0,[_q,Bq,Gq,Rq,Jq])}function Eve(){return rw(),I(C(iee,1),z,372,0,[jj,lP,aP,hP,oP])}function Ave(){return H5(),I(C(afe,1),z,370,0,[D2,L3,P8,S8,Qj])}function Mve(){return ay(),I(C(han,1),z,331,0,[fan,dH,oan,bH,san])}function Tve(){return O5(),I(C(iln,1),z,329,0,[tln,hq,lq,h8,l8])}function Cve(){return ff(),I(C(Eon,1),z,166,0,[Oj,Y9,$l,Z9,Ld])}function Ive(){return Lo(),I(C(Ho,1),z,161,0,[Nn,Gt,vo,A1,Fl])}function Sve(){return _g(),I(C(q8,1),z,260,0,[Ia,oE,Udn,G8,Kdn])}function Pve(n){return rA(),function(){return k4e(n,this,arguments)}}function qu(n){return n.t||(n.t=new xyn(n),M5(new eEn(n),0,n.t)),n.t}function QDn(n){var e;return n.c||(e=n.r,D(e,89)&&(n.c=u(e,29))),n.c}function Ove(n){return n.e=3,n.d=n.Yb(),n.e!=2?(n.e=0,!0):!1}function vN(n){var e,t,i;return e=n&Wu,t=n>>22&Wu,i=n<0?Sl:0,Xc(e,t,i)}function VDn(n){var e;return e=n.length,Cn(Un.substr(Un.length-e,e),n)}function ie(n){if(se(n))return n.c=n.a,n.a.Pb();throw M(new Fr)}function Sp(n,e){return e==0||n.e==0?n:e>0?ARn(n,e):wHn(n,-e)}function oV(n,e){return e==0||n.e==0?n:e>0?wHn(n,e):ARn(n,-e)}function YDn(n){this.b=n,re.call(this,n),this.a=u(Vn(this.b.a,4),131)}function ZDn(n){this.b=n,dp.call(this,n),this.a=u(Vn(this.b.a,4),131)}function Ds(n,e,t,i,r){c$n.call(this,e,i,r),this.c=n,this.b=t}function hV(n,e,t,i,r){kLn.call(this,e,i,r),this.c=n,this.a=t}function lV(n,e,t,i,r){yLn.call(this,e,i,r),this.c=n,this.a=t}function aV(n,e,t,i,r){c$n.call(this,e,i,r),this.c=n,this.a=t}function Lve(n,e,t){return ht(lp(sv(n),Xi(e.b)),lp(sv(n),Xi(t.b)))}function Dve(n,e,t){return ht(lp(sv(n),Xi(e.e)),lp(sv(n),Xi(t.e)))}function $ve(n,e){return j.Math.min(X1(e.a,n.d.d.c),X1(e.b,n.d.d.c))}function mN(n,e,t){var i;return i=n.Fh(e),i>=0?n.Ih(i,t,!0):D0(n,e,t)}function Nve(n,e){var t,i;t=u(m9e(n.c,e),18),t&&(i=t.gc(),t.$b(),n.d-=i)}function n$n(n){var e,t;return e=n.c.i,t=n.d.i,e.k==(Xn(),ei)&&t.k==ei}function f5(n){var e,t;++n.j,e=n.g,t=n.i,n.g=null,n.i=0,n.Mi(t,e),n.Li()}function mk(n,e){n.Zi(n.i+1),Fm(n,n.i,n.Xi(n.i,e)),n.Ki(n.i++,e),n.Li()}function e$n(n,e,t){var i;i=new aX(n.a),w5(i,n.a.a),fu(i.f,e,t),n.a.a=i}function dV(n,e,t,i){var r;for(r=0;re)throw M(new xc(ien(n,e,"index")));return n}function xve(n,e){var t;t=n.q.getHours()+(e/60|0),n.q.setMinutes(e),Q5(n,t)}function Pp(n,e){return ki(e)?e==null?ken(n.f,null):kxn(n.i,e):ken(n.f,e)}function t$n(n,e){cTn.call(this,e.xd(),e.wd()&-6),Gn(n),this.a=n,this.b=e}function i$n(n,e){uTn.call(this,e.xd(),e.wd()&-6),Gn(n),this.a=n,this.b=e}function vV(n,e){QA.call(this,e.xd(),e.wd()&-6),Gn(n),this.a=n,this.b=e}function r$n(n,e,t){zE.call(this,t),this.b=n,this.c=e,this.d=(FF(),aU)}function c$n(n,e,t){this.d=n,this.k=e?1:0,this.f=t?1:0,this.o=-1,this.p=0}function u$n(n,e,t){this.a=n,this.c=e,this.d=t,nn(e.e,this),nn(t.b,this)}function Io(n){this.c=n,this.a=new A(this.c.a),this.b=new A(this.c.b)}function gT(){this.e=new Z,this.c=new Z,this.d=new Z,this.b=new Z}function f$n(){this.g=new IK,this.b=new IK,this.a=new Z,this.k=new Z}function s$n(){this.a=new LK,this.b=new yjn,this.d=new ywn,this.e=new kwn}function pT(n,e,t){this.a=n,this.b=e,this.c=t,nn(n.t,this),nn(e.i,this)}function kk(){this.b=new dt,this.a=new dt,this.b=new dt,this.a=new dt}function $4(){$4=x;var n,e;HO=(u4(),e=new QE,e),UO=(n=new CL,n)}function vT(){vT=x,L8=new nt("org.eclipse.elk.labels.labelManager")}function o$n(){o$n=x,Lsn=new At("separateLayerConnections",(eC(),X_))}function yk(){yk=x,aH=new qz("FIXED",0),pO=new qz("CENTER_NODE",1)}function uo(){uo=x,Gw=new xz("REGULAR",0),Ea=new xz("CRITICAL",1)}function Bve(n,e){var t;return t=ILe(n,e),n.b=new XT(t.c.length),KOe(n,t)}function Rve(n,e,t){var i;return++n.e,--n.f,i=u(n.d[e].ed(t),138),i.kd()}function Jve(n){var e,t;return e=n.jd(),t=u(n.kd(),18),tk(t.Lc(),new Z9n(e))}function jN(n){var e;return e=n.b,e.b==0?null:u(vc(e,0),65).b}function mV(n){if(n.a){if(n.e)return mV(n.e)}else return n;return null}function _ve(n,e){return n.pe.p?-1:0}function mT(n,e){return Gn(e),n.ct||e=0?n.Ih(t,!0,!0):D0(n,e,!0)}function a6e(n,e){return ht($(N(m(n,(X(),ib)))),$(N(m(e,ib))))}function OV(n,e){QA.call(this,e.xd(),e.wd()&-16449),Gn(n),this.a=n,this.c=e}function LV(n,e,t,i,r){_Tn(this),this.b=n,this.d=e,this.f=t,this.g=i,this.c=r}function Jc(n){xD(this),rk(n>=0,"Initial capacity must not be negative")}function Lp(n){var e;return Ce(n),D(n,206)?(e=u(n,206),e):new b8n(n)}function d6e(n){for(;!n.a;)if(!yIn(n.c,new q8n(n)))return!1;return!0}function b6e(n){var e;if(!n.a)throw M(new _Pn);return e=n.a,n.a=It(n.a),e}function w6e(n){if(n.b<=0)throw M(new Fr);return--n.b,n.a-=n.c.c,W(n.a)}function DV(n,e){if(n.g==null||e>=n.i)throw M(new OD(e,n.i));return n.g[e]}function z$n(n,e,t){if(Q4(n,t),t!=null&&!n.dk(t))throw M(new EL);return t}function g6e(n,e,t){var i;return i=Wxn(n,e,t),n.b=new XT(i.c.length),Xen(n,i)}function X$n(n){var e;if(n.ll())for(e=n.i-1;e>=0;--e)O(n,e);return ZQ(n)}function p6e(n){jT(),u(n.mf((Me(),Xw)),185).Ec(($u(),hE)),n.of(KH,null)}function jT(){jT=x,ise=new Uvn,cse=new Kvn,rse=O5e((Me(),KH),ise,Ta,cse)}function W$n(){W$n=x,lI(),H0n=$t,whe=di,U0n=new w7($t),ghe=new w7(di)}function ET(){ET=x,s1n=new _z("LEAF_NUMBER",0),qq=new _z("NODE_SIZE",1)}function IN(n){n.a=J(Oe,ze,30,n.b+1,15,1),n.c=J(Oe,ze,30,n.b,15,1),n.d=0}function v6e(n,e){n.a.Le(e.d,n.b)>0&&(nn(n.c,new SW(e.c,e.d,n.d)),n.b=e.d)}function F4(n,e,t,i){var r;i=(b0(),i||hfn),r=n.slice(e,t),ren(r,n,e,t,-e,i)}function Bf(n,e,t,i,r){return e<0?D0(n,t,i):u(t,69).uk().wk(n,n.ei(),e,i,r)}function Q$n(n,e){var t,i;return i=e/n.c.Pd().gc()|0,t=e%n.c.Pd().gc(),Op(n,i,t)}function $V(n){var e,t;if(!n.b)return null;for(t=n.b;e=t.a[0];)t=e;return t}function V$n(n){var e,t;if(!n.b)return null;for(t=n.b;e=t.a[1];)t=e;return t}function m6e(n){return D(n,183)?""+u(n,183).a:n==null?null:$r(n)}function k6e(n){return D(n,183)?""+u(n,183).a:n==null?null:$r(n)}function Y$n(n,e){if(e.a)throw M(new xr(fXn));Yt(n.a,e),e.a=n,!n.j&&(n.j=e)}function Du(){Du=x,Eh=new eD(c3,0),ga=new eD(Nv,1),qs=new eD(u3,2)}function x4(){x4=x,y_=new AA("All",0),j_=new CTn,E_=new RTn,A_=new ITn}function Z$n(){Z$n=x,zYn=me((x4(),I(C($S,1),z,310,0,[y_,j_,E_,A_])))}function nNn(){nNn=x,FZn=me((M0(),I(C(NZn,1),z,414,0,[gj,wj,S_,P_])))}function eNn(){eNn=x,Tne=me((z4(),I(C(Mne,1),z,413,0,[Y0,Aw,Ew,a2])))}function tNn(){tNn=x,Lne=me((_p(),I(C(qfn,1),z,384,0,[_9,Gfn,__,G_])))}function iNn(){iNn=x,Une=me((eC(),I(C(Hne,1),z,368,0,[X_,fP,sP,yj])))}function rNn(){rNn=x,tee=me((Bs(),I(C(eee,1),z,418,0,[Cw,a6,d6,W_])))}function cNn(){cNn=x,Qre=me((ld(),I(C(Wre,1),z,409,0,[_j,w8,QP,WP])))}function uNn(){uNn=x,kre=me((iw(),I(C(oq,1),z,205,0,[KP,sq,I2,C2])))}function fNn(){fNn=x,Ere=me((Al(),I(C(hln,1),z,270,0,[ja,oln,aq,dq])))}function sNn(){sNn=x,dee=me((I5(),I(C(_sn,1),z,302,0,[U9,Rsn,Ej,Jsn])))}function oNn(){oNn=x,rue=me((m5(),I(C(r1n,1),z,354,0,[Fq,cO,Nq,$q])))}function hNn(){hNn=x,$ue=me((OC(),I(C(C1n,1),z,355,0,[zq,M1n,T1n,A1n])))}function lNn(){lNn=x,Bue=me((GC(),I(C(xue,1),z,406,0,[Zq,Qq,Yq,Vq])))}function aNn(){aNn=x,Dce=me((Gp(),I(C(Tln,1),z,402,0,[nO,v8,m8,k8])))}function dNn(){dNn=x,Rfe=me((NC(),I(C(Oan,1),z,396,0,[kH,yH,jH,EH])))}function bNn(){bNn=x,Gse=me((Z4(),I(C(Odn,1),z,280,0,[cE,IO,Sdn,Pdn])))}function wNn(){wNn=x,Hse=me((El(),I(C(QH,1),z,225,0,[WH,uE,G6,R3])))}function gNn(){gNn=x,Wse=me((kf(),I(C(Xse,1),z,293,0,[sE,Qh,Ca,fE])))}function pNn(){pNn=x,ooe=me((lT(),I(C(gE,1),z,290,0,[n0n,t0n,nU,e0n])))}function vNn(){vNn=x,uoe=me((of(),I(C(K8,1),z,381,0,[dE,qd,aE,Yw])))}function mNn(){mNn=x,hoe=me((bC(),I(C(u0n,1),z,327,0,[eU,i0n,c0n,r0n])))}function kNn(){kNn=x,doe=me((tC(),I(C(aoe,1),z,412,0,[tU,s0n,f0n,o0n])))}function Tk(){Tk=x,Wsn=new Pz(lo,0),gP=new Pz("IMPROVE_STRAIGHTNESS",1)}function AT(){AT=x,fH=new ED(TWn,0),nan=new ED(Zrn,1),Z1n=new ED(lo,2)}function NV(n){var e;if(!UN(n))throw M(new Fr);return n.e=1,e=n.d,n.d=null,e}function i1(n){var e;return Lr(n)&&(e=0-n,!isNaN(e))?e:Q1(X4(n))}function _r(n,e,t){for(;t=0;)++e[0]}function CNn(n,e){yfn=new LE,xZn=e,B9=n,u(B9.b,68),AV(B9,yfn,null),bKn(B9)}function s5(){s5=x,N_=new iD("XY",0),$_=new iD("X",1),F_=new iD("Y",2)}function cu(){cu=x,wo=new tD("TOP",0),pa=new tD(Nv,1),Hs=new tD(pin,2)}function vl(){vl=x,Cj=new oD(lo,0),m2=new oD("TOP",1),m3=new oD(pin,2)}function Ok(){Ok=x,bq=new Dz("INPUT_ORDER",0),wq=new Dz("PORT_DEGREE",1)}function B4(){B4=x,Uun=Xc(Wu,Wu,524287),OYn=Xc(0,0,xy),Kun=vN(1),vN(2),zun=vN(0)}function xV(n){var e;return e=$p(Vn(n,32)),e==null&&(Wc(n),e=$p(Vn(n,32))),e}function BV(n){var e;return n.Lh()||(e=he(n.Ah())-n.gi(),n.Xh().Kk(e)),n.wh()}function INn(n){(this.q?this.q:(Dn(),Dn(),Kh)).zc(n.q?n.q:(Dn(),Dn(),Kh))}function SNn(n,e){Sc(n,e==null||aM((Gn(e),e))||isNaN((Gn(e),e))?0:(Gn(e),e))}function PNn(n,e){yu(n,e==null||aM((Gn(e),e))||isNaN((Gn(e),e))?0:(Gn(e),e))}function ONn(n,e){cd(n,e==null||aM((Gn(e),e))||isNaN((Gn(e),e))?0:(Gn(e),e))}function LNn(n,e){rd(n,e==null||aM((Gn(e),e))||isNaN((Gn(e),e))?0:(Gn(e),e))}function T6e(n,e){gp(u(u(n.f,19).mf((Me(),x6)),103))&&cRn(mQ(u(n.f,19)),e)}function DN(n,e){var t;return t=St(n.d,e),t>=0?TC(n,t,!0,!0):D0(n,e,!0)}function IT(n,e){var t;return t=n.bd(e),t>=0?(n.ed(t),!0):!1}function $N(n,e,t){var i;return i=n.g[e],Fm(n,e,n.Xi(e,t)),n.Pi(e,t,i),n.Li(),i}function NN(n){var e;return n.d!=n.r&&(e=ls(n),n.e=!!e&&e.jk()==OVn,n.d=e),n.e}function FN(n,e){var t;for(Ce(n),Ce(e),t=!1;e.Ob();)t=t|n.Ec(e.Pb());return t}function Dr(n,e){var t,i;return ea(n),i=new vV(e,n.a),t=new EIn(i),new Pn(n,t)}function So(n,e){var t;return t=u(zn(n.e,e),395),t?(QTn(n,t),t.e):null}function C6e(n,e){var t,i,r;r=e.c.i,t=u(zn(n.f,r),60),i=t.d.c-t.e.c,gY(e.a,i,0)}function Fh(n,e,t){var i,r;for(i=10,r=0;rn.a[i]&&(i=t);return i}function _Nn(n){var e;for(++n.a,e=n.c.a.length;n.a=0&&e0?Ze:Pc(n,Si)<0?Si:Le(n)}function Ns(n,e,t){var i;if(e==null)throw M(new W2);return i=dl(n,e),nve(n,e,t),i}function UNn(n,e){return Gn(e),WW(n),n.d.Ob()?(e.Ad(n.d.Pb()),!0):!1}function KNn(n){this.b=new Z,this.a=new Z,this.c=new Z,this.d=new Z,this.e=n}function zNn(n,e,t){hM.call(this),GV(this),this.a=n,this.c=t,this.b=e.d,this.f=e.e}function R6e(){return Xn(),I(C(q_,1),z,252,0,[xt,Zt,ei,$c,dc,Go,mj,G9])}function XNn(){XNn=x,Vse=me((_g(),I(C(q8,1),z,260,0,[Ia,oE,Udn,G8,Kdn])))}function WNn(){WNn=x,use=me((Lo(),I(C(Ho,1),z,161,0,[Nn,Gt,vo,A1,Fl])))}function QNn(){QNn=x,ree=me((rw(),I(C(iee,1),z,372,0,[jj,lP,aP,hP,oP])))}function VNn(){VNn=x,aue=me((JC(),I(C(lue,1),z,365,0,[_q,Bq,Gq,Rq,Jq])))}function YNn(){YNn=x,Pee=me((ff(),I(C(Eon,1),z,166,0,[Oj,Y9,$l,Z9,Ld])))}function ZNn(){ZNn=x,yre=me((O5(),I(C(iln,1),z,329,0,[tln,hq,lq,h8,l8])))}function nFn(){nFn=x,dfe=me((H5(),I(C(afe,1),z,370,0,[D2,L3,P8,S8,Qj])))}function eFn(){eFn=x,mfe=me((ay(),I(C(han,1),z,331,0,[fan,dH,oan,bH,san])))}function J6e(){return uI(),I(C(Fsn,1),z,277,0,[Y_,eG,V_,rG,nG,Z_,iG,tG])}function _6e(){return ua(),I(C(fse,1),z,287,0,[xan,fi,Ui,$3,Pi,Ct,D3,Uo])}function G6e(){return Yp(),I(C(jE,1),z,235,0,[uU,RO,yE,kE,cU,BO,xO,rU])}function q6e(n,e){return Dp(),-bc(u(m(n,(Vr(),P2)),15).a,u(m(e,P2),15).a)}function H6e(n,e,t,i){var r;n.j=-1,pen(n,Wnn(n,e,t),(rr(),r=u(e,69).tk(),r.vl(i)))}function U6e(n,e,t){var i,r;for(r=new A(t);r.a0?e-1:e,gEn(E1e(yFn(IW(new Y2,t),n.n),n.j),n.k)}function OT(n,e){var t;return ea(n),t=new uOn(n,n.a.xd(),n.a.wd()|4,e),new Pn(n,t)}function z6e(n,e){var t,i;return t=u(Zb(n.d,e),18),t?(i=e,n.e.pc(i,t)):null}function tFn(n){this.d=n,this.c=n.c.vc().Jc(),this.b=null,this.a=null,this.e=(eA(),h_)}function m0(n){if(n<0)throw M(new qn("Illegal Capacity: "+n));this.g=this.$i(n)}function X6e(n,e){if(0>n||n>e)throw M(new WK("fromIndex: 0, toIndex: "+n+oin+e))}function iFn(n,e){return!!b5(n,e,Le(Hi(Gh,$h(Le(Hi(e==null?0:kt(e),qh)),15))))}function W6e(n,e){gp(u(m(u(n.e,9),(en(),Bt)),103))&&(Dn(),si(u(n.e,9).j,e))}function Q6e(n){var e;return e=$(N(m(n,(en(),k1)))),e<0&&(e=0,H(n,k1,e)),e}function LT(n,e){var t,i;for(i=n.Jc();i.Ob();)t=u(i.Pb(),70),H(t,(X(),A3),e)}function V6e(n,e,t){var i;i=j.Math.max(0,n.b/2-.5),$5(t,i,1),nn(e,new XAn(t,i))}function rFn(n,e,t,i,r,c){var f;f=kN(i),Gi(f,r),Ti(f,c),Sn(n.a,i,new bM(f,e,t.f))}function cFn(n,e){qe(n,(Rh(),eH),e.f),qe(n,Jue,e.e),qe(n,nH,e.d),qe(n,Rue,e.c)}function RN(n){var e;Cb(!!n.c),e=n.c.a,Rf(n.d,n.c),n.b==n.c?n.b=e:--n.a,n.c=null}function uFn(n){return n.a>=-.01&&n.a<=Bo&&(n.a=0),n.b>=-.01&&n.b<=Bo&&(n.b=0),n}function $g(n){mv();var e,t;for(t=tcn,e=0;et&&(t=n[e]);return t}function fFn(n,e){var t;if(t=ky(n.Ah(),e),!t)throw M(new qn(da+e+IJ));return t}function zb(n,e){var t;for(t=n;It(t);)if(t=It(t),t==e)return!0;return!1}function Y6e(n,e){return e&&n.b[e.g]==e?(qt(n.b,e.g,null),--n.c,!0):!1}function Rf(n,e){var t;return t=e.c,e.a.b=e.b,e.b.a=e.a,e.a=e.b=null,e.c=null,--n.b,t}function _c(n,e){var t,i,r,c;for(Gn(e),i=n.c,r=0,c=i.length;r0&&(n.a/=e,n.b/=e),n}function DT(n){this.b=(Ce(n),new Ou(n)),this.a=new Z,this.d=new Z,this.e=new Li}function GV(n){n.b=(Du(),ga),n.f=(cu(),pa),n.d=(vf(2,ww),new Jc(2)),n.e=new Li}function oFn(){oFn=x,FS=(so(),I(C(jw,1),z,240,0,[nc,Kc,ec])).length,C_=FS}function so(){so=x,nc=new nD("BEGIN",0),Kc=new nD(Nv,1),ec=new nD("END",2)}function Po(){Po=x,J6=new TD(Nv,0),Vw=new TD("HEAD",1),_6=new TD("TAIL",2)}function Dk(){Dk=x,bP=new Sz("READING_DIRECTION",0),Ksn=new Sz("ROTATION",1)}function $k(){$k=x,PH=new Kz("DIRECT_ROUTING",0),SH=new Kz("BEND_ROUTING",1)}function Dp(){Dp=x,fue=ah(ah(ah(gm(new Kt,(Gp(),v8)),(X5(),Eq)),Pln),$ln)}function ml(){ml=x,oue=ah(ah(ah(gm(new Kt,(Gp(),k8)),(X5(),Lln)),Cln),Oln)}function Ng(n,e){return C1e(d5(n,e,Le(Hi(Gh,$h(Le(Hi(e==null?0:kt(e),qh)),15)))))}function qV(n,e){return Eo(),Fs(d1),j.Math.abs(n-e)<=d1||n==e||isNaN(n)&&isNaN(e)}function HV(n,e){return Eo(),Fs(d1),j.Math.abs(n-e)<=d1||n==e||isNaN(n)&&isNaN(e)}function pf(n){var e;return n.w?n.w:(e=U3e(n),e&&!e.Sh()&&(n.w=e),e)}function rme(n){var e;return n==null?null:(e=u(n,198),Vje(e,e.length))}function O(n,e){if(n.g==null||e>=n.i)throw M(new OD(e,n.i));return n.Ui(e,n.g[e])}function cme(n,e){Dn();var t,i;for(i=new Z,t=0;t=14&&e<=16))),n}function aFn(){aFn=x,yee=me((hy(),I(C(eon,1),z,284,0,[pP,Ysn,non,Vsn,Zsn,kG])))}function dFn(){dFn=x,jee=me((bv(),I(C(fon,1),z,285,0,[K9,ion,uon,con,ron,ton])))}function bFn(){bFn=x,mee=me((UC(),I(C(Xsn,1),z,286,0,[gG,wG,vG,pG,mG,wP])))}function wFn(){wFn=x,lee=me((Kp(),I(C(g6,1),z,233,0,[w6,H9,b6,Iw,g2,w2])))}function gFn(){gFn=x,Use=me((qC(),I(C(Bdn,1),z,328,0,[VH,Ndn,xdn,Ddn,Fdn,$dn])))}function pFn(){pFn=x,wse=me((wd(),I(C(xH,1),z,300,0,[FH,F8,N8,NH,D8,$8])))}function vFn(){vFn=x,ose=me((xh(),I(C(Jan,1),z,259,0,[DH,Zj,nE,jO,kO,yO])))}function mFn(){mFn=x,Yse=me((ji(),I(C(zdn,1),z,103,0,[Sa,Wo,q6,Gd,Yh,Ac])))}function kFn(){kFn=x,Zse=me(($u(),I(C(PO,1),z,282,0,[Pa,Rl,hE,U8,H8,J3])))}function sme(){return sw(),I(C(dr,1),z,96,0,[Xs,Bl,Ws,Vs,Vh,ms,Cf,Qs,vs])}function h5(){h5=x,lE=new ID(run,0),YH=new ID("PARENT",1),Wdn=new ID("ROOT",2)}function yFn(n,e){return n.n=e,n.n?(n.f=new Z,n.e=new Z):(n.f=null,n.e=null),n}function rd(n,e){var t;t=n.f,n.f=e,(n.Db&4)!=0&&(n.Db&1)==0&&rt(n,new Ub(n,3,t,n.f))}function $T(n,e){var t;t=n.b,n.b=e,(n.Db&4)!=0&&(n.Db&1)==0&&rt(n,new Ub(n,1,t,n.b))}function k0(n,e){var t;t=n.b,n.b=e,(n.Db&4)!=0&&(n.Db&1)==0&&rt(n,new Ub(n,3,t,n.b))}function y0(n,e){var t;t=n.c,n.c=e,(n.Db&4)!=0&&(n.Db&1)==0&&rt(n,new Ub(n,4,t,n.c))}function cd(n,e){var t;t=n.g,n.g=e,(n.Db&4)!=0&&(n.Db&1)==0&&rt(n,new Ub(n,4,t,n.g))}function Sc(n,e){var t;t=n.i,n.i=e,(n.Db&4)!=0&&(n.Db&1)==0&&rt(n,new Ub(n,5,t,n.i))}function yu(n,e){var t;t=n.j,n.j=e,(n.Db&4)!=0&&(n.Db&1)==0&&rt(n,new Ub(n,6,t,n.j))}function j0(n,e){var t;t=n.j,n.j=e,(n.Db&4)!=0&&(n.Db&1)==0&&rt(n,new Ub(n,1,t,n.j))}function E0(n,e){var t;t=n.k,n.k=e,(n.Db&4)!=0&&(n.Db&1)==0&&rt(n,new Ub(n,2,t,n.k))}function NT(n,e){var t;t=n.a,n.a=e,(n.Db&4)!=0&&(n.Db&1)==0&&rt(n,new Ub(n,0,t,n.a))}function r1(n,e){var t;t=n.s,n.s=e,(n.Db&4)!=0&&(n.Db&1)==0&&rt(n,new dN(n,4,t,n.s))}function Xb(n,e){var t;t=n.t,n.t=e,(n.Db&4)!=0&&(n.Db&1)==0&&rt(n,new dN(n,5,t,n.t))}function _N(n,e){var t;t=n.d,n.d=e,(n.Db&4)!=0&&(n.Db&1)==0&&rt(n,new dN(n,2,t,n.d))}function J4(n,e){var t;t=n.F,n.F=e,(n.Db&4)!=0&&(n.Db&1)==0&&rt(n,new wi(n,1,5,t,e))}function Nk(n,e){var t;return t=u(zn((kA(),JO),n),58),t?t.ek(e):J(hi,Bn,1,e,5,1)}function kl(n,e){var t,i;return t=e in n.a,t&&(i=dl(n,e).pe(),i)?i.a:null}function ome(n,e){var t,i,r;return t=(i=(F1(),r=new BU,r),e&&Gen(i,e),i),uY(t,n),t}function jFn(n,e,t){var i;return i=fv(t),Ke(n.c,i,e),Ke(n.d,e,t),Ke(n.e,e,Jb(e)),e}function ae(n,e,t,i,r,c){var f;return f=F$(n,e),AFn(t,f),f.i=r?8:0,f.f=i,f.e=r,f.g=c,f}function UV(n,e,t,i,r){this.d=e,this.k=i,this.f=r,this.o=-1,this.p=1,this.c=n,this.a=t}function KV(n,e,t,i,r){this.d=e,this.k=i,this.f=r,this.o=-1,this.p=2,this.c=n,this.a=t}function zV(n,e,t,i,r){this.d=e,this.k=i,this.f=r,this.o=-1,this.p=6,this.c=n,this.a=t}function XV(n,e,t,i,r){this.d=e,this.k=i,this.f=r,this.o=-1,this.p=7,this.c=n,this.a=t}function WV(n,e,t,i,r){this.d=e,this.j=i,this.e=r,this.o=-1,this.p=4,this.c=n,this.a=t}function EFn(n,e){var t,i,r,c;for(i=e,r=0,c=i.length;r0?u(rn(t.a,i-1),9):null}function Fs(n){if(!(n>=0))throw M(new qn("tolerance ("+n+") must be >= 0"));return n}function l5(){return OH||(OH=new QHn,xg(OH,I(C(l2,1),Bn,139,0,[new GU]))),OH}function FT(){FT=x,mln=new wD("NO",0),kq=new wD(Pin,1),vln=new wD("LOOK_BACK",2)}function xT(){xT=x,Gsn=new cD("ARD",0),dP=new cD("MSD",1),uG=new cD("MANUAL",2)}function fr(){fr=x,d8=new lD(o9,0),xu=new lD("INPUT",1),zc=new lD("OUTPUT",2)}function dme(){return py(),I(C(Usn,1),z,268,0,[oG,Hsn,lG,aG,hG,dG,Aj,sG,fG])}function bme(){return my(),I(C(Zhn,1),z,269,0,[uq,Qhn,Vhn,rq,Whn,Yhn,HP,iq,cq])}function wme(){return Xu(),I(C(Vdn,1),z,267,0,[H6,wE,OO,z8,LO,$O,DO,ZH,bE])}function pr(n,e,t){return ad(n,e),Gc(n,t),r1(n,0),Xb(n,1),o1(n,!0),s1(n,!0),n}function TFn(n,e){var t;return D(e,45)?n.c.Kc(e):(t=$F(n,e),mC(n,e),t)}function a5(n,e){var t,i,r,c;for(i=e,r=0,c=i.length;rt)throw M(new Lb(e,t));return new sW(n,e)}function CFn(n,e){var t,i;for(t=0,i=n.gc();t=0),e7e(n.d,n.c)<0&&(n.a=n.a-1&n.d.a.length-1,n.b=n.d.c),n.c=-1}function mme(n){var e,t;for(t=new A(OJn(n));t.a=0}function nY(){nY=x,Rre=xe(xe(xe(new Kt,(Ei(),Us),(Ii(),d2)),zh,Tw),jc,Mw)}function DFn(){DFn=x,Jre=xe(xe(xe(new Kt,(Ei(),Us),(Ii(),d2)),zh,Tw),jc,Mw)}function eY(){eY=x,_re=xe(xe(xe(new Kt,(Ei(),Us),(Ii(),d2)),zh,Tw),jc,Mw)}function $Fn(){$Fn=x,Gre=xe(xe(xe(new Kt,(Ei(),Us),(Ii(),d2)),zh,Tw),jc,Mw)}function NFn(){NFn=x,qre=xe(xe(xe(new Kt,(Ei(),Us),(Ii(),d2)),zh,Tw),jc,Mw)}function FFn(){FFn=x,Hre=xe(xe(xe(new Kt,(Ei(),Us),(Ii(),d2)),zh,Tw),jc,Mw)}function xFn(){xFn=x,zre=Bc(xe(xe(new Kt,(Ei(),jc),(Ii(),ZS)),Ec,XS),ar,YS)}function BFn(){BFn=x,LYn=I(C(Oe,1),ze,30,15,[0,8,4,12,2,10,6,14,1,9,5,13,3,11,7,15])}function tY(n,e){var t;t=n.b,n.b=e,(n.Db&4)!=0&&(n.Db&1)==0&&rt(n,new wi(n,1,0,t,n.b))}function iY(n,e){var t;t=n.c,n.c=e,(n.Db&4)!=0&&(n.Db&1)==0&&rt(n,new wi(n,1,1,t,n.c))}function qN(n,e){var t;t=n.c,n.c=e,(n.Db&4)!=0&&(n.Db&1)==0&&rt(n,new wi(n,1,4,t,n.c))}function rY(n,e){var t;t=n.c,n.c=e,(n.Db&4)!=0&&(n.Db&1)==0&&rt(n,new wi(n,1,1,t,n.c))}function cY(n,e){var t;t=n.d,n.d=e,(n.Db&4)!=0&&(n.Db&1)==0&&rt(n,new wi(n,1,1,t,n.d))}function _4(n,e){var t;t=n.k,n.k=e,(n.Db&4)!=0&&(n.Db&1)==0&&rt(n,new wi(n,1,2,t,n.k))}function HN(n,e){var t;t=n.D,n.D=e,(n.Db&4)!=0&&(n.Db&1)==0&&rt(n,new wi(n,1,2,t,n.D))}function _T(n,e){var t;t=n.f,n.f=e,(n.Db&4)!=0&&(n.Db&1)==0&&rt(n,new wi(n,1,8,t,n.f))}function GT(n,e){var t;t=n.i,n.i=e,(n.Db&4)!=0&&(n.Db&1)==0&&rt(n,new wi(n,1,7,t,n.i))}function uY(n,e){var t;t=n.a,n.a=e,(n.Db&4)!=0&&(n.Db&1)==0&&rt(n,new wi(n,1,8,t,n.a))}function fY(n,e){var t;t=n.b,n.b=e,(n.Db&4)!=0&&(n.Db&1)==0&&rt(n,new wi(n,1,0,t,n.b))}function jme(n,e,t){var i;n.b=e,n.a=t,i=(n.a&512)==512?new $jn:new _U,n.c=sIe(i,n.b,n.a)}function RFn(n,e){return Tl(n.e,e)?(rr(),NN(e)?new jM(e,n):new G7(e,n)):new nTn(e,n)}function Eme(n){var e,t;return 0>n?new lz:(e=n+1,t=new zDn(e,n),new _X(null,t))}function Ame(n,e){Dn();var t;return t=new ip(1),ki(n)?Er(t,n,e):fu(t.f,n,e),new mL(t)}function Mme(n,e){var t;t=new LE,u(e.b,68),u(e.b,68),u(e.b,68),_c(e.a,new gW(n,t,e))}function JFn(n,e){var t;return D(e,8)?(t=u(e,8),n.a==t.a&&n.b==t.b):!1}function Tme(n){var e;return e=m(n,(X(),st)),D(e,176)?oRn(u(e,176)):null}function _Fn(n){var e;return n=j.Math.max(n,2),e=DY(n),n>e?(e<<=1,e>0?e:r9):e}function UN(n){switch(mX(n.e!=3),n.e){case 2:return!1;case 0:return!0}return Ove(n)}function sY(n){var e;return n.b==null?(Ql(),Ql(),TE):(e=n.sl()?n.rl():n.ql(),e)}function GFn(n,e){var t,i;for(i=e.vc().Jc();i.Ob();)t=u(i.Pb(),45),sy(n,t.jd(),t.kd())}function oY(n,e){var t;t=n.d,n.d=e,(n.Db&4)!=0&&(n.Db&1)==0&&rt(n,new wi(n,1,11,t,n.d))}function qT(n,e){var t;t=n.j,n.j=e,(n.Db&4)!=0&&(n.Db&1)==0&&rt(n,new wi(n,1,13,t,n.j))}function hY(n,e){var t;t=n.b,n.b=e,(n.Db&4)!=0&&(n.Db&1)==0&&rt(n,new wi(n,1,21,t,n.b))}function lY(n,e){n.r>0&&n.c0&&n.g!=0&&lY(n.i,e/n.r*n.i.d))}function Fg(n){var e;return r$(n.f.g,n.d),oe(n.b),n.c=n.a,e=u(n.a.Pb(),45),n.b=EY(n),e}function qFn(n,e){var t;return t=e==null?-1:_r(n.b,e,0),t<0?!1:(KN(n,t),!0)}function xs(n,e){var t;return Gn(e),t=e.g,n.b[t]?!1:(qt(n.b,t,e),++n.c,!0)}function HT(n,e){var t,i;return t=1-e,i=n.a[t],n.a[t]=i.a[e],i.a[e]=n,n.b=!0,i.b=!1,i}function KN(n,e){var t;t=e1(n.b,n.b.c.length-1),e0?1:0:(!n.c&&(n.c=bk(cc(n.f))),n.c).e}function VFn(n,e){e?n.B==null&&(n.B=n.D,n.D=null):n.B!=null&&(n.D=n.B,n.B=null)}function Ht(n,e,t,i,r,c,f,o,h,l,a,d,g){return yGn(n,e,t,i,r,c,f,o,h,l,a,d,g),CF(n,!1),n}function QN(n,e,t,i,r,c){var f;this.c=n,f=new Z,QZ(n,f,e,n.b,t,i,r,c),this.a=new Ci(f,0)}function YFn(){this.c=new sA(0),this.b=new sA(ecn),this.d=new sA(gWn),this.a=new sA(pWn)}function ZFn(n){this.e=n,this.d=new fA(Vb(mp(this.e).gc())),this.c=this.e.a,this.b=this.e.c}function XT(n){this.b=n,this.a=J(Oe,ze,30,n+1,15,1),this.c=J(Oe,ze,30,n,15,1),this.d=0}function Dme(){return fa(),I(C(sln,1),z,246,0,[zP,Bj,Rj,cln,uln,rln,fln,XP,I6,a8])}function $me(){return sr(),I(C(yG,1),z,262,0,[vP,Qf,z9,mP,k6,v2,X9,v6,m6,kP])}function nxn(n,e){return $(N(Zu(Qk(Rc(new Pn(null,new On(n.c.b,16)),new Q7n(n)),e))))}function wY(n,e){return $(N(Zu(Qk(Rc(new Pn(null,new On(n.c.b,16)),new W7n(n)),e))))}function exn(n,e){return Eo(),Fs(Bo),j.Math.abs(0-e)<=Bo||e==0||isNaN(0)&&isNaN(e)?0:n/e}function Nme(n,e){return z4(),n==Y0&&e==Aw||n==Aw&&e==Y0||n==a2&&e==Ew||n==Ew&&e==a2}function Fme(n,e){return z4(),n==Y0&&e==Ew||n==Y0&&e==a2||n==Aw&&e==a2||n==Aw&&e==Ew}function xme(n,e,t){var i,r,c;for(i=0,r=0;r>>31;i!=0&&(n[t]=i)}function gY(n,e,t){var i,r;for(r=Ae(n,0);r.b!=r.d.c;)i=u(je(r),8),i.a+=e,i.b+=t;return n}function d5(n,e,t){var i;for(i=n.b[t&n.f];i;i=i.b)if(t==i.a&&ll(e,i.g))return i;return null}function b5(n,e,t){var i;for(i=n.c[t&n.f];i;i=i.d)if(t==i.f&&ll(e,i.i))return i;return null}function Bme(n,e){var t,i;return t=u(G(n,(ca(),sO)),15),i=u(G(e,sO),15),bc(t.a,i.a)}function Rme(n,e){var t;e.Tg("General Compactor",1),t=N8e(u(G(n,(ca(),Uq)),387)),t.Bg(n)}function Jme(n,e,t){t.Tg("DFS Treeifying phase",1),K8e(n,e),PCe(n,e),n.a=null,n.b=null,t.Ug()}function _me(n,e,t,i){var r;r=new Z2,Ya(r,"x",BC(n,e,i.a)),Ya(r,"y",RC(n,e,i.b)),Ep(t,r)}function Gme(n,e,t,i){var r;r=new Z2,Ya(r,"x",BC(n,e,i.a)),Ya(r,"y",RC(n,e,i.b)),Ep(t,r)}function VN(){VN=x,Y8=new Sjn,hU=I(C(bu,1),s2,182,0,[]),zoe=I(C(js,1),Tun,62,0,[])}function Np(){Np=x,z_=new At("edgelabelcenterednessanalysis.includelabel",(_n(),wa))}function ju(){ju=x,Wfn=new Mwn,zfn=new Twn,Xfn=new Cwn,Kfn=new Iwn,Qfn=new Swn,Vfn=new Pwn}function qme(n,e){e.Tg(UXn,1),EZ(J1e(new HE((am(),new _$(n,!1,!1,new TU))))),e.Ug()}function YN(n){var e;return e=XQ(n),Sm(e.a,0)?(jb(),jb(),k_):(jb(),new zD(e.b))}function ZN(n){var e;return e=XQ(n),Sm(e.a,0)?(jb(),jb(),k_):(jb(),new zD(e.c))}function Hme(n){var e;return e=uT(n),Sm(e.a,0)?(aA(),aA(),UYn):(aA(),new SCn(e.b))}function Ume(n){return n.b.c.i.k==(Xn(),ei)?u(m(n.b.c.i,(X(),st)),12):n.b.c}function txn(n){return n.b.d.i.k==(Xn(),ei)?u(m(n.b.d.i,(X(),st)),12):n.b.d}function ixn(n){switch(n.g){case 2:return tn(),Zn;case 4:return tn(),te;default:return n}}function rxn(n){switch(n.g){case 1:return tn(),le;case 3:return tn(),Yn;default:return n}}function Kme(n,e){var t;return t=$nn(n),len(new V(t.c,t.d),new V(t.b,t.a),n.Kf(),e,n.$f())}function zme(n){var e,t,i;for(i=0,t=new A(n.b);t.a0&&(this.g=this.$i(this.i+(this.i/8|0)+1),n.Oc(this.g))}function uxn(n,e,t){this.g=n,this.d=e,this.e=t,this.a=new Z,GAe(this),Dn(),si(this.a,null)}function _f(n,e,t,i,r,c,f){pe.call(this,n,e),this.d=t,this.e=i,this.c=r,this.b=c,this.a=$s(f)}function vY(n,e){e.q=n,n.d=j.Math.max(n.d,e.r),n.b+=e.d+(n.a.c.length==0?0:n.c),nn(n.a,e)}function nF(n,e){var t,i,r,c;return r=n.c,t=n.c+n.b,c=n.d,i=n.d+n.a,e.a>r&&e.ac&&e.br?t=r:ne(e,t+1),n.a=ss(n.a,0,e)+(""+i)+hQ(n.a,t)}function fd(n,e,t){var i,r;return r=u(Jm(n.d,e),15),i=u(Jm(n.b,t),15),!r||!i?null:Op(n,r.a,i.a)}function i5e(n,e,t){return ht(lp(sv(n),new V(e.e.a,e.e.b)),lp(sv(n),new V(t.e.a,t.e.b)))}function r5e(n,e,t){return n==(ld(),QP)?new j3n:zu(e,1)!=0?new nz(t.length):new lEn(t.length)}function rt(n,e){var t,i,r;if(t=n.qh(),t!=null&&n.th())for(i=0,r=t.length;i1||n.Ob())return++n.a,n.g=0,e=n.i,n.Ob(),e;throw M(new Fr)}function h5e(n){LTn();var e;return FAn(jq,n)||(e=new R3n,e.a=n,XX(jq,n,e)),u(gr(jq,n),642)}function os(n){var e,t,i,r;return r=n,i=0,r<0&&(r+=md,i=Sl),t=_i(r/r3),e=_i(r-t*r3),Xc(e,t,i)}function kxn(n,e){var t;return t=n.a.get(e),t===void 0?++n.d:(w0e(n.a,e),--n.c,++n.b.g),t}function uc(n,e){var t;return e&&(t=e.lf(),t.dc()||(n.q?w5(n.q,t):n.q=new mTn(t))),n}function l5e(n,e){var t,i,r;return t=e.p-n.p,t==0?(i=n.f.a*n.f.b,r=e.f.a*e.f.b,ht(i,r)):t}function kY(n,e){switch(e){case 1:return!!n.n&&n.n.i!=0;case 2:return n.k!=null}return HQ(n,e)}function a5e(n){return n.b.c.length!=0&&u(rn(n.b,0),70).a?u(rn(n.b,0),70).a:U$(n)}function d5e(n,e){var t;try{e.be()}catch(i){if(i=zt(i),D(i,81))t=i,Rn(n.c,t);else throw M(i)}}function b5e(n,e){var t;e.Tg("Edge and layer constraint edge reversal",1),t=JIe(n),jDe(t),e.Ug()}function w5e(n,e){var t,i;return t=n.j,i=e.j,t!=i?t.g-i.g:n.p==e.p?0:t==(tn(),Yn)?n.p-e.p:e.p-n.p}function U4(n,e){this.b=n,this.e=e,this.d=e.j,this.f=(rr(),u(n,69).vk()),this.k=Qc(e.e.Ah(),n)}function sd(n,e,t){this.b=(Gn(n),n),this.d=(Gn(e),e),this.e=(Gn(t),t),this.c=this.d+(""+this.e)}function yY(n,e,t,i,r){Yxn.call(this,n,t,i,r),this.f=J(Xh,w1,9,e.a.c.length,0,1),Oo(e.a,this.f)}function g5(n,e,t,i,r){qt(n.c[e.g],t.g,i),qt(n.c[t.g],e.g,i),qt(n.b[e.g],t.g,r),qt(n.b[t.g],e.g,r)}function yxn(n,e){n.c&&(uUn(n,e,!0),Rt(new Pn(null,new On(e,16)),new tkn(n))),uUn(n,e,!1)}function _k(n){this.n=new Z,this.e=new dt,this.j=new dt,this.k=new Z,this.f=new Z,this.p=n}function jxn(n){n.r=new Vt,n.w=new Vt,n.t=new Z,n.i=new Z,n.d=new Vt,n.a=new hp,n.c=new de}function M0(){M0=x,gj=new MA("UP",0),wj=new MA(iR,1),S_=new MA(c3,2),P_=new MA(u3,3)}function YT(){YT=x,aln=new aD("EQUALLY",0),gq=new aD("NORTH",1),dln=new aD("NORTH_SOUTH",2)}function K4(){K4=x,jG=new fD("ONE_SIDED",0),EG=new fD("TWO_SIDED",1),Mj=new fD("OFF",2)}function Exn(){Exn=x,foe=me((Xu(),I(C(Vdn,1),z,267,0,[H6,wE,OO,z8,LO,$O,DO,ZH,bE])))}function Axn(){Axn=x,Qse=me((sw(),I(C(dr,1),z,96,0,[Xs,Bl,Ws,Vs,Vh,ms,Cf,Qs,vs])))}function Mxn(){Mxn=x,wee=me((py(),I(C(Usn,1),z,268,0,[oG,Hsn,lG,aG,hG,dG,Aj,sG,fG])))}function Txn(){Txn=x,vre=me((my(),I(C(Zhn,1),z,269,0,[uq,Qhn,Vhn,rq,Whn,Yhn,HP,iq,cq])))}function Bs(){Bs=x,Cw=new SA(Nv,0),a6=new SA(c3,1),d6=new SA(u3,2),W_=new SA("TOP",3)}function ZT(){ZT=x,yq=new gD("OFF",0),S6=new gD("SINGLE_EDGE",1),_w=new gD("MULTI_EDGE",2)}function Gk(){Gk=x,mO=new Hz("MINIMUM_SPANNING_TREE",0),Can=new Hz("MAXIMUM_SPANNING_TREE",1)}function g5e(n,e,t){var i,r;r=u(m(n,(en(),Cr)),79),r&&(i=new _u,vF(i,0,r),Wb(i,t),qi(e,i))}function jY(n){var e;return e=u(m(n,(X(),tc)),64),n.k==(Xn(),ei)&&(e==(tn(),Zn)||e==te)}function p5e(n){var e;if(n){if(e=n,e.dc())throw M(new Fr);return e.Xb(e.gc()-1)}return oLn(n.Jc())}function tF(n,e,t,i){return t==1?(!n.n&&(n.n=new U(zr,n,1,7)),Qi(n.n,e,i)):Gnn(n,e,t,i)}function qk(n,e){var t,i;return i=(t=new fL,t),Gc(i,e),Ee((!n.A&&(n.A=new pu(eu,n,7)),n.A),i),i}function v5e(n,e,t){var i,r,c,f;return c=null,f=e,r=v0(f,FJ),i=new NMn(n,t),c=(i_n(i.a,i.b,r),r),c}function nC(n,e,t){var i,r,c,f;f=gi(n),i=f.d,r=f.c,c=n.n,e&&(c.a=c.a-i.b-r.a),t&&(c.b=c.b-i.d-r.b)}function m5e(n,e){var t,i,r;return t=n.l+e.l,i=n.m+e.m+(t>>22),r=n.h+e.h+(i>>22),Xc(t&Wu,i&Wu,r&Sl)}function Cxn(n,e){var t,i,r;return t=n.l-e.l,i=n.m-e.m+(t>>22),r=n.h-e.h+(i>>22),Xc(t&Wu,i&Wu,r&Sl)}function Hk(n,e){var t,i;for(Gn(e),i=e.Jc();i.Ob();)if(t=i.Pb(),!n.Gc(t))return!1;return!0}function iF(n){var e;return(!n.a||(n.Bb&1)==0&&n.a.Sh())&&(e=ls(n),D(e,160)&&(n.a=u(e,160))),n.a}function zt(n){var e;return D(n,81)?n:(e=n&&n.__java$exception,e||(e=new mBn(n),Vyn(e)),e)}function rF(n){if(D(n,196))return u(n,127);if(n)return null;throw M(new np(JQn))}function Ixn(n){switch(n.g){case 0:return new Tvn;case 1:return new Cvn;case 2:default:return null}}function EY(n){return n.a.Ob()?!0:n.a!=n.e?!1:(n.a=new TV(n.f.f),n.a.Ob())}function Sxn(n,e){if(e==null)return!1;for(;n.a!=n.b;)if(ct(e,uC(n)))return!0;return!1}function Pxn(n,e){return!n||!e||n==e?!1:PRn(n.d.c,e.d.c+e.d.b)&&PRn(e.d.c,n.d.c+n.d.b)}function k5e(){return wT(),_o?new gN(null):aqn(e5e(),"com.google.common.base.Strings")}function Xt(n,e){var t,i;return t=e.Nc(),i=t.length,i==0?!1:(OW(n.c,n.c.length,t),!0)}function y5e(n,e){var t,i;return t=n.c,i=e.e[n.p],i=128?!1:n<64?Pm(yi(Lh(1,n),t),0):Pm(yi(Lh(1,n-64),e),0)}function SY(n,e,t){var i;if(i=n.gc(),e>i)throw M(new Lb(e,i));return n.Qi()&&(t=HOn(n,t)),n.Ci(e,t)}function $5e(n,e){var t,i;return t=u(u(zn(n.g,e.a),49).a,68),i=u(u(zn(n.g,e.b),49).a,68),xUn(t,i)}function X4(n){var e,t,i;return e=~n.l+1&Wu,t=~n.m+(e==0?1:0)&Wu,i=~n.h+(e==0&&t==0?1:0)&Sl,Xc(e,t,i)}function N5e(n){mv();var e,t,i;for(t=J(vi,Y,8,2,0,1),i=0,e=0;e<2;e++)i+=.5,t[e]=wke(i,n);return t}function _xn(n,e){var t,i,r,c;for(t=!1,i=n.a[e].length,c=0;cn.f,t=n.u+n.e[n.o.p]*n.d>n.f*n.s*n.d,e||t}function p5(n){var e;return e=n.a[n.b],e==null?null:(qt(n.a,n.b,null),n.b=n.b+1&n.a.length-1,e)}function zxn(n,e,t){var i,r;return i=new TN(e,t),r=new QO,n.b=mHn(n,n.b,i,r),r.b||++n.c,n.b.b=!1,r.d}function Xxn(n){var e,t;return t=wy(n.h),t==32?(e=wy(n.m),e==32?wy(n.l)+32:e+20-10):t-12}function DY(n){var e;if(n<0)return Si;if(n==0)return 0;for(e=r9;(e&n)==0;e>>=1);return e}function F5e(n){var e;return n==0?"Etc/GMT":(n<0?(n=-n,e="Etc/GMT-"):e="Etc/GMT+",e+DNn(n))}function $Y(n){var e;return(!n.c||(n.Bb&1)==0&&(n.c.Db&64)!=0)&&(e=ls(n),D(e,89)&&(n.c=u(e,29))),n.c}function Y1(n){var e,t;for(t=new A(n.a.b);t.a1||e>=0&&n.b<3)}function _5e(n,e,t){return!f4(et(new Pn(null,new On(n.c,16)),new Y3(new AMn(e,t)))).zd((Ga(),w3))}function lF(n,e,t){this.g=n,this.e=new Li,this.f=new Li,this.d=new dt,this.b=new dt,this.a=e,this.c=t}function aF(n,e,t,i){this.b=new Z,this.n=new Z,this.i=i,this.j=t,this.s=n,this.t=e,this.r=0,this.d=0}function Yxn(n,e,t,i){this.b=new de,this.g=new de,this.d=(y5(),UP),this.c=n,this.e=e,this.d=t,this.a=i}function Zxn(n,e,t){n.g=Ix(n,e,(tn(),te),n.b),n.d=Ix(n,t,te,n.b),!(n.g.c==0||n.d.c==0)&&J_n(n)}function nBn(n,e,t){n.g=Ix(n,e,(tn(),Zn),n.j),n.d=Ix(n,t,Zn,n.j),!(n.g.c==0||n.d.c==0)&&J_n(n)}function G5e(n,e,t,i,r){var c;return c=Men(n,e),t&&oF(c),r&&(n=yke(n,e),i?ba=X4(n):ba=Xc(n.l,n.m,n.h)),c}function q5e(n,e,t,i,r){var c,f;if(f=n.length,c=t.length,e<0||i<0||r<0||e+r>f||i+r>c)throw M(new MK)}function eBn(n,e){rk(n>=0,"Negative initial capacity"),rk(e>=0,"Non-positive load factor"),hc(this)}function W4(){W4=x,$sn=new u2n,Nsn=new f2n,Qne=new s2n,Wne=new o2n,Xne=new h2n,Dsn=(Gn(Xne),new abn)}function v5(){v5=x,xln=new vD(lo,0),Aq=new vD("MIDDLE_TO_MIDDLE",1),qj=new vD("AVOID_OVERLAP",2)}function BY(n,e,t){switch(e){case 0:!n.o&&(n.o=new ku((lc(),Zh),T1,n,0)),WT(n.o,t);return}Px(n,e,t)}function H5e(n,e){switch(e.g){case 0:D(n.b,638)||(n.b=new gxn);break;case 1:D(n.b,639)||(n.b=new bSn)}}function tBn(n){switch(n.g){case 0:return new xvn;default:throw M(new qn(rS+(n.f!=null?n.f:""+n.g)))}}function iBn(n){switch(n.g){case 0:return new Fvn;default:throw M(new qn(rS+(n.f!=null?n.f:""+n.g)))}}function rBn(n){switch(n.g){case 0:return new Rvn;default:throw M(new qn(nJ+(n.f!=null?n.f:""+n.g)))}}function cBn(n){switch(n.g){case 0:return new Jvn;default:throw M(new qn(nJ+(n.f!=null?n.f:""+n.g)))}}function uBn(n){switch(n.g){case 0:return new Lvn;default:throw M(new qn(nJ+(n.f!=null?n.f:""+n.g)))}}function Q4(n,e){if(!n.Ji()&&e==null)throw M(new qn("The 'no null' constraint is violated"));return e}function RY(n){var e,t,i;for(e=new _u,i=Ae(n,0);i.b!=i.d.c;)t=u(je(i),8),b4(e,0,new zi(t));return e}function c1(n){var e,t;for(e=0,t=0;ti?1:0}function fBn(n,e){var t,i,r;for(r=n.b;r;){if(t=n.a.Le(e,r.d),t==0)return r;i=t<0?0:1,r=r.a[i]}return null}function xg(n,e){var t,i,r,c,f;for(i=e,r=0,c=i.length;r=n.b.c.length||(GY(n,2*e+1),t=2*e+2,t0&&(e.Ad(t),t.i&&C7e(t))}function qY(n,e,t){var i;for(i=t-1;i>=0&&n[i]===e[i];i--);return i<0?0:VL(yi(n[i],or),yi(e[i],or))?-1:1}function Z5e(n,e){var t;return!n||n==e||!ut(e,(X(),tb))?!1:(t=u(m(e,(X(),tb)),9),t!=n)}function Bg(n,e,t){var i,r;return r=(i=new IL,i),pr(r,e,t),Ee((!n.q&&(n.q=new U(js,n,11,10)),n.q),r),r}function wF(n,e){var t,i;return i=u(Vn(n.a,4),131),t=J(sU,UJ,420,e,0,1),i!=null&&kc(i,0,t,0,i.length),t}function gF(n){var e,t,i,r;for(r=V1e(Eoe,n),t=r.length,i=J(on,Y,2,t,6,1),e=0;e0)return j4(e-1,n.a.c.length),e1(n.a,e-1);throw M(new Zyn)}function c9e(n,e,t){if(e<0)throw M(new xc(UWn+e));ee)throw M(new qn(TI+n+rXn+e));if(n<0||e>t)throw M(new WK(TI+n+ain+e+oin+t))}function wBn(n){if(!n.a||(n.a.i&8)==0)throw M(new yr("Enumeration class expected for layout option "+n.f))}function gBn(n){qOn.call(this,"The given string does not match the expected format for individual spacings.",n)}function pBn(n){switch(n.i){case-2:return!0;case-1:return!1;case 1:--n.c;default:return n.Zl()}}function u1(n){switch(n.c){case 0:return b$(),_un;case 1:return new X2(LGn(new rp(n)));default:return new Kjn(n)}}function vBn(n){switch(n.gc()){case 0:return b$(),_un;case 1:return new X2(n.Jc().Pb());default:return new mz(n)}}function KY(n){var e;return e=(!n.a&&(n.a=new U(Jl,n,9,5)),n.a),e.i!=0?X1e(u(O(e,0),691)):null}function u9e(n,e){var t;return t=Wi(n,e),VL(fN(n,e),0)|zA(fN(n,t),0)?t:Wi($y,fN(Xa(t,63),1))}function zY(n,e,t){var i,r;return Gb(e,n.c.length),i=t.Nc(),r=i.length,r==0?!1:(OW(n.c,e,i),!0)}function f9e(n,e){var t,i;for(t=n.a.length-1;e!=n.b;)i=e-1&t,qt(n.a,e,n.a[i]),e=i;qt(n.a,n.b,null),n.b=n.b+1&t}function s9e(n,e){var t,i;for(t=n.a.length-1,n.c=n.c-1&t;e!=n.c;)i=e+1&t,qt(n.a,e,n.a[i]),e=i;qt(n.a,n.c,null)}function Yb(n){var e;++n.j,n.i==0?n.g=null:n.ir&&(h_n(e.q,r),i=t!=e.q.d)),i}function MBn(n,e){var t,i,r,c,f,o,h,l;return h=e.i,l=e.j,i=n.f,r=i.i,c=i.j,f=h-r,o=l-c,t=j.Math.sqrt(f*f+o*o),t}function TBn(n,e){var t,i,r;t=n,r=0;do{if(t==e)return r;if(i=t.e,!i)throw M(new v7);t=gi(i),++r}while(!0)}function ad(n,e){var t,i,r;i=n.Wk(e,null),r=null,e&&(r=(u4(),t=new Qd,t),R4(r,n.r)),i=$o(n,r,i),i&&i.mj()}function w9e(n,e){var t,i;for(i=zu(n.d,1)!=0,t=!0;t;)t=!1,t=e.c.kg(e.e,i),t=t|yy(n,e,i,!1),i=!i;dY(n)}function WY(n,e){var t,i;return i=yC(n),i||(t=(oB(),Lqn(e)),i=new qyn(t),Ee(i.Cl(),n)),i}function Xk(n,e){var t,i;return t=u(n.c.Ac(e),18),t?(i=n.hc(),i.Fc(t),n.d-=t.gc(),t.$b(),n.mc(i)):n.jc()}function g9e(n){var e;if(!(n.c.c<0?n.a>=n.c.b:n.a<=n.c.b))throw M(new Fr);return e=n.a,n.a+=n.c.c,++n.b,W(e)}function p9e(n){var e,t;if(n==null)return!1;for(e=0,t=n.length;eYI?n-t>YI:t-n>YI}function Pc(n,e){var t;return Lr(n)&&Lr(e)&&(t=n-e,!isNaN(t))?t:hnn(Lr(n)?os(n):n,Lr(e)?os(e):e)}function k9e(n,e,t){var i;i=new tqn(n,e),Sn(n.r,e.$f(),i),t&&!Um(n.u)&&(i.c=new NOn(n.d),_c(e.Pf(),new Y8n(i)))}function yF(n){var e;return e=new sX(n.a),uc(e,n),H(e,(X(),st),n),e.o.a=n.g,e.o.b=n.f,e.n.a=n.i,e.n.b=n.j,e}function y9e(n){var e;return e=YA(zre),u(m(n,(X(),Nc)),24).Gc((sr(),k6))&&xe(e,(Ei(),jc),(Ii(),tP)),e}function j9e(n){var e,t,i,r;for(r=new Vt,i=new A(n);i.a=0?e:-e;i>0;)i%2==0?(t*=t,i=i/2|0):(r*=t,i-=1);return e<0?1/r:r}function E9e(n,e){var t,i,r;for(r=1,t=n,i=e>=0?e:-e;i>0;)i%2==0?(t*=t,i=i/2|0):(r*=t,i-=1);return e<0?1/r:r}function na(n,e){var t,i,r,c;return c=(r=n?yC(n):null,EGn((i=e,r&&r.El(),i))),c==e&&(t=yC(n),t&&t.El()),c}function VY(n,e,t){var i,r;return r=n.a,n.a=e,(n.Db&4)!=0&&(n.Db&1)==0&&(i=new wi(n,1,1,r,e),t?t.lj(i):t=i),t}function PBn(n,e,t){var i,r;return r=n.b,n.b=e,(n.Db&4)!=0&&(n.Db&1)==0&&(i=new wi(n,1,3,r,e),t?t.lj(i):t=i),t}function OBn(n,e,t){var i,r;return r=n.f,n.f=e,(n.Db&4)!=0&&(n.Db&1)==0&&(i=new wi(n,1,0,r,e),t?t.lj(i):t=i),t}function A9e(n,e,t,i){var r,c;for(c=n.Jc();c.Ob();)r=u(c.Pb(),70),r.n.a=e.a+(i.a-r.o.a)/2,r.n.b=e.b,e.b+=r.o.b+t}function M9e(n,e,t,i,r,c,f,o){var h;for(h=t;c=i||e0&&(t=u(rn(n.a,n.a.c.length-1),572),_Y(t,e))||nn(n.a,new XDn(e))}function xBn(n,e){var t;n.c.length!=0&&(t=u(Oo(n,J(Xh,w1,9,n.c.length,0,1)),201),tX(t,new bgn),zGn(t,e))}function BBn(n,e){var t;n.c.length!=0&&(t=u(Oo(n,J(Xh,w1,9,n.c.length,0,1)),201),tX(t,new wgn),zGn(t,e))}function W(n){var e,t;return n>-129&&n<128?(dSn(),e=n+128,t=Yun[e],!t&&(t=Yun[e]=new rK(n)),t):new rK(n)}function nv(n){var e,t;return n>-129&&n<128?(ySn(),e=n+128,t=tfn[e],!t&&(t=tfn[e]=new tK(n)),t):new tK(n)}function RBn(n){var e;return e=new $1,e.a+="VerticalSegment ",Mc(e,n.e),e.a+=" ",Je(e,kX(new JL,new A(n.k))),e.a}function P9e(n){df();var e,t;e=n.d.c-n.e.c,t=u(n.g,157),_c(t.b,new N7n(e)),_c(t.c,new F7n(e)),Bi(t.i,new x7n(e))}function O9e(n){var e;return e=u(So(n.c.c,""),236),e||(e=new Tp(c4(r4(new K2,""),"Other")),dd(n.c.c,"",e)),e}function j5(n){var e;return(n.Db&64)!=0?Rs(n):(e=new us(Rs(n)),e.a+=" (name: ",wr(e,n.zb),e.a+=")",e.a)}function eZ(n,e,t){var i,r;return r=n.sb,n.sb=e,(n.Db&4)!=0&&(n.Db&1)==0&&(i=new wi(n,1,4,r,e),t?t.lj(i):t=i),t}function EF(n,e){var t,i,r;for(t=0,r=qr(n,e).Jc();r.Ob();)i=u(r.Pb(),12),t+=m(i,(X(),Fu))!=null?1:0;return t}function Jg(n,e,t){var i,r,c;for(i=0,c=Ae(n,0);c.b!=c.d.c&&(r=$(N(je(c))),!(r>t));)r>=e&&++i;return i}function L9e(n,e,t){var i,r;return i=new pl(n.e,3,13,null,(r=e.c,r||($n(),Vo)),h1(n,e),!1),t?t.lj(i):t=i,t}function D9e(n,e,t){var i,r;return i=new pl(n.e,4,13,(r=e.c,r||($n(),Vo)),null,h1(n,e),!1),t?t.lj(i):t=i,t}function tZ(n,e,t){var i,r;return r=n.r,n.r=e,(n.Db&4)!=0&&(n.Db&1)==0&&(i=new wi(n,1,8,r,n.r),t?t.lj(i):t=i),t}function f1(n,e){var t,i;return t=u(e,688),i=t.cl(),!i&&t.dl(i=D(e,89)?new ZMn(n,u(e,29)):new OLn(n,u(e,160))),i}function Wk(n,e,t){var i;n.Zi(n.i+1),i=n.Xi(e,t),e!=n.i&&kc(n.g,e,n.g,e+1,n.i-e),qt(n.g,e,i),++n.i,n.Ki(e,t),n.Li()}function $9e(n,e){var t;n.c=e,n.a=P8e(e),n.a<54&&(n.f=(t=e.d>1?xLn(e.a[0],e.a[1]):xLn(e.a[0],0),td(e.e>0?t:i1(t))))}function N9e(n,e){var t;return e.a&&(t=e.a.a.length,n.a?Je(n.a,n.b):n.a=new af(n.d),HLn(n.a,e.a,e.d.length,t)),n}function F9e(n,e){var t,i,r,c;if(e.cj(n.a),c=u(Vn(n.a,8),2014),c!=null)for(t=c,i=0,r=t.length;it)throw M(new xc(TI+n+ain+e+", size: "+t));if(n>e)throw M(new qn(TI+n+rXn+e))}function s1(n,e){var t;t=(n.Bb&256)!=0,e?n.Bb|=256:n.Bb&=-257,(n.Db&4)!=0&&(n.Db&1)==0&&rt(n,new Ds(n,1,2,t,e))}function cZ(n,e){var t;t=(n.Bb&256)!=0,e?n.Bb|=256:n.Bb&=-257,(n.Db&4)!=0&&(n.Db&1)==0&&rt(n,new Ds(n,1,8,t,e))}function uZ(n,e){var t;t=(n.Bb&512)!=0,e?n.Bb|=512:n.Bb&=-513,(n.Db&4)!=0&&(n.Db&1)==0&&rt(n,new Ds(n,1,9,t,e))}function o1(n,e){var t;t=(n.Bb&512)!=0,e?n.Bb|=512:n.Bb&=-513,(n.Db&4)!=0&&(n.Db&1)==0&&rt(n,new Ds(n,1,3,t,e))}function sC(n,e){var t;t=(n.Bb&256)!=0,e?n.Bb|=256:n.Bb&=-257,(n.Db&4)!=0&&(n.Db&1)==0&&rt(n,new Ds(n,1,8,t,e))}function B9e(n,e,t){var i,r;return r=n.a,n.a=e,(n.Db&4)!=0&&(n.Db&1)==0&&(i=new wi(n,1,5,r,n.a),t?Ann(t,i):t=i),t}function qBn(n){var e;return(n.Db&64)!=0?Rs(n):(e=new us(Rs(n)),e.a+=" (source: ",wr(e,n.d),e.a+=")",e.a)}function A5(n,e){var t;return n.b==-1&&n.a&&(t=n.a.nk(),n.b=t?n.c.Eh(n.a.Jj(),t):St(n.c.Ah(),n.a)),n.c.vh(n.b,e)}function HBn(n,e){var t,i;for(i=new re(n);i.e!=i.i.gc();)if(t=u(ue(i),29),R(e)===R(t))return!0;return!1}function R9e(n){kI();var e,t,i,r;for(t=qF(),i=0,r=t.length;i=65&&n<=70?n-65+10:n>=97&&n<=102?n-97+10:n>=48&&n<=57?n-48:0}function KBn(n){return n-=n>>1&1431655765,n=(n>>2&858993459)+(n&858993459),n=(n>>4)+n&252645135,n+=n>>8,n+=n>>16,n&63}function fZ(n){var e,t;return e=n.k,e==(Xn(),ei)?(t=u(m(n,(X(),tc)),64),t==(tn(),Yn)||t==le):!1}function zBn(n,e){var t,i;for(i=new re(n);i.e!=i.i.gc();)if(t=u(ue(i),146),R(e)===R(t))return!0;return!1}function J9e(n,e,t){var i,r,c;return c=(r=gv(n.b,e),r),c&&(i=u(wI(Sk(n,c),""),29),i)?Oen(n,i,e,t):null}function AF(n,e,t){var i,r,c;return c=(r=gv(n.b,e),r),c&&(i=u(wI(Sk(n,c),""),29),i)?Len(n,i,e,t):null}function M5(n,e,t){var i;if(i=n.gc(),e>i)throw M(new Lb(e,i));if(n.Qi()&&n.Gc(t))throw M(new qn(uj));n.Ei(e,t)}function _9e(n,e){e.Tg("Sort end labels",1),Rt(et(Dr(new Pn(null,new On(n.b,16)),new Ywn),new Zwn),new ngn),e.Ug()}function ii(){ii=x,Xo=new R7(o9,0),Or=new R7(u3,1),Ir=new R7(c3,2),zo=new R7(iR,3),Vf=new R7("UP",4)}function Vk(){Vk=x,bO=new MD("P1_STRUCTURE",0),wO=new MD("P2_PROCESSING_ORDER",1),gO=new MD("P3_EXECUTION",2)}function XBn(){XBn=x,sue=ah(ah(gm(ah(ah(gm(xe(new Kt,(Gp(),v8),(X5(),Eq)),m8),Dln),Nln),k8),Sln),Fln)}function G9e(n){var e,t,i;for(e=new Z,i=new A(n.b);i.a=0?ta(n):Xm(ta(i1(n))))}function VBn(n,e,t,i,r,c){this.e=new Z,this.f=(fr(),d8),nn(this.e,n),this.d=e,this.a=t,this.b=i,this.f=r,this.c=c}function z9e(n){var e;if(!n.a)throw M(new yr("Cannot offset an unassigned cut."));e=n.c-n.b,n.b+=e,sOn(n,e),oOn(n,e)}function YBn(n){var e;return e=XQ(n),Sm(e.a,0)?(jb(),jb(),k_):(jb(),new zD(QL(e.a,0)?gV(e)/td(e.a):0))}function X9e(n,e){var t;if(t=ky(n,e),D(t,336))return u(t,38);throw M(new qn(da+e+"' is not a valid attribute"))}function ht(n,e){return ne?1:n==e?n==0?ht(1/n,1/e):0:isNaN(n)?isNaN(e)?0:1:-1}function T5(n,e,t){var i,r;return n.Nj()?(r=n.Oj(),i=Dx(n,e,t),n.Hj(n.Gj(7,W(t),i,e,r)),i):Dx(n,e,t)}function MF(n,e){var t,i,r;n.d==null?(++n.e,--n.f):(r=e.jd(),t=e.yi(),i=(t&Ze)%n.d.length,Rve(n,i,Rqn(n,i,t,r)))}function ev(n,e){var t;t=(n.Bb&as)!=0,e?n.Bb|=as:n.Bb&=-1025,(n.Db&4)!=0&&(n.Db&1)==0&&rt(n,new Ds(n,1,10,t,e))}function tv(n,e){var t;t=(n.Bb&gw)!=0,e?n.Bb|=gw:n.Bb&=-4097,(n.Db&4)!=0&&(n.Db&1)==0&&rt(n,new Ds(n,1,12,t,e))}function iv(n,e){var t;t=(n.Bb&Mu)!=0,e?n.Bb|=Mu:n.Bb&=-8193,(n.Db&4)!=0&&(n.Db&1)==0&&rt(n,new Ds(n,1,15,t,e))}function rv(n,e){var t;t=(n.Bb&Cl)!=0,e?n.Bb|=Cl:n.Bb&=-2049,(n.Db&4)!=0&&(n.Db&1)==0&&rt(n,new Ds(n,1,11,t,e))}function W9e(n,e){var t;return t=ht(n.b.c,e.b.c),t!=0||(t=ht(n.a.a,e.a.a),t!=0)?t:ht(n.a.b,e.a.b)}function hC(n){var e,t;return t=u(m(n,(en(),Tf)),87),t==(ii(),Xo)?(e=$(N(m(n,CP))),e>=1?Or:zo):t}function Q9e(n){var e,t;for(t=Dqn(pf(n)).Jc();t.Ob();)if(e=Pe(t.Pb()),W5(n,e))return sve(($An(),Noe),e);return null}function V9e(n,e,t){var i,r;for(r=n.a.ec().Jc();r.Ob();)if(i=u(r.Pb(),9),Hk(t,u(rn(e,i.p),18)))return i;return null}function Y9e(n,e,t){var i,r;for(r=D(e,104)&&(u(e,20).Bb&Zi)!=0?new LD(e,n):new U4(e,n),i=0;i>10)+Ry&ri,e[1]=(n&1023)+56320&ri,lh(e,0,e.length)}function aZ(n,e){var t;t=(n.Bb&Zi)!=0,e?n.Bb|=Zi:n.Bb&=-65537,(n.Db&4)!=0&&(n.Db&1)==0&&rt(n,new Ds(n,1,20,t,e))}function dZ(n,e){var t;t=(n.Bb&sc)!=0,e?n.Bb|=sc:n.Bb&=-32769,(n.Db&4)!=0&&(n.Db&1)==0&&rt(n,new Ds(n,1,18,t,e))}function CF(n,e){var t;t=(n.Bb&sc)!=0,e?n.Bb|=sc:n.Bb&=-32769,(n.Db&4)!=0&&(n.Db&1)==0&&rt(n,new Ds(n,1,18,t,e))}function cv(n,e){var t;t=(n.Bb&wh)!=0,e?n.Bb|=wh:n.Bb&=-16385,(n.Db&4)!=0&&(n.Db&1)==0&&rt(n,new Ds(n,1,16,t,e))}function bZ(n,e,t){var i;return i=0,e&&(yg(n.a)?i+=e.f.a/2:i+=e.f.b/2),t&&(yg(n.a)?i+=t.f.a/2:i+=t.f.b/2),i}function T0(n,e,t){var i;return i=n.a.get(e),n.a.set(e,t===void 0?null:t),i===void 0?(++n.c,++n.b.g):++n.d,i}function IF(n,e,t){var i,r;return i=(F1(),r=new FE,r),NT(i,e),$T(i,t),n&&Ee((!n.a&&(n.a=new ti(Pf,n,5)),n.a),i),i}function t8e(n,e,t){var i;i=t,!i&&(i=IW(new Y2,0)),i.Tg(LXn,2),sJn(n.b,e,i.dh(1)),iLe(n,e,i.dh(1)),i$e(e,i.dh(1)),i.Ug()}function qr(n,e){var t;return n.i||uen(n),t=u(gr(n.g,e),49),t?new fh(n.j,u(t.a,15).a,u(t.b,15).a):(Dn(),Dn(),nr)}function Wi(n,e){var t;return Lr(n)&&Lr(e)&&(t=n+e,By34028234663852886e22?$t:e<-34028234663852886e22?di:e}function hh(n){var e,t,i;for(e=new Z,i=new A(n.j);i.a"+ed(e.c):"e_"+kt(e),n.b&&n.c?ed(n.b)+"->"+ed(n.c):"e_"+kt(n))}function u8e(n,e){return Cn(e.b&&e.c?ed(e.b)+"->"+ed(e.c):"e_"+kt(e),n.b&&n.c?ed(n.b)+"->"+ed(n.c):"e_"+kt(n))}function f8e(n){return pF(),_n(),!!(rRn(u(n.a,84).j,u(n.b,87))||u(n.a,84).d.e!=0&&rRn(u(n.a,84).j,u(n.b,87)))}function PF(){Lnn();var n,e,t;t=bNe+++Date.now(),n=_i(j.Math.floor(t*_y))&MI,e=_i(t-n*sin),this.a=n^1502,this.b=e^VB}function eRn(n,e,t,i,r){_Tn(this),this.b=n,this.d=J(Xh,w1,9,e.a.c.length,0,1),this.f=t,Oo(e.a,this.d),this.g=i,this.c=r}function wZ(n,e){n.n.c.length==0&&nn(n.n,new eT(n.s,n.t,n.i)),nn(n.b,e),WZ(u(rn(n.n,n.n.c.length-1),211),e),GUn(n,e)}function s8e(n,e,t){var i;t.Tg("Straight Line Edge Routing",1),t.bh(e,acn),i=u(G(e,(Ig(),O2)),19),tKn(n,i),t.bh(e,eS)}function yn(n){var e,t,i,r;return t=(e=u(io((i=n.Pm,r=i.f,r==ge?i:r)),10),new Nf(e,u(Os(e,e.length),10),0)),xs(t,n),t}function o8e(n){var e,t;for(t=FMe(pf(_b(n))).Jc();t.Ob();)if(e=Pe(t.Pb()),W5(n,e))return ove((NAn(),Foe),e);return null}function OF(n,e){var t,i,r;for(r=0,i=u(e.Kb(n),22).Jc();i.Ob();)t=u(i.Pb(),17),sn(fn(m(t,(X(),m1))))||++r;return r}function tRn(n){var e,t,i,r;for(e=new ZCn(n.Pd().gc()),r=0,i=Lp(n.Pd().Jc());i.Ob();)t=i.Pb(),Q2e(e,t,W(r++));return JEe(e.a)}function h8e(n){var e,t,i;for(t=0,i=n.length;te){NLn(t);break}}RM(t,e)}function a8e(n,e){var t,i,r;i=Og(e),r=$(N(ew(i,(en(),Ks)))),t=j.Math.max(0,r/2-.5),$5(e,t,1),nn(n,new eMn(e,t))}function mn(n,e){var t,i,r,c,f;if(t=e.f,dd(n.c.d,t,e),e.g!=null)for(r=e.g,c=0,f=r.length;ce&&i.Le(n[c-1],n[c])>0;--c)f=n[c],qt(n,c,n[c-1]),qt(n,c-1,f)}function Hf(n,e,t,i){if(e<0)Fen(n,t,i);else{if(!t.pk())throw M(new qn(da+t.ve()+j9));u(t,69).uk().Ak(n,n.ei(),e,i)}}function b8e(n,e){var t;if(t=ky(n.Ah(),e),D(t,104))return u(t,20);throw M(new qn(da+e+"' is not a valid reference"))}function $r(n){var e;return Array.isArray(n)&&n.Rm===U2?_a(uf(n))+"@"+(e=kt(n)>>>0,e.toString(16)):n.toString()}function w8e(n,e){return n.h==xy&&n.m==0&&n.l==0?(e&&(ba=Xc(0,0,0)),pTn((B4(),Kun))):(e&&(ba=Xc(n.l,n.m,n.h)),Xc(0,0,0))}function g8e(n,e){switch(e.g){case 2:return n.b;case 1:return n.c;case 4:return n.d;case 3:return n.a;default:return!1}}function rRn(n,e){switch(e.g){case 2:return n.b;case 1:return n.c;case 4:return n.d;case 3:return n.a;default:return!1}}function gZ(n,e,t,i){switch(e){case 3:return n.f;case 4:return n.g;case 5:return n.i;case 6:return n.j}return rZ(n,e,t,i)}function aC(n,e){if(e==n.d)return n.e;if(e==n.e)return n.d;throw M(new qn("Node "+e+" not part of edge "+n))}function p8e(n){return n.e==null?n:(!n.c&&(n.c=new Gx((n.f&256)!=0,n.i,n.a,n.d,(n.f&16)!=0,n.j,n.g,null)),n.c)}function v8e(n){return n.k!=(Xn(),xt)?!1:Dg(new Pn(null,new xb(new Hn(Qn(yt(n).a.Jc(),new In)))),new mpn)}function Ku(n){var e;if(n.b){if(Ku(n.b),n.b.d!=n.c)throw M(new Lf)}else n.d.dc()&&(e=u(n.f.c.xc(n.e),18),e&&(n.d=e))}function m8e(n){Pb();var e,t,i,r;for(e=n.o.b,i=u(u(ot(n.r,(tn(),le)),24),85).Jc();i.Ob();)t=u(i.Pb(),116),r=t.e,r.b+=e}function k8e(n,e){var t,i,r;for(i=YIe(n,e),r=i[i.length-1]/2,t=0;t=r)return e.c+t;return e.c+e.b.gc()}function pZ(n,e,t,i,r){var c,f,o;for(f=r;e.b!=e.c;)c=u(yp(e),9),o=u(qr(c,i).Xb(0),12),n.d[o.p]=f++,Rn(t.c,o);return f}function C5(n){var e;this.a=(e=u(n.e&&n.e(),10),new Nf(e,u(Os(e,e.length),10),0)),this.b=J(hi,Bn,1,this.a.a.length,5,1)}function vZ(n){NF(),this.c=$s(I(C(DNe,1),Bn,837,0,[gre])),this.b=new de,this.a=n,Ke(this.b,qP,1),_c(pre,new nyn(this))}function ff(){ff=x,Oj=new L7(lo,0),Y9=new L7("FIRST",1),$l=new L7(XXn,2),Z9=new L7("LAST",3),Ld=new L7(WXn,4)}function I5(){I5=x,U9=new PA("LAYER_SWEEP",0),Rsn=new PA("MEDIAN_LAYER_SWEEP",1),Ej=new PA(dR,2),Jsn=new PA(lo,3)}function dC(){dC=x,D1n=new jD("ASPECT_RATIO_DRIVEN",0),tH=new jD("MAX_SCALE_DRIVEN",1),L1n=new jD("AREA_DRIVEN",2)}function bC(){bC=x,eU=new qA(Zrn,0),i0n=new qA("GROUP_DEC",1),c0n=new qA("GROUP_MIXED",2),r0n=new qA("GROUP_INC",3)}function El(){El=x,WH=new JA(o9,0),uE=new JA("POLYLINE",1),G6=new JA("ORTHOGONAL",2),R3=new JA("SPLINES",3)}function mZ(){mZ=x,qfe=new nt(Ucn),Lan=(oT(),vH),Gfe=new An(Kcn,Lan),_fe=new An(zcn,50),Jfe=new An(Xcn,(_n(),!0))}function y8e(n){var e,t,i,r,c;return c=Dnn(n),t=E7(n.c),i=!t,i&&(r=new Ba,Ns(c,"knownLayouters",r),e=new Pyn(r),Bi(n.c,e)),c}function kZ(n,e){var t,i,r,c,f,o;for(i=0,t=0,c=e,f=0,o=c.length;f0&&(i+=r,++t);return t>1&&(i+=n.d*(t-1)),i}function yZ(n){var e,t,i;for(i=new Kl,i.a+="[",e=0,t=n.gc();e0&&(ne(e-1,n.length),n.charCodeAt(e-1)==58)&&!LF(n,Q8,V8))}function jZ(n,e){var t;return R(n)===R(e)?!0:D(e,92)?(t=u(e,92),n.e==t.e&&n.d==t.d&&ave(n,t.a)):!1}function Rp(n){switch(tn(),n.g){case 4:return Yn;case 1:return te;case 3:return le;case 2:return Zn;default:return Kr}}function E8e(n){var e,t;if(n.b)return n.b;for(t=_o?null:n.d;t;){if(e=_o?null:t.b,e)return e;t=_o?null:t.d}return l4(),gfn}function C0(n,e){return Eo(),Fs(d1),j.Math.abs(n-e)<=d1||n==e||isNaN(n)&&isNaN(e)?0:ne?1:Ha(isNaN(n),isNaN(e))}function cRn(n,e){p4();var t,i,r,c;for(i=X$n(n),r=e,F4(i,0,i.length,r),t=0;t3;)r*=10,--c;n=(n+(r>>1))/r|0}return i.i=n,!0}function P8e(n){var e,t,i;return n.e==0?0:(e=n.d<<5,t=n.a[n.d-1],n.e<0&&(i=cxn(n),i==n.d-1&&(--t,t=t|0)),e-=wy(t),e)}function O8e(n){var e,t,i;return n>5,e=n&31,i=J(Oe,ze,30,t+1,15,1),i[t]=1<0&&(e.lengthn.i&&qt(e,n.i,null),e}function F8e(n,e,t){var i,r;return i=$(n.p[e.i.p])+$(n.d[e.i.p])+e.n.b+e.a.b,r=$(n.p[t.i.p])+$(n.d[t.i.p])+t.n.b+t.a.b,r-i}function St(n,e){var t,i,r;if(t=(n.i==null&&bh(n),n.i),i=e.Jj(),i!=-1){for(r=t.length;i0?(n.Zj(),i=e==null?0:kt(e),r=(i&Ze)%n.d.length,t=Rqn(n,r,i,e),t!=-1):!1}function gC(n){var e,t,i,r;for(r=0,t=0,i=n.length;t=0;--i)for(e=t[i],r=0;r0&&(n.Zj(),i=e==null?0:kt(e),r=(i&Ze)%n.d.length,t=ben(n,r,i,e),t)?t.kd():null}function gRn(n,e){var t,i,r;return D(e,45)?(t=u(e,45),i=t.jd(),r=Zb(n.Pc(),i),ll(r,t.kd())&&(r!=null||n.Pc()._b(i))):!1}function qc(n,e,t){var i,r,c;return n.Nj()?(i=n.i,c=n.Oj(),Wk(n,i,e),r=n.Gj(3,null,e,i,c),t?t.lj(r):t=r):Wk(n,n.i,e),t}function G8e(n,e,t){var i,r;return i=new pl(n.e,4,10,(r=e.c,D(r,89)?u(r,29):($n(),As)),null,h1(n,e),!1),t?t.lj(i):t=i,t}function q8e(n,e,t){var i,r;return i=new pl(n.e,3,10,null,(r=e.c,D(r,89)?u(r,29):($n(),As)),h1(n,e),!1),t?t.lj(i):t=i,t}function pRn(n){iw();var e;return(n.q?n.q:(Dn(),Dn(),Kh))._b((en(),ub))?e=u(m(n,ub),205):e=u(m(gi(n),f8),205),e}function ta(n){dh();var e,t;return t=Le(n),e=Le(Xa(n,32)),e!=0?new GLn(t,e):t>10||t<0?new wl(1,t):xYn[t]}function vRn(n){if(n.b==null){for(;n.a.Ob();)if(n.b=n.a.Pb(),!u(n.b,52).Gh())return!0;return n.b=null,!1}else return!0}function mRn(n,e,t){oFn(),jjn.call(this),this.a=$b(uZn,[Y,win],[599,219],0,[FS,C_],2),this.c=new hp,this.g=n,this.f=e,this.d=t}function kRn(n){this.e=J(Oe,ze,30,n.length,15,1),this.c=J(wu,ho,30,n.length,16,1),this.b=J(wu,ho,30,n.length,16,1),this.f=0}function H8e(n){var e,t;for(n.j=J(Mi,mr,30,n.p.c.length,15,1),t=new A(n.p);t.a>5,e&=31,r=n.d+t+(e==0?0:1),i=J(Oe,ze,30,r,15,1),Uje(i,n.a,t,e),c=new Wa(n.e,r,i),t5(c),c}function uv(n,e,t){var i,r,c;for(r=null,c=n.b;c;){if(i=n.a.Le(e,c.d),t&&i==0)return c;i>=0?c=c.a[1]:(r=c,c=c.a[0])}return r}function ty(n,e,t){var i,r,c;for(r=null,c=n.b;c;){if(i=n.a.Le(e,c.d),t&&i==0)return c;i<=0?c=c.a[0]:(r=c,c=c.a[1])}return r}function MRn(n,e,t){var i,r,c,f;for(r=u(zn(n.b,t),172),i=0,f=new A(e.j);f.a0?(j.Error.stackTraceLimit=Error.stackTraceLimit=64,!0):"stack"in new Error}function of(){of=x,dE=new GA("PORTS",0),qd=new GA("PORT_LABELS",1),aE=new GA("NODE_LABELS",2),Yw=new GA("MINIMUM_SIZE",3)}function Al(){Al=x,ja=new LA(lo,0),oln=new LA("NODES_AND_EDGES",1),aq=new LA("PREFER_EDGES",2),dq=new LA("PREFER_NODES",3)}function V8e(n,e){return Eo(),Eo(),Fs(d1),(j.Math.abs(n-e)<=d1||n==e||isNaN(n)&&isNaN(e)?0:ne?1:Ha(isNaN(n),isNaN(e)))>0}function DZ(n,e){return Eo(),Eo(),Fs(d1),(j.Math.abs(n-e)<=d1||n==e||isNaN(n)&&isNaN(e)?0:ne?1:Ha(isNaN(n),isNaN(e)))<0}function PRn(n,e){return Eo(),Eo(),Fs(d1),(j.Math.abs(n-e)<=d1||n==e||isNaN(n)&&isNaN(e)?0:ne?1:Ha(isNaN(n),isNaN(e)))<=0}function $Z(n){switch(n.g){case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:case 20:return!0;default:return!1}}function NZ(n,e,t,i,r,c){this.a=n,this.c=e,this.b=t,this.f=i,this.d=r,this.e=c,this.c>0&&this.b>0&&(this.g=TM(this.c,this.b,this.a))}function Y8e(n,e){var t=n.a,i;e=String(e),t.hasOwnProperty(e)&&(i=t[e]);var r=(fF(),w_)[typeof i],c=r?r(i):ZY(typeof i);return c}function fv(n){var e,t,i;if(i=null,e=yh in n.a,t=!e,t)throw M(new th("Every element must have an id."));return i=Xp(dl(n,yh)),i}function S0(n){var e,t;for(t=uGn(n),e=null;n.c==2;)tt(n),e||(e=(it(),it(),new $m(2)),pd(e,t),t=e),t.Hm(uGn(n));return t}function mC(n,e){var t,i,r;return n.Zj(),i=e==null?0:kt(e),r=(i&Ze)%n.d.length,t=ben(n,r,i,e),t?(TFn(n,t),t.kd()):null}function ORn(n,e){return n.e>e.e?1:n.ee.d?n.e:n.d=48&&n<48+j.Math.min(10,10)?n-48:n>=97&&n<97?n-97+10:n>=65&&n<65?n-65+10:-1}function Z8e(n,e){if(e.c==n)return e.d;if(e.d==n)return e.c;throw M(new qn("Input edge is not connected to the input port."))}function ah(n,e){if(n.a<0)throw M(new yr("Did not call before(...) or after(...) before calling add(...)."));return OX(n,n.a,e),n}function DRn(n,e){var t,i,r;if(n.c)rd(n.c,e);else for(t=e-tf(n),r=new A(n.a);r.a=c?(s9e(n,e),-1):(f9e(n,e),1)}function t7e(n,e){var t,i;for(t=(ne(e,n.length),n.charCodeAt(e)),i=e+1;ie.e?1:n.fe.f?1:kt(n)-kt(e)}function NRn(n,e){var t;return R(e)===R(n)?!0:!D(e,24)||(t=u(e,24),t.gc()!=n.gc())?!1:n.Hc(t)}function kC(n,e){return Gn(n),e==null?!1:Cn(n,e)?!0:n.length==e.length&&Cn(n.toLowerCase(),e.toLowerCase())}function tw(n){var e,t;return Pc(n,-129)>0&&Pc(n,128)<0?(kSn(),e=Le(n)+128,t=Zun[e],!t&&(t=Zun[e]=new cK(n)),t):new cK(n)}function _p(){_p=x,_9=new CA(lo,0),Gfn=new CA("INSIDE_PORT_SIDE_GROUPS",1),__=new CA("GROUP_MODEL_ORDER",2),G_=new CA(sR,3)}function yC(n){var e,t,i;if(i=n.Gh(),!i)for(e=0,t=n.Mh();t;t=t.Mh()){if(++e>zB)return t.Nh();if(i=t.Gh(),i||t==n)break}return i}function c7e(n){var e;return n.b||A1e(n,(e=L0e(n.e,n.a),!e||!Cn(EJ,oo((!e.b&&(e.b=new nf(($n(),tr),ic,e)),e.b),"qualified")))),n.c}function u7e(n){var e,t;for(t=new A(n.a.b);t.a2e3&&(CYn=n,SS=j.setTimeout(O1e,10))),IS++==0?(N6e((HK(),qun)),!0):!1}function p7e(n,e,t){var i;(WYn?(E8e(n),!0):QYn||YYn?(l4(),!0):VYn&&(l4(),!1))&&(i=new NIn(e),i.b=t,EEe(n,i))}function _F(n,e){var t;t=!n.A.Gc((of(),qd))||n.q==(ji(),Ac),n.u.Gc(($u(),Rl))?t?VDe(n,e):WKn(n,e):n.u.Gc(Pa)&&(t?mDe(n,e):hzn(n,e))}function JRn(n){var e;R(G(n,(Me(),$2)))===R((jl(),SO))&&(It(n)?(e=u(G(It(n),$2),348),qe(n,$2,e)):qe(n,$2,_8))}function v7e(n,e,t){var i,r;jx(n.e,e,t,(tn(),Zn)),jx(n.i,e,t,te),n.a&&(r=u(m(e,(X(),st)),12),i=u(m(t,st),12),sN(n.g,r,i))}function _Rn(n,e,t){return new Ls(j.Math.min(n.a,e.a)-t/2,j.Math.min(n.b,e.b)-t/2,j.Math.abs(n.a-e.a)+t,j.Math.abs(n.b-e.b)+t)}function m7e(n,e){var t,i;return t=bc(n.a.c.p,e.a.c.p),t!=0?t:(i=bc(n.a.d.i.p,e.a.d.i.p),i!=0?i:bc(e.a.d.p,n.a.d.p))}function k7e(n,e,t){var i,r,c,f;return c=e.j,f=t.j,c!=f?c.g-f.g:(i=n.f[e.p],r=n.f[t.p],i==0&&r==0?0:i==0?-1:r==0?1:ht(i,r))}function GRn(n){var e;this.d=new Z,this.j=new Li,this.g=new Li,e=n.g.b,this.f=u(m(gi(e),(en(),Tf)),87),this.e=$(N(AC(e,Rw)))}function qRn(n){this.d=new Z,this.e=new z1,this.c=J(Oe,ze,30,(tn(),I(C(er,1),ac,64,0,[Kr,Yn,te,le,Zn])).length,15,1),this.b=n}function _Z(n,e,t){var i;switch(i=t[n.g][e],n.g){case 1:case 3:return new V(0,i);case 2:case 4:return new V(i,0);default:return null}}function y7e(n,e){var t;if(t=Ng(n.o,e),t==null)throw M(new th("Node did not exist in input."));return Jen(n,e),Kx(n,e),Pen(n,e,t),null}function HRn(n,e,t){var i,r;r=u(ak(e.f),207);try{r.kf(n,t),wQ(e.f,r)}catch(c){throw c=zt(c),D(c,102)?(i=c,M(i)):M(c)}}function URn(n,e,t){var i,r,c,f,o,h;return i=null,o=xtn(l5(),e),c=null,o&&(r=null,h=Ntn(o,t),f=null,h!=null&&(f=n.of(o,h)),r=f,c=r),i=c,i}function GF(n,e,t,i){var r;if(r=n.length,e>=r)return r;for(e=e>0?e:0;ei&&qt(e,i,null),e}function KRn(n,e){var t,i;for(i=n.a.length,e.lengthi&&qt(e,i,null),e}function j7e(n){var e;if(n==null)return null;if(e=aTe(Lc(n,!0)),e==null)throw M(new xL("Invalid hexBinary value: '"+n+"'"));return e}function jC(n,e,t){var i;e.a.length>0&&(nn(n.b,new XIn(e.a,t)),i=e.a.length,0i&&(e.a+=HTn(J(ns,gh,30,-i,15,1))))}function zRn(n,e,t){var i,r,c;if(!t[e.d])for(t[e.d]=!0,r=new A(Rg(e));r.a=n.b>>1)for(i=n.c,t=n.b;t>e;--t)i=i.b;else for(i=n.a.a,t=0;t=0?n.Th(r):Lx(n,i)):t<0?Lx(n,i):u(i,69).uk().zk(n,n.ei(),t)}function VRn(n){var e,t,i;for(i=(!n.o&&(n.o=new ku((lc(),Zh),T1,n,0)),n.o),t=i.c.Jc();t.e!=t.i.gc();)e=u(t.Wj(),45),e.kd();return jk(i)}function cn(n){var e;if(D(n.a,4)){if(e=FZ(n.a),e==null)throw M(new yr(zWn+n.b+"'. "+KWn+(hl(AE),AE.k)+Vcn));return e}else return n.a}function L7e(n){var e;if(n==null)return null;if(e=c$e(Lc(n,!0)),e==null)throw M(new xL("Invalid base64Binary value: '"+n+"'"));return e}function ue(n){var e;try{return e=n.i.Xb(n.e),n.Vj(),n.g=n.e++,e}catch(t){throw t=zt(t),D(t,99)?(n.Vj(),M(new Fr)):M(t)}}function KF(n){var e;try{return e=n.c.Ti(n.e),n.Vj(),n.g=n.e++,e}catch(t){throw t=zt(t),D(t,99)?(n.Vj(),M(new Fr)):M(t)}}function EC(n){var e,t,i,r;for(r=0,t=0,i=n.length;t=64&&e<128&&(r=sh(r,Lh(1,e-64)));return r}function AC(n,e){var t,i;return i=null,ut(n,(Me(),x3))&&(t=u(m(n,x3),105),t.nf(e)&&(i=t.mf(e))),i==null&&gi(n)&&(i=m(gi(n),e)),i}function D7e(n,e){var t;return t=u(m(n,(en(),Cr)),79),_D(e,Dne)?t?rf(t):(t=new _u,H(n,Cr,t)):t&&H(n,Cr,null),t}function $7e(n,e){var t,i,r;for(r=new Jc(e.gc()),i=e.Jc();i.Ob();)t=u(i.Pb(),295),t.c==t.f?wv(n,t,t.c):YEe(n,t)||Rn(r.c,t);return r}function YRn(n,e){var t,i,r;for(t=n.o,r=u(u(ot(n.r,e),24),85).Jc();r.Ob();)i=u(r.Pb(),116),i.e.a=xke(i,t.a),i.e.b=t.b*$(N(i.b.mf(xS)))}function N7e(n,e){var t,i,r,c;return r=n.k,t=$(N(m(n,(X(),ib)))),c=e.k,i=$(N(m(e,ib))),c!=(Xn(),ei)?-1:r!=ei?1:t==i?0:tt.b)return!0}return!1}function eJn(n){var e;return e=new $1,e.a+="n",n.k!=(Xn(),xt)&&Je(Je((e.a+="(",e),KD(n.k).toLowerCase()),")"),Je((e.a+="_",e),cy(n)),e.a}function O5(){O5=x,tln=new D7(Zrn,0),hq=new D7(dR,1),lq=new D7("LINEAR_SEGMENTS",2),h8=new D7("BRANDES_KOEPF",3),l8=new D7(lWn,4)}function Gp(){Gp=x,nO=new $A("P1_TREEIFICATION",0),v8=new $A("P2_NODE_ORDERING",1),m8=new $A("P3_NODE_PLACEMENT",2),k8=new $A(mWn,3)}function qp(n,e,t,i){var r;return t>=0?n.Ph(e,t,i):(n.Mh()&&(i=(r=n.Ch(),r>=0?n.xh(i):n.Mh().Qh(n,-1-r,null,i))),n.zh(e,t,i))}function GZ(n,e){switch(e){case 7:!n.e&&(n.e=new Ln(mt,n,7,4)),ke(n.e);return;case 8:!n.d&&(n.d=new Ln(mt,n,8,5)),ke(n.d);return}CZ(n,e)}function qe(n,e,t){return t==null?(!n.o&&(n.o=new ku((lc(),Zh),T1,n,0)),mC(n.o,e)):(!n.o&&(n.o=new ku((lc(),Zh),T1,n,0)),sy(n.o,e,t)),n}function vc(n,e){var t;t=n.dd(e);try{return t.Pb()}catch(i){throw i=zt(i),D(i,113)?M(new xc("Can't get element "+e)):M(i)}}function tJn(n,e){var t;switch(t=u(gr(n.b,e),129).n,e.g){case 1:n.t>=0&&(t.d=n.t);break;case 3:n.t>=0&&(t.a=n.t)}n.C&&(t.b=n.C.b,t.c=n.C.c)}function G7e(n){var e;e=n.a;do e=u(ie(new Hn(Qn(Ut(e).a.Jc(),new In))),17).c.i,e.k==(Xn(),Zt)&&n.b.Ec(e);while(e.k==(Xn(),Zt));n.b=sf(n.b)}function iJn(n,e){var t,i,r;for(r=n,i=new Hn(Qn(Ut(e).a.Jc(),new In));se(i);)t=u(ie(i),17),t.c.i.c&&(r=j.Math.max(r,t.c.i.c.p));return r}function q7e(n,e){var t,i,r;for(r=0,i=u(u(ot(n.r,e),24),85).Jc();i.Ob();)t=u(i.Pb(),116),r+=t.d.d+t.b.Kf().b+t.d.a,i.Ob()&&(r+=n.w);return r}function H7e(n,e){var t,i,r;for(r=0,i=u(u(ot(n.r,e),24),85).Jc();i.Ob();)t=u(i.Pb(),116),r+=t.d.b+t.b.Kf().a+t.d.c,i.Ob()&&(r+=n.w);return r}function rJn(n){var e,t,i,r;if(i=0,r=ow(n),r.c.length==0)return 1;for(t=new A(r);t.a=0?n.Ih(f,t,!0):D0(n,c,t)):u(c,69).uk().wk(n,n.ei(),r,t,i)}function z7e(n,e,t,i){var r,c;c=e.nf((Me(),F2))?u(e.mf(F2),24):n.j,r=R9e(c),r!=(kI(),I_)&&(t&&!$Z(r)||Knn(dTe(n,r,i),e))}function zF(n,e){return ki(n)?!!kYn[e]:n.Qm?!!n.Qm[e]:Tb(n)?!!mYn[e]:Mb(n)?!!vYn[e]:!1}function X7e(n){switch(n.g){case 1:return M0(),gj;case 3:return M0(),wj;case 2:return M0(),P_;case 4:return M0(),S_;default:return null}}function W7e(n,e,t){if(n.e)switch(n.b){case 1:upe(n.c,e,t);break;case 0:fpe(n.c,e,t)}else wDn(n.c,e,t);n.a[e.p][t.p]=n.c.i,n.a[t.p][e.p]=n.c.e}function uJn(n){var e,t;if(n==null)return null;for(t=J(Xh,Y,201,n.length,0,2),e=0;ec?1:0):0}function iw(){iw=x,KP=new OA(lo,0),sq=new OA("PORT_POSITION",1),I2=new OA("NODE_SIZE_WHERE_SPACE_PERMITS",2),C2=new OA("NODE_SIZE",3)}function xh(){xh=x,DH=new Am("AUTOMATIC",0),Zj=new Am(c3,1),nE=new Am(u3,2),jO=new Am("TOP",3),kO=new Am(pin,4),yO=new Am(Nv,5)}function Gg(n,e,t){var i,r;if(r=n.gc(),e>=r)throw M(new Lb(e,r));if(n.Qi()&&(i=n.bd(t),i>=0&&i!=e))throw M(new qn(uj));return n.Vi(e,t)}function h1(n,e){var t,i,r;if(r=GJn(n,e),r>=0)return r;if(n.ml()){for(i=0;i0||n==(OL(),f_)||e==(LL(),s_))throw M(new qn("Invalid range: "+bDn(n,e)))}function HZ(n,e,t,i){kv();var r,c;for(r=0,c=0;c0),(e&-e)==e)return _i(e*zu(n,31)*4656612873077393e-25);do t=zu(n,31),i=t%e;while(t-i+(e-1)<0);return _i(i)}function V7e(n,e){var t,i,r;for(t=u0(new Ja,n),r=new A(e);r.a1&&(c=V7e(n,e)),c}function tke(n){var e,t,i;for(e=0,i=new A(n.c.a);i.a102?-1:n<=57?n-48:n<65?-1:n<=70?n-65+10:n<97?-1:n-97+10}function ex(n,e){if(n==null)throw M(new np("null key in entry: null="+e));if(e==null)throw M(new np("null value in entry: "+n+"=null"))}function bJn(n,e){var t;return t=I(C(Mi,1),mr,30,15,[mF(n.a[0],e),mF(n.a[1],e),mF(n.a[2],e)]),n.d&&(t[0]=j.Math.max(t[0],t[2]),t[2]=t[0]),t}function wJn(n,e){var t;return t=I(C(Mi,1),mr,30,15,[cC(n.a[0],e),cC(n.a[1],e),cC(n.a[2],e)]),n.d&&(t[0]=j.Math.max(t[0],t[2]),t[2]=t[0]),t}function XZ(n,e,t){gp(u(m(e,(en(),Bt)),103))||(rV(n,e,l1(e,t)),rV(n,e,l1(e,(tn(),le))),rV(n,e,l1(e,Yn)),Dn(),si(e.j,new nkn(n)))}function gJn(n){var e,t;for(n.c||lLe(n),t=new _u,e=new A(n.a),E(e);e.a0&&(ne(0,e.length),e.charCodeAt(0)==43)?(ne(1,e.length+1),e.substr(1)):e))}function mke(n){var e;return n==null?null:new _1((e=Lc(n,!0),e.length>0&&(ne(0,e.length),e.charCodeAt(0)==43)?(ne(1,e.length+1),e.substr(1)):e))}function QZ(n,e,t,i,r,c,f,o){var h,l;i&&(h=i.a[0],h&&QZ(n,e,t,h,r,c,f,o),hx(n,t,i.d,r,c,f,o)&&e.Ec(i),l=i.a[1],l&&QZ(n,e,t,l,r,c,f,o))}function L5(n,e){var t,i,r,c;for(c=n.gc(),e.lengthc&&qt(e,c,null),e}function kke(n,e){var t,i;if(i=n.gc(),e==null){for(t=0;t0&&(h+=r),l[a]=f,f+=o*(h+i)}function Cke(n){var e;for(e=0;e0?n.c:0),++r;n.b=i,n.d=c}function IJn(n,e){var t;return t=I(C(Mi,1),mr,30,15,[UZ(n,(so(),nc),e),UZ(n,Kc,e),UZ(n,ec,e)]),n.f&&(t[0]=j.Math.max(t[0],t[2]),t[2]=t[0]),t}function SJn(n){var e;ut(n,(en(),cb))&&(e=u(m(n,cb),24),e.Gc((sw(),Xs))?(e.Kc(Xs),e.Ec(Ws)):e.Gc(Ws)&&(e.Kc(Ws),e.Ec(Xs)))}function PJn(n){var e;ut(n,(en(),cb))&&(e=u(m(n,cb),24),e.Gc((sw(),Vs))?(e.Kc(Vs),e.Ec(ms)):e.Gc(ms)&&(e.Kc(ms),e.Ec(Vs)))}function fx(n,e,t,i){var r,c,f,o;return n.a==null&&CEe(n,e),f=e.b.j.c.length,c=t.d.p,o=i.d.p,r=o-1,r<0&&(r=f-1),c<=r?n.a[r]-n.a[c]:n.a[f-1]-n.a[c]+n.a[r]}function Ske(n){var e;for(e=0;e0&&(r.b+=e),r}function DC(n,e){var t,i,r;for(r=new Li,i=n.Jc();i.Ob();)t=u(i.Pb(),37),yv(t,0,r.b),r.b+=t.f.b+e,r.a=j.Math.max(r.a,t.f.a);return r.a>0&&(r.a+=e),r}function LJn(n,e){var t,i;if(e.length==0)return 0;for(t=x$(n.a,e[0],(tn(),Zn)),t+=x$(n.a,e[e.length-1],te),i=0;i>16==6?n.Cb.Qh(n,5,ko,e):(i=cr(u(Fn((t=u(Vn(n,16),29),t||n.fi()),n.Db>>16),20)),n.Cb.Qh(n,i.n,i.f,e))}function Nke(n){O4();var e=n.e;if(e&&e.stack){var t=e.stack,i=e+` `;return t.substring(0,i.length)==i&&(t=t.substring(i.length)),t.split(` diff --git a/src/uipath/dev/server/static/assets/vendor-react-BN_uQvcy.js b/src/uipath/dev/server/static/assets/vendor-react-N5xbSGOh.js similarity index 98% rename from src/uipath/dev/server/static/assets/vendor-react-BN_uQvcy.js rename to src/uipath/dev/server/static/assets/vendor-react-N5xbSGOh.js index 5018655..0732a6d 100644 --- a/src/uipath/dev/server/static/assets/vendor-react-BN_uQvcy.js +++ b/src/uipath/dev/server/static/assets/vendor-react-N5xbSGOh.js @@ -56,4 +56,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho monaco.config({ paths: { vs: '...' } }) For more please check the link https://github.com/suren-atoyan/monaco-loader#config - `},L0=am(im)(K0),cm={config:nm},om=function(){for(var y=arguments.length,g=new Array(y),o=0;o{o.current=!1}:c,y)}var mt=Um;function pe(){}function _a(c,y,g,o){return Hm(c,o)||Rm(c,y,g,o)}function Hm(c,y){return c.editor.getModel(I0(c,y))}function Rm(c,y,g,o){return c.editor.createModel(y,g,o?I0(c,o):void 0)}function I0(c,y){return c.Uri.parse(y)}function Nm({original:c,modified:y,language:g,originalLanguage:o,modifiedLanguage:D,originalModelPath:N,modifiedModelPath:V,keepCurrentOriginalModel:F=!1,keepCurrentModifiedModel:U=!1,theme:O="light",loading:K="Loading...",options:q={},height:rl="100%",width:Xl="100%",className:Yl,wrapperProps:Cl={},beforeMount:et=pe,onMount:Ql=pe}){let[zl,El]=$.useState(!1),[_l,sl]=$.useState(!0),el=$.useRef(null),j=$.useRef(null),Dl=$.useRef(null),hl=$.useRef(Ql),ll=$.useRef(et),Zl=$.useRef(!1);k0(()=>{let G=$0.init();return G.then(b=>(j.current=b)&&sl(!1)).catch(b=>(b==null?void 0:b.type)!=="cancelation"&&console.error("Monaco initialization: error:",b)),()=>el.current?Wl():G.cancel()}),mt(()=>{if(el.current&&j.current){let G=el.current.getOriginalEditor(),b=_a(j.current,c||"",o||g||"text",N||"");b!==G.getModel()&&G.setModel(b)}},[N],zl),mt(()=>{if(el.current&&j.current){let G=el.current.getModifiedEditor(),b=_a(j.current,y||"",D||g||"text",V||"");b!==G.getModel()&&G.setModel(b)}},[V],zl),mt(()=>{let G=el.current.getModifiedEditor();G.getOption(j.current.editor.EditorOption.readOnly)?G.setValue(y||""):y!==G.getValue()&&(G.executeEdits("",[{range:G.getModel().getFullModelRange(),text:y||"",forceMoveMarkers:!0}]),G.pushUndoStop())},[y],zl),mt(()=>{var G,b;(b=(G=el.current)==null?void 0:G.getModel())==null||b.original.setValue(c||"")},[c],zl),mt(()=>{let{original:G,modified:b}=el.current.getModel();j.current.editor.setModelLanguage(G,o||g||"text"),j.current.editor.setModelLanguage(b,D||g||"text")},[g,o,D],zl),mt(()=>{var G;(G=j.current)==null||G.editor.setTheme(O)},[O],zl),mt(()=>{var G;(G=el.current)==null||G.updateOptions(q)},[q],zl);let ql=$.useCallback(()=>{var _;if(!j.current)return;ll.current(j.current);let G=_a(j.current,c||"",o||g||"text",N||""),b=_a(j.current,y||"",D||g||"text",V||"");(_=el.current)==null||_.setModel({original:G,modified:b})},[g,y,D,c,o,N,V]),ht=$.useCallback(()=>{var G;!Zl.current&&Dl.current&&(el.current=j.current.editor.createDiffEditor(Dl.current,{automaticLayout:!0,...q}),ql(),(G=j.current)==null||G.editor.setTheme(O),El(!0),Zl.current=!0)},[q,O,ql]);$.useEffect(()=>{zl&&hl.current(el.current,j.current)},[zl]),$.useEffect(()=>{!_l&&!zl&&ht()},[_l,zl,ht]);function Wl(){var b,_,Y,tl;let G=(b=el.current)==null?void 0:b.getModel();F||((_=G==null?void 0:G.original)==null||_.dispose()),U||((Y=G==null?void 0:G.modified)==null||Y.dispose()),(tl=el.current)==null||tl.dispose()}return Da.createElement(F0,{width:Xl,height:rl,isEditorReady:zl,loading:K,_ref:Dl,className:Yl,wrapperProps:Cl})}var Cm=Nm;$.memo(Cm);function qm(c){let y=$.useRef();return $.useEffect(()=>{y.current=c},[c]),y.current}var jm=qm,Wn=new Map;function Ym({defaultValue:c,defaultLanguage:y,defaultPath:g,value:o,language:D,path:N,theme:V="light",line:F,loading:U="Loading...",options:O={},overrideServices:K={},saveViewState:q=!0,keepCurrentModel:rl=!1,width:Xl="100%",height:Yl="100%",className:Cl,wrapperProps:et={},beforeMount:Ql=pe,onMount:zl=pe,onChange:El,onValidate:_l=pe}){let[sl,el]=$.useState(!1),[j,Dl]=$.useState(!0),hl=$.useRef(null),ll=$.useRef(null),Zl=$.useRef(null),ql=$.useRef(zl),ht=$.useRef(Ql),Wl=$.useRef(),G=$.useRef(o),b=jm(N),_=$.useRef(!1),Y=$.useRef(!1);k0(()=>{let s=$0.init();return s.then(E=>(hl.current=E)&&Dl(!1)).catch(E=>(E==null?void 0:E.type)!=="cancelation"&&console.error("Monaco initialization: error:",E)),()=>ll.current?il():s.cancel()}),mt(()=>{var E,M,H,Q;let s=_a(hl.current,c||o||"",y||D||"",N||g||"");s!==((E=ll.current)==null?void 0:E.getModel())&&(q&&Wn.set(b,(M=ll.current)==null?void 0:M.saveViewState()),(H=ll.current)==null||H.setModel(s),q&&((Q=ll.current)==null||Q.restoreViewState(Wn.get(N))))},[N],sl),mt(()=>{var s;(s=ll.current)==null||s.updateOptions(O)},[O],sl),mt(()=>{!ll.current||o===void 0||(ll.current.getOption(hl.current.editor.EditorOption.readOnly)?ll.current.setValue(o):o!==ll.current.getValue()&&(Y.current=!0,ll.current.executeEdits("",[{range:ll.current.getModel().getFullModelRange(),text:o,forceMoveMarkers:!0}]),ll.current.pushUndoStop(),Y.current=!1))},[o],sl),mt(()=>{var E,M;let s=(E=ll.current)==null?void 0:E.getModel();s&&D&&((M=hl.current)==null||M.editor.setModelLanguage(s,D))},[D],sl),mt(()=>{var s;F!==void 0&&((s=ll.current)==null||s.revealLine(F))},[F],sl),mt(()=>{var s;(s=hl.current)==null||s.editor.setTheme(V)},[V],sl);let tl=$.useCallback(()=>{var s;if(!(!Zl.current||!hl.current)&&!_.current){ht.current(hl.current);let E=N||g,M=_a(hl.current,o||c||"",y||D||"",E||"");ll.current=(s=hl.current)==null?void 0:s.editor.create(Zl.current,{model:M,automaticLayout:!0,...O},K),q&&ll.current.restoreViewState(Wn.get(E)),hl.current.editor.setTheme(V),F!==void 0&&ll.current.revealLine(F),el(!0),_.current=!0}},[c,y,g,o,D,N,O,K,q,V,F]);$.useEffect(()=>{sl&&ql.current(ll.current,hl.current)},[sl]),$.useEffect(()=>{!j&&!sl&&tl()},[j,sl,tl]),G.current=o,$.useEffect(()=>{var s,E;sl&&El&&((s=Wl.current)==null||s.dispose(),Wl.current=(E=ll.current)==null?void 0:E.onDidChangeModelContent(M=>{Y.current||El(ll.current.getValue(),M)}))},[sl,El]),$.useEffect(()=>{if(sl){let s=hl.current.editor.onDidChangeMarkers(E=>{var H;let M=(H=ll.current.getModel())==null?void 0:H.uri;if(M&&E.find(Q=>Q.path===M.path)){let Q=hl.current.editor.getModelMarkers({resource:M});_l==null||_l(Q)}});return()=>{s==null||s.dispose()}}return()=>{}},[sl,_l]);function il(){var s,E;(s=Wl.current)==null||s.dispose(),rl?q&&Wn.set(N,ll.current.saveViewState()):(E=ll.current.getModel())==null||E.dispose(),ll.current.dispose()}return Da.createElement(F0,{width:Xl,height:Yl,isEditorReady:sl,loading:U,_ref:Zl,className:Cl,wrapperProps:et})}var Bm=Ym,Gm=$.memo(Bm),Vm=Gm;export{Vm as F,Da as W,$ as a,Zm as b,Xm as c,Ty as g,Qm as j,pc as r}; + `},L0=am(im)(K0),cm={config:nm},om=function(){for(var y=arguments.length,g=new Array(y),o=0;o{o.current=!1}:c,y)}var mt=Um;function pe(){}function _a(c,y,g,o){return Hm(c,o)||Rm(c,y,g,o)}function Hm(c,y){return c.editor.getModel(I0(c,y))}function Rm(c,y,g,o){return c.editor.createModel(y,g,o?I0(c,o):void 0)}function I0(c,y){return c.Uri.parse(y)}function Nm({original:c,modified:y,language:g,originalLanguage:o,modifiedLanguage:D,originalModelPath:N,modifiedModelPath:V,keepCurrentOriginalModel:F=!1,keepCurrentModifiedModel:U=!1,theme:O="light",loading:K="Loading...",options:q={},height:rl="100%",width:Xl="100%",className:Yl,wrapperProps:Cl={},beforeMount:et=pe,onMount:Ql=pe}){let[zl,El]=$.useState(!1),[_l,sl]=$.useState(!0),el=$.useRef(null),j=$.useRef(null),Dl=$.useRef(null),hl=$.useRef(Ql),ll=$.useRef(et),Zl=$.useRef(!1);k0(()=>{let G=$0.init();return G.then(b=>(j.current=b)&&sl(!1)).catch(b=>(b==null?void 0:b.type)!=="cancelation"&&console.error("Monaco initialization: error:",b)),()=>el.current?Wl():G.cancel()}),mt(()=>{if(el.current&&j.current){let G=el.current.getOriginalEditor(),b=_a(j.current,c||"",o||g||"text",N||"");b!==G.getModel()&&G.setModel(b)}},[N],zl),mt(()=>{if(el.current&&j.current){let G=el.current.getModifiedEditor(),b=_a(j.current,y||"",D||g||"text",V||"");b!==G.getModel()&&G.setModel(b)}},[V],zl),mt(()=>{let G=el.current.getModifiedEditor();G.getOption(j.current.editor.EditorOption.readOnly)?G.setValue(y||""):y!==G.getValue()&&(G.executeEdits("",[{range:G.getModel().getFullModelRange(),text:y||"",forceMoveMarkers:!0}]),G.pushUndoStop())},[y],zl),mt(()=>{var G,b;(b=(G=el.current)==null?void 0:G.getModel())==null||b.original.setValue(c||"")},[c],zl),mt(()=>{let{original:G,modified:b}=el.current.getModel();j.current.editor.setModelLanguage(G,o||g||"text"),j.current.editor.setModelLanguage(b,D||g||"text")},[g,o,D],zl),mt(()=>{var G;(G=j.current)==null||G.editor.setTheme(O)},[O],zl),mt(()=>{var G;(G=el.current)==null||G.updateOptions(q)},[q],zl);let ql=$.useCallback(()=>{var _;if(!j.current)return;ll.current(j.current);let G=_a(j.current,c||"",o||g||"text",N||""),b=_a(j.current,y||"",D||g||"text",V||"");(_=el.current)==null||_.setModel({original:G,modified:b})},[g,y,D,c,o,N,V]),ht=$.useCallback(()=>{var G;!Zl.current&&Dl.current&&(el.current=j.current.editor.createDiffEditor(Dl.current,{automaticLayout:!0,...q}),ql(),(G=j.current)==null||G.editor.setTheme(O),El(!0),Zl.current=!0)},[q,O,ql]);$.useEffect(()=>{zl&&hl.current(el.current,j.current)},[zl]),$.useEffect(()=>{!_l&&!zl&&ht()},[_l,zl,ht]);function Wl(){var b,_,Y,tl;let G=(b=el.current)==null?void 0:b.getModel();F||((_=G==null?void 0:G.original)==null||_.dispose()),U||((Y=G==null?void 0:G.modified)==null||Y.dispose()),(tl=el.current)==null||tl.dispose()}return Da.createElement(F0,{width:Xl,height:rl,isEditorReady:zl,loading:K,_ref:Dl,className:Yl,wrapperProps:Cl})}var Cm=Nm,Vm=$.memo(Cm);function qm(c){let y=$.useRef();return $.useEffect(()=>{y.current=c},[c]),y.current}var jm=qm,Wn=new Map;function Ym({defaultValue:c,defaultLanguage:y,defaultPath:g,value:o,language:D,path:N,theme:V="light",line:F,loading:U="Loading...",options:O={},overrideServices:K={},saveViewState:q=!0,keepCurrentModel:rl=!1,width:Xl="100%",height:Yl="100%",className:Cl,wrapperProps:et={},beforeMount:Ql=pe,onMount:zl=pe,onChange:El,onValidate:_l=pe}){let[sl,el]=$.useState(!1),[j,Dl]=$.useState(!0),hl=$.useRef(null),ll=$.useRef(null),Zl=$.useRef(null),ql=$.useRef(zl),ht=$.useRef(Ql),Wl=$.useRef(),G=$.useRef(o),b=jm(N),_=$.useRef(!1),Y=$.useRef(!1);k0(()=>{let s=$0.init();return s.then(E=>(hl.current=E)&&Dl(!1)).catch(E=>(E==null?void 0:E.type)!=="cancelation"&&console.error("Monaco initialization: error:",E)),()=>ll.current?il():s.cancel()}),mt(()=>{var E,M,H,Q;let s=_a(hl.current,c||o||"",y||D||"",N||g||"");s!==((E=ll.current)==null?void 0:E.getModel())&&(q&&Wn.set(b,(M=ll.current)==null?void 0:M.saveViewState()),(H=ll.current)==null||H.setModel(s),q&&((Q=ll.current)==null||Q.restoreViewState(Wn.get(N))))},[N],sl),mt(()=>{var s;(s=ll.current)==null||s.updateOptions(O)},[O],sl),mt(()=>{!ll.current||o===void 0||(ll.current.getOption(hl.current.editor.EditorOption.readOnly)?ll.current.setValue(o):o!==ll.current.getValue()&&(Y.current=!0,ll.current.executeEdits("",[{range:ll.current.getModel().getFullModelRange(),text:o,forceMoveMarkers:!0}]),ll.current.pushUndoStop(),Y.current=!1))},[o],sl),mt(()=>{var E,M;let s=(E=ll.current)==null?void 0:E.getModel();s&&D&&((M=hl.current)==null||M.editor.setModelLanguage(s,D))},[D],sl),mt(()=>{var s;F!==void 0&&((s=ll.current)==null||s.revealLine(F))},[F],sl),mt(()=>{var s;(s=hl.current)==null||s.editor.setTheme(V)},[V],sl);let tl=$.useCallback(()=>{var s;if(!(!Zl.current||!hl.current)&&!_.current){ht.current(hl.current);let E=N||g,M=_a(hl.current,o||c||"",y||D||"",E||"");ll.current=(s=hl.current)==null?void 0:s.editor.create(Zl.current,{model:M,automaticLayout:!0,...O},K),q&&ll.current.restoreViewState(Wn.get(E)),hl.current.editor.setTheme(V),F!==void 0&&ll.current.revealLine(F),el(!0),_.current=!0}},[c,y,g,o,D,N,O,K,q,V,F]);$.useEffect(()=>{sl&&ql.current(ll.current,hl.current)},[sl]),$.useEffect(()=>{!j&&!sl&&tl()},[j,sl,tl]),G.current=o,$.useEffect(()=>{var s,E;sl&&El&&((s=Wl.current)==null||s.dispose(),Wl.current=(E=ll.current)==null?void 0:E.onDidChangeModelContent(M=>{Y.current||El(ll.current.getValue(),M)}))},[sl,El]),$.useEffect(()=>{if(sl){let s=hl.current.editor.onDidChangeMarkers(E=>{var H;let M=(H=ll.current.getModel())==null?void 0:H.uri;if(M&&E.find(Q=>Q.path===M.path)){let Q=hl.current.editor.getModelMarkers({resource:M});_l==null||_l(Q)}});return()=>{s==null||s.dispose()}}return()=>{}},[sl,_l]);function il(){var s,E;(s=Wl.current)==null||s.dispose(),rl?q&&Wn.set(N,ll.current.saveViewState()):(E=ll.current.getModel())==null||E.dispose(),ll.current.dispose()}return Da.createElement(F0,{width:Xl,height:Yl,isEditorReady:sl,loading:U,_ref:Zl,className:Cl,wrapperProps:et})}var Bm=Ym,Gm=$.memo(Bm),Lm=Gm;export{Lm as F,Da as W,$ as a,Zm as b,Xm as c,Ty as g,Qm as j,pc as r,Vm as w}; diff --git a/src/uipath/dev/server/static/assets/vendor-reactflow-BP_V7ttx.js b/src/uipath/dev/server/static/assets/vendor-reactflow-CxoS0d5s.js similarity index 99% rename from src/uipath/dev/server/static/assets/vendor-reactflow-BP_V7ttx.js rename to src/uipath/dev/server/static/assets/vendor-reactflow-CxoS0d5s.js index 8b6ea14..248e930 100644 --- a/src/uipath/dev/server/static/assets/vendor-reactflow-BP_V7ttx.js +++ b/src/uipath/dev/server/static/assets/vendor-reactflow-CxoS0d5s.js @@ -1,4 +1,4 @@ -import{r as io,g as ds,W as N,a as b}from"./vendor-react-BN_uQvcy.js";function it(t){if(typeof t=="string"||typeof t=="number")return""+t;let e="";if(Array.isArray(t))for(let n=0,r;n UiPath Developer Console - - - + + + - +
diff --git a/src/uipath/dev/services/agent/loop.py b/src/uipath/dev/services/agent/loop.py index 83dc906..d36b248 100644 --- a/src/uipath/dev/services/agent/loop.py +++ b/src/uipath/dev/services/agent/loop.py @@ -5,6 +5,8 @@ import asyncio import json import logging +import platform +import sys from collections.abc import AsyncIterator, Callable from typing import Any @@ -38,10 +40,26 @@ # System prompt # --------------------------------------------------------------------------- -SYSTEM_PROMPT = """\ +_OS_LABEL = ( + "Windows" + if sys.platform == "win32" + else ("macOS" if sys.platform == "darwin" else "Linux") +) +_SHELL_HINT = ( + "Use Windows-compatible commands (e.g., `dir` instead of `ls`, `type` instead of `cat`, " + "backslashes in paths). PowerShell and cmd builtins are available." + if sys.platform == "win32" + else "Standard Unix shell commands are available (ls, cat, etc.)." +) + +SYSTEM_PROMPT = f"""\ You are a senior Python developer specializing in UiPath coded agents and automations. \ You help users build, debug, test, and improve Python agents using the UiPath SDK. +## Environment +- **OS**: {_OS_LABEL} ({platform.platform()}) +- **Shell**: {_SHELL_HINT} + ## Critical Rules ### You Have a Shell — USE IT @@ -103,13 +121,54 @@ If the user asks you to publish or deploy, use `bash` to run the commands — don't tell them to do it. \ Default to publishing to personal workspace (`-w`) unless the user specifies a tenant folder. +## UiPath Project Structure + +A typical UiPath Python project has: +- `main.py` or `src//main.py` — agent/function entry point (can be at root or in src/) +- `uipath.json` — registers agents: `{{"agents": {{"main": "main.py:main"}}}}` or `{{"agents": {{"main": "src/agent/main.py:main"}}}}` +- `langgraph.json` — alternative config for LangGraph agents +- `pyproject.toml` — Python dependencies (managed via `uv`) +- `bindings.json` — UiPath resource bindings (queues, buckets) +- `evaluations/` — test suites + - `eval-sets/` — JSON test case files (inputs + expected outputs) + - `evaluators/` — JSON evaluator definition files +- `entry-points.json` — auto-generated by `uv run uipath init` +- `src/` — alternative location for agent/function source code + +## Search Strategy + +- When searching Python code, ALWAYS use `include: '*.py'` with grep +- Use `glob` to discover file structure first, then `grep` for content +- Start with targeted searches (specific filenames, class names) before broad patterns +- For evaluations: look in `evaluations/eval-sets/` and `evaluations/evaluators/` +- For agent code: check `uipath.json` first to find entry points, then look in both root and `src/` for Python files +- Check `pyproject.toml` for dependencies and project name +- NEVER search without a file type filter — it wastes time on binary/generated files + +## Debugging + +When `uv run uipath eval` fails or all scores come back 0.0, the function likely crashed — not wrong logic. + +### Triage Steps +1. **Run the function standalone first**: `uv run uipath run ''` with a sample input from the eval set. +2. **Read the bottom of the traceback** — the last exception is the root cause. +3. **Re-run `uv run uipath init`** after changing Input/Output models to regenerate `entry-points.json`. + +### Common Error Patterns +- **Score 0.0 on ALL evals**: function crashed, not wrong logic. The evaluator got `{{}}` because the function errored. Run standalone to see the real error. +- **`ModuleNotFoundError`**: missing dependency — add it to `pyproject.toml` and run `uv sync`. +- **`KeyError` or empty output in evaluator**: function returned `{{}}` instead of expected output — the function errored, not the evaluator. +- **Schema mismatch / wrong input shape**: stale `entry-points.json` — run `uv run uipath init`. +- **`from __future__ import annotations`**: this stringifies all annotations and breaks runtime type detection. Remove it if Input/Output models aren't being recognized. +- **Missing env vars**: check that required variables (`OPENAI_API_KEY`, etc.) are set in the environment. + ## Tools - `read_file` — Read file contents (always use before editing). Supports offset/limit for large files. - `write_file` — Create or overwrite a file - `edit_file` — Surgical string replacement (old_string must be unique) - `bash` — Execute a shell command (timeout: 30s). USE THIS to run commands for the user. -- `glob` — Find files matching a pattern (e.g. `**/*.py`) -- `grep` — Search file contents with regex +- `glob` — Find files matching a pattern (e.g. `**/*.py`). Excludes .venv, node_modules, __pycache__, .git. +- `grep` — Search file contents with regex. Excludes .venv, node_modules, __pycache__, .git. - `create_task` — Add a new step to your task plan - `update_task` — Update a task's status (pending → in_progress → completed) or title - `list_tasks` — Show all tasks with their statuses @@ -151,6 +210,9 @@ async def _empty_async_iter() -> AsyncIterator[StreamEvent]: - Be concise: your full response goes back to the parent agent's context window - Keep your response under 2000 chars — focus on what matters - If you can't find something, say so explicitly rather than guessing +- When searching code, always use `include: '*.py'` with grep +- Focus on evaluations/ directory for test-related files +- Check uipath.json and main.py for agent entry points """ diff --git a/src/uipath/dev/services/agent/service.py b/src/uipath/dev/services/agent/service.py index f9639ba..c7d4e55 100644 --- a/src/uipath/dev/services/agent/service.py +++ b/src/uipath/dev/services/agent/service.py @@ -13,6 +13,7 @@ from uipath.dev.services.agent.provider import create_provider from uipath.dev.services.agent.session import AgentSession from uipath.dev.services.agent.tools import ( + EXCLUDED_DIRS, create_ask_user_tool, create_default_tools, create_dispatch_agent_tool, @@ -24,6 +25,138 @@ _PROJECT_ROOT = Path.cwd().resolve() +def _detect_project_context(project_root: Path) -> str: + """Detect project files and return a context string for the system prompt.""" + parts: list[str] = [] + + pyproject = project_root / "pyproject.toml" + if pyproject.is_file(): + try: + text = pyproject.read_text(encoding="utf-8") + for line in text.splitlines(): + stripped = line.strip() + if stripped.startswith("name"): + # Extract name = "value" from TOML + _, _, value = stripped.partition("=") + name = value.strip().strip('"').strip("'") + if name: + parts.append(f"Project: {name}") + break + except Exception: + pass + + uipath_json = project_root / "uipath.json" + if uipath_json.is_file(): + try: + parts.append( + f"uipath.json: {uipath_json.read_text(encoding='utf-8').strip()}" + ) + except Exception: + pass + + langgraph_json = project_root / "langgraph.json" + if langgraph_json.is_file(): + try: + parts.append( + f"langgraph.json: {langgraph_json.read_text(encoding='utf-8').strip()}" + ) + except Exception: + pass + + evals_dir = project_root / "evaluations" + if evals_dir.is_dir(): + eval_set_dir = evals_dir / "eval-sets" + evaluator_dir = evals_dir / "evaluators" + eval_sets = list(eval_set_dir.glob("*.json")) if eval_set_dir.is_dir() else [] + evaluators = ( + list(evaluator_dir.glob("*.json")) if evaluator_dir.is_dir() else [] + ) + sub: list[str] = [] + if eval_sets: + sub.append( + f"{len(eval_sets)} eval sets: {', '.join(f.stem for f in eval_sets[:5])}" + ) + if evaluators: + sub.append( + f"{len(evaluators)} evaluators: {', '.join(f.stem for f in evaluators[:5])}" + ) + if sub: + parts.append(f"Evaluations dir: {'; '.join(sub)}") + + # List Python source files at root and in src/ + py_files = [f.name for f in project_root.glob("*.py")] + src_dir = project_root / "src" + if src_dir.is_dir(): + src_py = [ + str(f.relative_to(project_root)) + for f in src_dir.rglob("*.py") + if not any( + p.startswith(".") or p in EXCLUDED_DIRS + for p in f.relative_to(project_root).parts + ) + ][:10] + py_files.extend(src_py) + if py_files: + parts.append(f"Python files: {', '.join(py_files[:10])}") + + if not parts: + return "" + return "\n\n## Current Project\n" + "\n".join(f"- {p}" for p in parts) + + +def _repair_orphaned_tool_calls(session: AgentSession) -> None: + """Fix conversation history after a cancelled turn. + + If the last assistant message has tool_calls but some/all tool results + are missing, the API will reject the next request. Patch by adding + stub tool results for any missing call IDs. + """ + if not session.messages: + return + + # Find the last assistant message with tool_calls + last_asst_idx = None + for i in range(len(session.messages) - 1, -1, -1): + msg = session.messages[i] + if msg.get("role") == "assistant" and msg.get("tool_calls"): + last_asst_idx = i + break + + if last_asst_idx is None: + return + + expected_ids = {tc["id"] for tc in session.messages[last_asst_idx]["tool_calls"]} + + # Collect tool result IDs that follow this assistant message + present_ids: set[str] = set() + for msg in session.messages[last_asst_idx + 1 :]: + if msg.get("role") == "tool" and msg.get("tool_call_id"): + present_ids.add(msg["tool_call_id"]) + + missing = expected_ids - present_ids + if not missing: + return + + # Insert stub results right after the last existing tool result (or after assistant msg) + insert_at = last_asst_idx + 1 + for j in range(last_asst_idx + 1, len(session.messages)): + if session.messages[j].get("role") == "tool": + insert_at = j + 1 + else: + break + + for call_id in missing: + session.messages.insert( + insert_at, + { + "role": "tool", + "tool_call_id": call_id, + "content": "[cancelled by user]", + }, + ) + insert_at += 1 + + def _safe_parse_json(s: str) -> dict[str, Any]: """Parse JSON string, returning empty dict on failure.""" try: @@ -86,6 +219,7 @@ async def send_message( ): return + _repair_orphaned_tool_calls(session) session.messages.append({"role": "user", "content": text}) session.status = "thinking" session._cancel_event.clear() @@ -350,6 +484,9 @@ async def _run_agent_loop(self, session: AgentSession) -> None: except FileNotFoundError: pass + # Inject dynamic project context + system_prompt += _detect_project_context(_PROJECT_ROOT) + # Build tools list tools = create_default_tools(_PROJECT_ROOT) tools.extend(create_task_tools()) diff --git a/src/uipath/dev/services/agent/tools.py b/src/uipath/dev/services/agent/tools.py index 070423e..c9e11d7 100644 --- a/src/uipath/dev/services/agent/tools.py +++ b/src/uipath/dev/services/agent/tools.py @@ -20,6 +20,16 @@ BASH_TIMEOUT = 30 TOOLS_REQUIRING_APPROVAL = {"write_file", "edit_file", "bash"} +# Directories to exclude from glob/grep results. +# All dot-prefixed directories (e.g. .git, .venv, .claude) are already +# filtered via `startswith(".")` checks. This set covers non-dot dirs +# that should also be excluded. +EXCLUDED_DIRS = { + "node_modules", + "__pycache__", + "__uipath", +} + # Matches standard ANSI CSI sequences, OSC sequences, and carriage returns. _ANSI_RE = re.compile(r"\x1b\][^\x1b]*(?:\x1b\\|\x07)|\x1b\[[0-9;]*[A-Za-z]|\r") @@ -215,7 +225,15 @@ def handler(args: dict[str, Any]) -> str: if not base.is_dir(): return f"Error: directory not found: {args.get('path', '.')}" matches = sorted(base.glob(pattern)) - matches = [m for m in matches if str(m.resolve()).startswith(str(project_root))] + matches = [ + m + for m in matches + if str(m.resolve()).startswith(str(project_root)) + and not any( + p.startswith(".") or p in EXCLUDED_DIRS + for p in m.relative_to(project_root).parts + ) + ] if len(matches) > MAX_GLOB_RESULTS: matches = matches[:MAX_GLOB_RESULTS] truncated = True @@ -246,14 +264,12 @@ def handler(args: dict[str, Any]) -> str: if base.is_file(): files_to_search = [base] elif base.is_dir(): - for root, _dirs, filenames in os.walk(base): + for root, dirs, filenames in os.walk(base): + # Prune excluded directories in-place to prevent traversal + dirs[:] = [ + d for d in dirs if not d.startswith(".") and d not in EXCLUDED_DIRS + ] root_path = Path(root) - parts = root_path.relative_to(base).parts - if any( - p.startswith(".") or p in ("node_modules", "__pycache__", ".venv") - for p in parts - ): - continue for fname in filenames: if include and not fnmatch.fnmatch(fname, include): continue @@ -489,7 +505,15 @@ def create_default_tools(project_root: Path) -> list[ToolDefinition]: "Execute a shell command and return stdout + stderr. Timeout: 30 seconds. " "Use this for running CLI tools (uv run, uipath init, pytest, ruff, etc.), " "installing dependencies, and any terminal operations. For commands that need " - "interactive input, provide it via the stdin parameter. Requires user approval." + "interactive input, provide it via the stdin parameter. Requires user approval. " + "Common UiPath commands: `uv run uipath init`, `uv run uipath run ''`, " + "`uv run uipath eval`, `uv run uipath pack`, `uv run uipath publish -w`. " + + ( + "The user is on Windows — use Windows-compatible commands " + "(e.g., `dir` instead of `ls`, `type` instead of `cat`)." + if sys.platform == "win32" + else "The user is on Unix — standard shell commands (ls, cat, etc.) are available." + ) ), parameters=_BASH_PARAMS, handler=_make_bash(project_root), @@ -501,6 +525,7 @@ def create_default_tools(project_root: Path) -> list[ToolDefinition]: "Find files matching a glob pattern (e.g. '**/*.py', 'src/**/*.ts'). " "Use this to discover files by name or extension before reading them. " "Returns up to 200 file paths relative to the project root, sorted alphabetically. " + "Automatically excludes .venv, node_modules, __pycache__, .git and other non-source directories. " "For searching file *contents*, use grep instead." ), parameters=_GLOB_PARAMS, @@ -510,9 +535,10 @@ def create_default_tools(project_root: Path) -> list[ToolDefinition]: name="grep", description=( "Search file contents using a regex pattern. Returns matching lines with " - "file path, line number, and content (up to 100 matches). Skips hidden dirs, " - "node_modules, and __pycache__. Use the 'include' filter for specific file types " - "(e.g. '*.py'). For finding files by name, use glob instead." + "file path, line number, and content (up to 100 matches). " + "Skips .venv, .git, node_modules, __pycache__, and other non-source directories. " + "Use the 'include' filter for specific file types (e.g. '*.py'). " + "For finding files by name, use glob instead." ), parameters=_GREP_PARAMS, handler=_make_grep(project_root), diff --git a/src/uipath/dev/services/skill_service.py b/src/uipath/dev/services/skill_service.py index 95b31b2..ef7b6e3 100644 --- a/src/uipath/dev/services/skill_service.py +++ b/src/uipath/dev/services/skill_service.py @@ -63,7 +63,7 @@ def get_skill_content(self, skill_id: str) -> str: return path.read_text(encoding="utf-8") def get_skill_summary(self, skill_id: str) -> str: - """Return a compact summary: title + section headings + reference files. + """Return a compact summary: title + description + section headings + reference files. This is injected into the system prompt instead of the full content, so the model can use ``read_reference`` to drill into details. @@ -74,17 +74,29 @@ def get_skill_summary(self, skill_id: str) -> str: text = path.read_text(encoding="utf-8") title = "" + first_paragraph = "" headings: list[str] = [] + in_frontmatter = False + past_title = False for line in text.splitlines(): stripped = line.strip() + # Skip YAML frontmatter + if stripped == "---": + in_frontmatter = not in_frontmatter + continue + if in_frontmatter: + continue if ( stripped.startswith("# ") and not stripped.startswith("##") and not title ): title = stripped + past_title = True elif stripped.startswith("## "): headings.append(stripped) + elif past_title and not first_paragraph and stripped: + first_paragraph = stripped # List sibling reference files the model can read_reference into refs_dir = path.parent @@ -93,15 +105,18 @@ def get_skill_summary(self, skill_id: str) -> str: ) parts = [title or f"# {skill_id}"] + if first_paragraph: + parts.append(first_paragraph) + parts.append( + "\nTo use this skill: read the sections below, then call `read_reference` " + "with a filename to get full details on any topic." + ) if headings: parts.append("\nSections:") parts.extend(f" - {h.lstrip('#').strip()}" for h in headings) if ref_files: parts.append("\nAvailable reference files (use read_reference to view):") parts.extend(f" - {f}" for f in ref_files) - parts.append( - "\nUse read_reference with the filename above to get full details." - ) return "\n".join(parts) def get_reference(self, skill_id: str, ref_path: str) -> str: diff --git a/src/uipath/dev/skills/uipath/SKILL.md b/src/uipath/dev/skills/uipath/SKILL.md index 9be3a68..39caea1 100644 --- a/src/uipath/dev/skills/uipath/SKILL.md +++ b/src/uipath/dev/skills/uipath/SKILL.md @@ -22,16 +22,6 @@ Both share: ## Documentation -### Getting Started - -Begin your agent development journey with these foundational topics: - -- **[Authentication](references/authentication.md)** - Authenticate with UiPath - - Interactive OAuth authentication - - Unattended client credentials flow - - Environment configuration - - Network settings - ### Building Agents Develop new agents with monitoring and observability built-in: @@ -85,63 +75,22 @@ Package and publish your agents and functions to UiPath Orchestrator: Ensure your agents work correctly with evaluations: -- **[Evaluations](references/evaluations.md)** - Create and run evaluations - - Output-based evaluators for result validation - - Trajectory-based evaluators for execution flow analysis - - Test case organization - - Mocking external dependencies - -- **[Creating Evaluations](references/evaluations/creating-evaluations.md)** - Design test cases - - Define evaluation scenarios - - Collect test inputs and expected outputs - - Organize by scenario type - - Schema validation - -- **[Evaluators Guide](references/evaluations/evaluators/README.md)** - Understand evaluator types - - Output-based evaluators (ExactMatch, JsonSimilarity, LLMJudgeOutput, Contains) - - Trajectory-based evaluators (Trajectory) - - Custom evaluators - - Evaluator selection guide - -- **[Evaluation Sets](references/evaluations/evaluation-sets.md)** - Structure your tests - - Evaluation set file format - - Test case schema - - Mocking strategies - - Complete examples - -- **[Running Evaluations](references/evaluations/running-evaluations.md)** - Execute and analyze - - Running test suites - - Understanding results - - Performance analysis - - Troubleshooting - -- **[Best Practices](references/evaluations/best-practices.md)** - Evaluation patterns - - Best practices for evaluation design - - Common patterns by agent type: - - Calculator/Deterministic agents - - Natural language agents - - Multi-step orchestration agents - - API integration agents - - Test organization strategies - - Performance optimization +- **[Evaluations](references/evaluations.md)** — Creating evaluations, eval sets, running evaluations, mocking, best practices +- **[Evaluators](references/evaluators.md)** — All evaluator types, custom evaluators, selection guide ## Quick Patterns ### Calculator/Deterministic Agents Use ExactMatch evaluators for agents that produce deterministic outputs. -See [Best Practices - Calculator Pattern](references/evaluations/best-practices.md#pattern-1-calculatordeterministic-agents) ### Natural Language Agents Combine LLMJudge and Contains evaluators for semantic validation. -See [Best Practices - Natural Language Pattern](references/evaluations/best-practices.md#pattern-2-natural-language-agents) ### Multi-Step Orchestration Agents Use Trajectory and JsonSimilarity evaluators for multi-tool workflows. -See [Best Practices - Orchestration Pattern](references/evaluations/best-practices.md#pattern-3-multi-step-orchestration-agents) ### API Integration Agents Mix JsonSimilarity and ExactMatch for API response validation. -See [Best Practices - API Integration Pattern](references/evaluations/best-practices.md#pattern-4-api-integration-agents) ## Features @@ -192,22 +141,18 @@ Evaluations are test suites that: ## Next Steps -1. **Getting started?** - - See [Authentication](references/authentication.md) for setup instructions - -2. **Building your first agent?** +1. **Building your first agent?** - Start with [Creating Agents](references/creating-agents.md) - Learn about [Tracing](references/tracing.md) to add monitoring - Then run your first agent using [Running Agents](references/running-agents.md) -3. **Building your first function?** +2. **Building your first function?** - Start with [Creating Functions](references/creating-functions.md) - Then run it using [Running Agents](references/running-agents.md) (same workflow) -4. **Testing your agents?** - - Start with [Creating Evaluations](references/evaluations/creating-evaluations.md) - - Review [Best Practices](references/evaluations/best-practices.md) for your agent type - - Run evaluations with [Running Evaluations](references/evaluations/running-evaluations.md) +3. **Testing your agents?** + - Read [Evaluations](references/evaluations.md) for creating and running evaluations + - Read [Evaluators](references/evaluators.md) for evaluator types and selection # Additional Instructions - You MUST ALWAYS read the relevant linked references before making assumptions! diff --git a/src/uipath/dev/skills/uipath/references/evaluations.md b/src/uipath/dev/skills/uipath/references/evaluations.md index d6c4f79..2e7716e 100644 --- a/src/uipath/dev/skills/uipath/references/evaluations.md +++ b/src/uipath/dev/skills/uipath/references/evaluations.md @@ -1099,15 +1099,15 @@ Before running, you'll be asked for: ### Command ```bash -uv run uipath eval \ +uv run uipath eval \ --workers 4 \ --no-report \ --output-file eval-results.json ``` **Parameters:** -- `` - Agent entry point name from `entry-points.json` -- `` - Path to evaluation set file +- `` - Agent/function name — the key from `uipath.json` (e.g., `"main"`), or from framework config files like `langgraph.json` / `llama-index.json`. This is the short name, **not** the file path. +- `` - Relative path to the evaluation set file (e.g., `evaluations/eval-sets/my-tests.json`). Required when the project has more than one eval set; can be omitted if there is only one. - `--workers` - Number of parallel workers (1-8) - `--no-report` - Don't report to UiPath Cloud - `--output-file` - Save results to JSON file @@ -1398,7 +1398,7 @@ Results can be: Set `--report` flag to send results to your UiPath Cloud account: ```bash -uv run uipath eval \ +uv run uipath eval \ --report \ --workers 4 ``` @@ -1410,7 +1410,7 @@ uv run uipath eval \ Run tests in parallel for faster execution: ```bash -uv run uipath eval \ +uv run uipath eval \ --workers 8 ``` @@ -1424,7 +1424,7 @@ uv run uipath eval \ For evaluators using LLMs (LLMJudge, Trajectory), enable mocker cache: ```bash -uv run uipath eval \ +uv run uipath eval \ --mocker-cache ``` @@ -1436,6 +1436,36 @@ Benefits: ## Troubleshooting +### All Tests Score 0.0 or Error + +This almost always means the **function crashed** — it's not a logic problem, it's a runtime error. The evaluator received `{}` because the function errored out before producing output. + +**How to diagnose:** +1. Pick one test case input from your eval set +2. Run the function standalone: `uv run uipath run ''` +3. Read the traceback — the last exception is the root cause + +### KeyError or Empty Output in Evaluator + +If the evaluator reports `KeyError` or the output is `{}`, the function errored silently. The evaluator is working correctly — it just received empty output because the function crashed. + +Run the function standalone with `uv run uipath run` to see the actual error. + +### ModuleNotFoundError + +A dependency is missing from the project. Fix: +1. Add the package to `pyproject.toml` under `[project.dependencies]` +2. Run `uv sync` to install it +3. Re-run the evaluation + +### Schema Mismatch / Wrong Input Shape + +The function received unexpected input (e.g., raw dict instead of a Pydantic model). This usually means `entry-points.json` is stale. + +Fix: run `uv run uipath init` to regenerate entry points, then re-run the evaluation. + +Also check for `from __future__ import annotations` in the function file — this stringifies all annotations and breaks runtime type detection. Remove it if Input/Output models aren't being recognized. + ### Test Passes but Score Seems Wrong - Check evaluator configuration @@ -1443,13 +1473,6 @@ Benefits: - Verify expected output format - Look at justification in detailed results -### All Tests Fail - -- Verify agent is working correctly -- Check evaluation set references correct agent -- Ensure evaluator files exist and are valid -- Review agent input/output schemas - ### Performance Issues - Reduce number of workers if hitting rate limits @@ -1986,7 +2009,7 @@ eval-sets/ - **Enable caching for LLM evaluators** ```bash - uv run uipath eval --mocker-cache + uv run uipath eval --mocker-cache ``` - Faster re-runs - Lower API costs @@ -2037,7 +2060,7 @@ eval-sets/ - **Run evaluations in CI/CD** ```bash - uv run uipath eval evaluations/eval-sets/smoke-tests.json \ + uv run uipath eval evaluations/eval-sets/smoke-tests.json \ --workers 4 \ --mocker-cache \ --output-file eval-results.json diff --git a/src/uipath/dev/skills/uipath/references/running-agents.md b/src/uipath/dev/skills/uipath/references/running-agents.md index 1c51d7b..1579cc4 100644 --- a/src/uipath/dev/skills/uipath/references/running-agents.md +++ b/src/uipath/dev/skills/uipath/references/running-agents.md @@ -49,9 +49,11 @@ Enter description (string) - Optional agent description [press Enter to skip]: Your agent runs with: ```bash -uv run uipath run '' +uv run uipath run '' ``` +Where `` is the key from `uipath.json` (e.g., `"main"` from `"agents": {"main": "main.py:main"}`), or the equivalent key from framework config files like `langgraph.json` or `llama-index.json`. It is **not** the file path — use the short name, not `main.py`. + The agent runs with your provided inputs and returns structured output. ## Results Display @@ -87,11 +89,13 @@ The skill supports all JSON schema types: ## Error Handling -If execution fails, you'll see: -- Error message from the agent -- Stack trace for debugging -- Suggestions for fixing the issue -- Option to re-run with modified inputs +If execution fails, check the traceback for these common errors: + +- **`ModuleNotFoundError`**: A dependency is missing. Add it to `pyproject.toml` under `[project.dependencies]` and run `uv sync`. +- **`entry point not found`**: `entry-points.json` is stale or missing. Run `uv run uipath init` to regenerate it. +- **`ValidationError` (Pydantic)**: The input doesn't match the expected schema. Check your Input model fields and types against the JSON you're passing. +- **Type errors with `from __future__ import annotations`**: This stringifies all annotations and breaks runtime type detection. Remove it if your Input/Output models aren't being recognized. +- **Missing environment variables**: Check that required variables (e.g., `OPENAI_API_KEY`) are set. The error will typically say `KeyError` or `EnvironmentError` with the variable name. ## Integration diff --git a/uv.lock b/uv.lock index 643bd8e..319255d 100644 --- a/uv.lock +++ b/uv.lock @@ -2266,7 +2266,7 @@ wheels = [ [[package]] name = "uipath-dev" -version = "0.0.65" +version = "0.0.66" source = { editable = "." } dependencies = [ { name = "fastapi" },