diff --git a/.bb/plugins.json b/.bb/plugins.json index 0794000..ad5ac14 100644 --- a/.bb/plugins.json +++ b/.bb/plugins.json @@ -5,6 +5,7 @@ "plugins": [ { "name": "workstreams", "source": "./plugins/workstreams" }, { "name": "kubernetes-provider", "source": "./plugins/kubernetes-provider" }, - { "name": "devbox-provider", "source": "./plugins/devbox-provider" } + { "name": "devbox-provider", "source": "./plugins/devbox-provider" }, + { "name": "diff-explorer", "source": "./plugins/diff-explorer" } ] } diff --git a/README.md b/README.md index a5fdf3d..a1b139a 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ Plugins for [bb](https://getbb.app), maintained by Bit Complete. | [devbox-provider](plugins/devbox-provider) | Machine provider that creates devboxes in your Incus project on bertha, once you connect devbox | | [thread-briefs](plugins/thread-briefs) | Gives every thread a durable goal / current state / next step brief, summarized outside the working chat | | [multi-repo](plugins/multi-repo) | Gives a project a set of git repos and every thread a workspace holding a checkout of each | +| [diff-explorer](plugins/diff-explorer) | Scrollable diff of every changed file, with ⌘-click go to definition and Ctrl+- to go back | Install one: diff --git a/plugins/diff-explorer/.gitignore b/plugins/diff-explorer/.gitignore new file mode 100644 index 0000000..f06235c --- /dev/null +++ b/plugins/diff-explorer/.gitignore @@ -0,0 +1,2 @@ +node_modules +dist diff --git a/plugins/diff-explorer/LICENSE b/plugins/diff-explorer/LICENSE new file mode 100644 index 0000000..ad09e3d --- /dev/null +++ b/plugins/diff-explorer/LICENSE @@ -0,0 +1,28 @@ +MIT License + +Copyright (c) 2026 Arash Outadi + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +monaco/ is a build of monaco-editor 0.56.0, and scripts/multi-diff.js adapts +code from Visual Studio Code. Both are MIT licensed: +Copyright (c) 2016 - present Microsoft Corporation. +See monaco/LICENSE and monaco/ThirdPartyNotices.txt. diff --git a/plugins/diff-explorer/PLUGIN_OVERVIEW.md b/plugins/diff-explorer/PLUGIN_OVERVIEW.md new file mode 100644 index 0000000..6a3f2e1 --- /dev/null +++ b/plugins/diff-explorer/PLUGIN_OVERVIEW.md @@ -0,0 +1,21 @@ +## What you get + +- One scrolling view of every changed file in the thread's workspace. Changed lines show in red and green, and unchanged regions fold away. +- A switch between **Uncommitted** changes and **All changes** since the merge base with the base branch. +- ⌘-click a symbol, or press F12, to open its definition. Do it again from there to go one level deeper. +- Press Ctrl+- to go back one level. The back button shows the current file, line, and depth. +- Open the panel from the button in the thread header, or with ⌘⇧D. + +## How it works + +The panel uses the Monaco editor and the VS Code multi-file diff view. Only the files on screen get an editor, so a large change set stays responsive. + +Definitions come from the language server for the file's language. The server runs on the machine that holds the workspace. It starts when the panel loads, so it can index the project before your first click. + +## Requirements + +- TypeScript and JavaScript: Node.js with `npx`. The first use downloads `typescript-language-server`. +- Go: `gopls`. Rust: `rust-analyzer`. Python: `pyright-langserver`. C and C++: `clangd`. Swift: `sourcekit-lsp`. Each must be on your PATH. +- Files in other languages show the diff without go to definition. +- Binary files and files too large to diff are skipped. +- Tested on macOS. The plugin uses experimental BB plugin APIs. diff --git a/plugins/diff-explorer/README.md b/plugins/diff-explorer/README.md new file mode 100644 index 0000000..bb40e85 --- /dev/null +++ b/plugins/diff-explorer/README.md @@ -0,0 +1,46 @@ +# Diff Explorer + +A [BB](https://getbb.app) plugin. Review a thread's changes, and jump into the code behind them. + +![Diff view](screenshots/diff.png) + +## What it does + +- Shows every changed file in one scrolling view. +- Switches between **Uncommitted** and **All changes** since the base branch. +- ⌘-click a symbol (or press F12) to open its definition. +- Jump again to go deeper. Press **Ctrl+-** to go back one level. +- Opens from the thread header button, or with **⌘⇧D**. + +![Go to definition](screenshots/go-to-definition.png) + +## Install + +```sh +bb plugin install git:https://github.com/arashout/bb-plugin-diff-explorer.git +``` + +## Go to definition needs a language server + +| Language | Server (on your PATH) | +|---|---| +| TypeScript, JavaScript | `npx` (downloads `typescript-language-server` on first use) | +| Go | `gopls` | +| Rust | `rust-analyzer` | +| Python | `pyright-langserver` | +| C, C++ | `clangd` | +| Swift | `sourcekit-lsp` | + +Other languages still show the diff. + +## Develop + +```sh +npm install +npm run build:monaco # only after changing scripts/multi-diff.js or the Monaco version +bb plugin install . +``` + +## License + +MIT. Bundles Monaco and code adapted from VS Code (both MIT, © Microsoft). diff --git a/plugins/diff-explorer/app.tsx b/plugins/diff-explorer/app.tsx new file mode 100644 index 0000000..3b15677 --- /dev/null +++ b/plugins/diff-explorer/app.tsx @@ -0,0 +1,406 @@ +import { useCallback, useEffect, useRef, useState } from "react"; +import type { KeyboardEvent } from "react"; +import type * as Monaco from "monaco-editor"; +import { + definePluginApp, + experimental_Icon as Icon, + experimental_useCodeTheme, + useBbNavigate, + useRealtime, + useRpc, + type PluginThreadHeaderActionProps, + type PluginThreadPanelProps, +} from "@get-bb/plugin-sdk/app"; +import type { z } from "zod"; +import type { DiffFile, DiffTarget, Location, rpcContract } from "./contract"; + +type MonacoApi = typeof Monaco; +type Rpc = ReturnType>; +type Loaded = z.infer<(typeof rpcContract)["load"]["output"]>; + +// Model URIs are :///; the authority routes a model back to its panel. +const OLD = "bbold"; +const NEW = "bbnew"; +const FILE = "bbfile"; + +type PanelContext = { + rpc: Rpc; + environmentId: string; + push(from: Monaco.editor.ICodeEditor, to: Location): void; + setError(message: string | null): void; +}; +const panels = new Map(); + +type MultiDiffDocument = { + original: Monaco.editor.ITextModel; + modified: Monaco.editor.ITextModel; + label: string; + options: Monaco.editor.IDiffEditorOptions; + estimatedHeight: number; +}; +type Bundle = { + monaco: MonacoApi; + createMultiDiffEditor( + element: HTMLElement, + documents: MultiDiffDocument[], + ): { update(documents: MultiDiffDocument[]): void; dispose(): void }; +}; +let bundlePromise: Promise | null = null; + +function loadMonaco(baseUrl: string): Promise { + return (bundlePromise ??= (async () => { + const link = document.createElement("link"); + link.rel = "stylesheet"; + link.href = `${baseUrl}/editor.css`; + document.head.appendChild(link); + (globalThis as any).MonacoEnvironment = { + getWorker: () => new Worker(new URL(`${baseUrl}/editor.worker.js`, window.location.origin), { type: "module" }), + }; + const bundle: Bundle = await import(/* @vite-ignore */ `${baseUrl}/editor.js`); + installNavigation(bundle.monaco); + return bundle; + })()); +} + +function installNavigation(monaco: MonacoApi) { + monaco.languages.registerDefinitionProvider("*", { + async provideDefinition(model, position) { + const panel = panels.get(model.uri.authority); + if (panel === undefined || model.uri.scheme === OLD) return null; + try { + const { locations } = await panel.rpc.call("definition", { + environmentId: panel.environmentId, + path: model.uri.path, + line: position.lineNumber, + column: position.column, + }); + panel.setError(null); + // Monaco only navigates to models that exist. + const models = await Promise.all(locations.map((l) => fileModel(monaco, model.uri.authority, panel, l.path))); + return locations.map((l, i) => ({ + uri: models[i].uri, + range: new monaco.Range(l.line, l.column, l.line, l.column), + })); + } catch (cause) { + panel.setError(cause instanceof Error ? cause.message : String(cause)); + return null; + } + }, + }); + monaco.editor.registerEditorOpener({ + openCodeEditor(source, resource, selectionOrPosition) { + const panel = panels.get(resource.authority); + if (panel === undefined) return false; + const target = + selectionOrPosition === undefined + ? { line: 1, column: 1 } + : "startLineNumber" in selectionOrPosition + ? { line: selectionOrPosition.startLineNumber, column: selectionOrPosition.startColumn } + : { line: selectionOrPosition.lineNumber, column: selectionOrPosition.column }; + panel.push(source, { path: resource.path, ...target }); + return true; + }, + }); +} + +async function fileModel(monaco: MonacoApi, panelId: string, panel: PanelContext, path: string) { + const uri = monaco.Uri.from({ scheme: FILE, authority: panelId, path }); + const existing = monaco.editor.getModel(uri); + if (existing !== null) return existing; + const { content } = await panel.rpc.call("read", { environmentId: panel.environmentId, path }); + return monaco.editor.getModel(uri) ?? monaco.editor.createModel(content, languageFor(monaco, path), uri); +} + +function languageFor(monaco: MonacoApi, filePath: string) { + const ext = filePath.slice(filePath.lastIndexOf(".")).toLowerCase(); + return monaco.languages.getLanguages().find((l) => l.extensions?.includes(ext))?.id ?? "plaintext"; +} + +const EDITOR_OPTIONS = { + readOnly: true, + scrollBeyondLastLine: false, + minimap: { enabled: false }, + fixedOverflowWidgets: true, + gotoLocation: { multipleDefinitions: "goto" }, +} satisfies Monaco.editor.IEditorOptions; + +const DIFF_OPTIONS = { + ...EDITOR_OPTIONS, + renderSideBySide: false, + hideUnchangedRegions: { enabled: true }, +} satisfies Monaco.editor.IDiffEditorOptions; + +const LINE_HEIGHT = 19; +const HEADER_HEIGHT = 40; + +function MultiDiff({ bundle, panelId, root, files }: { bundle: Bundle; panelId: string; root: string; files: DiffFile[] }) { + const container = useRef(null); + const editor = useRef | null>(null); + // Models per path, updated in place on refresh so each file keeps its editor and your scroll place. + const models = useRef(new Map()); + + useEffect(() => { + const created = bundle.createMultiDiffEditor(container.current!, []); + editor.current = created; + const owned = models.current; + return () => { + created.dispose(); + for (const m of owned.values()) { + m.original.dispose(); + m.modified.dispose(); + } + owned.clear(); + }; + }, [bundle]); + + useEffect(() => { + const { monaco } = bundle; + const current = models.current; + const documents = files.map((file) => { + const abs = `${root.replace(/\/$/, "")}/${file.path}`; + let m = current.get(abs); + if (m === undefined) { + const language = languageFor(monaco, file.path); + m = { + original: monaco.editor.createModel(file.oldText, language, monaco.Uri.from({ scheme: OLD, authority: panelId, path: abs })), + modified: monaco.editor.createModel(file.newText, language, monaco.Uri.from({ scheme: NEW, authority: panelId, path: abs })), + }; + current.set(abs, m); + } else { + if (m.original.getValue() !== file.oldText) m.original.setValue(file.oldText); + if (m.modified.getValue() !== file.newText) m.modified.setValue(file.newText); + } + return { + ...m, + label: `${file.path} · ${file.changeKind}`, + options: DIFF_OPTIONS, + // Placeholder height until the widget renders the file; ~ changed lines plus collapsed-region rows. + estimatedHeight: HEADER_HEIGHT + (file.additions + file.deletions + 8) * LINE_HEIGHT, + }; + }); + editor.current!.update(documents); + const kept = new Set(documents.map((d) => d.modified)); + for (const [abs, m] of current) { + if (kept.has(m.modified)) continue; + m.original.dispose(); + m.modified.dispose(); + current.delete(abs); + } + }, [bundle, panelId, root, files]); + + return
; +} + +function FileView({ monaco, panelId, location, onError }: { + monaco: MonacoApi; + panelId: string; + location: Location; + onError(message: string): void; +}) { + const container = useRef(null); + useEffect(() => { + let cancelled = false; + let editor: Monaco.editor.IStandaloneCodeEditor | undefined; + fileModel(monaco, panelId, panels.get(panelId)!, location.path).then((model) => { + if (cancelled) return; + editor = monaco.editor.create(container.current!, { ...EDITOR_OPTIONS, automaticLayout: true, model }); + const position = { lineNumber: location.line, column: location.column }; + editor.setPosition(position); + editor.revealPositionInCenter(position); + editor.focus(); + }, (cause) => onError(cause instanceof Error ? cause.message : String(cause))); + return () => { + cancelled = true; + editor?.dispose(); + }; + }, [monaco, panelId, location, onError]); + return
; +} + +function DiffsPanel({ threadId }: PluginThreadPanelProps) { + const rpc = useRpc(); + const { mode } = experimental_useCodeTheme(); + const [panelId] = useState(() => `p${Math.random().toString(36).slice(2)}`); + const [bundle, setBundle] = useState(null); + const monaco = bundle?.monaco ?? null; + const [data, setData] = useState(null); + const [error, setError] = useState(null); + const [stack, setStack] = useState([]); + const [reload, setReload] = useState(0); + const [target, setTarget] = useState("uncommitted"); + const root = useRef(null); + + useEffect(() => { + let cancelled = false; + setData(null); + setStack([]); + Promise.all([rpc.call("assets", null).then(({ baseUrl }) => loadMonaco(baseUrl)), rpc.call("load", { threadId, target })]).then( + ([b, loaded]) => { + if (cancelled) return; + setBundle(b); + setData(loaded); + setError(null); + }, + (cause) => setError(cause instanceof Error ? cause.message : String(cause)), + ); + return () => { + cancelled = true; + }; + }, [rpc, threadId, target, reload]); + + const current = useRef({ target, root: data?.root }); + current.current = { target, root: data?.root }; + useRealtime("changed", (payload) => { + if ((payload as { root: string }).root !== current.current.root) return; + rpc.call("load", { threadId, target }).then( + (loaded) => { + if (current.current.target !== target) return; + setData((prev) => (prev !== null && JSON.stringify(prev) === JSON.stringify(loaded) ? prev : loaded)); + }, + (cause) => setError(cause instanceof Error ? cause.message : String(cause)), + ); + }); + + useEffect(() => { + monaco?.editor.setTheme(mode === "dark" ? "vs-dark" : "vs"); + }, [monaco, mode]); + + const environmentId = data?.environmentId ?? null; + useEffect(() => { + if (environmentId === null) return; + panels.set(panelId, { + rpc, + environmentId, + setError, + push(from, to) { + const at = from.getPosition(); + setStack((s) => { + const top = s.at(-1); + const updated = top !== undefined && at !== null ? [...s.slice(0, -1), { ...top, line: at.lineNumber, column: at.column }] : s; + return [...updated, to]; + }); + }, + }); + return () => { + panels.delete(panelId); + for (const model of monaco?.editor.getModels() ?? []) { + if (model.uri.scheme === FILE && model.uri.authority === panelId) model.dispose(); + } + }; + }, [panelId, rpc, environmentId, monaco]); + + const back = useCallback(() => { + setStack((s) => s.slice(0, -1)); + root.current?.focus(); + }, []); + + const onKeyDownCapture = (event: KeyboardEvent) => { + if (event.ctrlKey && !event.metaKey && event.key === "-" && stack.length > 0) { + event.preventDefault(); + event.stopPropagation(); + back(); + } + }; + + const top = stack.at(-1); + const relative = (p: string) => (data !== null && p.startsWith(`${data.root}/`) ? p.slice(data.root.length + 1) : p); + + return ( +
+
+ {top === undefined ? ( + <> + + + {data === null ? "Loading…" : `${data.files.length} files · ⌘-click a symbol to go to its definition`} + + + ) : ( + <> + + + {relative(top.path)}:{top.line} + + depth {stack.length} + + )} + + {error === null ? null : {error}} + +
+ {bundle === null || monaco === null || data === null ? null : ( + <> + + {top === undefined ? null : ( + + )} + + )} +
+ ); +} + +const OPEN_DIFFS = { actionId: "diffs" }; + +function OpenDiffsButton(_: PluginThreadHeaderActionProps) { + const navigate = useBbNavigate(); + return ( + + ); +} + +export default definePluginApp((app) => { + app.slots.threadPanelAction({ + id: "diffs", + title: "Diff Explorer", + icon: "FileDiff", + layout: "flush", + component: DiffsPanel, + }); + app.slots.experimental_threadHeaderAction({ id: "open-diffs", title: "Diff Explorer", component: OpenDiffsButton }); + app.commands.register({ + id: "open-diffs", + title: "Open Diff Explorer", + defaultShortcut: { key: "d", mod: true, shift: true }, + isAvailable: ({ threadId }) => threadId !== null, + run: ({ openPanel }) => { + openPanel(OPEN_DIFFS); + }, + }); +}); diff --git a/plugins/diff-explorer/contract.ts b/plugins/diff-explorer/contract.ts new file mode 100644 index 0000000..f2e670c --- /dev/null +++ b/plugins/diff-explorer/contract.ts @@ -0,0 +1,75 @@ +import { defineRpcContract } from "@get-bb/plugin-sdk"; +import { z } from "zod"; + +const location = z.object({ + path: z.string(), + line: z.number().int(), + column: z.number().int(), +}); +export type Location = z.infer; + +const position = z.object({ + path: z.string().startsWith("/"), + line: z.number().int().min(1), + column: z.number().int().min(1), +}); + +export const hostContract = defineRpcContract({ + definition: { + input: position.extend({ root: z.string().startsWith("/") }), + output: z.object({ locations: z.array(location) }), + }, + read: { + input: z.object({ path: z.string().startsWith("/") }), + output: z.object({ content: z.string() }), + }, + warm: { + input: z.object({ root: z.string().startsWith("/"), paths: z.array(z.string().startsWith("/")) }), + output: z.null(), + }, + watch: { + input: z.object({ root: z.string().startsWith("/") }), + output: z.null(), + }, +}); + +export const changedPayload = z.object({ root: z.string() }); +export const hostSignals = { changed: { payload: changedPayload } }; + +const diffFile = z.object({ + path: z.string(), + changeKind: z.string(), + additions: z.number(), + deletions: z.number(), + oldText: z.string(), + newText: z.string(), +}); +export type DiffFile = z.infer; + +const diffTarget = z.enum(["all", "uncommitted"]); +export type DiffTarget = z.infer; + +export const rpcContract = defineRpcContract({ + assets: { + input: z.null(), + output: z.object({ baseUrl: z.string() }), + }, + load: { + input: z.object({ threadId: z.string(), target: diffTarget }), + output: z.object({ + environmentId: z.string(), + root: z.string(), + baseBranch: z.string(), + files: z.array(diffFile), + skipped: z.array(z.string()), + }), + }, + definition: { + input: position.extend({ environmentId: z.string() }), + output: z.object({ locations: z.array(location) }), + }, + read: { + input: z.object({ environmentId: z.string(), path: z.string().startsWith("/") }), + output: z.object({ content: z.string() }), + }, +}); diff --git a/plugins/diff-explorer/host.ts b/plugins/diff-explorer/host.ts new file mode 100644 index 0000000..28bb55a --- /dev/null +++ b/plugins/diff-explorer/host.ts @@ -0,0 +1,214 @@ +import { spawn, type ChildProcess } from "node:child_process"; +import { readFile } from "node:fs/promises"; +import path from "node:path"; +import { fileURLToPath, pathToFileURL } from "node:url"; +import { experimental_defineHostEntry } from "@get-bb/plugin-sdk/host"; +import { hostContract, hostSignals, type Location } from "./contract"; + +const TS = ["npx", "--yes", "-p", "typescript", "-p", "typescript-language-server", "typescript-language-server", "--stdio"]; + +// [command, { extension: LSP languageId }] +const SERVER_GROUPS: [string[], Record][] = [ + [TS, { ".ts": "typescript", ".mts": "typescript", ".cts": "typescript", ".tsx": "typescriptreact" }], + [TS, { ".js": "javascript", ".mjs": "javascript", ".cjs": "javascript", ".jsx": "javascriptreact" }], + [["gopls"], { ".go": "go" }], + [["rust-analyzer"], { ".rs": "rust" }], + [["pyright-langserver", "--stdio"], { ".py": "python", ".pyi": "python" }], + [["clangd"], { ".c": "c", ".h": "c", ".cc": "cpp", ".cpp": "cpp", ".hpp": "cpp" }], + [["sourcekit-lsp"], { ".swift": "swift" }], +]; +const SERVERS = Object.fromEntries( + SERVER_GROUPS.flatMap(([cmd, exts]) => Object.entries(exts).map(([ext, languageId]) => [ext, { cmd, languageId }])), +); + +const REQUEST_TIMEOUT_MS = 60_000; + +type Message = { id?: number | string; method?: string; params?: any; result?: unknown; error?: { message: string } }; + +class LanguageServer { + private child: ChildProcess; + private buffer = Buffer.alloc(0); + private nextId = 1; + private pending = new Map void; reject: (e: Error) => void }>(); + private documents = new Map(); + readonly ready: Promise; + exited = false; + + constructor(cmd: string[], root: string) { + this.child = spawn(cmd[0], cmd.slice(1), { cwd: root, stdio: ["pipe", "pipe", "ignore"] }); + this.child.stdout!.on("data", (chunk: Buffer) => this.onData(chunk)); + this.child.on("exit", () => this.fail(new Error(`${cmd[0]} exited`))); + this.child.on("error", (error) => this.fail(error)); + const rootUri = pathToFileURL(root).href; + this.ready = this.request("initialize", { + processId: process.pid, + rootUri, + rootPath: root, + workspaceFolders: [{ uri: rootUri, name: path.basename(root) }], + capabilities: { + textDocument: { definition: { linkSupport: true }, synchronization: {} }, + workspace: { configuration: true, workspaceFolders: true }, + window: { workDoneProgress: true }, + }, + }).then(() => this.notify("initialized", {})); + } + + async open(file: string, languageId: string) { + await this.ready; + const uri = pathToFileURL(file).href; + const text = await readFile(file, "utf8"); + const open = this.documents.get(uri); + if (open === undefined) { + this.documents.set(uri, { version: 1, text }); + this.notify("textDocument/didOpen", { textDocument: { uri, languageId, version: 1, text } }); + } else if (open.text !== text) { + open.version += 1; + open.text = text; + this.notify("textDocument/didChange", { + textDocument: { uri, version: open.version }, + contentChanges: [{ text }], + }); + } + return uri; + } + + async definition(file: string, line: number, column: number, languageId: string): Promise { + const uri = await this.open(file, languageId); + const result = await this.request("textDocument/definition", { + textDocument: { uri }, + position: { line: line - 1, character: column - 1 }, + }); + const items = result === null ? [] : Array.isArray(result) ? result : [result]; + return items + .map((item: any) => ({ uri: item.targetUri ?? item.uri, range: item.targetSelectionRange ?? item.range })) + .filter((item) => item.uri.startsWith("file:")) + .map((item) => ({ + path: fileURLToPath(item.uri), + line: item.range.start.line + 1, + column: item.range.start.character + 1, + })); + } + + dispose() { + this.child.kill(); + } + + private request(method: string, params: unknown): Promise { + const id = this.nextId++; + this.send({ jsonrpc: "2.0", id, method, params }); + return new Promise((resolve, reject) => { + const timer = setTimeout(() => { + this.pending.delete(id); + reject(new Error(`${method} timed out`)); + }, REQUEST_TIMEOUT_MS); + this.pending.set(id, { + resolve: (v) => (clearTimeout(timer), resolve(v)), + reject: (e) => (clearTimeout(timer), reject(e)), + }); + }); + } + + private notify(method: string, params: unknown) { + this.send({ jsonrpc: "2.0", method, params }); + } + + private send(message: object) { + const body = Buffer.from(JSON.stringify(message), "utf8"); + this.child.stdin!.write(`Content-Length: ${body.length}\r\n\r\n`); + this.child.stdin!.write(body); + } + + private onData(chunk: Buffer) { + this.buffer = Buffer.concat([this.buffer, chunk]); + for (;;) { + const headerEnd = this.buffer.indexOf("\r\n\r\n"); + if (headerEnd === -1) return; + const length = Number(/Content-Length: (\d+)/i.exec(this.buffer.subarray(0, headerEnd).toString())![1]); + const start = headerEnd + 4; + if (this.buffer.length < start + length) return; + const message: Message = JSON.parse(this.buffer.subarray(start, start + length).toString("utf8")); + this.buffer = this.buffer.subarray(start + length); + this.onMessage(message); + } + } + + private onMessage(message: Message) { + if (message.method !== undefined) { + if (message.id === undefined) return; + const result = message.method === "workspace/configuration" ? message.params.items.map(() => null) : null; + this.send({ jsonrpc: "2.0", id: message.id, result }); + return; + } + const pending = this.pending.get(message.id as number); + if (pending === undefined) return; + this.pending.delete(message.id as number); + if (message.error) pending.reject(new Error(message.error.message)); + else pending.resolve(message.result ?? null); + } + + private fail(error: Error) { + this.exited = true; + for (const pending of this.pending.values()) pending.reject(error); + this.pending.clear(); + } +} + +// ponytail: servers live as long as the host worker (idle-stopped after 5 min); add a retainWorker lease if cold starts hurt +const servers = new Map(); + +function serverFor(root: string, cmd: string[]) { + const key = `${root}\0${cmd.join(" ")}`; + let server = servers.get(key); + if (server === undefined || server.exited) { + server = new LanguageServer(cmd, root); + servers.set(key, server); + } + return server; +} + +// ponytail: one watcher per workspace root for the worker's lifetime; dispose idle roots if watcher count matters +const watches = new Map }>>(); + +export default experimental_defineHostEntry({ + contract: hostContract, + experimental_signals: hostSignals, + handlers: { + async watch({ root }, context) { + if (!watches.has(root)) { + const watch = context.experimental_watch( + { rootPath: root, ignoredPaths: ["node_modules", ".git/objects"], debounceMs: 500, maxWaitMs: 2000 }, + (event) => (event.kind === "watch-error" ? undefined : context.experimental_emitSignal("changed", { root })), + ); + watches.set(root, watch); + watch.catch(() => watches.delete(root)); + } + await watches.get(root); + return null; + }, + async definition({ root, path: file, line, column }) { + const spec = SERVERS[path.extname(file).toLowerCase()]; + if (spec === undefined) return { locations: [] }; + const locations = await serverFor(root, spec.cmd).definition(file, line, column, spec.languageId); + return { locations }; + }, + // Opens one file per language server so it indexes the project before the first click. + async warm({ root, paths }) { + const first = new Map(); + for (const file of paths) { + const spec = SERVERS[path.extname(file).toLowerCase()]; + if (spec !== undefined && !first.has(spec.cmd)) first.set(spec.cmd, [file, spec.languageId]); + } + await Promise.all([...first].map(([cmd, [file, languageId]]) => serverFor(root, cmd).open(file, languageId))); + return null; + }, + async read({ path: file }) { + return { content: await readFile(file, "utf8") }; + }, + }, + async dispose() { + for (const server of servers.values()) server.dispose(); + servers.clear(); + await Promise.all([...watches.values()].map((watch) => watch.then((w) => w.dispose(), () => undefined))); + watches.clear(); + }, +}); diff --git a/plugins/diff-explorer/monaco/LICENSE b/plugins/diff-explorer/monaco/LICENSE new file mode 100644 index 0000000..76fdc58 --- /dev/null +++ b/plugins/diff-explorer/monaco/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 - present Microsoft Corporation + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/plugins/diff-explorer/monaco/ThirdPartyNotices.txt b/plugins/diff-explorer/monaco/ThirdPartyNotices.txt new file mode 100644 index 0000000..0e9b56a --- /dev/null +++ b/plugins/diff-explorer/monaco/ThirdPartyNotices.txt @@ -0,0 +1,448 @@ +THIRD-PARTY SOFTWARE NOTICES AND INFORMATION +Do Not Translate or Localize + +This project incorporates components from the projects listed below. The original copyright notices and the licenses +under which Microsoft received such components are set forth below. Microsoft reserves all rights not expressly granted +herein, whether by implication, estoppel or otherwise. + + + +%% nodejs path library (https://github.com/nodejs/node/tree/43dd49c9782848c25e5b03448c8a0f923f13c158) +========================================= +Copyright Joyent, Inc. and other Node contributors. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. +========================================= +END OF nodejs path library NOTICES AND INFORMATION + + + + +%% markedjs NOTICES AND INFORMATION BEGIN HERE +========================================= +The MIT License (MIT) + +Copyright (c) 2018+, MarkedJS (https://github.com/markedjs/) +Copyright (c) 2011-2018, Christopher Jeffrey (https://github.com/chjj/) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +========================================= +END OF markedjs NOTICES AND INFORMATION + + + +%% typescript version 4.4.4 (https://github.com/microsoft/TypeScript) +========================================= +Copyright (c) Microsoft Corporation. All rights reserved. + +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of this License; and + +You must cause any modified files to carry prominent notices stating that You changed the files; and + +You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + +If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + + +The TypeScript software incorporates third party material from the projects listed below. The original copyright notice and the license under which Microsoft received such third party material are set forth below. Microsoft reserves all other rights not expressly granted, whether by implication, estoppel or otherwise. + + +------------------- DefinitelyTyped -------------------- +This file is based on or incorporates material from the projects listed below (collectively "Third Party Code"). Microsoft is not the original author of the Third Party Code. The original copyright notice and the license, under which Microsoft received such Third Party Code, are set forth below. Such licenses and notices are provided for informational purposes only. Microsoft, not the third party, licenses the Third Party Code to you under the terms set forth in the EULA for the Microsoft Product. Microsoft reserves all other rights not expressly granted under this agreement, whether by implication, estoppel or otherwise. +DefinitelyTyped +This project is licensed under the MIT license. Copyrights are respective of each contributor listed at the beginning of each definition file. Provided for Informational Purposes Only + +MIT License +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ""Software""), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +-------------------------------------------------------------------------------------- + +------------------- Unicode -------------------- +UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE + +Unicode Data Files include all data files under the directories +http://www.unicode.org/Public/, http://www.unicode.org/reports/, +http://www.unicode.org/cldr/data/, http://source.icu-project.org/repos/icu/, and +http://www.unicode.org/utility/trac/browser/. + +Unicode Data Files do not include PDF online code charts under the +directory http://www.unicode.org/Public/. + +Software includes any source code published in the Unicode Standard +or under the directories +http://www.unicode.org/Public/, http://www.unicode.org/reports/, +http://www.unicode.org/cldr/data/, http://source.icu-project.org/repos/icu/, and +http://www.unicode.org/utility/trac/browser/. + +NOTICE TO USER: Carefully read the following legal agreement. +BY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S +DATA FILES ("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"), +YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE +TERMS AND CONDITIONS OF THIS AGREEMENT. +IF YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE +THE DATA FILES OR SOFTWARE. + +COPYRIGHT AND PERMISSION NOTICE + +Copyright (c) 1991-2017 Unicode, Inc. All rights reserved. +Distributed under the Terms of Use in http://www.unicode.org/copyright.html. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Unicode data files and any associated documentation +(the "Data Files") or Unicode software and any associated documentation +(the "Software") to deal in the Data Files or Software +without restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, and/or sell copies of +the Data Files or Software, and to permit persons to whom the Data Files +or Software are furnished to do so, provided that either +(a) this copyright and permission notice appear with all copies +of the Data Files or Software, or +(b) this copyright and permission notice appear in associated +Documentation. + +THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT OF THIRD PARTY RIGHTS. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS +NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL +DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THE DATA FILES OR SOFTWARE. + +Except as contained in this notice, the name of a copyright holder +shall not be used in advertising or otherwise to promote the sale, +use or other dealings in these Data Files or Software without prior +written authorization of the copyright holder. +------------------------------------------------------------------------------------- + +-------------------Document Object Model----------------------------- +DOM + +W3C License +This work is being provided by the copyright holders under the following license. +By obtaining and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions. +Permission to copy, modify, and distribute this work, with or without modification, for any purpose and without fee or royalty is hereby granted, provided that you include the following +on ALL copies of the work or portions thereof, including modifications: +* The full text of this NOTICE in a location viewable to users of the redistributed or derivative work. +* Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, the W3C Software and Document Short Notice should be included. +* Notice of any changes or modifications, through a copyright statement on the new code or document such as "This software or document includes material copied from or derived +from [title and URI of the W3C document]. Copyright © [YEAR] W3C® (MIT, ERCIM, Keio, Beihang)." +Disclaimers +THIS WORK IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR +FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENT WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS. +COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENT. +The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the work without specific, written prior permission. +Title to copyright in this work will at all times remain with copyright holders. + +--------- + +DOM +Copyright © 2018 WHATWG (Apple, Google, Mozilla, Microsoft). This work is licensed under a Creative Commons Attribution 4.0 International License: Attribution 4.0 International +======================================================================= +Creative Commons Corporation ("Creative Commons") is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an "as-is" basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible. Using Creative Commons Public Licenses Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses. Considerations for licensors: Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC- licensed material, or material used under an exception or limitation to copyright. More considerations for licensors: + +wiki.creativecommons.org/Considerations_for_licensors Considerations for the public: By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensor's permission is not necessary for any reason--for example, because of any applicable exception or limitation to copyright--then that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described. Although not required by our licenses, you are encouraged to respect those requests where reasonable. More_considerations for the public: wiki.creativecommons.org/Considerations_for_licensees ======================================================================= +Creative Commons Attribution 4.0 International Public License By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions. Section 1 -- Definitions. a. Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image. b. Adapter's License means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License. c. Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. d. Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements. e. Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material. f. Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License. g. Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license. h. Licensor means the individual(s) or entity(ies) granting rights under this Public License. i. Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them. j. Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world. k. You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning. Section 2 -- Scope. a. License grant. 1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to: a. reproduce and Share the Licensed Material, in whole or in part; and b. produce, reproduce, and Share Adapted Material. 2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions. 3. Term. The term of this Public License is specified in Section 6(a). 4. Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a) (4) never produces Adapted Material. 5. Downstream recipients. a. Offer from the Licensor -- Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License. b. No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material. 6. No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i). b. Other rights. 1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise. 2. Patent and trademark rights are not licensed under this Public License. 3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties. Section 3 -- License Conditions. Your exercise of the Licensed Rights is expressly made subject to the following conditions. a. Attribution. 1. If You Share the Licensed Material (including in modified form), You must: a. retain the following if it is supplied by the Licensor with the Licensed Material: i. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated); ii. a copyright notice; iii. a notice that refers to this Public License; iv. a notice that refers to the disclaimer of warranties; v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable; b. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and c. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License. 2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information. 3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable. 4. If You Share Adapted Material You produce, the Adapter's License You apply must not prevent recipients of the Adapted Material from complying with this Public License. Section 4 -- Sui Generis Database Rights. Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material: a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database; b. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material; and c. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database. For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights. Section 5 -- Disclaimer of Warranties and Limitation of Liability. a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. c. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability. Section 6 -- Term and Termination. a. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically. b. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates: 1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or 2. upon express reinstatement by the Licensor. For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License. c. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License. d. Sections 1, 5, 6, 7, and 8 survive termination of this Public License. Section 7 -- Other Terms and Conditions. a. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed. b. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License. Section 8 -- Interpretation. a. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License. b. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions. c. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor. d. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority. ======================================================================= Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the "Licensor." Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at creativecommons.org/policies, Creative Commons does not authorize the use of the trademark "Creative Commons" or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses. Creative Commons may be contacted at creativecommons.org. + +-------------------------------------------------------------------------------- + +----------------------Web Background Synchronization------------------------------ + +Web Background Synchronization Specification +Portions of spec © by W3C + +W3C Community Final Specification Agreement +To secure commitments from participants for the full text of a Community or Business Group Report, the group may call for voluntary commitments to the following terms; a "summary" is +available. See also the related "W3C Community Contributor License Agreement". +1. The Purpose of this Agreement. +This Agreement sets forth the terms under which I make certain copyright and patent rights available to you for your implementation of the Specification. +Any other capitalized terms not specifically defined herein have the same meaning as those terms have in the "W3C Patent Policy", and if not defined there, in the "W3C Process Document". +2. Copyrights. +2.1. Copyright Grant. I grant to you a perpetual (for the duration of the applicable copyright), worldwide, non-exclusive, no-charge, royalty-free, copyright license, without any obligation for accounting to me, to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, distribute, and implement the Specification to the full extent of my copyright interest in the Specification. +2.2. Attribution. As a condition of the copyright grant, you must include an attribution to the Specification in any derivative work you make based on the Specification. That attribution must include, at minimum, the Specification name and version number. +3. Patents. +3.1. Patent Licensing Commitment. I agree to license my Essential Claims under the W3C Community RF Licensing Requirements. This requirement includes Essential Claims that I own and any that I have the right to license without obligation of payment or other consideration to an unrelated third party. W3C Community RF Licensing Requirements obligations made concerning the Specification and described in this policy are binding on me for the life of the patents in question and encumber the patents containing Essential Claims, regardless of changes in participation status or W3C Membership. I also agree to license my Essential Claims under the W3C Community RF Licensing Requirements in derivative works of the Specification so long as all normative portions of the Specification are maintained and that this licensing commitment does not extend to any portion of the derivative work that was not included in the Specification. +3.2. Optional, Additional Patent Grant. In addition to the provisions of Section 3.1, I may also, at my option, make certain intellectual property rights infringed by implementations of the Specification, including Essential Claims, available by providing those terms via the W3C Web site. +4. No Other Rights. Except as specifically set forth in this Agreement, no other express or implied patent, trademark, copyright, or other property rights are granted under this Agreement, including by implication, waiver, or estoppel. +5. Antitrust Compliance. I acknowledge that I may compete with other participants, that I am under no obligation to implement the Specification, that each participant is free to develop competing technologies and standards, and that each party is free to license its patent rights to third parties, including for the purpose of enabling competing technologies and standards. +6. Non-Circumvention. I agree that I will not intentionally take or willfully assist any third party to take any action for the purpose of circumventing my obligations under this Agreement. +7. Transition to W3C Recommendation Track. The Specification developed by the Project may transition to the W3C Recommendation Track. The W3C Team is responsible for notifying me that a Corresponding Working Group has been chartered. I have no obligation to join the Corresponding Working Group. If the Specification developed by the Project transitions to the W3C Recommendation Track, the following terms apply: +7.1. If I join the Corresponding Working Group. If I join the Corresponding Working Group, I will be subject to all W3C rules, obligations, licensing commitments, and policies that govern that Corresponding Working Group. +7.2. If I Do Not Join the Corresponding Working Group. +7.2.1. Licensing Obligations to Resulting Specification. If I do not join the Corresponding Working Group, I agree to offer patent licenses according to the W3C Royalty-Free licensing requirements described in Section 5 of the W3C Patent Policy for the portions of the Specification included in the resulting Recommendation. This licensing commitment does not extend to any portion of an implementation of the Recommendation that was not included in the Specification. This licensing commitment may not be revoked but may be modified through the exclusion process defined in Section 4 of the W3C Patent Policy. I am not required to join the Corresponding Working Group to exclude patents from the W3C Royalty-Free licensing commitment, but must otherwise follow the normal exclusion procedures defined by the W3C Patent Policy. The W3C Team will notify me of any Call for Exclusion in the Corresponding Working Group as set forth in Section 4.5 of the W3C Patent Policy. +7.2.2. No Disclosure Obligation. If I do not join the Corresponding Working Group, I have no patent disclosure obligations outside of those set forth in Section 6 of the W3C Patent Policy. +8. Conflict of Interest. I will disclose significant relationships when those relationships might reasonably be perceived as creating a conflict of interest with my role. I will notify W3C of any change in my affiliation using W3C-provided mechanisms. +9. Representations, Warranties and Disclaimers. I represent and warrant that I am legally entitled to grant the rights and promises set forth in this Agreement. IN ALL OTHER RESPECTS THE SPECIFICATION IS PROVIDED “AS IS.” The entire risk as to implementing or otherwise using the Specification is assumed by the implementer and user. Except as stated herein, I expressly disclaim any warranties (express, implied, or otherwise), including implied warranties of merchantability, non-infringement, fitness for a particular purpose, or title, related to the Specification. IN NO EVENT WILL ANY PARTY BE LIABLE TO ANY OTHER PARTY FOR LOST PROFITS OR ANY FORM OF INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER FROM ANY CAUSES OF ACTION OF ANY KIND WITH RESPECT TO THIS AGREEMENT, WHETHER BASED ON BREACH OF CONTRACT, TORT (INCLUDING NEGLIGENCE), OR OTHERWISE, AND WHETHER OR NOT THE OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. All of my obligations under Section 3 regarding the transfer, successors in interest, or assignment of Granted Claims will be satisfied if I notify the transferee or assignee of any patent that I know contains Granted Claims of the obligations under Section 3. Nothing in this Agreement requires me to undertake a patent search. +10. Definitions. +10.1. Agreement. “Agreement” means this W3C Community Final Specification Agreement. +10.2. Corresponding Working Group. “Corresponding Working Group” is a W3C Working Group that is chartered to develop a Recommendation, as defined in the W3C Process Document, that takes the Specification as an input. +10.3. Essential Claims. “Essential Claims” shall mean all claims in any patent or patent application in any jurisdiction in the world that would necessarily be infringed by implementation of the Specification. A claim is necessarily infringed hereunder only when it is not possible to avoid infringing it because there is no non-infringing alternative for implementing the normative portions of the Specification. Existence of a non-infringing alternative shall be judged based on the state of the art at the time of the publication of the Specification. The following are expressly excluded from and shall not be deemed to constitute Essential Claims: +10.3.1. any claims other than as set forth above even if contained in the same patent as Essential Claims; and +10.3.2. claims which would be infringed only by: +portions of an implementation that are not specified in the normative portions of the Specification, or +enabling technologies that may be necessary to make or use any product or portion thereof that complies with the Specification and are not themselves expressly set forth in the Specification (e.g., semiconductor manufacturing technology, compiler technology, object-oriented technology, basic operating system technology, and the like); or +the implementation of technology developed elsewhere and merely incorporated by reference in the body of the Specification. +10.3.3. design patents and design registrations. +For purposes of this definition, the normative portions of the Specification shall be deemed to include only architectural and interoperability requirements. Optional features in the RFC 2119 sense are considered normative unless they are specifically identified as informative. Implementation examples or any other material that merely illustrate the requirements of the Specification are informative, rather than normative. +10.4. I, Me, or My. “I,” “me,” or “my” refers to the signatory. +10.5 Project. “Project” means the W3C Community Group or Business Group for which I executed this Agreement. +10.6. Specification. “Specification” means the Specification identified by the Project as the target of this agreement in a call for Final Specification Commitments. W3C shall provide the authoritative mechanisms for the identification of this Specification. +10.7. W3C Community RF Licensing Requirements. “W3C Community RF Licensing Requirements” license shall mean a non-assignable, non-sublicensable license to make, have made, use, sell, have sold, offer to sell, import, and distribute and dispose of implementations of the Specification that: +10.7.1. shall be available to all, worldwide, whether or not they are W3C Members; +10.7.2. shall extend to all Essential Claims owned or controlled by me; +10.7.3. may be limited to implementations of the Specification, and to what is required by the Specification; +10.7.4. may be conditioned on a grant of a reciprocal RF license (as defined in this policy) to all Essential Claims owned or controlled by the licensee. A reciprocal license may be required to be available to all, and a reciprocal license may itself be conditioned on a further reciprocal license from all. +10.7.5. may not be conditioned on payment of royalties, fees or other consideration; +10.7.6. may be suspended with respect to any licensee when licensor issued by licensee for infringement of claims essential to implement the Specification or any W3C Recommendation; +10.7.7. may not impose any further conditions or restrictions on the use of any technology, intellectual property rights, or other restrictions on behavior of the licensee, but may include reasonable, customary terms relating to operation or maintenance of the license relationship such as the following: choice of law and dispute resolution; +10.7.8. shall not be considered accepted by an implementer who manifests an intent not to accept the terms of the W3C Community RF Licensing Requirements license as offered by the licensor. +10.7.9. The RF license conforming to the requirements in this policy shall be made available by the licensor as long as the Specification is in effect. The term of such license shall be for the life of the patents in question. +I am encouraged to provide a contact from which licensing information can be obtained and other relevant licensing information. Any such information will be made publicly available. +10.8. You or Your. “You,” “you,” or “your” means any person or entity who exercises copyright or patent rights granted under this Agreement, and any person that person or entity controls. + +------------------------------------------------------------------------------------- + +------------------- WebGL ----------------------------- +Copyright (c) 2018 The Khronos Group Inc. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and/or associated documentation files (the +"Materials"), to deal in the Materials without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Materials, and to +permit persons to whom the Materials are furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Materials. + +THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. +------------------------------------------------------ + + +========================================= +END OF typescript NOTICES AND INFORMATION + + + + +%% HTML 5.1 W3C Working Draft version 08 October 2015 (http://www.w3.org/TR/2015/WD-html51-20151008/) +========================================= +Copyright © 2015 W3C® (MIT, ERCIM, Keio, Beihang). This software or document includes material copied +from or derived from HTML 5.1 W3C Working Draft (http://www.w3.org/TR/2015/WD-html51-20151008/.) + +THIS DOCUMENT IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT +NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF +THE DOCUMENT ARE SUITABLE FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY THIRD PARTY +PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS. + +COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE +DOCUMENT OR THE PERFORMANCE OR IMPLEMENTATION OF THE CONTENTS THEREOF. + +The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to this document or its contents +without specific, written prior permission. Title to copyright in this document will at all times remain with copyright holders. +========================================= +END OF HTML 5.1 W3C Working Draft NOTICES AND INFORMATION + + + + +%% JS Beautifier version 1.6.2 (https://github.com/beautify-web/js-beautify) +========================================= +The MIT License (MIT) + +Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and contributors. + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +========================================= +END OF js-beautify NOTICES AND INFORMATION + + + + +%% Ionic documentation version 1.2.4 (https://github.com/driftyco/ionic-site) +========================================= +Copyright Drifty Co. http://drifty.com/. + +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of this License; and + +You must cause any modified files to carry prominent notices stating that You changed the files; and + +You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + +If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS +========================================= +END OF Ionic documentation NOTICES AND INFORMATION + + + + +%% vscode-swift version 0.0.1 (https://github.com/owensd/vscode-swift) +========================================= +The MIT License (MIT) + +Copyright (c) 2015 David Owens II + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +========================================= +END OF vscode-swift NOTICES AND INFORMATION + diff --git a/plugins/diff-explorer/monaco/codicon-KP4OV2OO.ttf b/plugins/diff-explorer/monaco/codicon-KP4OV2OO.ttf new file mode 100644 index 0000000..aa9046c Binary files /dev/null and b/plugins/diff-explorer/monaco/codicon-KP4OV2OO.ttf differ diff --git a/plugins/diff-explorer/monaco/editor.css b/plugins/diff-explorer/monaco/editor.css new file mode 100644 index 0000000..d8dda89 --- /dev/null +++ b/plugins/diff-explorer/monaco/editor.css @@ -0,0 +1 @@ +.monaco-editor{font-family:-apple-system,BlinkMacSystemFont,Segoe WPC,Segoe UI,HelveticaNeue-Light,system-ui,Ubuntu,Droid Sans,sans-serif;--monaco-monospace-font: "SF Mono", Monaco, Menlo, Consolas, "Ubuntu Mono", "Liberation Mono", "DejaVu Sans Mono", "Courier New", monospace}.monaco-menu .monaco-action-bar.vertical .action-item .action-menu-item:focus .action-label{stroke-width:1.2px}.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,.monaco-editor.hc-black .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,.monaco-editor.hc-light .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label{stroke-width:1.2px}.monaco-hover p{margin:0}.monaco-aria-container{position:absolute!important;top:0;height:1px;width:1px;margin:-1px;overflow:hidden;padding:0;clip:rect(1px,1px,1px,1px);clip-path:inset(50%)}.monaco-editor .synthetic-focus,.monaco-diff-editor .synthetic-focus,.monaco-editor [tabindex="0"]:focus,.monaco-diff-editor [tabindex="0"]:focus,.monaco-editor [tabindex="-1"]:focus,.monaco-diff-editor [tabindex="-1"]:focus,.monaco-editor button:focus,.monaco-diff-editor button:focus,.monaco-editor input[type=button]:focus,.monaco-diff-editor input[type=button]:focus,.monaco-editor input[type=checkbox]:focus,.monaco-diff-editor input[type=checkbox]:focus,.monaco-editor input[type=search]:focus,.monaco-diff-editor input[type=search]:focus,.monaco-editor input[type=text]:focus,.monaco-diff-editor input[type=text]:focus,.monaco-editor select:focus,.monaco-diff-editor select:focus,.monaco-editor textarea:focus,.monaco-diff-editor textarea:focus{outline-width:1px;outline-style:solid;outline-offset:-1px;outline-color:var(--vscode-focusBorder);opacity:1}.monaco-aria-container{position:absolute;left:-999em}::-ms-clear{display:none}.monaco-editor .editor-widget input{color:inherit}.monaco-editor{position:relative;overflow:visible;-webkit-text-size-adjust:100%;text-spacing-trim:space-all;color:var(--vscode-editor-foreground);background-color:var(--vscode-editor-background);overflow-wrap:initial}.monaco-editor-background{background-color:var(--vscode-editor-background)}.monaco-editor .rangeHighlight{background-color:var(--vscode-editor-rangeHighlightBackground);box-sizing:border-box;border:1px solid var(--vscode-editor-rangeHighlightBorder)}.monaco-editor.hc-black .rangeHighlight,.monaco-editor.hc-light .rangeHighlight{border-style:dotted}.monaco-editor .symbolHighlight{background-color:var(--vscode-editor-symbolHighlightBackground);box-sizing:border-box;border:1px solid var(--vscode-editor-symbolHighlightBorder)}.monaco-editor.hc-black .symbolHighlight,.monaco-editor.hc-light .symbolHighlight{border-style:dotted}.monaco-editor .editorCanvas{position:absolute;width:100%;height:100%;z-index:0;pointer-events:none}.monaco-editor .overflow-guard{position:relative;overflow:hidden}.monaco-editor .view-overlays{position:absolute;top:0}.monaco-editor .view-overlays>div,.monaco-editor .margin-view-overlays>div{position:absolute;width:100%}.monaco-editor .squiggly-error{border-bottom:4px double var(--vscode-editorError-border)}.monaco-editor .squiggly-error:before{display:block;content:"";width:100%;height:100%;background:var(--vscode-editorError-background)}.monaco-editor .squiggly-warning{border-bottom:4px double var(--vscode-editorWarning-border)}.monaco-editor .squiggly-warning:before{display:block;content:"";width:100%;height:100%;background:var(--vscode-editorWarning-background)}.monaco-editor .squiggly-info{border-bottom:4px double var(--vscode-editorInfo-border)}.monaco-editor .squiggly-info:before{display:block;content:"";width:100%;height:100%;background:var(--vscode-editorInfo-background)}.monaco-editor .squiggly-hint{border-bottom:2px dotted var(--vscode-editorHint-border)}.monaco-editor.showUnused .squiggly-unnecessary{border-bottom:2px dashed var(--vscode-editorUnnecessaryCode-border)}.monaco-editor.showDeprecated .squiggly-inline-deprecated{text-decoration:line-through;text-decoration-color:var(--vscode-editor-foreground, inherit)}.monaco-scrollable-element>.scrollbar>.scra{cursor:pointer;font-size:11px!important}.monaco-scrollable-element>.visible{opacity:1;background:#0000;transition:opacity .1s linear;z-index:11}.monaco-scrollable-element>.invisible{opacity:0;pointer-events:none}.monaco-scrollable-element>.invisible.fade{transition:opacity .8s linear}.disable-animations .monaco-scrollable-element>.visible,.disable-animations .monaco-scrollable-element>.invisible.fade{transition:none}.monaco-scrollable-element>.shadow{position:absolute;display:none}.monaco-scrollable-element>.shadow.top{display:block;top:0;left:3px;height:3px;width:100%;box-shadow:var(--vscode-scrollbar-shadow) 0 6px 6px -6px inset}.monaco-scrollable-element>.shadow.left{display:block;top:3px;left:0;height:100%;width:3px;box-shadow:var(--vscode-scrollbar-shadow) 6px 0 6px -6px inset}.monaco-scrollable-element>.shadow.top-left-corner{display:block;top:0;left:0;height:3px;width:3px}.monaco-scrollable-element>.shadow.top.left{box-shadow:var(--vscode-scrollbar-shadow) 6px 0 6px -6px inset}.monaco-scrollable-element>.scrollbar{background:var(--vscode-scrollbar-background)}.monaco-scrollable-element>.scrollbar>.slider{background:var(--vscode-scrollbarSlider-background)}.monaco-scrollable-element>.scrollbar>.slider:hover{background:var(--vscode-scrollbarSlider-hoverBackground)}.monaco-scrollable-element>.scrollbar>.slider.active{background:var(--vscode-scrollbarSlider-activeBackground)}.monaco-editor .blockDecorations-container{position:absolute;top:0;pointer-events:none}.monaco-editor .blockDecorations-block{position:absolute;box-sizing:border-box}.monaco-editor .view-overlays .current-line,.monaco-editor .margin-view-overlays .current-line{display:block;position:absolute;left:0;top:0;box-sizing:border-box;height:100%}.monaco-editor .margin-view-overlays .current-line.current-line-margin.current-line-margin-both{border-right:0}.monaco-editor .lines-content .cdr{position:absolute;height:100%}.monaco-editor .glyph-margin{position:absolute;top:0}.monaco-editor .glyph-margin-widgets .cgmr{position:absolute;display:flex;align-items:center;justify-content:center}.monaco-editor .glyph-margin-widgets .cgmr.codicon-modifier-spin:before{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.monaco-editor .lines-content .core-guide{position:absolute;box-sizing:border-box;height:100%}.monaco-editor .margin-view-overlays .line-numbers{bottom:0;font-variant-numeric:tabular-nums;position:absolute;text-align:right;display:inline-block;vertical-align:middle;box-sizing:border-box;cursor:default}.monaco-editor .relative-current-line-number{text-align:left;display:inline-block;width:100%}.monaco-editor .margin-view-overlays .line-numbers.lh-odd{margin-top:1px}.monaco-editor .line-numbers{color:var(--vscode-editorLineNumber-foreground)}.monaco-editor .line-numbers.active-line-number{color:var(--vscode-editorLineNumber-activeForeground)}.monaco-mouse-cursor-text{cursor:text}.mtkcontrol{color:#fff!important;background:#960000!important}.mtkoverflow{background-color:var(--vscode-button-background, var(--vscode-editor-background));color:var(--vscode-button-foreground, var(--vscode-editor-foreground));border-width:1px;border-style:solid;border-color:var(--vscode-contrastBorder);border-radius:2px;padding:4px;cursor:pointer}.mtkoverflow:hover{background-color:var(--vscode-button-hoverBackground)}.monaco-editor.no-user-select .lines-content,.monaco-editor.no-user-select .view-line,.monaco-editor.no-user-select .view-lines{user-select:none;-webkit-user-select:none}.monaco-editor.mac .lines-content:hover,.monaco-editor.mac .view-line:hover,.monaco-editor.mac .view-lines:hover{user-select:text;-webkit-user-select:text;-ms-user-select:text}.monaco-editor.enable-user-select{user-select:initial;-webkit-user-select:initial}.monaco-editor .view-lines{white-space:nowrap}.monaco-editor .view-line{box-sizing:border-box;position:absolute;width:100%}.monaco-editor .lines-content>.view-lines>.view-line>span{top:0;bottom:0;position:absolute}.monaco-editor .mtkw{color:var(--vscode-editorWhitespace-foreground)!important}.monaco-editor .mtkz{display:inline-block;color:var(--vscode-editorWhitespace-foreground)!important}.monaco-editor .lines-decorations{position:absolute;top:0;background:#fff}.monaco-editor .margin-view-overlays .cldr{position:absolute;height:100%}.monaco-editor .margin{background-color:var(--vscode-editorGutter-background)}.monaco-editor .margin-view-overlays .cmdr{position:absolute;left:0;width:100%;height:100%}.monaco-editor .minimap.slider-mouseover .minimap-slider{opacity:0;transition:opacity .1s linear}.monaco-editor .minimap.slider-mouseover:hover .minimap-slider,.monaco-editor .minimap.slider-mouseover .minimap-slider.active{opacity:1}.monaco-editor .minimap-slider .minimap-slider-horizontal{background:var(--vscode-minimapSlider-background)}.monaco-editor .minimap-slider:hover .minimap-slider-horizontal{background:var(--vscode-minimapSlider-hoverBackground)}.monaco-editor .minimap-slider.active .minimap-slider-horizontal{background:var(--vscode-minimapSlider-activeBackground)}.monaco-editor .minimap-shadow-visible{box-shadow:var(--vscode-shadow-md)}.monaco-editor .minimap-shadow-hidden{position:absolute;width:0}.monaco-editor .minimap-shadow-visible{position:absolute;left:-6px;width:6px;pointer-events:none}.monaco-editor.no-minimap-shadow .minimap-shadow-visible{position:absolute;left:-1px;width:1px}.minimap.minimap-autohide-mouseover,.minimap.minimap-autohide-scroll{opacity:0;transition:opacity .5s}.minimap.minimap-autohide-scroll{pointer-events:none}.minimap.minimap-autohide-mouseover:hover,.minimap.minimap-autohide-scroll.active{opacity:1;pointer-events:auto}.monaco-editor .minimap{z-index:5}.monaco-editor .minimap canvas{opacity:.9}.monaco-editor .overlayWidgets{position:absolute;top:0;left:0}.monaco-editor .view-ruler{position:absolute;top:0;box-shadow:1px 0 0 0 var(--vscode-editorRuler-foreground) inset;pointer-events:none}.monaco-editor .scroll-decoration{position:absolute;top:0;left:0;height:6px;box-shadow:var(--vscode-scrollbar-shadow) 0 6px 6px -6px inset}.monaco-editor .lines-content .cslr{position:absolute}.monaco-editor .focused .selected-text{background-color:var(--vscode-editor-selectionBackground)}.monaco-editor .selected-text{background-color:var(--vscode-editor-inactiveSelectionBackground)}.monaco-editor .top-left-radius{border-top-left-radius:3px}.monaco-editor .bottom-left-radius{border-bottom-left-radius:3px}.monaco-editor .top-right-radius{border-top-right-radius:3px}.monaco-editor .bottom-right-radius{border-bottom-right-radius:3px}.monaco-editor.hc-black .top-left-radius{border-top-left-radius:0}.monaco-editor.hc-black .bottom-left-radius{border-bottom-left-radius:0}.monaco-editor.hc-black .top-right-radius{border-top-right-radius:0}.monaco-editor.hc-black .bottom-right-radius{border-bottom-right-radius:0}.monaco-editor.hc-light .top-left-radius{border-top-left-radius:0}.monaco-editor.hc-light .bottom-left-radius{border-bottom-left-radius:0}.monaco-editor.hc-light .top-right-radius{border-top-right-radius:0}.monaco-editor.hc-light .bottom-right-radius{border-bottom-right-radius:0}.monaco-editor .cursors-layer{position:absolute;top:0}.monaco-editor .cursors-layer>.cursor{position:absolute;overflow:hidden;box-sizing:border-box}.monaco-editor .cursors-layer.cursor-smooth-caret-animation>.cursor{transition:all 80ms}.monaco-editor .cursors-layer.cursor-block-outline-style>.cursor{background:transparent!important;border-style:solid;border-width:1px}.monaco-editor .cursors-layer.cursor-underline-style>.cursor{border-bottom-width:2px;border-bottom-style:solid;background:transparent!important}.monaco-editor .cursors-layer.cursor-underline-thin-style>.cursor{border-bottom-width:1px;border-bottom-style:solid;background:transparent!important}@keyframes monaco-cursor-smooth{0%,20%{opacity:1}60%,to{opacity:0}}@keyframes monaco-cursor-phase{0%,20%{opacity:1}90%,to{opacity:0}}@keyframes monaco-cursor-expand{0%,20%{transform:scaleY(1)}80%,to{transform:scaleY(0)}}.cursor-smooth{animation:monaco-cursor-smooth .5s ease-in-out 0s 20 alternate}.cursor-phase{animation:monaco-cursor-phase .5s ease-in-out 0s 20 alternate}.cursor-expand>.cursor{animation:monaco-cursor-expand .5s ease-in-out 0s 20 alternate}.monaco-editor .mwh{position:absolute;color:var(--vscode-editorWhitespace-foreground)!important}.monaco-editor .monaco-decoration-css-rule-extractor{visibility:hidden;pointer-events:none}.monaco-editor .inputarea{min-width:0;min-height:0;margin:0;padding:0;position:absolute;outline:none!important;resize:none;border:none;overflow:hidden;color:transparent;background-color:transparent;z-index:-10}.monaco-editor .inputarea.ime-input{z-index:10;caret-color:var(--vscode-editorCursor-foreground);color:var(--vscode-editor-foreground)}.monaco-editor .native-edit-context{margin:0;padding:0;position:absolute;overflow-y:scroll;scrollbar-width:none;z-index:-10;white-space:pre-wrap}.monaco-editor .ime-text-area{min-width:0;min-height:0;margin:0;padding:0;position:absolute;outline:none!important;resize:none;border:none;overflow:hidden;color:transparent;background-color:transparent;z-index:-10}.monaco-editor .edit-context-composition-none{background-color:transparent;border-bottom:none}.monaco-editor :not(.hc-black,.hc-light) .edit-context-composition-secondary{border-bottom:1px solid var(--vscode-editor-compositionBorder)}.monaco-editor :not(.hc-black,.hc-light) .edit-context-composition-primary{border-bottom:2px solid var(--vscode-editor-compositionBorder)}.monaco-editor :is(.hc-black,.hc-light) .edit-context-composition-secondary{border:1px solid var(--vscode-editor-compositionBorder)}.monaco-editor :is(.hc-black,.hc-light) .edit-context-composition-primary{border:2px solid var(--vscode-editor-compositionBorder)}.monaco-editor .margin-view-overlays .gpu-mark{position:absolute;top:0;bottom:0;left:0;width:100%;display:inline-block;border-left:solid 2px var(--vscode-editorWarning-foreground);opacity:.2;transition:background-color .1s linear}.monaco-editor .margin-view-overlays .gpu-mark:hover{background-color:var(--vscode-editorWarning-foreground)}.monaco-hover.workbench-hover{position:relative;font-size:13px;line-height:19px;z-index:40;overflow:hidden;max-width:700px;background:var(--vscode-editorHoverWidget-background);border:1px solid var(--vscode-editorHoverWidget-border);border-radius:5px;color:var(--vscode-editorHoverWidget-foreground);box-shadow:var(--vscode-shadow-lg)}.monaco-hover.workbench-hover.with-pointer{border-radius:3px}.monaco-hover.workbench-hover .monaco-action-bar .action-item .codicon{width:13px;height:13px}.monaco-hover.workbench-hover hr{border-bottom:none}.monaco-hover.workbench-hover.compact{font-size:12px}.monaco-hover.workbench-hover.compact .monaco-action-bar .action-item .codicon{width:12px;height:12px}.monaco-hover.workbench-hover.compact .hover-contents{padding:2px 8px}.workbench-hover-container.locked .monaco-hover.workbench-hover{outline:1px solid var(--vscode-editorHoverWidget-border)}.workbench-hover-container:focus-within.locked .monaco-hover.workbench-hover{outline-color:var(--vscode-focusBorder)}.workbench-hover-pointer{position:absolute;z-index:41;pointer-events:none}.workbench-hover-pointer:after{content:"";position:absolute;width:5px;height:5px;background-color:var(--vscode-editorHoverWidget-background);border-right:1px solid var(--vscode-editorHoverWidget-border);border-bottom:1px solid var(--vscode-editorHoverWidget-border)}.workbench-hover-container:not(:focus-within).locked .workbench-hover-pointer:after{width:4px;height:4px;border-right-width:2px;border-bottom-width:2px}.workbench-hover-container:focus-within .workbench-hover-pointer:after{border-right:1px solid var(--vscode-focusBorder);border-bottom:1px solid var(--vscode-focusBorder)}.workbench-hover-pointer.left{left:-3px}.workbench-hover-pointer.right{right:3px}.workbench-hover-pointer.top{top:-3px}.workbench-hover-pointer.bottom{bottom:3px}.workbench-hover-pointer.left:after{transform:rotate(135deg)}.workbench-hover-pointer.right:after{transform:rotate(315deg)}.workbench-hover-pointer.top:after{transform:rotate(225deg)}.workbench-hover-pointer.bottom:after{transform:rotate(45deg)}.monaco-hover.workbench-hover a{color:var(--vscode-textLink-foreground)}.monaco-hover.workbench-hover a:focus{outline:1px solid;outline-offset:-1px;text-decoration:underline;outline-color:var(--vscode-focusBorder)}.monaco-hover.workbench-hover a.codicon:focus,.monaco-hover.workbench-hover a.monaco-button:focus{text-decoration:none}.monaco-hover.workbench-hover a:hover,.monaco-hover.workbench-hover a:active{color:var(--vscode-textLink-activeForeground)}.monaco-hover.workbench-hover code{background:var(--vscode-textCodeBlock-background)}.monaco-hover.workbench-hover .hover-row .actions{background:var(--vscode-editorHoverWidget-statusBarBackground)}.monaco-hover.workbench-hover.right-aligned{left:1px}.monaco-hover.workbench-hover.right-aligned .hover-row.status-bar .actions{flex-direction:row-reverse}.monaco-hover.workbench-hover.right-aligned .hover-row.status-bar .actions .action-container{margin-right:0;margin-left:16px}.monaco-hover{cursor:default;position:absolute;overflow:hidden;user-select:text;-webkit-user-select:text;box-sizing:border-box;line-height:1.5em;white-space:var(--vscode-hover-whiteSpace, normal)}.monaco-hover.fade-in{animation:fadein .1s linear}.monaco-hover.hidden{display:none}.monaco-hover a:hover:not(.disabled){cursor:pointer}.monaco-hover .hover-contents:not(.html-hover-contents){padding:4px 8px}.monaco-hover .markdown-hover>.hover-contents:not(.code-hover-contents){max-width:var(--vscode-hover-maxWidth, 500px);word-wrap:break-word}.monaco-hover .markdown-hover>.hover-contents:not(.code-hover-contents) hr{min-width:100%}.monaco-hover p,.monaco-hover .code,.monaco-hover ul,.monaco-hover h1,.monaco-hover h2,.monaco-hover h3,.monaco-hover h4,.monaco-hover h5,.monaco-hover h6{margin:8px 0}.monaco-hover h1,.monaco-hover h2,.monaco-hover h3,.monaco-hover h4,.monaco-hover h5,.monaco-hover h6{line-height:1.1}.monaco-hover code{font-family:var(--monaco-monospace-font)}.monaco-hover hr{box-sizing:border-box;border-left:0px;border-right:0px;margin:4px -8px -4px;height:1px}.monaco-hover p:first-child,.monaco-hover .code:first-child,.monaco-hover ul:first-child{margin-top:0}.monaco-hover p:last-child,.monaco-hover .code:last-child,.monaco-hover ul:last-child{margin-bottom:0}.monaco-hover ul,.monaco-hover ol{padding-left:20px}.monaco-hover li>p{margin-bottom:0}.monaco-hover li>ul{margin-top:0}.monaco-hover code{border-radius:3px;padding:0 .4em}.monaco-hover .monaco-tokenized-source{white-space:var(--vscode-hover-sourceWhiteSpace, pre-wrap)}.monaco-hover .hover-row.status-bar{font-size:12px;line-height:22px}.monaco-hover .hover-row.status-bar .info{font-style:italic;padding:0 8px}.monaco-hover .hover-row.status-bar .actions{display:flex;padding:0 8px;width:100%;box-sizing:border-box}.monaco-hover .hover-row.status-bar .actions .action-container{margin-right:16px;cursor:pointer;overflow:hidden;text-wrap:nowrap;text-overflow:ellipsis}.monaco-hover .hover-row.status-bar .actions .action-container .action .icon{padding-right:4px;vertical-align:middle;font-size:inherit}.monaco-hover .hover-row.status-bar .actions .action-container a{color:var(--vscode-textLink-foreground);text-decoration:var(--text-link-decoration)}.monaco-hover .hover-row.status-bar .actions .action-container a .icon.codicon{color:var(--vscode-textLink-foreground)}.monaco-hover .markdown-hover .hover-contents .codicon{color:inherit;font-size:inherit;vertical-align:middle}.monaco-hover .hover-contents a.code-link:hover,.monaco-hover .hover-contents a.code-link{color:inherit}.monaco-hover .hover-contents a.code-link:before{content:"("}.monaco-hover .hover-contents a.code-link:after{content:")"}.monaco-hover .hover-contents a.code-link>span{text-decoration:underline;border-bottom:1px solid transparent;text-underline-position:under;color:var(--vscode-textLink-foreground)}.monaco-hover .hover-contents a.code-link>span:hover{color:var(--vscode-textLink-activeForeground)}.monaco-hover .markdown-hover .hover-contents:not(.code-hover-contents):not(.html-hover-contents) span.codicon{margin-bottom:2px}.monaco-hover-content .action-container a{-webkit-user-select:none;user-select:none}.monaco-hover-content .action-container.disabled{pointer-events:none;opacity:.4;cursor:default}.monaco-hover .action-container,.monaco-hover .action,.monaco-hover button,.monaco-hover .monaco-button,.monaco-hover .monaco-text-button,.monaco-hover [role=button]{-webkit-user-select:none;user-select:none}.context-view{position:absolute}.context-view.fixed{all:initial;font-family:inherit;font-size:13px;position:fixed;color:inherit}.monaco-select-box{width:100%;cursor:pointer;border-radius:var(--vscode-cornerRadius-small)}.monaco-select-box-dropdown-container{font-size:13px;font-weight:400;text-transform:none}.monaco-action-bar .action-item.select-container{cursor:default}.monaco-action-bar .action-item .monaco-select-box{cursor:pointer;min-width:100px;min-height:18px;padding:2px 23px 2px 8px}.mac .monaco-action-bar .action-item .monaco-select-box{font-size:11px;border-radius:var(--vscode-cornerRadius-small);min-height:24px}.monaco-list{position:relative;height:100%;width:100%;white-space:nowrap;overflow:hidden}.monaco-list.mouse-support{user-select:none;-webkit-user-select:none}.monaco-list>.monaco-scrollable-element{height:100%}.monaco-list-rows{position:relative;width:100%;height:100%}.monaco-list.horizontal-scrolling .monaco-list-rows{width:auto;min-width:100%}.monaco-list-row{position:absolute;box-sizing:border-box;overflow:hidden;width:100%}.monaco-list.mouse-support .monaco-list-row{cursor:pointer;touch-action:none}.monaco-list .monaco-scrollable-element>.scrollbar.vertical,.monaco-pane-view>.monaco-split-view2.vertical>.monaco-scrollable-element>.scrollbar.vertical{z-index:14}.monaco-list-row.scrolling{display:none!important}.monaco-list.element-focused,.monaco-list.selection-single,.monaco-list.selection-multiple{outline:0!important}.monaco-list-type-filter-message{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;padding:40px 1em 1em;text-align:center;white-space:normal;opacity:.7;pointer-events:none}.monaco-list-type-filter-message:empty{display:none}.monaco-drag-image{display:inline-block;padding:1px 7px;border-radius:10px;font-size:12px;position:absolute;z-index:1000;background-color:var(--vscode-list-activeSelectionBackground);color:var(--vscode-list-activeSelectionForeground);outline:1px solid var(--vscode-list-focusOutline);outline-offset:-1px;max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.monaco-select-box-dropdown-container{display:none;box-sizing:border-box;border-radius:var(--vscode-cornerRadius-large);box-shadow:var(--vscode-shadow-lg)}.monaco-select-box-dropdown-container>.select-box-details-pane>.select-box-description-markdown *{margin:0}.monaco-select-box-dropdown-container>.select-box-details-pane>.select-box-description-markdown a:focus{outline:1px solid -webkit-focus-ring-color;outline-offset:-1px}.monaco-select-box-dropdown-container>.select-box-details-pane>.select-box-description-markdown code{line-height:15px;font-family:var(--monaco-monospace-font)}.monaco-select-box-dropdown-container.visible{display:flex;flex-direction:column;text-align:left;width:1px;overflow:hidden}.monaco-select-box-dropdown-container>.select-box-dropdown-list-container{flex:0 0 auto;align-self:flex-start;width:100%;overflow:hidden;box-sizing:border-box}.monaco-select-box-dropdown-container>.select-box-details-pane{padding:5px 6px}.monaco-select-box-dropdown-container>.select-box-dropdown-list-container .monaco-list:focus:before{outline:0!important}.monaco-select-box-dropdown-container>.select-box-dropdown-list-container .monaco-list .monaco-list-row{cursor:pointer;padding-left:2px}.monaco-select-box-dropdown-container>.select-box-dropdown-list-container .monaco-list .monaco-list-row>.option-text{text-overflow:ellipsis;overflow:hidden;padding-left:6px;white-space:nowrap;float:left}.monaco-select-box-dropdown-container>.select-box-dropdown-list-container .monaco-list .monaco-list-row>.option-detail{text-overflow:ellipsis;overflow:hidden;padding-left:6px;white-space:nowrap;float:left;opacity:.7}.monaco-select-box-dropdown-container>.select-box-dropdown-list-container .monaco-list .monaco-list-row>.option-decorator-right{text-overflow:ellipsis;overflow:hidden;padding-right:10px;white-space:nowrap;float:right}.monaco-select-box-dropdown-container>.select-box-dropdown-list-container .monaco-list .monaco-list-row.option-separator{cursor:default;border-radius:0;padding:0}.monaco-select-box-dropdown-container>.select-box-dropdown-list-container .monaco-list .monaco-list-row.option-separator>.option-text{visibility:hidden;width:0;float:none}.monaco-select-box-dropdown-container>.select-box-dropdown-list-container .monaco-list .monaco-list-row.option-separator>.option-detail{display:none}.monaco-select-box-dropdown-container>.select-box-dropdown-list-container .monaco-list .monaco-list-row.option-separator>.option-decorator-right{color:var(--vscode-descriptionForeground);font-size:12px}.monaco-select-box-dropdown-container>.select-box-dropdown-list-container .monaco-list .monaco-list-row.option-separator:after{content:"";position:absolute;left:0;right:0;top:50%;height:1px;background-color:var(--vscode-menu-separatorBackground)}.monaco-select-box-dropdown-container>.select-box-dropdown-list-container .monaco-list .monaco-list-row>.visually-hidden{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}.monaco-select-box-dropdown-container>.select-box-dropdown-container-width-control{flex:1 1 auto;align-self:flex-start;opacity:0}.monaco-select-box-dropdown-container>.select-box-dropdown-container-width-control>.width-control-div{overflow:hidden;max-height:0px}.monaco-select-box-dropdown-container>.select-box-dropdown-container-width-control>.width-control-div>.option-text-width-control{padding-left:8px;padding-right:8px;white-space:nowrap}.monaco-action-bar{white-space:nowrap;height:100%}.monaco-action-bar .actions-container{display:flex;margin:0 auto;padding:0;height:100%;width:100%;align-items:center}.monaco-action-bar.vertical .actions-container{display:inline-block}.monaco-action-bar .action-item{display:block;align-items:center;justify-content:center;cursor:pointer;position:relative}.monaco-action-bar .action-item.disabled{cursor:default}.monaco-action-bar .action-item .icon,.monaco-action-bar .action-item .codicon{display:block}.monaco-action-bar .action-item .codicon{display:flex;align-items:center;width:16px;height:16px}.monaco-action-bar .action-label,.monaco-action-bar .action-item .keybinding{display:flex;font-size:11px;padding:3px;border-radius:var(--vscode-cornerRadius-medium)}.monaco-action-bar .action-item.disabled .action-label:not(.icon),.monaco-action-bar .action-item.disabled .action-label:not(.icon):before,.monaco-action-bar .action-item.disabled .action-label:not(.icon):hover{color:var(--vscode-disabledForeground)}.monaco-action-bar .action-item.disabled .action-label.icon,.monaco-action-bar .action-item.disabled .action-label.icon:before,.monaco-action-bar .action-item.disabled .action-label.icon:hover{opacity:.6}.monaco-action-bar.vertical{text-align:left}.monaco-action-bar.vertical .action-item{display:block}.monaco-action-bar.vertical .action-item .action-label.separator{display:block;border-bottom:1px solid var(--vscode-menu-separatorBackground, var(--vscode-disabledForeground));padding-top:1px;margin:4px .8em;width:100%;height:0;background-color:transparent}.monaco-action-bar .action-item .action-label.separator{width:1px;height:16px;margin:5px 4px!important;cursor:default;min-width:1px;padding:0;background-color:var(--vscode-disabledForeground)}.secondary-actions .monaco-action-bar .action-label{margin-left:6px}.monaco-action-bar .action-item.select-container{overflow:hidden;flex:1;max-width:170px;min-width:60px;display:flex;align-items:center;justify-content:center;margin-right:10px}.monaco-action-bar .action-item.action-dropdown-item{display:flex}.monaco-action-bar .action-item.action-dropdown-item>.action-dropdown-item-separator{display:flex;align-items:center;cursor:default}.monaco-action-bar .action-item.action-dropdown-item>.action-dropdown-item-separator>div{width:1px}.monaco-dropdown{height:100%;padding:0}.monaco-dropdown>.dropdown-label{cursor:pointer;height:100%;display:flex;align-items:center;justify-content:center}.monaco-dropdown>.dropdown-label>.action-label.disabled{cursor:default}.monaco-dropdown .dropdown-menu{border-radius:var(--vscode-cornerRadius-large);box-shadow:var(--vscode-shadow-lg)}.monaco-dropdown-with-primary{display:flex!important;flex-direction:row;border-radius:5px}.monaco-dropdown-with-primary>.action-container>.action-label{margin-right:0}.monaco-dropdown-with-primary>.dropdown-action-container>.monaco-dropdown>.dropdown-label .codicon[class*=codicon-]{font-size:12px;padding-left:0;padding-right:0;line-height:16px;margin-left:-3px}.monaco-dropdown-with-primary>.dropdown-action-container>.monaco-dropdown>.dropdown-label>.action-label{display:block;background-size:16px;background-position:center center;background-repeat:no-repeat}.monaco-action-bar .action-item.menu-entry .action-label.icon{width:16px;height:16px;background-repeat:no-repeat;background-position:50%;background-size:16px}.monaco-action-bar .action-item.menu-entry.text-only .action-label{color:var(--vscode-descriptionForeground);overflow:hidden;border-radius:2px}.monaco-action-bar .action-item.menu-entry.text-only.use-comma:not(:last-of-type) .action-label:after{content:", "}.monaco-action-bar .action-item.menu-entry.text-only+.action-item:not(.text-only)>.monaco-dropdown .action-label{color:var(--vscode-descriptionForeground)}.monaco-dropdown-with-default{display:flex!important;flex-direction:row;border-radius:5px}.monaco-dropdown-with-default>.action-container>.action-label{margin-right:0}.monaco-dropdown-with-default>.action-container.menu-entry>.action-label.icon{width:16px;height:16px;background-repeat:no-repeat;background-position:50%;background-size:16px}.monaco-dropdown-with-default>.action-container.disabled{cursor:default}.monaco-dropdown-with-default>.action-container.disabled>.action-label{opacity:.4;pointer-events:none}.monaco-dropdown-with-default:hover{background-color:var(--vscode-toolbar-hoverBackground)}.monaco-dropdown-with-default>.dropdown-action-container>.monaco-dropdown>.dropdown-label .codicon[class*=codicon-]{font-size:12px;padding-left:0;padding-right:0;line-height:16px;margin-left:-3px}.monaco-dropdown-with-default>.dropdown-action-container>.monaco-dropdown>.dropdown-label>.action-label{display:block;background-size:16px;background-position:center center;background-repeat:no-repeat}:root{--vscode-sash-size: 4px;--vscode-sash-hover-size: 4px}.monaco-sash{position:absolute;z-index:35;touch-action:none}.monaco-sash.disabled{pointer-events:none}.monaco-sash.mac.vertical{cursor:col-resize}.monaco-sash.vertical.minimum{cursor:e-resize}.monaco-sash.vertical.maximum{cursor:w-resize}.monaco-sash.mac.horizontal{cursor:row-resize}.monaco-sash.horizontal.minimum{cursor:s-resize}.monaco-sash.horizontal.maximum{cursor:n-resize}.monaco-sash.disabled{cursor:default!important;pointer-events:none!important}.monaco-sash.vertical{cursor:ew-resize;top:0;width:var(--vscode-sash-size);height:100%}.monaco-sash.horizontal{cursor:ns-resize;left:0;width:100%;height:var(--vscode-sash-size)}.monaco-sash:not(.disabled)>.orthogonal-drag-handle{content:" ";height:calc(var(--vscode-sash-size) * 2);width:calc(var(--vscode-sash-size) * 2);z-index:100;display:block;cursor:all-scroll;position:absolute}.monaco-sash.horizontal.orthogonal-edge-north:not(.disabled)>.orthogonal-drag-handle.start,.monaco-sash.horizontal.orthogonal-edge-south:not(.disabled)>.orthogonal-drag-handle.end{cursor:nwse-resize}.monaco-sash.horizontal.orthogonal-edge-north:not(.disabled)>.orthogonal-drag-handle.end,.monaco-sash.horizontal.orthogonal-edge-south:not(.disabled)>.orthogonal-drag-handle.start{cursor:nesw-resize}.monaco-sash.vertical>.orthogonal-drag-handle.start{left:calc(var(--vscode-sash-size) * -.5);top:calc(var(--vscode-sash-size) * -1)}.monaco-sash.vertical>.orthogonal-drag-handle.end{left:calc(var(--vscode-sash-size) * -.5);bottom:calc(var(--vscode-sash-size) * -1)}.monaco-sash.horizontal>.orthogonal-drag-handle.start{top:calc(var(--vscode-sash-size) * -.5);left:calc(var(--vscode-sash-size) * -1)}.monaco-sash.horizontal>.orthogonal-drag-handle.end{top:calc(var(--vscode-sash-size) * -.5);right:calc(var(--vscode-sash-size) * -1)}.monaco-sash:before{content:"";pointer-events:none;position:absolute;width:100%;height:100%;background:transparent}.monaco-enable-motion .monaco-sash:before{transition:background-color .1s ease-out}.monaco-sash.hover:before,.monaco-sash.active:before{background:var(--vscode-sash-hoverBorder)}.monaco-sash.vertical:before{width:var(--vscode-sash-hover-size);left:calc(50% - (var(--vscode-sash-hover-size) / 2))}.monaco-sash.horizontal:before{height:var(--vscode-sash-hover-size);top:calc(50% - (var(--vscode-sash-hover-size) / 2))}.pointer-events-disabled{pointer-events:none!important}.monaco-sash.debug{background:#0ff}.monaco-sash.debug.disabled{background:#0ff3}.monaco-sash.debug:not(.disabled)>.orthogonal-drag-handle{background:red}.monaco-split-view2{position:relative;width:100%;height:100%}.monaco-split-view2>.sash-container{position:absolute;width:100%;height:100%;pointer-events:none}.monaco-split-view2>.sash-container>.monaco-sash{pointer-events:initial}.monaco-split-view2>.monaco-scrollable-element{width:100%;height:100%}.monaco-split-view2>.monaco-scrollable-element>.split-view-container{width:100%;height:100%;white-space:nowrap;position:relative}.monaco-split-view2>.monaco-scrollable-element>.split-view-container>.split-view-view{white-space:initial;position:absolute}.monaco-split-view2>.monaco-scrollable-element>.split-view-container>.split-view-view:not(.visible){display:none}.monaco-split-view2.vertical>.monaco-scrollable-element>.split-view-container>.split-view-view{width:100%}.monaco-split-view2.horizontal>.monaco-scrollable-element>.split-view-container>.split-view-view{height:100%}.monaco-split-view2.separator-border>.monaco-scrollable-element>.split-view-container>.split-view-view:not(:first-child):before{content:" ";position:absolute;top:0;left:0;z-index:5;pointer-events:none;background-color:var(--separator-border)}.monaco-split-view2.separator-border.horizontal>.monaco-scrollable-element>.split-view-container>.split-view-view:not(:first-child):before{height:100%;width:1px}.monaco-split-view2.separator-border.vertical>.monaco-scrollable-element>.split-view-container>.split-view-view:not(:first-child):before{height:1px;width:100%}.monaco-table{display:flex;flex-direction:column;position:relative;height:100%;width:100%;white-space:nowrap;overflow:hidden}.monaco-table>.monaco-split-view2{border-bottom:1px solid transparent}.monaco-table>.monaco-list{flex:1}.monaco-table-tr{display:flex;height:100%}.monaco-table-th{width:100%;height:100%;font-weight:700;overflow:hidden;text-overflow:ellipsis}.monaco-table-th,.monaco-table-td{box-sizing:border-box;flex-shrink:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.monaco-table>.monaco-split-view2 .monaco-sash.vertical:before{content:"";position:absolute;left:calc(var(--vscode-sash-size) / 2);width:0;border-left:1px solid transparent}.monaco-enable-motion .monaco-table>.monaco-split-view2,.monaco-enable-motion .monaco-table>.monaco-split-view2 .monaco-sash.vertical:before{transition:border-color .2s ease-out}.monaco-custom-toggle{margin-left:2px;float:left;cursor:pointer;overflow:hidden;width:20px;height:20px;border-radius:3px;border:1px solid transparent;padding:1px;box-sizing:border-box;user-select:none;-webkit-user-select:none}.monaco-custom-toggle:hover{background-color:var(--vscode-inputOption-hoverBackground)}.monaco-custom-toggle.disabled{opacity:.4;cursor:default;pointer-events:none}.hc-black .monaco-custom-toggle:hover,.hc-light .monaco-custom-toggle:hover{border:1px dashed var(--vscode-focusBorder)}.hc-black .monaco-custom-toggle,.hc-light .monaco-custom-toggle,.hc-black .monaco-custom-toggle:hover,.hc-light .monaco-custom-toggle:hover{background:none}.monaco-custom-toggle.monaco-checkbox{height:18px;width:18px;border:1px solid transparent;border-radius:3px;margin-right:9px;margin-left:0;padding:0;opacity:1;background-size:16px!important}.monaco-action-bar .checkbox-action-item{display:flex;align-items:center;border-radius:2px;padding-right:2px}.monaco-action-bar .checkbox-action-item:hover{background-color:var(--vscode-toolbar-hoverBackground)}.monaco-action-bar .checkbox-action-item>.monaco-custom-toggle.monaco-checkbox{margin-right:4px}.monaco-action-bar .checkbox-action-item>.checkbox-label{font-size:12px}.monaco-inputbox{position:relative;display:block;padding:0;box-sizing:border-box;border-radius:4px;font-size:inherit}.monaco-inputbox>.ibwrapper>.input,.monaco-inputbox>.ibwrapper>.mirror{padding:4px 6px}.monaco-inputbox>.ibwrapper{position:relative;width:100%}.monaco-inputbox>.ibwrapper>.input{display:inline-block;box-sizing:border-box;width:100%;height:100%;line-height:inherit;border:none;font-family:inherit;font-size:inherit;resize:none;color:inherit}.monaco-inputbox>.ibwrapper>input{text-overflow:ellipsis}.monaco-inputbox>.ibwrapper>textarea.input{display:block;scrollbar-width:none;outline:none}.monaco-inputbox>.ibwrapper>textarea.input::-webkit-scrollbar{display:none}.monaco-inputbox>.ibwrapper>textarea.input.empty{white-space:nowrap}.monaco-inputbox>.ibwrapper>.mirror{position:absolute;display:inline-block;width:100%;top:0;left:0;box-sizing:border-box;white-space:pre-wrap;visibility:hidden;word-wrap:break-word}.monaco-inputbox-container{text-align:right}.monaco-inputbox-container .monaco-inputbox-message{display:inline-block;overflow:hidden;text-align:left;width:100%;box-sizing:border-box;padding:.4em;font-size:12px;line-height:17px;margin-top:-1px;word-wrap:break-word}.monaco-inputbox .monaco-action-bar{position:absolute;right:2px;top:4px}.monaco-inputbox .monaco-action-bar .action-item{margin-left:2px}.monaco-inputbox .monaco-action-bar .action-item .codicon{background-repeat:no-repeat;width:16px;height:16px;color:var(--vscode-icon-foreground)}.monaco-findInput{position:relative}.monaco-findInput .monaco-inputbox{font-size:13px;width:100%}.monaco-findInput>.controls{position:absolute;top:3px;right:2px}.vs .monaco-findInput.disabled{background-color:#e1e1e1}.vs-dark .monaco-findInput.disabled{background-color:#333}.monaco-findInput.highlight-0 .controls,.hc-light .monaco-findInput.highlight-0 .controls{animation:monaco-findInput-highlight-0 .1s linear 0s}.monaco-findInput.highlight-1 .controls,.hc-light .monaco-findInput.highlight-1 .controls{animation:monaco-findInput-highlight-1 .1s linear 0s}.hc-black .monaco-findInput.highlight-0 .controls,.vs-dark .monaco-findInput.highlight-0 .controls{animation:monaco-findInput-highlight-dark-0 .1s linear 0s}.hc-black .monaco-findInput.highlight-1 .controls,.vs-dark .monaco-findInput.highlight-1 .controls{animation:monaco-findInput-highlight-dark-1 .1s linear 0s}@keyframes monaco-findInput-highlight-0{0%{background:#fdff00cc}to{background:transparent}}@keyframes monaco-findInput-highlight-1{0%{background:#fdff00cc}99%{background:transparent}}@keyframes monaco-findInput-highlight-dark-0{0%{background:#ffffff70}to{background:transparent}}@keyframes monaco-findInput-highlight-dark-1{0%{background:#ffffff70}99%{background:transparent}}.monaco-tl-row{display:flex;height:100%;align-items:center;position:relative}.monaco-tl-row.disabled{cursor:default}.monaco-tl-indent{height:100%;position:absolute;top:0;left:16px;pointer-events:none}.hide-arrows .monaco-tl-indent{left:12px}.monaco-tl-indent>.indent-guide{display:inline-block;box-sizing:border-box;height:100%;border-left:1px solid transparent;opacity:0}.monaco-enable-motion .monaco-tl-indent>.indent-guide{transition:opacity .1s linear}.monaco-tl-twistie,.monaco-tl-contents{height:100%}.monaco-tl-twistie{font-size:10px;text-align:right;padding-right:6px;flex-shrink:0;width:16px;display:flex!important;align-items:center;justify-content:center;transform:translate(3px)}.monaco-tl-contents{flex:1;overflow:hidden}.monaco-tl-twistie:before{border-radius:20px}.monaco-tl-twistie.collapsed:before{transform:rotate(-90deg)}.monaco-tl-twistie.codicon-tree-item-loading:before{animation:codicon-spin 1.25s steps(30) infinite;transform-origin:center center}.monaco-tree-type-filter{position:absolute;top:0;right:0;display:flex;padding:3px;max-width:200px;z-index:100;margin:0 10px 0 6px;border:1px solid var(--vscode-widget-border);border-bottom-left-radius:4px;border-bottom-right-radius:4px}.monaco-enable-motion .monaco-tree-type-filter{transition:top .3s}.monaco-tree-type-filter.disabled{top:-40px!important}.monaco-tree-type-filter-input{flex:1}.monaco-tree-type-filter-input .monaco-inputbox{height:23px}.monaco-tree-type-filter-input .monaco-inputbox>.ibwrapper>.input,.monaco-tree-type-filter-input .monaco-inputbox>.ibwrapper>.mirror{padding:2px 4px}.monaco-tree-type-filter-input .monaco-findInput>.controls{top:2px}.monaco-tree-type-filter-actionbar{margin-left:4px}.monaco-tree-type-filter-actionbar .monaco-action-bar .action-label{padding:2px}.monaco-list .monaco-scrollable-element .monaco-tree-sticky-container{position:absolute;top:0;left:0;width:100%;height:0;z-index:13;background-color:var(--vscode-sideBar-background)}.monaco-list .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-row.monaco-list-row{position:absolute;width:100%;opacity:1!important;overflow:hidden;background-color:var(--vscode-sideBar-background)}.monaco-list .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-row:hover{background-color:var(--vscode-list-hoverBackground)!important;cursor:pointer}.monaco-list .monaco-scrollable-element .monaco-tree-sticky-container.empty,.monaco-list .monaco-scrollable-element .monaco-tree-sticky-container.empty .monaco-tree-sticky-container-shadow{display:none}.monaco-list .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-container-shadow{position:absolute;bottom:-3px;left:0;height:0px;width:100%}.monaco-list .monaco-scrollable-element .monaco-tree-sticky-container[tabindex="0"]:focus{outline:none}.quick-input-widget{font-size:13px}.quick-input-widget .monaco-highlighted-label .highlight{color:#0066bf}.vs .quick-input-widget .monaco-list-row.focused .monaco-highlighted-label .highlight{color:#9dddff}.vs-dark .quick-input-widget .monaco-highlighted-label .highlight{color:#0097fb}.hc-black .quick-input-widget .monaco-highlighted-label .highlight{color:#f38518}.hc-light .quick-input-widget .monaco-highlighted-label .highlight{color:#0f4a85}.monaco-keybinding>.monaco-keybinding-key{background-color:#ddd6;border:solid 1px rgba(204,204,204,.4);border-bottom-color:#bbb6;box-shadow:inset 0 -1px #bbb6;color:#555}.hc-black .monaco-keybinding>.monaco-keybinding-key{background-color:transparent;border:solid 1px rgb(111,195,223);box-shadow:none;color:#fff}.hc-light .monaco-keybinding>.monaco-keybinding-key{background-color:transparent;border:solid 1px #0F4A85;box-shadow:none;color:#292929}.vs-dark .monaco-keybinding>.monaco-keybinding-key{background-color:#8080802b;border:solid 1px rgba(51,51,51,.6);border-bottom-color:#4449;box-shadow:inset 0 -1px #4449;color:#ccc}.quick-input-widget{position:absolute;width:600px;z-index:2550;left:50%;-webkit-app-region:no-drag;border-radius:var(--vscode-cornerRadius-xLarge);box-shadow:var(--vscode-shadow-xl)}.quick-input-titlebar{cursor:grab;display:flex;align-items:center;border-top-right-radius:5px;border-top-left-radius:5px}.quick-input-widget.no-drag .quick-input-titlebar,.quick-input-widget.no-drag .quick-input-title,.quick-input-widget.no-drag .quick-input-header{cursor:default}.quick-input-widget .monaco-inputbox .monaco-action-bar{top:0}.quick-input-widget .monaco-action-bar .monaco-custom-toggle{margin-left:0;border-radius:5px;box-sizing:content-box}.quick-input-left-action-bar{display:flex;margin-left:4px}.quick-input-inline-action-bar .actions-container>.action-item:first-child{margin-left:5px}.quick-input-inline-action-bar .actions-container>.action-item{margin-top:2px}.quick-input-title{cursor:grab;padding:3px 0;text-align:center;text-overflow:ellipsis;overflow:hidden;flex:1}.quick-input-right-action-bar{display:flex;margin-right:4px}.quick-input-right-action-bar .actions-container{justify-content:flex-end}.quick-input-right-action-bar .actions-container>.action-item{margin-left:4px}.quick-input-inline-action-bar .actions-container>.action-item{margin-left:4px}.quick-input-titlebar .monaco-action-bar .action-label.codicon{background-position:center;background-repeat:no-repeat;padding:2px}.quick-input-description{margin:6px 6px 6px 11px}.quick-input-header .quick-input-description{margin:4px 2px;flex:1}.quick-input-header{cursor:grab;display:flex;padding:6px 6px 4px}.quick-input-widget .quick-input-filter .monaco-inputbox{border-radius:var(--vscode-cornerRadius-medium)}.quick-input-widget.hidden-input .quick-input-header{padding:0;margin-bottom:0}.quick-input-and-message{display:flex;flex-direction:column;flex-grow:1;min-width:0;position:relative}.quick-input-check-all{align-self:center;margin:0}.quick-input-widget .quick-input-header .monaco-checkbox{margin-top:6px}.quick-input-filter{flex-grow:1;display:flex;position:relative}.quick-input-box{flex-grow:1}.quick-input-widget.show-checkboxes .quick-input-box,.quick-input-widget.show-checkboxes .quick-input-message{margin-left:5px}.quick-input-visible-count{position:absolute;left:-10000px}.quick-input-count{align-self:center;position:absolute;right:4px;display:flex;align-items:center}.quick-input-count .monaco-count-badge{vertical-align:middle;padding:2px 4px;border-radius:2px;min-height:auto;line-height:normal}.quick-input-action{margin-left:6px}.quick-input-message{margin-top:-1px;padding:5px;overflow-wrap:break-word}.quick-input-message>.codicon{margin:0 .2em;vertical-align:text-bottom}.quick-input-message a{color:inherit}.quick-input-progress.monaco-progress-container{position:relative}.quick-input-list{line-height:22px}.quick-input-widget.hidden-input .quick-input-list{margin-top:4px;padding-bottom:4px}.quick-input-list .monaco-list{overflow:hidden;max-height:440px;padding-bottom:7px}.quick-input-list .monaco-scrollable-element{padding:0 6px}.quick-input-list .quick-input-list-entry{box-sizing:border-box;overflow:hidden;display:flex;padding:0 6px}.quick-input-list .quick-input-list-entry.quick-input-list-separator-border{border-top-width:1px;border-top-style:solid}.quick-input-list .monaco-list-row{border-radius:3px}.quick-input-list .monaco-list-row[data-index="0"] .quick-input-list-entry.quick-input-list-separator-border{border-top-style:none}.quick-input-list .quick-input-list-label{overflow:hidden;display:flex;height:100%;flex:1}.quick-input-widget .monaco-checkbox{margin-right:0}.quick-input-widget .quick-input-list .monaco-checkbox,.quick-input-widget .quick-input-tree .monaco-checkbox{margin-top:4px}.quick-input-list .quick-input-list-icon{background-size:16px;background-position:left center;background-repeat:no-repeat;padding-right:6px;width:16px;height:22px;display:flex;align-items:center;justify-content:center}.quick-input-list .quick-input-list-rows{overflow:hidden;text-overflow:ellipsis;display:flex;flex-direction:column;height:100%;flex:1;margin-left:5px}.quick-input-list .quick-input-list-rows>.quick-input-list-row{display:flex;align-items:center}.quick-input-list .quick-input-list-rows>.quick-input-list-row .monaco-icon-label,.quick-input-list .quick-input-list-rows>.quick-input-list-row .monaco-icon-label .monaco-icon-label-container>.monaco-icon-name-container{flex:1}.quick-input-list .quick-input-list-rows>.quick-input-list-row .codicon[class*=codicon-]{vertical-align:text-bottom}.quick-input-list .quick-input-list-rows .monaco-highlighted-label>span{opacity:1}.quick-input-list .quick-input-list-entry .quick-input-list-entry-keybinding{margin-right:8px}.quick-input-list .quick-input-list-label-meta{opacity:.7;line-height:normal;text-overflow:ellipsis;overflow:hidden}.quick-input-list .monaco-list .monaco-list-row .monaco-highlighted-label .highlight{font-weight:700;background-color:unset;color:var(--vscode-list-highlightForeground)!important}.quick-input-list .monaco-list .monaco-list-row.focused .monaco-highlighted-label .highlight{color:var(--vscode-quickInputList-focusHighlightForeground)!important}.quick-input-list .quick-input-list-entry .quick-input-list-separator{margin-right:4px;font-size:var(--vscode-bodyFontSize-xSmall);color:var(--vscode-descriptionForeground)}.quick-input-list .quick-input-list-entry-action-bar{display:flex;flex:0;overflow:visible}.quick-input-list .quick-input-list-entry-action-bar .action-label,.quick-input-list .quick-input-list-entry-action-bar .monaco-custom-toggle{display:none}.quick-input-list .quick-input-list-entry-action-bar .action-label.codicon{margin-right:4px;padding:2px}.quick-input-list .quick-input-list-entry-action-bar .monaco-custom-toggle.codicon{margin-right:4px}.quick-input-list .quick-input-list-entry-action-bar{margin-top:1px}.quick-input-list .quick-input-list-entry-action-bar{margin-right:4px}.quick-input-list .quick-input-list-entry .quick-input-list-entry-action-bar .action-label.always-visible,.quick-input-list .quick-input-list-entry:hover .quick-input-list-entry-action-bar .action-label,.quick-input-list .quick-input-list-entry.focus-inside .quick-input-list-entry-action-bar .action-label,.quick-input-list .monaco-list-row.focused .quick-input-list-entry-action-bar .action-label,.quick-input-list .monaco-list-row.passive-focused .quick-input-list-entry-action-bar .action-label,.quick-input-list .quick-input-list-entry .quick-input-list-entry-action-bar .monaco-custom-toggle.always-visible,.quick-input-list .quick-input-list-entry:hover .quick-input-list-entry-action-bar .monaco-custom-toggle,.quick-input-list .quick-input-list-entry.focus-inside .quick-input-list-entry-action-bar .monaco-custom-toggle,.quick-input-list .monaco-list-row.focused .quick-input-list-entry-action-bar .monaco-custom-toggle,.quick-input-list .monaco-list-row.passive-focused .quick-input-list-entry-action-bar .monaco-custom-toggle{display:flex}.quick-input-list>.monaco-list:focus .monaco-list-row.focused{outline:1px solid var(--vscode-list-focusOutline)!important;outline-offset:-1px}.quick-input-list>.monaco-list:focus .monaco-list-row.focused .quick-input-list-entry.quick-input-list-separator-border{border-color:transparent}.quick-input-list .monaco-list-row.focused .monaco-keybinding-key,.quick-input-list .monaco-list-row.focused .quick-input-list-entry .quick-input-list-separator{color:inherit}.quick-input-list .monaco-list-row.focused .monaco-keybinding-key,.quick-input-list .monaco-list-row:hover .monaco-keybinding-key{background:none;border-color:var(--vscode-widget-shadow)}:is(.vs,.vs-dark) .quick-input-list .monaco-list-row.focused .monaco-keybinding-key,:is(.vs,.vs-dark) .quick-input-list .monaco-list-row:hover .monaco-keybinding-key{border-color:color-mix(in srgb,currentColor 30%,transparent)}.quick-input-list .quick-input-list-separator-as-item{padding:4px 6px;font-size:12px}.quick-input-list .quick-input-list-separator-as-item .label-name{font-weight:600}.quick-input-list .quick-input-list-separator-as-item .label-description{opacity:1!important}.quick-input-list .monaco-tree-sticky-row .quick-input-list-entry.quick-input-list-separator-as-item.quick-input-list-separator-border{border-top-style:none}.quick-input-list .monaco-tree-sticky-row{padding:0 5px}.quick-input-list .monaco-tl-twistie{display:none!important}.quick-input-tree .monaco-list{overflow:hidden;max-height:440px;padding-bottom:5px}.quick-input-tree.quick-input-tree-flat .monaco-tl-indent,.quick-input-tree.quick-input-tree-flat .monaco-tl-twistie{display:none!important}.quick-input-tree.quick-input-tree-flat .monaco-checkbox{margin-left:6px}.quick-input-tree .quick-input-tree-entry{box-sizing:border-box;overflow:hidden;display:flex;padding-right:6px}.quick-input-tree .quick-input-tree-label{overflow:hidden;display:flex;height:100%;flex:1}.quick-input-tree .quick-input-tree-icon{background-size:16px;background-position:left center;background-repeat:no-repeat;padding-right:6px;width:16px;height:22px;display:flex;align-items:center;justify-content:center}.quick-input-tree .quick-input-tree-rows{overflow:hidden;text-overflow:ellipsis;display:flex;flex-direction:column;height:100%;flex:1;margin-left:5px}.quick-input-tree .quick-input-tree-rows>.quick-input-tree-row{display:flex;align-items:center}.quick-input-tree .quick-input-tree-rows>.quick-input-tree-row .monaco-icon-label,.quick-input-tree .quick-input-tree-rows>.quick-input-tree-row .monaco-icon-label .monaco-icon-label-container>.monaco-icon-name-container{flex:1}.quick-input-tree .quick-input-tree-rows>.quick-input-tree-row .codicon[class*=codicon-]{vertical-align:text-bottom}.quick-input-tree .quick-input-tree-rows .monaco-highlighted-label>span{opacity:1}.quick-input-tree .quick-input-tree-entry-action-bar{display:flex;flex:0;overflow:visible}.quick-input-tree .quick-input-tree-entry-action-bar .action-label,.quick-input-tree .quick-input-tree-entry-action-bar .monaco-custom-toggle{display:none}.quick-input-tree .quick-input-tree-entry-action-bar .action-label.codicon{margin-right:4px;padding:2px}.quick-input-tree .quick-input-tree-entry-action-bar .monaco-custom-toggle.codicon{margin-right:4px}.quick-input-tree .quick-input-tree-entry-action-bar{margin-top:1px}.quick-input-tree .quick-input-tree-entry-action-bar{margin-right:4px}.quick-input-tree .quick-input-tree-entry .quick-input-tree-entry-action-bar .action-label.always-visible,.quick-input-tree .quick-input-tree-entry:hover .quick-input-tree-entry-action-bar .action-label,.quick-input-tree .quick-input-tree-entry.focus-inside .quick-input-tree-entry-action-bar .action-label,.quick-input-tree .monaco-list-row.focused .quick-input-tree-entry-action-bar .action-label,.quick-input-tree .monaco-list-row.passive-focused .quick-input-tree-entry-action-bar .action-label,.quick-input-tree .quick-input-tree-entry .quick-input-tree-entry-action-bar .monaco-custom-toggle.always-visible,.quick-input-tree .quick-input-tree-entry:hover .quick-input-tree-entry-action-bar .monaco-custom-toggle,.quick-input-tree .quick-input-tree-entry.focus-inside .quick-input-tree-entry-action-bar .monaco-custom-toggle,.quick-input-tree .monaco-list-row.focused .quick-input-tree-entry-action-bar .monaco-custom-toggle,.quick-input-tree .monaco-list-row.passive-focused .quick-input-tree-entry-action-bar .monaco-custom-toggle{display:flex}.quick-input-tree>.monaco-list:focus .monaco-list-row.focused{outline:1px solid var(--vscode-list-focusOutline)!important;outline-offset:-1px}.monaco-toolbar{height:100%}.monaco-toolbar .toolbar-toggle-more{display:inline-block;padding:0}.monaco-toolbar.responsive.responsive-all{.monaco-action-bar>.actions-container>.action-item{flex-shrink:1;min-width:var(--vscode-toolbar-action-min-width, 20px)}}.monaco-toolbar.responsive.responsive-last{.monaco-action-bar>.actions-container>.action-item{flex-shrink:0}.monaco-action-bar:not(.has-overflow)>.actions-container>.action-item:last-child,.monaco-action-bar.has-overflow>.actions-container>.action-item:nth-last-child(2){flex-shrink:1;min-width:var(--vscode-toolbar-action-min-width, 20px)}}.monaco-text-button{box-sizing:border-box;display:flex;width:100%;padding:4px 8px;border-radius:4px;text-align:center;cursor:pointer;justify-content:center;align-items:center;border:1px solid var(--vscode-button-border, transparent);line-height:16px;font-size:12px;overflow-wrap:normal}.monaco-text-button.secondary{border-color:var(--vscode-button-secondaryBorder, var(--vscode-button-border, transparent))}.monaco-text-button.small{line-height:14px;font-size:11px;padding:3px 6px}.monaco-text-button:focus{outline-offset:2px!important}.monaco-text-button:hover{text-decoration:none!important}.monaco-button.disabled:focus,.monaco-button.disabled{opacity:.4!important;cursor:default}.monaco-text-button .codicon{margin:0 .2em;color:inherit!important}.monaco-text-button.monaco-text-button-with-short-label{flex-direction:row;flex-wrap:wrap;padding:0 4px;overflow:hidden;height:28px}.monaco-text-button.monaco-text-button-with-short-label>.monaco-button-label{flex-basis:100%}.monaco-text-button.monaco-text-button-with-short-label>.monaco-button-label-short{flex-grow:1;width:0;overflow:hidden}.monaco-text-button.monaco-text-button-with-short-label>.monaco-button-label,.monaco-text-button.monaco-text-button-with-short-label>.monaco-button-label-short{display:flex;justify-content:center;align-items:center;font-weight:400;font-style:inherit;line-height:18px;padding:4px 0}.monaco-button-dropdown{display:flex;cursor:pointer}.monaco-button-dropdown.disabled{cursor:default}.monaco-button-dropdown>.monaco-button:focus{outline-offset:-1px!important}.monaco-button-dropdown.disabled>.monaco-button.disabled,.monaco-button-dropdown.disabled>.monaco-button.disabled:focus,.monaco-button-dropdown.disabled>.monaco-button-dropdown-separator{opacity:.4!important}.monaco-button-dropdown>.monaco-button.monaco-text-button{border-right-width:0!important}.monaco-button-dropdown .monaco-button-dropdown-separator{padding:4px 0;cursor:default}.monaco-button-dropdown .monaco-button-dropdown-separator>div{height:100%;width:1px}.monaco-button-dropdown>.monaco-button.monaco-dropdown-button{border:1px solid var(--vscode-button-border, transparent);border-left-width:0!important;border-radius:0 4px 4px 0;padding:0 4px;display:flex;align-items:center}.monaco-button-dropdown>.monaco-button.monaco-dropdown-button.secondary{border-color:var(--vscode-button-secondaryBorder, var(--vscode-button-border, transparent))}.monaco-button-dropdown>.monaco-button.monaco-text-button{border-radius:4px 0 0 4px}.monaco-description-button{display:flex;flex-direction:column;align-items:center;margin:4px 5px}.monaco-description-button .monaco-button-description{font-style:italic;font-size:11px;padding:4px 20px}.monaco-description-button .monaco-button-label,.monaco-description-button .monaco-button-description{display:flex;justify-content:center;align-items:center}.monaco-description-button .monaco-button-label>.codicon,.monaco-description-button .monaco-button-description>.codicon{margin:0 .2em;color:inherit!important}.monaco-button.default-colors,.monaco-button-dropdown.default-colors>.monaco-button{color:var(--vscode-button-foreground);background-color:var(--vscode-button-background)}.monaco-button.default-colors:hover,.monaco-button-dropdown.default-colors>.monaco-button:hover{background-color:var(--vscode-button-hoverBackground)}.monaco-button.default-colors.secondary,.monaco-button-dropdown.default-colors>.monaco-button.secondary{color:var(--vscode-button-secondaryForeground);background-color:var(--vscode-button-secondaryBackground)}.monaco-button.default-colors.secondary:hover,.monaco-button-dropdown.default-colors>.monaco-button.secondary:hover{background-color:var(--vscode-button-secondaryHoverBackground)}.monaco-button-dropdown.default-colors .monaco-button-dropdown-separator{background-color:var(--vscode-button-background);border-top:1px solid var(--vscode-button-border);border-bottom:1px solid var(--vscode-button-border)}.monaco-button-dropdown.default-colors .monaco-button.secondary+.monaco-button-dropdown-separator{background-color:var(--vscode-button-secondaryBackground);border-top-color:var(--vscode-button-secondaryBorder, var(--vscode-button-border));border-bottom-color:var(--vscode-button-secondaryBorder, var(--vscode-button-border))}.monaco-button-dropdown.default-colors .monaco-button-dropdown-separator>div{background-color:var(--vscode-button-separator)}.monaco-count-badge{padding:3px 5px;border-radius:11px;font-size:11px;min-width:18px;min-height:18px;line-height:11px;font-weight:400;text-align:center;display:inline-block;box-sizing:border-box}.monaco-count-badge.long{padding:2px 3px;border-radius:2px;min-height:auto;line-height:normal}.monaco-progress-container{width:100%;height:2px;overflow:hidden}.monaco-progress-container .progress-bit{width:2%;height:2px;position:absolute;left:0;display:none}.monaco-progress-container.active .progress-bit{display:inherit}.monaco-progress-container.discrete .progress-bit{left:0;transition:width .1s linear}.monaco-progress-container.discrete.done .progress-bit{width:100%}.monaco-progress-container.infinite .progress-bit{animation-name:progress;animation-duration:4s;animation-iteration-count:infinite;transform:translateZ(0);animation-timing-function:linear}.monaco-progress-container.infinite.infinite-long-running .progress-bit{animation-timing-function:steps(100)}@keyframes progress{0%{transform:translate(0) scaleX(1)}50%{transform:translate(2500%) scaleX(3)}to{transform:translate(4900%) scaleX(1)}}.monaco-icon-label{display:flex;overflow:hidden;text-overflow:ellipsis}.monaco-icon-label:before{background-size:16px;background-position:left center;background-repeat:no-repeat;padding-right:6px;width:16px;height:22px;line-height:inherit!important;display:inline-block;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;vertical-align:top;flex-shrink:0}.monaco-icon-label-iconpath{width:16px;height:22px;margin-right:6px;display:flex}.monaco-icon-label-container.disabled{color:var(--vscode-disabledForeground)}.monaco-icon-label>.monaco-icon-label-container{min-width:0;overflow:hidden;text-overflow:ellipsis;flex:1}.monaco-icon-label>.monaco-icon-label-container>.monaco-icon-name-container>.label-name{color:inherit;white-space:pre}.monaco-icon-label>.monaco-icon-label-container>.monaco-icon-name-container>.label-name>.label-separator{margin:0 2px;opacity:.5}.monaco-icon-label>.monaco-icon-label-container>.monaco-icon-suffix-container>.label-suffix{opacity:.7;white-space:pre}.monaco-icon-label>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{opacity:.7;margin-left:.5em;font-size:.9em;white-space:pre}.monaco-icon-label.nowrap>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{white-space:nowrap}.vs .monaco-icon-label>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{opacity:.95}.monaco-icon-label.bold>.monaco-icon-label-container>.monaco-icon-name-container>.label-name,.monaco-icon-label.bold>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{font-weight:700}.monaco-icon-label.italic>.monaco-icon-label-container>.monaco-icon-name-container>.label-name,.monaco-icon-label.italic>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{font-style:italic}.monaco-icon-label.deprecated{text-decoration:line-through;opacity:.66}.monaco-icon-label.strikethrough>.monaco-icon-label-container>.monaco-icon-name-container>.label-name,.monaco-icon-label.strikethrough>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{text-decoration:line-through}.monaco-icon-label:after{opacity:.75;font-size:90%;font-weight:600;margin:auto 16px 0 5px;text-align:center}.monaco-list:focus .selected .monaco-icon-label,.monaco-list:focus .selected .monaco-icon-label:after{color:inherit!important}.monaco-list-row.focused.selected .label-description,.monaco-list-row.selected .label-description{opacity:.8}.monaco-keybinding{display:flex;align-items:center;line-height:10px}.monaco-keybinding>.monaco-keybinding-key{display:inline-flex;align-items:center;border-style:solid;border-width:1px;border-radius:3px;justify-content:center;min-width:12px;font-size:11px;padding:3px 5px;margin:0 2px}.monaco-keybinding>.monaco-keybinding-key:first-child{margin-left:0}.monaco-keybinding>.monaco-keybinding-key:last-child{margin-right:0}.monaco-keybinding>.monaco-keybinding-key-separator{display:inline-block}.monaco-keybinding>.monaco-keybinding-key-chord-separator{width:6px}.monaco-diff-editor .diff-review{position:absolute}.monaco-component.diff-review{user-select:none;-webkit-user-select:none;z-index:99;.diff-review-line-number{text-align:right;display:inline-block;color:var(--vscode-editorLineNumber-foreground)}.diff-review-summary{padding-left:10px}.diff-review-shadow{position:absolute;box-shadow:var(--vscode-scrollbar-shadow) 0 -6px 6px -6px inset}.diff-review-row{white-space:pre}.diff-review-table{display:table;min-width:100%}.diff-review-row{display:table-row;width:100%}.diff-review-spacer{display:inline-block;width:10px;vertical-align:middle}.diff-review-spacer>.codicon{font-size:9px!important}.diff-review-actions{display:inline-block;position:absolute;right:10px;top:2px;z-index:100}.diff-review-actions .action-label{width:16px;height:16px;margin:2px 0}.revertButton{cursor:pointer}.action-label{background:var(--vscode-editorActionList-background)}}.monaco-editor .diff-hidden-lines-widget{width:100%}.monaco-editor .diff-hidden-lines{height:0px;transform:translateY(-10px);font-size:13px;line-height:14px}.monaco-editor .diff-hidden-lines:not(.dragging) .top:hover,.monaco-editor .diff-hidden-lines:not(.dragging) .bottom:hover,.monaco-editor .diff-hidden-lines .top.dragging,.monaco-editor .diff-hidden-lines .bottom.dragging{background-color:var(--vscode-focusBorder)}.monaco-editor .diff-hidden-lines .top,.monaco-editor .diff-hidden-lines .bottom{transition:background-color .1s ease-out;height:4px;background-color:transparent;background-clip:padding-box;border-bottom:2px solid transparent;border-top:4px solid transparent}.monaco-editor.draggingUnchangedRegion.canMoveTop:not(.canMoveBottom) *,.monaco-editor .diff-hidden-lines .top.canMoveTop:not(.canMoveBottom),.monaco-editor .diff-hidden-lines .bottom.canMoveTop:not(.canMoveBottom){cursor:n-resize!important}.monaco-editor.draggingUnchangedRegion:not(.canMoveTop).canMoveBottom *,.monaco-editor .diff-hidden-lines .top:not(.canMoveTop).canMoveBottom,.monaco-editor .diff-hidden-lines .bottom:not(.canMoveTop).canMoveBottom{cursor:s-resize!important}.monaco-editor.draggingUnchangedRegion.canMoveTop.canMoveBottom *,.monaco-editor .diff-hidden-lines .top.canMoveTop.canMoveBottom,.monaco-editor .diff-hidden-lines .bottom.canMoveTop.canMoveBottom{cursor:ns-resize!important}.monaco-editor .diff-hidden-lines .top{transform:translateY(4px)}.monaco-editor .diff-hidden-lines .bottom{transform:translateY(-6px)}.monaco-editor .diff-unchanged-lines{background:var(--vscode-diffEditor-unchangedCodeBackground)}.monaco-editor .noModificationsOverlay{z-index:1;background:var(--vscode-editor-background);display:flex;justify-content:center;align-items:center}.monaco-editor .diff-hidden-lines .center{background:var(--vscode-diffEditor-unchangedRegionBackground);color:var(--vscode-diffEditor-unchangedRegionForeground);overflow:hidden;display:block;text-overflow:ellipsis;white-space:nowrap;height:24px;box-shadow:inset 0 -5px 5px -7px var(--vscode-diffEditor-unchangedRegionShadow),inset 0 5px 5px -7px var(--vscode-diffEditor-unchangedRegionShadow)}.monaco-editor .diff-hidden-lines .center span.codicon{vertical-align:middle}.monaco-editor .diff-hidden-lines .center a:hover .codicon{cursor:pointer;color:var(--vscode-editorLink-activeForeground)!important}.monaco-editor .diff-hidden-lines div.breadcrumb-item{cursor:pointer}.monaco-editor .diff-hidden-lines div.breadcrumb-item:hover{color:var(--vscode-editorLink-activeForeground)}.monaco-editor .movedOriginal,.monaco-editor .movedModified{border:2px solid var(--vscode-diffEditor-move-border)}.monaco-editor .movedOriginal.currentMove,.monaco-editor .movedModified.currentMove{border:2px solid var(--vscode-diffEditor-moveActive-border)}.monaco-diff-editor .moved-blocks-lines path.currentMove{stroke:var(--vscode-diffEditor-moveActive-border)}.monaco-diff-editor .moved-blocks-lines path{pointer-events:visiblestroke}.monaco-diff-editor .moved-blocks-lines .arrow{fill:var(--vscode-diffEditor-move-border)}.monaco-diff-editor .moved-blocks-lines .arrow.currentMove{fill:var(--vscode-diffEditor-moveActive-border)}.monaco-diff-editor .moved-blocks-lines .arrow-rectangle{fill:var(--vscode-editor-background)}.monaco-diff-editor .moved-blocks-lines{position:absolute;pointer-events:none}.monaco-diff-editor .moved-blocks-lines path{fill:none;stroke:var(--vscode-diffEditor-move-border);stroke-width:2}.monaco-editor .char-delete.diff-range-empty{margin-left:-1px;border-left:solid var(--vscode-diffEditor-removedTextBackground) 3px}.monaco-editor .char-insert.diff-range-empty{border-left:solid var(--vscode-diffEditor-insertedTextBackground) 3px}.monaco-editor .fold-unchanged{cursor:pointer}.monaco-diff-editor .diff-moved-code-block{display:flex;justify-content:flex-end;margin-top:-4px}.monaco-diff-editor .diff-moved-code-block .action-bar .action-label.codicon{width:12px;height:12px;font-size:12px}.monaco-diff-editor .diffOverview{z-index:9}.monaco-diff-editor .diffOverview .diffViewport{z-index:10}.monaco-diff-editor.vs .diffOverview{background:#00000008}.monaco-diff-editor.vs-dark .diffOverview{background:#ffffff03}.monaco-scrollable-element.modified-in-monaco-diff-editor.vs .scrollbar,.monaco-scrollable-element.modified-in-monaco-diff-editor.vs-dark .scrollbar{background:#0000}.monaco-scrollable-element.modified-in-monaco-diff-editor.hc-black .scrollbar,.monaco-scrollable-element.modified-in-monaco-diff-editor.hc-light .scrollbar{background:none}.monaco-scrollable-element.modified-in-monaco-diff-editor .slider{z-index:10}.modified-in-monaco-diff-editor .slider.active{background:#ababab66}.modified-in-monaco-diff-editor.hc-black .slider.active,.modified-in-monaco-diff-editor.hc-light .slider.active{background:none}.monaco-editor .insert-sign,.monaco-diff-editor .insert-sign,.monaco-editor .delete-sign,.monaco-diff-editor .delete-sign{font-size:11px!important;opacity:.7!important;display:flex!important;align-items:center}.monaco-editor.hc-black .insert-sign,.monaco-diff-editor.hc-black .insert-sign,.monaco-editor.hc-black .delete-sign,.monaco-diff-editor.hc-black .delete-sign,.monaco-editor.hc-light .insert-sign,.monaco-diff-editor.hc-light .insert-sign,.monaco-editor.hc-light .delete-sign,.monaco-diff-editor.hc-light .delete-sign{opacity:1}.monaco-editor .inline-deleted-margin-view-zone,.monaco-editor .inline-added-margin-view-zone{text-align:right}.monaco-editor .arrow-revert-change{z-index:10;position:absolute}.monaco-editor .arrow-revert-change:hover{cursor:pointer}.monaco-editor .view-zones .view-lines .view-line span{display:inline-block}.monaco-editor .margin-view-zones .lightbulb-glyph:hover{cursor:pointer}.monaco-editor .char-insert,.monaco-diff-editor .char-insert{background-color:var(--vscode-diffEditor-insertedTextBackground)}.monaco-editor .line-insert,.monaco-diff-editor .line-insert{background-color:var(--vscode-diffEditor-insertedLineBackground, var(--vscode-diffEditor-insertedTextBackground))}.monaco-editor .line-insert,.monaco-editor .char-insert{box-sizing:border-box;border:1px solid var(--vscode-diffEditor-insertedTextBorder)}.monaco-editor.hc-black .line-insert,.monaco-editor.hc-light .line-insert,.monaco-editor.hc-black .char-insert,.monaco-editor.hc-light .char-insert{border-style:dashed}.monaco-editor .line-delete,.monaco-editor .char-delete{box-sizing:border-box;border:1px solid var(--vscode-diffEditor-removedTextBorder)}.monaco-editor.hc-black .line-delete,.monaco-editor.hc-light .line-delete,.monaco-editor.hc-black .char-delete,.monaco-editor.hc-light .char-delete{border-style:dashed}.monaco-editor .inline-added-margin-view-zone,.monaco-editor .gutter-insert,.monaco-diff-editor .gutter-insert{background-color:var(--vscode-diffEditorGutter-insertedLineBackground, var(--vscode-diffEditor-insertedLineBackground), var(--vscode-diffEditor-insertedTextBackground))}.monaco-editor .char-delete,.monaco-diff-editor .char-delete,.monaco-editor .inline-deleted-text{background-color:var(--vscode-diffEditor-removedTextBackground)}.monaco-editor .inline-deleted-text{text-decoration:line-through}.monaco-editor .line-delete,.monaco-diff-editor .line-delete{background-color:var(--vscode-diffEditor-removedLineBackground, var(--vscode-diffEditor-removedTextBackground))}.monaco-editor .inline-deleted-margin-view-zone,.monaco-editor .gutter-delete,.monaco-diff-editor .gutter-delete{background-color:var(--vscode-diffEditorGutter-removedLineBackground, var(--vscode-diffEditor-removedLineBackground), var(--vscode-diffEditor-removedTextBackground))}.monaco-diff-editor.side-by-side .editor.modified{box-shadow:-6px 0 5px -5px var(--vscode-scrollbar-shadow);border-left:1px solid var(--vscode-diffEditor-border)}.monaco-diff-editor.side-by-side .editor.original{box-shadow:6px 0 5px -5px var(--vscode-scrollbar-shadow);border-right:1px solid var(--vscode-diffEditor-border)}.monaco-diff-editor .diffViewport{background:var(--vscode-scrollbarSlider-background)}.monaco-diff-editor .diffViewport:hover{background:var(--vscode-scrollbarSlider-hoverBackground)}.monaco-diff-editor .diffViewport:active{background:var(--vscode-scrollbarSlider-activeBackground)}.monaco-editor .diagonal-fill{background-image:linear-gradient(-45deg,var(--vscode-diffEditor-diagonalFill) 12.5%,#0000 12.5%,#0000 50%,var(--vscode-diffEditor-diagonalFill) 50%,var(--vscode-diffEditor-diagonalFill) 62.5%,#0000 62.5%,#0000 100%);background-size:8px 8px}.monaco-diff-editor .gutter{position:relative;overflow:hidden;flex-shrink:0;flex-grow:0;>div{position:absolute}.gutterItem{opacity:0;transition:opacity .7s;&.showAlways{opacity:1;transition:none}&.noTransition{transition:none}}&:hover .gutterItem{opacity:1;transition:opacity .1s ease-in-out}.gutterItem{.background{position:absolute;height:100%;left:50%;width:1px;border-left:2px var(--vscode-menu-separatorBackground) solid}.buttons{position:absolute;width:100%;display:flex;justify-content:center;align-items:center;.monaco-toolbar{height:fit-content;.monaco-action-bar{line-height:1;.actions-container{width:fit-content;border-radius:4px;background:var(--vscode-editorGutter-itemBackground);.action-item{&:hover{background:var(--vscode-toolbar-hoverBackground)}.action-label{color:var(--vscode-editorGutter-itemGlyphForeground);padding:1px 2px}}}}}}}}.monaco-diff-editor .diff-hidden-lines-compact{display:flex;height:11px;.line-left,.line-right{height:1px;border-top:1px solid;border-color:var(--vscode-editorCodeLens-foreground);opacity:.5;margin:auto;width:100%}.line-left{width:20px}.text{color:var(--vscode-editorCodeLens-foreground);text-wrap:nowrap;font-size:11px;line-height:11px;margin:0 4px}}.monaco-editor .line-delete-selectable{user-select:text!important;-webkit-user-select:text!important;z-index:1!important}.line-delete-selectable .view-line{user-select:text!important;-webkit-user-select:text!important}.monaco-editor .rendered-markdown kbd{background-color:var(--vscode-keybindingLabel-background);color:var(--vscode-keybindingLabel-foreground);border-style:solid;border-width:1px;border-radius:3px;border-color:var(--vscode-keybindingLabel-border);border-bottom-color:var(--vscode-keybindingLabel-bottomBorder);box-shadow:inset 0 -1px 0 var(--vscode-widget-shadow);vertical-align:middle;padding:1px 3px}.rendered-markdown li:has(input[type=checkbox]){list-style-type:none}.monaco-component.multiDiffEditor{background:var(--vscode-multiDiffEditor-background);position:relative;height:100%;width:100%;overflow-y:hidden;>div{position:absolute;top:0;left:0;height:100%;width:100%;&.placeholder{visibility:hidden;&.visible{visibility:visible}display:grid;place-items:center;place-content:center}}>.multi-diff-root-floating-menu{position:absolute;inset:auto 28px 24px auto;width:auto}.active{--vscode-multiDiffEditor-border: var(--vscode-focusBorder)}.multiDiffEntry{display:flex;flex-direction:column;flex:1;overflow:hidden;.collapse-button{margin:0 5px;cursor:pointer;a{display:block}}.header{z-index:1000;background:var(--vscode-editor-background);&:not(.collapsed) .header-content{border-bottom:1px solid var(--vscode-sideBarSectionHeader-border)}.header-content{margin:8px 0 0;padding:4px 5px;border-top:1px solid var(--vscode-multiDiffEditor-border);display:flex;align-items:center;color:var(--vscode-foreground);background:var(--vscode-multiDiffEditor-headerBackground);&.shadow{box-shadow:var(--vscode-scrollbar-shadow) 0 6px 6px -6px}.file-path{display:flex;flex:1;min-width:0;.title{font-size:14px;line-height:22px;&.original{flex:1;min-width:0;text-overflow:ellipsis}}.status{font-weight:600;opacity:.75;margin:0 10px;line-height:22px}}.actions{padding:0 8px}}}.editorParent{flex:1;display:flex;flex-direction:column;border-bottom:1px solid var(--vscode-multiDiffEditor-border);overflow:hidden}.editorContainer{flex:1}}}.monaco-editor .selection-anchor{background-color:#007acc;width:2px!important}.monaco-editor .bracket-match{box-sizing:border-box;background-color:var(--vscode-editorBracketMatch-background);border:1px solid var(--vscode-editorBracketMatch-border)}.inline-editor-progress-decoration{display:inline-block;width:1em;height:1em}.inline-progress-widget{display:flex!important;justify-content:center;align-items:center}.inline-progress-widget .icon{font-size:80%!important}.inline-progress-widget:hover .icon{font-size:90%!important;animation:none}.inline-progress-widget:hover .icon:before{content:var(--vscode-icon-x-content);font-family:var(--vscode-icon-x-font-family)}.monaco-editor .monaco-editor-overlaymessage{padding-bottom:8px;z-index:10000}.monaco-editor .monaco-editor-overlaymessage.below{padding-bottom:0;padding-top:8px;z-index:10000}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.monaco-editor .monaco-editor-overlaymessage.fadeIn{animation:fadeIn .15s ease-out}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}.monaco-editor .monaco-editor-overlaymessage.fadeOut{animation:fadeOut .1s ease-out}.monaco-editor .monaco-editor-overlaymessage .message{padding:2px 4px;color:var(--vscode-editorHoverWidget-foreground);background-color:var(--vscode-editorHoverWidget-background);border:1px solid var(--vscode-inputValidation-infoBorder);border-radius:3px}.monaco-editor .monaco-editor-overlaymessage .message p{margin-block:0px}.monaco-editor .monaco-editor-overlaymessage .message a{color:var(--vscode-textLink-foreground)}.monaco-editor .monaco-editor-overlaymessage .message a:hover{color:var(--vscode-textLink-activeForeground)}.monaco-editor.hc-black .monaco-editor-overlaymessage .message,.monaco-editor.hc-light .monaco-editor-overlaymessage .message{border-width:2px}.monaco-editor .monaco-editor-overlaymessage .anchor{width:0!important;height:0!important;border-color:transparent;border-style:solid;z-index:1000;border-width:8px;position:absolute;left:2px}.monaco-editor .monaco-editor-overlaymessage .anchor.top{border-bottom-color:var(--vscode-inputValidation-infoBorder)}.monaco-editor .monaco-editor-overlaymessage .anchor.below{border-top-color:var(--vscode-inputValidation-infoBorder)}.monaco-editor .monaco-editor-overlaymessage:not(.below) .anchor.top,.monaco-editor .monaco-editor-overlaymessage.below .anchor.below{display:none}.monaco-editor .monaco-editor-overlaymessage.below .anchor.top{display:inherit;top:-8px}.action-widget{font-size:13px;min-width:100px;max-width:80vw;z-index:40;display:block;width:100%;border:1px solid var(--vscode-editorHoverWidget-border)!important;border-radius:var(--vscode-cornerRadius-large);background-color:var(--vscode-menu-background);color:var(--vscode-menu-foreground);padding:4px;box-shadow:var(--vscode-shadow-lg)}.context-view-block{position:fixed;cursor:initial;left:0;top:0;width:100%;height:100%;z-index:-1}.context-view-pointerBlock{position:fixed;cursor:initial;left:0;top:0;width:100%;height:100%;z-index:2}.action-widget .monaco-list{user-select:none;-webkit-user-select:none;border:none!important;border-width:0!important}.action-widget .monaco-list:focus:before{outline:0!important}.action-widget .monaco-list .monaco-scrollable-element{overflow:visible}.action-widget .monaco-list .monaco-list-row{padding:0 12px 0 6px;white-space:nowrap;cursor:pointer;touch-action:none;border-radius:var(--vscode-cornerRadius-medium)}.action-widget .monaco-list .monaco-list-row.action.focused:not(.option-disabled){background-color:var(--vscode-list-hoverBackground)!important;color:var(--vscode-list-hoverForeground);outline:1px solid var(--vscode-menu-selectionBorder, transparent);outline-offset:-2px}.action-widget .monaco-list-row.group-header{color:var(--vscode-descriptionForeground)!important;font-weight:500;font-size:11px}.action-widget .monaco-list-row.group-header:not(:first-of-type){margin-top:2px}.action-widget .monaco-scrollable-element .monaco-list-rows .monaco-list-row.separator{border-top:1px solid var(--vscode-editorHoverWidget-border);color:var(--vscode-descriptionForeground);font-size:12px;margin:4px 0;width:100%;cursor:default;-webkit-user-select:none;user-select:none;border-radius:0;pointer-events:none}.action-widget .monaco-scrollable-element .monaco-list-rows .monaco-list-row.separator:hover,.action-widget .monaco-scrollable-element .monaco-list-rows .monaco-list-row.separator.focused{outline:0 solid;background-color:transparent!important;border-radius:0}.action-widget .monaco-list-row.separator:first-of-type{border-top:none;margin-top:0}.action-widget .monaco-list-row.separator>span:not(:empty){display:flex;align-items:center;height:100%;padding-left:10px}.action-widget .monaco-list .group-header,.action-widget .monaco-list .option-disabled,.action-widget .monaco-list .option-disabled:before,.action-widget .monaco-list .option-disabled .focused,.action-widget .monaco-list .option-disabled .focused:before{cursor:default!important;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;background-color:transparent!important;outline:0 solid!important}.action-widget .monaco-list-row.action{display:flex;gap:6px;align-items:center}.action-widget .monaco-list-row.action .codicon{font-size:12px}.action-widget .monaco-list-row.action .action-list-item-toolbar .codicon{font-size:16px}.action-widget .actionList.compact-icons .monaco-list-row.action .codicon{font-size:var(--vscode-codiconFontSize-compact, 12px)}.action-widget .actionList.compact-icons .monaco-list-row.action .action-list-item-toolbar .codicon,.action-widget .actionList.compact-icons .monaco-list-row.action .action-list-submenu-indicator.codicon{font-size:var(--vscode-codiconFontSize, 16px)}.action-widget .monaco-list-row.action.option-disabled,.action-widget .monaco-list:focus .monaco-list-row.focused.action.option-disabled,.action-widget .monaco-list-row.action.option-disabled .codicon,.action-widget .monaco-list:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused).option-disabled{color:var(--vscode-disabledForeground)}.action-widget .monaco-list-row.action:not(.option-disabled) .codicon{color:inherit}.action-widget .monaco-list-row.action .title{flex:1;overflow:hidden;text-overflow:ellipsis}.action-widget .monaco-list-row.action .detail{order:99;width:100%;padding-left:18px;font-size:11px;line-height:14px;color:var(--vscode-descriptionForeground);opacity:.8;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.action-widget .monaco-list-row.action .action-item-badge{padding:0 6px;border-radius:10px;background-color:var(--vscode-badge-background);color:var(--vscode-badge-foreground);font-size:11px;line-height:18px;flex-shrink:0}.action-widget .monaco-list-row.action .monaco-keybinding>.monaco-keybinding-key{background-color:var(--vscode-keybindingLabel-background);color:var(--vscode-keybindingLabel-foreground);border-style:solid;border-width:1px;border-radius:3px;border-color:var(--vscode-keybindingLabel-border);border-bottom-color:var(--vscode-keybindingLabel-bottomBorder);box-shadow:inset 0 -1px 0 var(--vscode-widget-shadow)}.action-widget .action-widget-action-bar{background-color:var(--vscode-menu-background);border-top:1px solid var(--vscode-editorHoverWidget-border);margin-top:4px}.action-widget .action-widget-action-bar:before{display:block;content:"";width:100%}.action-widget .action-widget-action-bar .actions-container{padding:2px 8px 0 26px;width:auto}.action-widget-action-bar .action-label{color:var(--vscode-textLink-activeForeground);font-size:12px;line-height:22px;padding:0;pointer-events:all}.action-widget-action-bar .action-item{margin-right:16px;pointer-events:none}.action-widget-action-bar .action-label:hover{background-color:transparent!important}.monaco-action-bar .actions-container.highlight-toggled .action-label.checked{background:var(--vscode-actionBar-toggledBackground)!important}.action-widget .monaco-list .monaco-list-row .description{color:var(--vscode-descriptionForeground);margin-left:.5em;font-size:12px}.action-widget .monaco-list .monaco-list-row .description a{color:var(--vscode-textLink-foreground)}.action-widget .monaco-list .monaco-list-row .description a:hover,.action-widget .monaco-list .monaco-list-row .description a:active{color:var(--vscode-textLink-activeForeground)}.action-widget .monaco-list-row.action .group-title{color:var(--vscode-descriptionForeground);margin-left:.5em;margin-right:6px;font-size:12px;flex-shrink:0}.action-widget .monaco-list .monaco-list-row.action{&:has(.detail:not([style*="display: none"])){flex-wrap:wrap;align-content:center;padding-right:6px;.title{line-height:14px}}}.action-widget .inline-description .monaco-list-row.action{gap:0;.title{flex:0 1 auto;min-width:0;margin-left:6px}.description{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis}.group-title{margin-left:auto}.action-list-item-toolbar{margin-left:4px;margin-right:10px}.action-list-submenu-indicator{margin-left:auto;margin-right:10px}}.action-widget .monaco-list-row.action .action-list-item-toolbar{display:none}.action-widget .monaco-list-row.focused.action.has-toolbar .action-list-item-toolbar,.action-widget .monaco-list-row:hover.action.has-toolbar .action-list-item-toolbar{display:flex}.action-widget .monaco-list-row .action-list-item-toolbar .monaco-action-bar:not(.vertical) .action-label:not(.disabled):hover{background-color:var(--vscode-toolbar-hoverBackground)}.action-widget-delegate-label{display:flex;align-items:center;gap:4px;font-size:12px}.action-widget .action-list-filter{padding:2px 2px 4px}.action-widget .action-list-filter-row{display:flex;align-items:center;gap:4px;padding-right:10px}.action-widget .action-list-filter:first-child{border-bottom:none}.action-widget .action-list-filter:last-child{border-top:1px solid var(--vscode-editorHoverWidget-border)}.action-widget .action-list-filter-input{width:100%;flex:1;box-sizing:border-box;padding:4px 8px;border:1px solid var(--vscode-input-border, transparent);border-radius:3px;background-color:var(--vscode-input-background);color:var(--vscode-input-foreground);outline:none}.action-widget .action-list-filter-input:focus{border-color:var(--vscode-focusBorder)}.action-widget .action-list-filter-input::placeholder{color:var(--vscode-input-placeholderForeground)}.action-widget .action-list-filter-actions .action-label{padding:3px;border-radius:3px}.action-widget .action-list-filter-actions .action-label:hover{background-color:var(--vscode-toolbar-hoverBackground)}.action-widget .action-list-filter-label{color:var(--vscode-descriptionForeground);font-size:12px;flex-shrink:0;margin-right:2px}.action-widget .action-list-footer{color:var(--vscode-descriptionForeground);font-size:11px;padding:4px 10px 2px 6px;margin-top:4px;border-top:1px solid var(--vscode-editorHoverWidget-border)}.action-widget .action-list-header{display:flex;align-items:flex-start;gap:6px;color:var(--vscode-foreground);font-size:12px;line-height:16px;padding:6px 12px 6px 6px;margin-bottom:2px;background-color:var(--vscode-chat-requestBubbleBackground);border-radius:var(--vscode-cornerRadius-medium)}.action-widget:has(.action-list-header){min-width:160px}.action-widget .action-list-header .action-list-header-icon{flex-shrink:0;width:12px;text-align:center;font-size:12px!important;line-height:16px;color:var(--vscode-descriptionForeground)}.action-widget .action-list-header .action-list-header-text{flex:1;font-size:11px}.action-widget .actionList{position:relative}.action-widget .action-list-submenu-indicator{display:flex;align-items:center;justify-content:center;width:20px;height:20px;flex-shrink:0;border-radius:4px}.action-widget .action-list-submenu-indicator.has-submenu{opacity:.6}.action-widget .monaco-list-row.action .action-list-submenu-indicator.codicon{display:flex;font-size:16px}.action-list-submenu-panel{background-color:var(--vscode-menu-background);color:var(--vscode-menu-foreground);border:1px solid var(--vscode-menu-border, var(--vscode-editorHoverWidget-border));border-radius:5px;box-shadow:0 2px 8px var(--vscode-widget-shadow);z-index:50;width:max-content;outline:none}.action-list-submenu-hover-header{padding:4px 8px;line-height:1.4em;font-size:12px;max-width:300px;word-wrap:break-word;-webkit-user-select:text;user-select:text}.action-list-submenu-hover-header a{color:var(--vscode-textLink-foreground)}.action-list-submenu-hover-header a:hover,.action-list-submenu-hover-header a:active{color:var(--vscode-textLink-activeForeground)}.action-list-submenu-hover-header.has-submenu{border-bottom:1px solid var(--vscode-menu-separatorBackground, var(--vscode-editorWidget-border))}.action-list-submenu-hover-header>p{margin-left:0;margin-right:0}.action-list-submenu-hover-header>p:first-child{margin-top:0}.action-list-submenu-hover-header>p:last-child{margin-bottom:0}.post-edit-widget{box-shadow:var(--vscode-shadow-lg);border:1px solid var(--vscode-widget-border, transparent);border-radius:4px;color:var(--vscode-button-foreground);background-color:var(--vscode-button-background);overflow:hidden}.post-edit-widget .monaco-button{padding:2px;border:none;border-radius:0}.post-edit-widget .monaco-button:hover{background-color:var(--vscode-button-hoverBackground)!important}.post-edit-widget .monaco-button .codicon{margin:0}@font-face{font-family:codicon;font-display:block;src:url("./codicon-KP4OV2OO.ttf") format("truetype")}.codicon[class*=codicon-]{font: 16px/1 codicon;display:inline-block;text-decoration:none;text-rendering:auto;text-align:center;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;user-select:none;-webkit-user-select:none}.codicon-wrench-subaction{opacity:.5}@keyframes codicon-spin{to{transform:rotate(360deg)}}.codicon-sync.codicon-modifier-spin,.codicon-loading.codicon-modifier-spin,.codicon-gear.codicon-modifier-spin,.codicon-notebook-state-executing.codicon-modifier-spin,.codicon-loading,.codicon-tree-item-loading:before{animation:codicon-spin 1.5s steps(30) infinite;transform-origin:center center}.codicon-modifier-disabled{opacity:.4}.monaco-editor .codicon.codicon-symbol-array,.monaco-workbench .codicon-colored.codicon.codicon-symbol-array{color:var(--vscode-symbolIcon-arrayForeground)}.monaco-editor .codicon.codicon-symbol-boolean,.monaco-workbench .codicon-colored.codicon.codicon-symbol-boolean{color:var(--vscode-symbolIcon-booleanForeground)}.monaco-editor .codicon.codicon-symbol-class,.monaco-workbench .codicon-colored.codicon.codicon-symbol-class{color:var(--vscode-symbolIcon-classForeground)}.monaco-editor .codicon.codicon-symbol-method,.monaco-workbench .codicon-colored.codicon.codicon-symbol-method{color:var(--vscode-symbolIcon-methodForeground)}.monaco-editor .codicon.codicon-symbol-color,.monaco-workbench .codicon-colored.codicon.codicon-symbol-color{color:var(--vscode-symbolIcon-colorForeground)}.monaco-editor .codicon.codicon-symbol-constant,.monaco-workbench .codicon-colored.codicon.codicon-symbol-constant{color:var(--vscode-symbolIcon-constantForeground)}.monaco-editor .codicon.codicon-symbol-constructor,.monaco-workbench .codicon-colored.codicon.codicon-symbol-constructor{color:var(--vscode-symbolIcon-constructorForeground)}.monaco-editor .codicon.codicon-symbol-value,.monaco-workbench .codicon-colored.codicon.codicon-symbol-value,.monaco-editor .codicon.codicon-symbol-enum,.monaco-workbench .codicon-colored.codicon.codicon-symbol-enum{color:var(--vscode-symbolIcon-enumeratorForeground)}.monaco-editor .codicon.codicon-symbol-enum-member,.monaco-workbench .codicon-colored.codicon.codicon-symbol-enum-member{color:var(--vscode-symbolIcon-enumeratorMemberForeground)}.monaco-editor .codicon.codicon-symbol-event,.monaco-workbench .codicon-colored.codicon.codicon-symbol-event{color:var(--vscode-symbolIcon-eventForeground)}.monaco-editor .codicon.codicon-symbol-field,.monaco-workbench .codicon-colored.codicon.codicon-symbol-field{color:var(--vscode-symbolIcon-fieldForeground)}.monaco-editor .codicon.codicon-symbol-file,.monaco-workbench .codicon-colored.codicon.codicon-symbol-file{color:var(--vscode-symbolIcon-fileForeground)}.monaco-editor .codicon.codicon-symbol-folder,.monaco-workbench .codicon-colored.codicon.codicon-symbol-folder{color:var(--vscode-symbolIcon-folderForeground)}.monaco-editor .codicon.codicon-symbol-function,.monaco-workbench .codicon-colored.codicon.codicon-symbol-function{color:var(--vscode-symbolIcon-functionForeground)}.monaco-editor .codicon.codicon-symbol-interface,.monaco-workbench .codicon-colored.codicon.codicon-symbol-interface{color:var(--vscode-symbolIcon-interfaceForeground)}.monaco-editor .codicon.codicon-symbol-key,.monaco-workbench .codicon-colored.codicon.codicon-symbol-key{color:var(--vscode-symbolIcon-keyForeground)}.monaco-editor .codicon.codicon-symbol-keyword,.monaco-workbench .codicon-colored.codicon.codicon-symbol-keyword{color:var(--vscode-symbolIcon-keywordForeground)}.monaco-editor .codicon.codicon-symbol-module,.monaco-workbench .codicon-colored.codicon.codicon-symbol-module{color:var(--vscode-symbolIcon-moduleForeground)}.monaco-editor .codicon.codicon-symbol-namespace,.monaco-workbench .codicon-colored.codicon.codicon-symbol-namespace{color:var(--vscode-symbolIcon-namespaceForeground)}.monaco-editor .codicon.codicon-symbol-null,.monaco-workbench .codicon-colored.codicon.codicon-symbol-null{color:var(--vscode-symbolIcon-nullForeground)}.monaco-editor .codicon.codicon-symbol-number,.monaco-workbench .codicon-colored.codicon.codicon-symbol-number{color:var(--vscode-symbolIcon-numberForeground)}.monaco-editor .codicon.codicon-symbol-object,.monaco-workbench .codicon-colored.codicon.codicon-symbol-object{color:var(--vscode-symbolIcon-objectForeground)}.monaco-editor .codicon.codicon-symbol-operator,.monaco-workbench .codicon-colored.codicon.codicon-symbol-operator{color:var(--vscode-symbolIcon-operatorForeground)}.monaco-editor .codicon.codicon-symbol-package,.monaco-workbench .codicon-colored.codicon.codicon-symbol-package{color:var(--vscode-symbolIcon-packageForeground)}.monaco-editor .codicon.codicon-symbol-property,.monaco-workbench .codicon-colored.codicon.codicon-symbol-property{color:var(--vscode-symbolIcon-propertyForeground)}.monaco-editor .codicon.codicon-symbol-reference,.monaco-workbench .codicon-colored.codicon.codicon-symbol-reference{color:var(--vscode-symbolIcon-referenceForeground)}.monaco-editor .codicon.codicon-symbol-snippet,.monaco-workbench .codicon-colored.codicon.codicon-symbol-snippet{color:var(--vscode-symbolIcon-snippetForeground)}.monaco-editor .codicon.codicon-symbol-string,.monaco-workbench .codicon-colored.codicon.codicon-symbol-string{color:var(--vscode-symbolIcon-stringForeground)}.monaco-editor .codicon.codicon-symbol-struct,.monaco-workbench .codicon-colored.codicon.codicon-symbol-struct{color:var(--vscode-symbolIcon-structForeground)}.monaco-editor .codicon.codicon-symbol-text,.monaco-workbench .codicon-colored.codicon.codicon-symbol-text{color:var(--vscode-symbolIcon-textForeground)}.monaco-editor .codicon.codicon-symbol-type-parameter,.monaco-workbench .codicon-colored.codicon.codicon-symbol-type-parameter{color:var(--vscode-symbolIcon-typeParameterForeground)}.monaco-editor .codicon.codicon-symbol-unit,.monaco-workbench .codicon-colored.codicon.codicon-symbol-unit{color:var(--vscode-symbolIcon-unitForeground)}.monaco-editor .codicon.codicon-symbol-variable,.monaco-workbench .codicon-colored.codicon.codicon-symbol-variable{color:var(--vscode-symbolIcon-variableForeground)}.monaco-editor .lightBulbWidget{display:flex;align-items:center;justify-content:center}.monaco-editor .lightBulbWidget:hover{cursor:pointer}.monaco-editor .lightBulbWidget.codicon-light-bulb,.monaco-editor .lightBulbWidget.codicon-lightbulb-sparkle{color:var(--vscode-editorLightBulb-foreground)}.monaco-editor .lightBulbWidget.codicon-lightbulb-autofix,.monaco-editor .lightBulbWidget.codicon-lightbulb-sparkle-autofix{color:var(--vscode-editorLightBulbAutoFix-foreground, var(--vscode-editorLightBulb-foreground))}.monaco-editor .lightBulbWidget.codicon-sparkle-filled{color:var(--vscode-editorLightBulbAi-foreground, var(--vscode-icon-foreground))}.monaco-editor .lightBulbWidget:before{position:relative;z-index:2}.monaco-editor .lightBulbWidget:after{position:absolute;top:0;left:0;content:"";display:block;width:100%;height:100%;opacity:.3;z-index:1}.monaco-editor .glyph-margin-widgets .cgmr[class*=codicon-gutter-lightbulb]{display:block;cursor:pointer}.monaco-editor .glyph-margin-widgets .cgmr.codicon-gutter-lightbulb,.monaco-editor .glyph-margin-widgets .cgmr.codicon-gutter-lightbulb-sparkle{color:var(--vscode-editorLightBulb-foreground)}.monaco-editor .glyph-margin-widgets .cgmr.codicon-gutter-lightbulb-auto-fix,.monaco-editor .glyph-margin-widgets .cgmr.codicon-gutter-lightbulb-aifix-auto-fix{color:var(--vscode-editorLightBulbAutoFix-foreground, var(--vscode-editorLightBulb-foreground))}.monaco-editor .glyph-margin-widgets .cgmr.codicon-gutter-lightbulb-sparkle-filled{color:var(--vscode-editorLightBulbAi-foreground, var(--vscode-icon-foreground))}.monaco-editor .codelens-decoration{overflow:hidden;display:inline-flex!important;align-items:center;text-overflow:ellipsis;white-space:nowrap;color:var(--vscode-editorCodeLens-foreground);line-height:var(--vscode-editorCodeLens-lineHeight);font-size:var(--vscode-editorCodeLens-fontSize);padding-right:calc(var(--vscode-editorCodeLens-fontSize)*.5);font-feature-settings:var(--vscode-editorCodeLens-fontFeatureSettings);font-family:var(--vscode-editorCodeLens-fontFamily),var(--vscode-editorCodeLens-fontFamilyDefault)}.monaco-editor .codelens-decoration>span,.monaco-editor .codelens-decoration>a{user-select:none;-webkit-user-select:none;white-space:nowrap;vertical-align:sub;display:inline-flex;align-items:center}.monaco-editor .codelens-decoration>a{text-decoration:none}.monaco-editor .codelens-decoration>a:hover{cursor:pointer;color:var(--vscode-editorLink-activeForeground)!important}.monaco-editor .codelens-decoration>a:hover .codicon{color:var(--vscode-editorLink-activeForeground)!important}.monaco-editor .codelens-decoration .codicon[class*=codicon-]{vertical-align:middle;color:currentColor!important;color:var(--vscode-editorCodeLens-foreground);line-height:var(--vscode-editorCodeLens-lineHeight);font-size:var(--vscode-editorCodeLens-fontSize)}.monaco-editor .codelens-decoration>a:hover .codicon:before{cursor:pointer}@keyframes fadein{0%{opacity:0}to{opacity:1}}.monaco-editor .codelens-decoration.fadein{animation:fadein .1s linear}.monaco-editor .inlineSuggestionsHints{padding:4px;.warningMessage p{margin:0}}.monaco-editor .inlineSuggestionsHints.withBorder{z-index:39;color:var(--vscode-editorHoverWidget-foreground);background-color:var(--vscode-editorHoverWidget-background);border:1px solid var(--vscode-editorHoverWidget-border)}.monaco-editor .inlineSuggestionsHints a,.monaco-editor .inlineSuggestionsHints a:hover{color:var(--vscode-foreground)!important}.monaco-editor .inlineSuggestionsHints .keybinding{display:flex;align-items:center;margin-left:4px;opacity:.6}.monaco-editor .inlineSuggestionsHints .keybinding .monaco-keybinding-key{font-size:8px;padding:2px 3px}.monaco-editor .inlineSuggestionsHints .availableSuggestionCount a{display:flex;min-width:19px;justify-content:center}.monaco-editor .inlineSuggestionStatusBarItemLabel{align-items:center;margin-right:2px}.monaco-editor .find-widget{position:absolute;z-index:35;height:34px;overflow:hidden;line-height:19px;transition:transform .2s linear;padding:0 4px 0 9px;margin-top:4px;box-sizing:border-box;transform:translateY(calc(-100% - 10px));box-shadow:var(--vscode-shadow-lg);color:var(--vscode-editorWidget-foreground);border:1px solid var(--vscode-widget-border);border-radius:var(--vscode-cornerRadius-large);background-color:var(--vscode-editorWidget-background)}.monaco-reduce-motion .monaco-editor .find-widget{transition:transform 0ms linear}.monaco-editor .find-widget textarea{margin:0}.monaco-editor .find-widget.hiddenEditor{display:none}.monaco-editor .find-widget.replaceToggled>.replace-part{display:flex}.monaco-editor .find-widget.visible{transform:translateY(0)}.monaco-editor .find-widget .monaco-inputbox.synthetic-focus{outline:1px solid -webkit-focus-ring-color;outline-offset:-1px;outline-color:var(--vscode-focusBorder)}.monaco-editor .find-widget .monaco-inputbox .input{background-color:transparent;min-height:0}.monaco-editor .find-widget .monaco-findInput .input{font-size:13px}.monaco-editor .find-widget>.find-part,.monaco-editor .find-widget>.replace-part{margin:3px 25px 0 17px;font-size:12px;display:flex}.monaco-editor .find-widget>.find-part .monaco-inputbox,.monaco-editor .find-widget>.replace-part .monaco-inputbox{min-height:25px}.monaco-editor .find-widget>.replace-part .monaco-inputbox>.ibwrapper>.mirror{padding-right:22px}.monaco-editor .find-widget>.find-part .monaco-inputbox>.ibwrapper>.input,.monaco-editor .find-widget>.find-part .monaco-inputbox>.ibwrapper>.mirror,.monaco-editor .find-widget>.replace-part .monaco-inputbox>.ibwrapper>.input,.monaco-editor .find-widget>.replace-part .monaco-inputbox>.ibwrapper>.mirror{padding-top:2px;padding-bottom:2px}.monaco-editor .find-widget>.find-part .find-actions{height:25px;display:flex;align-items:center}.monaco-editor .find-widget>.replace-part .replace-actions{height:25px;display:flex;align-items:center}.monaco-editor .find-widget .monaco-findInput{vertical-align:middle;display:flex;flex:1}.monaco-editor .find-widget .monaco-findInput .monaco-scrollable-element{width:100%}.monaco-editor .find-widget .monaco-findInput .monaco-scrollable-element .scrollbar.vertical{opacity:0}.monaco-editor .find-widget .matchesCount{display:flex;flex:initial;margin:0 0 0 3px;padding:2px 0 0 2px;height:25px;vertical-align:middle;box-sizing:border-box;text-align:center;line-height:23px}.monaco-editor .find-widget .button{width:16px;height:16px;padding:3px;border-radius:5px;flex:initial;margin-left:3px;background-position:center center;background-repeat:no-repeat;cursor:pointer;display:flex;align-items:center;justify-content:center}.monaco-editor .find-widget .codicon-find-selection{width:22px;height:22px;padding:3px;border-radius:5px}.monaco-editor .find-widget .button.left{margin:4px 0 4px 5px}.monaco-editor .find-widget .button.wide{width:auto;padding:1px 6px;top:-1px}.monaco-editor .find-widget .button.toggle{position:absolute;top:0;left:0;width:18px;height:-webkit-fill-available;border-radius:var(--vscode-cornerRadius-small);box-sizing:border-box}.monaco-editor .find-widget .button.toggle.disabled{display:none}.monaco-editor .find-widget .disabled{color:var(--vscode-disabledForeground);cursor:default}.monaco-editor .find-widget>.replace-part{display:none}.monaco-editor .find-widget>.replace-part>.monaco-findInput{position:relative;display:flex;vertical-align:middle;flex:auto;flex-grow:0;flex-shrink:0}.monaco-editor .find-widget>.replace-part>.monaco-findInput>.controls{position:absolute;top:3px;right:2px}.monaco-editor .find-widget.reduced-find-widget .matchesCount{display:none}.monaco-editor .find-widget.narrow-find-widget{max-width:257px!important}.monaco-editor .find-widget.collapsed-find-widget{max-width:170px!important}.monaco-editor .find-widget.collapsed-find-widget .button.previous,.monaco-editor .find-widget.collapsed-find-widget .button.next,.monaco-editor .find-widget.collapsed-find-widget .button.replace,.monaco-editor .find-widget.collapsed-find-widget .button.replace-all,.monaco-editor .find-widget.collapsed-find-widget>.find-part .monaco-findInput .controls{display:none}.monaco-editor .find-widget.no-results .matchesCount{color:var(--vscode-errorForeground)}.monaco-editor .findMatch{animation-duration:0;animation-name:inherit!important;background-color:var(--vscode-editor-findMatchHighlightBackground)}.monaco-editor .currentFindMatch{background-color:var(--vscode-editor-findMatchBackground);border:2px solid var(--vscode-editor-findMatchBorder);padding:1px;box-sizing:border-box}.monaco-editor .findScope{background-color:var(--vscode-editor-findRangeHighlightBackground)}.monaco-editor .find-widget .monaco-sash{left:0!important;background-color:var(--vscode-editorWidget-resizeBorder, var(--vscode-editorWidget-border))}.monaco-editor.hc-black .find-widget .button:before{position:relative;top:1px;left:2px}.monaco-editor .find-widget .button:not(.disabled):hover,.monaco-editor .find-widget .codicon-find-selection:hover{background-color:var(--vscode-toolbar-hoverBackground)!important}.monaco-editor.findMatch{background-color:var(--vscode-editor-findMatchHighlightBackground)}.monaco-editor.currentFindMatch{background-color:var(--vscode-editor-findMatchBackground)}.monaco-editor.findScope{background-color:var(--vscode-editor-findRangeHighlightBackground)}.monaco-editor.findMatch{background-color:var(--vscode-editorWidget-background)}.monaco-editor .find-widget>.button.codicon-widget-close{position:absolute;top:5px;right:4px}.colorpicker-widget{height:190px;user-select:none;-webkit-user-select:none}.colorpicker-color-decoration,.hc-light .colorpicker-color-decoration{border:solid .1em #000;box-sizing:border-box;margin:.1em .2em 0;width:.8em;height:.8em;line-height:.8em;display:inline-block;cursor:pointer}.hc-black .colorpicker-color-decoration,.vs-dark .colorpicker-color-decoration{border:solid .1em #eee}.colorpicker-header{display:flex;height:24px;position:relative;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTZEaa/1AAAAHUlEQVQYV2PYvXu3JAi7uLiAMaYAjAGTQBPYLQkAa/0Zef3qRswAAAAASUVORK5CYII=);background-size:9px 9px;image-rendering:pixelated}.colorpicker-header .picked-color{width:240px;display:flex;align-items:center;justify-content:center;line-height:24px;cursor:pointer;color:#fff;flex:1;white-space:nowrap;overflow:hidden}.colorpicker-header .picked-color .picked-color-presentation{white-space:nowrap;margin-left:5px;margin-right:5px}.colorpicker-header .picked-color .codicon{color:inherit;font-size:14px}.colorpicker-header .picked-color.light{color:#000}.colorpicker-header .original-color{width:74px;z-index:inherit;cursor:pointer}.standalone-colorpicker{color:var(--vscode-editorHoverWidget-foreground);background-color:var(--vscode-editorHoverWidget-background);border:1px solid var(--vscode-editorHoverWidget-border)}.colorpicker-header.standalone-colorpicker{border-bottom:none}.colorpicker-header .close-button{cursor:pointer;background-color:var(--vscode-editorHoverWidget-background);border-left:1px solid var(--vscode-editorHoverWidget-border)}.colorpicker-header .close-button-inner-div{width:100%;height:100%;text-align:center}.colorpicker-header .close-button-inner-div:hover{background-color:var(--vscode-toolbar-hoverBackground)}.colorpicker-header .close-icon{padding:3px}.colorpicker-body{display:flex;padding:8px;position:relative}.colorpicker-body .saturation-wrap{overflow:hidden;height:150px;position:relative;min-width:220px;flex:1}.colorpicker-body .saturation-box{height:150px;position:absolute}.colorpicker-body .saturation-selection{width:9px;height:9px;margin:-5px 0 0 -5px;border:1px solid rgb(255,255,255);border-radius:100%;box-shadow:0 0 2px #000c;position:absolute}.colorpicker-body .strip{width:25px;height:150px}.colorpicker-body .standalone-strip{width:25px;height:122px}.colorpicker-body .hue-strip{position:relative;margin-left:8px;cursor:grab;background:linear-gradient(to bottom,red,#ff0 17%,#0f0 33%,#0ff,#00f 67%,#f0f 83%,red)}.colorpicker-body .opacity-strip{position:relative;margin-left:8px;cursor:grab;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTZEaa/1AAAAHUlEQVQYV2PYvXu3JAi7uLiAMaYAjAGTQBPYLQkAa/0Zef3qRswAAAAASUVORK5CYII=);background-size:9px 9px;image-rendering:pixelated}.colorpicker-body .strip.grabbing{cursor:grabbing}.colorpicker-body .slider{position:absolute;top:0;left:-2px;width:calc(100% + 4px);height:4px;box-sizing:border-box;border:1px solid rgba(255,255,255,.71);box-shadow:0 0 1px #000000d9}.colorpicker-body .strip .overlay{height:150px;pointer-events:none}.colorpicker-body .standalone-strip .standalone-overlay{height:122px;pointer-events:none}.standalone-colorpicker-body{display:block;border:1px solid transparent;border-bottom:1px solid var(--vscode-editorHoverWidget-border);overflow:hidden}.colorpicker-body .insert-button{position:absolute;height:20px;width:58px;padding:0;right:8px;bottom:8px;background:var(--vscode-button-background);color:var(--vscode-button-foreground);border-radius:2px;border:none;cursor:pointer}.colorpicker-body .insert-button:hover{background:var(--vscode-button-hoverBackground)}.monaco-editor .peekview-widget{box-shadow:var(--vscode-shadow-lg)}.monaco-editor .peekview-widget .head{box-sizing:border-box;display:flex;justify-content:space-between;flex-wrap:nowrap}.monaco-editor .peekview-widget .head .peekview-title{display:flex;align-items:baseline;font-size:13px;margin-left:20px;min-width:0;text-overflow:ellipsis;overflow:hidden}.monaco-editor .peekview-widget .head .peekview-title.clickable{cursor:pointer}.monaco-editor .peekview-widget .head .peekview-title .dirname:not(:empty){font-size:.9em;margin-left:.5em}.monaco-editor .peekview-widget .head .peekview-title .meta{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.monaco-editor .peekview-widget .head .peekview-title .dirname,.monaco-editor .peekview-widget .head .peekview-title .filename{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.monaco-editor .peekview-widget .head .peekview-title .meta:not(:empty):before{content:"-";padding:0 .3em}.monaco-editor .peekview-widget .head .peekview-actions{flex:1;text-align:right;padding-right:2px}.monaco-editor .peekview-widget .head .peekview-actions>.monaco-action-bar{display:inline-block}.monaco-editor .peekview-widget .head .peekview-actions>.monaco-action-bar,.monaco-editor .peekview-widget .head .peekview-actions>.monaco-action-bar>.actions-container{height:100%}.monaco-editor .peekview-widget>.body{border-top:1px solid;position:relative}.monaco-editor .peekview-widget .head .peekview-title .codicon{margin-right:4px;align-self:center}.monaco-editor .peekview-widget .monaco-list .monaco-list-row.focused .codicon{color:inherit!important}.monaco-editor .zone-widget{position:absolute;z-index:10}.monaco-editor .zone-widget .zone-widget-container{border-top-style:solid;border-bottom-style:solid;border-top-width:0;border-bottom-width:0;position:relative}.monaco-editor .zone-widget .zone-widget-container.reference-zone-widget{border-top-width:1px;border-bottom-width:1px}.monaco-editor .reference-zone-widget .inline{display:inline-block;vertical-align:top}.monaco-editor .reference-zone-widget .messages{height:100%;width:100%;text-align:center;padding:3em 0}.monaco-editor .reference-zone-widget .ref-tree{line-height:23px;background-color:var(--vscode-peekViewResult-background);color:var(--vscode-peekViewResult-lineForeground)}.monaco-editor .reference-zone-widget .ref-tree .reference{text-overflow:ellipsis;overflow:hidden}.monaco-editor .reference-zone-widget .ref-tree .reference-file{display:inline-flex;width:100%;height:100%;color:var(--vscode-peekViewResult-fileForeground)}.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .selected .reference-file{color:inherit!important}.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .monaco-list-rows>.monaco-list-row.selected:not(.highlighted){background-color:var(--vscode-peekViewResult-selectionBackground);color:var(--vscode-peekViewResult-selectionForeground)!important}.monaco-editor .reference-zone-widget .ref-tree .reference-file .count{margin-right:12px;margin-left:auto}.monaco-editor .reference-zone-widget .ref-tree .referenceMatch .highlight{color:var(--vscode-peekViewResult-fileForeground)!important;background-color:var(--vscode-peekViewResult-matchHighlightBackground)!important}.monaco-editor .reference-zone-widget .preview .reference-decoration{background-color:var(--vscode-peekViewEditor-matchHighlightBackground);border:2px solid var(--vscode-peekViewEditor-matchHighlightBorder);box-sizing:border-box}.monaco-editor .reference-zone-widget .preview .monaco-editor .monaco-editor-background,.monaco-editor .reference-zone-widget .preview .monaco-editor .inputarea.ime-input{background-color:var(--vscode-peekViewEditor-background)}.monaco-editor .reference-zone-widget .preview .monaco-editor .margin{background-color:var(--vscode-peekViewEditorGutter-background)}.monaco-editor.hc-black .reference-zone-widget .ref-tree .reference-file,.monaco-editor.hc-light .reference-zone-widget .ref-tree .reference-file{font-weight:700}.monaco-editor.hc-black .reference-zone-widget .ref-tree .referenceMatch .highlight,.monaco-editor.hc-light .reference-zone-widget .ref-tree .referenceMatch .highlight{border:1px dotted var(--vscode-contrastActiveBorder, transparent);box-sizing:border-box}.monaco-editor .hoverHighlight{background-color:var(--vscode-editor-hoverHighlightBackground)}.monaco-editor .monaco-resizable-hover{border:1px solid var(--vscode-editorHoverWidget-border);border-radius:var(--vscode-cornerRadius-large);box-sizing:content-box;background-color:var(--vscode-editorHoverWidget-background)}.monaco-editor .monaco-resizable-hover>.monaco-hover{border:none;border-radius:inherit;overflow:hidden}.monaco-editor .monaco-hover{border:1px solid var(--vscode-editorHoverWidget-border);border-radius:var(--vscode-cornerRadius-large);color:var(--vscode-editorHoverWidget-foreground);background-color:var(--vscode-editorHoverWidget-background);box-shadow:var(--vscode-shadow-lg)}.monaco-editor .monaco-hover a{color:var(--vscode-textLink-foreground)}.monaco-editor .monaco-hover a:hover{color:var(--vscode-textLink-activeForeground)}.monaco-editor .monaco-hover .hover-row{border-radius:var(--vscode-cornerRadius-large);display:flex}.monaco-editor .monaco-hover .hover-row.hover-row-with-copy{position:relative;padding-right:20px}.monaco-editor .monaco-hover .hover-row .hover-row-contents{min-width:0;display:flex;flex-direction:column}.monaco-editor .monaco-hover .hover-row .verbosity-actions{border-right:1px solid var(--vscode-editorHoverWidget-border);width:22px;overflow-y:clip}.monaco-editor .monaco-hover .hover-row .verbosity-actions-inner{display:flex;flex-direction:column;padding-left:5px;padding-right:5px;justify-content:flex-end;position:relative}.monaco-editor .monaco-hover .hover-row .verbosity-actions-inner .codicon{cursor:pointer;font-size:11px}.monaco-editor .monaco-hover .hover-row .verbosity-actions-inner .codicon.enabled{color:var(--vscode-textLink-foreground)}.monaco-editor .monaco-hover .hover-row .verbosity-actions-inner .codicon.disabled{opacity:.6}.monaco-editor .monaco-hover .hover-row .actions{background-color:var(--vscode-editorHoverWidget-statusBarBackground)}.monaco-editor .monaco-hover code{background-color:var(--vscode-textCodeBlock-background)}.monaco-editor .monaco-hover .hover-copy-button{position:absolute;top:4px;right:4px;padding:2px 4px;border-radius:3px;display:flex;align-items:center;justify-content:center;opacity:0}.monaco-editor .monaco-hover .hover-row-with-copy:hover .hover-copy-button,.monaco-editor .monaco-hover .hover-row-with-copy:focus-within .hover-copy-button{opacity:1}.monaco-editor .monaco-hover .hover-copy-button:hover{background-color:var(--vscode-toolbar-hoverBackground);cursor:pointer}.monaco-editor .monaco-hover .hover-copy-button:focus{outline:1px solid var(--vscode-focusBorder);outline-offset:-1px}.monaco-editor .monaco-hover .hover-copy-button .codicon{font-size:16px;color:var(--vscode-foreground)}.monaco-editor.vs .dnd-target,.monaco-editor.hc-light .dnd-target{border-right:2px dotted black;color:#fff}.monaco-editor.vs-dark .dnd-target{border-right:2px dotted #AEAFAD;color:#51504f}.monaco-editor.hc-black .dnd-target{border-right:2px dotted #fff;color:#000}.monaco-editor.mouse-default .view-lines,.monaco-editor.vs-dark.mac.mouse-default .view-lines,.monaco-editor.hc-black.mac.mouse-default .view-lines,.monaco-editor.hc-light.mac.mouse-default .view-lines{cursor:default}.monaco-editor.mouse-copy .view-lines,.monaco-editor.vs-dark.mac.mouse-copy .view-lines,.monaco-editor.hc-black.mac.mouse-copy .view-lines,.monaco-editor.hc-light.mac.mouse-copy .view-lines{cursor:copy}.monaco-editor .findOptionsWidget{background-color:var(--vscode-editorWidget-background);color:var(--vscode-editorWidget-foreground);box-shadow:var(--vscode-shadow-lg);border:2px solid var(--vscode-contrastBorder)}.floating-menu-overlay-widget{padding:2px 4px;color:var(--vscode-foreground);background-color:var(--vscode-editorWidget-background);border-radius:var(--vscode-cornerRadius-medium);border:1px solid var(--vscode-contrastBorder);display:flex;align-items:center;justify-content:center;gap:4px;z-index:10;box-shadow:var(--vscode-shadow-lg);overflow:hidden;&.single-button{background-color:transparent;border-width:0;padding:0;overflow:visible;.action-item>.action-label,.action-item>.action-label.codicon:not(.separator){height:28px;line-height:28px;border-radius:var(--vscode-cornerRadius-medium);box-shadow:0 2px 8px var(--vscode-widget-shadow)}.action-item>.action-label{padding:0 8px}.action-item>.action-label.codicon:not(.separator){width:28px}}.actions-container{gap:4px}.action-item>.action-label{padding:4px 6px;font-size:11px;line-height:14px;border-radius:var(--vscode-cornerRadius-small)}.action-item>.action-label.codicon:not(.separator){color:var(--vscode-foreground);width:22px;height:22px;padding:0;font-size:16px;line-height:22px;display:flex;align-items:center;justify-content:center}.action-item.primary>.action-label,.action-item.primary>.action-label.action-label.codicon:not(.separator){background-color:var(--vscode-button-background);color:var(--vscode-button-foreground)}.action-item.primary>.action-label:hover{background-color:var(--vscode-button-hoverBackground)!important}}.hc-black .floating-menu-overlay-widget.single-button,.hc-light .floating-menu-overlay-widget.single-button{border-width:1px;border-style:solid;border-color:var(--vscode-contrastBorder);background-color:var(--vscode-editorWidget-background);padding:0;.action-item>.action-label,.action-item>.action-label.codicon:not(.separator){box-shadow:none}}.monaco-editor .margin-view-overlays .codicon-folding-manual-collapsed,.monaco-editor .margin-view-overlays .codicon-folding-manual-expanded,.monaco-editor .margin-view-overlays .codicon-folding-expanded,.monaco-editor .margin-view-overlays .codicon-folding-collapsed{cursor:pointer;opacity:0;transition:opacity .5s;display:flex;align-items:center;justify-content:center;font-size:140%;margin-left:2px}.monaco-reduce-motion .monaco-editor .margin-view-overlays .codicon-folding-manual-collapsed,.monaco-reduce-motion .monaco-editor .margin-view-overlays .codicon-folding-manual-expanded,.monaco-reduce-motion .monaco-editor .margin-view-overlays .codicon-folding-expanded,.monaco-reduce-motion .monaco-editor .margin-view-overlays .codicon-folding-collapsed{transition:initial}.monaco-editor .margin-view-overlays:hover .codicon,.monaco-editor .margin-view-overlays .codicon.codicon-folding-collapsed,.monaco-editor .margin-view-overlays .codicon.codicon-folding-manual-collapsed,.monaco-editor .margin-view-overlays .codicon.alwaysShowFoldIcons{opacity:1}.monaco-editor .inline-folded:after{color:var(--vscode-editor-foldPlaceholderForeground);margin:.1em .2em 0;content:"\22ef";display:inline;line-height:1em;cursor:pointer}.monaco-editor .folded-background{background-color:var(--vscode-editor-foldBackground)}.monaco-editor .cldr.codicon.codicon-folding-expanded,.monaco-editor .cldr.codicon.codicon-folding-collapsed,.monaco-editor .cldr.codicon.codicon-folding-manual-expanded,.monaco-editor .cldr.codicon.codicon-folding-manual-collapsed{color:var(--vscode-editorGutter-foldingControlForeground)!important}.monaco-editor .peekview-widget .head .peekview-title .severity-icon{display:inline-block;vertical-align:text-top;margin-right:4px}.monaco-editor .marker-widget{text-overflow:ellipsis;white-space:nowrap}.monaco-editor .marker-widget>.stale{opacity:.6;font-style:italic}.monaco-editor .marker-widget .title{display:inline-block;padding-right:5px}.monaco-editor .marker-widget .descriptioncontainer{position:absolute;white-space:pre;user-select:text;-webkit-user-select:text;padding:8px 12px 0 20px}.monaco-editor .marker-widget .descriptioncontainer .message{display:flex;flex-direction:column}.monaco-editor .marker-widget .descriptioncontainer .message .details{padding-left:6px}.monaco-editor .marker-widget .descriptioncontainer .message .source,.monaco-editor .marker-widget .descriptioncontainer .message span.code{opacity:.6}.monaco-editor .marker-widget .descriptioncontainer .message a.code-link{opacity:.6;color:inherit}.monaco-editor .marker-widget .descriptioncontainer .message a.code-link:before{content:"("}.monaco-editor .marker-widget .descriptioncontainer .message a.code-link:after{content:")"}.monaco-editor .marker-widget .descriptioncontainer .message a.code-link>span{text-decoration:underline;border-bottom:1px solid transparent;text-underline-position:under;color:var(--vscode-textLink-activeForeground)}.monaco-editor .marker-widget .descriptioncontainer .filename{cursor:pointer;color:var(--vscode-textLink-activeForeground)}.monaco-editor .zone-widget .codicon.codicon-error,.markers-panel .marker-icon.error,.markers-panel .marker-icon .codicon.codicon-error,.text-search-provider-messages .providerMessage .codicon.codicon-error,.extensions-viewlet>.extensions .codicon.codicon-error,.extension-editor .codicon.codicon-error,.chat-attached-context-attachment .codicon.codicon-error{color:var(--vscode-problemsErrorIcon-foreground)}.monaco-editor .zone-widget .codicon.codicon-warning,.markers-panel .marker-icon.warning,.markers-panel .marker-icon .codicon.codicon-warning,.text-search-provider-messages .providerMessage .codicon.codicon-warning,.extensions-viewlet>.extensions .codicon.codicon-warning,.extension-editor .codicon.codicon-warning,.preferences-editor .codicon.codicon-warning{color:var(--vscode-problemsWarningIcon-foreground)}.monaco-editor .zone-widget .codicon.codicon-info,.markers-panel .marker-icon.info,.markers-panel .marker-icon .codicon.codicon-info,.text-search-provider-messages .providerMessage .codicon.codicon-info,.extensions-viewlet>.extensions .codicon.codicon-info,.extension-editor .codicon.codicon-info{color:var(--vscode-problemsInfoIcon-foreground)}.monaco-editor .goto-definition-link{text-decoration:underline;cursor:pointer;color:var(--vscode-editorLink-activeForeground)!important}.monaco-editor .snippet-placeholder{min-width:2px;outline-style:solid;outline-width:1px;background-color:var(--vscode-editor-snippetTabstopHighlightBackground, transparent);outline-color:var(--vscode-editor-snippetTabstopHighlightBorder, transparent)}.monaco-editor .finish-snippet-placeholder{outline-style:solid;outline-width:1px;background-color:var(--vscode-editor-snippetFinalTabstopHighlightBackground, transparent);outline-color:var(--vscode-editor-snippetFinalTabstopHighlightBorder, transparent)}.monaco-editor .rename-box{z-index:100;color:inherit;border-radius:4px;box-shadow:var(--vscode-shadow-lg)}.monaco-editor .rename-box.preview{padding:4px 4px 0}.monaco-editor .rename-box .rename-input-with-button{padding:3px;border-radius:4px;width:calc(100% - 8px)}.monaco-editor .rename-box .rename-input{width:calc(100% - 8px);padding:0}.monaco-editor .rename-box .rename-input:focus{outline:none}.monaco-editor .rename-box .rename-suggestions-button{display:flex;align-items:center;padding:3px;background-color:transparent;border:none;border-radius:5px;cursor:pointer}.monaco-editor .rename-box .rename-suggestions-button:hover{background-color:var(--vscode-toolbar-hoverBackground)}.monaco-editor .rename-box .rename-candidate-list-container .monaco-list-row{border-radius:2px}.monaco-editor .rename-box .rename-label{display:none;opacity:.8}.monaco-editor .rename-box.preview .rename-label{display:inherit}.monaco-editor .suggest-widget{width:430px;z-index:40;display:flex;flex-direction:column;border-radius:var(--vscode-cornerRadius-large);box-shadow:var(--vscode-shadow-lg)}.monaco-editor .suggest-widget.message{flex-direction:row;align-items:center}.monaco-editor .suggest-widget,.monaco-editor .suggest-details{flex:0 1 auto;width:100%;border-style:solid;border-width:1px;border-color:var(--vscode-editorSuggestWidget-border);background-color:var(--vscode-editorSuggestWidget-background)}.monaco-editor.hc-black .suggest-widget,.monaco-editor.hc-black .suggest-details,.monaco-editor.hc-light .suggest-widget,.monaco-editor.hc-light .suggest-details{border-width:2px}.monaco-editor .suggest-widget .suggest-status-bar{box-sizing:border-box;display:none;flex-flow:row nowrap;justify-content:space-between;width:100%;font-size:80%;padding:0 4px;border-top:1px solid var(--vscode-editorSuggestWidget-border);overflow:hidden}.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar{display:flex}.monaco-editor .suggest-widget .suggest-status-bar .left{padding-right:8px}.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-label{color:var(--vscode-editorSuggestWidgetStatus-foreground)}.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-item:not(:last-of-type) .action-label{margin-right:0}.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-item:not(:last-of-type) .action-label:after{content:", ";margin-right:.3em}.monaco-editor .suggest-widget.with-status-bar .monaco-list .monaco-list-row>.contents>.main>.right>.readMore,.monaco-editor .suggest-widget.with-status-bar .monaco-list .monaco-list-row.focused.string-label>.contents>.main>.right>.readMore{display:none}.monaco-editor .suggest-widget.with-status-bar:not(.docs-side) .monaco-list .monaco-list-row:hover>.contents>.main>.right.can-expand-details>.details-label{width:100%}.monaco-editor .suggest-widget>.message{padding-left:22px}.monaco-editor .suggest-widget>.tree{height:100%;width:100%}.monaco-editor .suggest-widget .monaco-list{user-select:none;-webkit-user-select:none;border-radius:var(--vscode-cornerRadius-large)}.monaco-editor .suggest-widget .monaco-list .monaco-list-row{display:flex;-mox-box-sizing:border-box;box-sizing:border-box;padding-right:10px;background-repeat:no-repeat;background-position:2px 2px;white-space:nowrap;cursor:pointer;touch-action:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused{color:var(--vscode-editorSuggestWidget-selectedForeground)}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused .codicon{color:var(--vscode-editorSuggestWidget-selectedIconForeground)}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents{flex:1;height:100%;overflow:hidden;padding-left:2px}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main{display:flex;overflow:hidden;text-overflow:ellipsis;white-space:pre;justify-content:space-between}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left,.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right{display:flex}.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.focused)>.contents>.main .monaco-icon-label{color:var(--vscode-editorSuggestWidget-foreground)}.monaco-editor .suggest-widget:not(.frozen) .monaco-highlighted-label .highlight{font-weight:700}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main .monaco-highlighted-label .highlight{color:var(--vscode-editorSuggestWidget-highlightForeground)}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused>.contents>.main .monaco-highlighted-label .highlight{color:var(--vscode-editorSuggestWidget-focusHighlightForeground)}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close,.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore:before{color:inherit;opacity:1;font-size:14px;cursor:pointer}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close{position:absolute;top:6px;right:2px}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close:hover,.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore:hover{opacity:1}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label{color:var(--vscode-editorSuggestWidget-foreground)}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused>.contents>.main>.right>.details-label{color:var(--vscode-editorSuggestWidget-selectedForeground)}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.signature-label{overflow:hidden;text-overflow:ellipsis;opacity:.6}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.qualifier-label{margin-left:12px;opacity:.4;font-size:85%;line-height:initial;text-overflow:ellipsis;overflow:hidden;align-self:center}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label{font-size:85%;margin-left:1.1em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label>.monaco-tokenized-source{display:inline}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label{display:none}.monaco-editor .suggest-widget:not(.shows-details) .monaco-list .monaco-list-row.focused>.contents>.main>.right>.details-label{display:inline}.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.string-label)>.contents>.main>.right>.details-label,.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row.focused:not(.string-label)>.contents>.main>.right>.details-label{display:inline}.monaco-editor .suggest-widget:not(.docs-side) .monaco-list .monaco-list-row.focused:hover>.contents>.main>.right.can-expand-details>.details-label{width:calc(100% - 26px)}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left{flex-shrink:1;flex-grow:1;overflow:hidden}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.monaco-icon-label{flex-shrink:0}.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.string-label)>.contents>.main>.left>.monaco-icon-label{max-width:100%}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.string-label>.contents>.main>.left>.monaco-icon-label{flex-shrink:1}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right{overflow:hidden;flex-shrink:4;max-width:70%}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore{display:inline-block;position:absolute;right:10px;width:18px;height:18px;visibility:hidden}.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row>.contents>.main>.right>.readMore{display:none!important}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.string-label>.contents>.main>.right>.readMore{display:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused.string-label>.contents>.main>.right>.readMore{display:inline-block}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused:hover>.contents>.main>.right>.readMore{visibility:visible}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label.deprecated{opacity:.66;text-decoration:unset}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label.deprecated>.monaco-icon-label-container>.monaco-icon-name-container{text-decoration:line-through}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label:before{height:100%}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon{display:block;height:16px;width:16px;margin-left:2px;background-repeat:no-repeat;background-size:80%;background-position:center}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.hide{display:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .suggest-icon{display:flex;align-items:center;margin-right:4px}.monaco-editor .suggest-widget.no-icons .monaco-list .monaco-list-row .icon,.monaco-editor .suggest-widget.no-icons .monaco-list .monaco-list-row .suggest-icon:before{display:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.customcolor .colorspan{margin:0 0 0 .3em;border:.1em solid #000;width:.7em;height:.7em;display:inline-block}.monaco-editor .suggest-details-container{z-index:41}.monaco-editor .suggest-details{display:flex;flex-direction:column;cursor:default;color:var(--vscode-editorSuggestWidget-foreground)}.monaco-editor .suggest-details:focus{border-color:var(--vscode-focusBorder)}.monaco-editor .suggest-details a{color:var(--vscode-textLink-foreground)}.monaco-editor .suggest-details a:hover{color:var(--vscode-textLink-activeForeground)}.monaco-editor .suggest-details code{background-color:var(--vscode-textCodeBlock-background)}.monaco-editor .suggest-details.no-docs{display:none}.monaco-editor .suggest-details>.monaco-scrollable-element{flex:1}.monaco-editor .suggest-details>.monaco-scrollable-element>.body{box-sizing:border-box;height:100%;width:100%}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.type{flex:2;overflow:hidden;text-overflow:ellipsis;opacity:.7;white-space:pre;margin:0 24px 0 0;padding:4px 0 4px 5px}.monaco-editor .suggest-details.detail-and-doc>.monaco-scrollable-element>.body>.header>.type{padding-bottom:12px}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.type.auto-wrap{white-space:normal;word-break:break-all}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs{margin:0;padding:4px 5px;white-space:pre-wrap}.monaco-editor .suggest-details.no-type>.monaco-scrollable-element>.body>.docs{margin-right:24px;overflow:hidden}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs{padding:0;white-space:initial;min-height:calc(1rem + 8px)}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div,.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>span:not(:empty){padding:4px 5px}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div>p:first-child{margin-top:0}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div>p:last-child{margin-bottom:0}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs .monaco-tokenized-source{white-space:pre}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs .code{white-space:pre-wrap;word-wrap:break-word}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs .codicon{vertical-align:sub}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>p:empty{display:none}.monaco-editor .suggest-details code{border-radius:3px;padding:0 .4em}.monaco-editor .suggest-details ul,.monaco-editor .suggest-details ol{padding-left:20px}.monaco-editor .suggest-details p code{font-family:var(--monaco-monospace-font)}.monaco-editor .suggest-preview-additional-widget{white-space:nowrap}.monaco-editor .suggest-preview-additional-widget .content-spacer{color:transparent;white-space:pre}.monaco-editor .suggest-preview-additional-widget .button{display:inline-block;cursor:pointer;text-decoration:underline;text-underline-position:under}.monaco-editor .ghost-text-hidden{opacity:0;font-size:0}.monaco-editor .ghost-text-decoration,.monaco-editor .suggest-preview-text .ghost-text{font-style:italic}.monaco-editor .suggest-preview-text.clickable .view-line{z-index:1}.monaco-editor .ghost-text-decoration.clickable,.monaco-editor .ghost-text-decoration-preview.clickable,.monaco-editor .suggest-preview-text.clickable .ghost-text{cursor:pointer}.monaco-editor .inline-completion-text-to-replace{text-decoration:underline;text-underline-position:under}.monaco-editor .ghost-text-decoration,.monaco-editor .ghost-text-decoration-preview,.monaco-editor .suggest-preview-text .ghost-text{&.syntax-highlighted{opacity:.7}&:not(.syntax-highlighted){color:var(--vscode-editorGhostText-foreground)}background-color:var(--vscode-editorGhostText-background);border:1px solid var(--vscode-editorGhostText-border)}.monaco-editor .ghost-text-decoration.warning,.monaco-editor .ghost-text-decoration-preview.warning,.monaco-editor .suggest-preview-text .ghost-text.warning{background:var(--monaco-editor-warning-decoration) repeat-x bottom left;border-bottom:4px double var(--vscode-editorWarning-border)}.monaco-editor .ghost-text-decoration.short-text,.monaco-editor .ghost-text-decoration-preview.short-text,.monaco-editor .suggest-preview-text .ghost-text.short-text{text-decoration:underline dotted var(--vscode-editorGhostText-foreground);text-underline-position:under}.ghost-text-view-warning-widget-icon{.codicon{color:var(--vscode-editorWarning-foreground)!important}}.monaco-editor{.edits-fadeout-decoration{opacity:var(--animation-opacity, 1);background-color:var(--vscode-inlineEdit-modifiedChangedTextBackground)}}.monaco-editor .sticky-widget{overflow:hidden;border-bottom:1px solid var(--vscode-editorStickyScroll-border);width:100%;box-shadow:var(--vscode-editorStickyScroll-shadow) 0 4px 2px -2px;z-index:4;right:initial!important;margin-left:"0px"}.monaco-editor .sticky-widget .sticky-widget-line-numbers{float:left;background-color:var(--vscode-editorStickyScrollGutter-background)}.monaco-editor .sticky-widget.peek .sticky-widget-line-numbers{background-color:var(--vscode-peekViewEditorStickyScrollGutter-background)}.monaco-editor .sticky-widget .sticky-widget-lines-scrollable{display:inline-block;position:absolute;overflow:hidden;width:var(--vscode-editorStickyScroll-scrollableWidth);background-color:var(--vscode-editorStickyScroll-background)}.monaco-editor .sticky-widget.peek .sticky-widget-lines-scrollable{background-color:var(--vscode-peekViewEditorStickyScroll-background)}.monaco-editor .sticky-widget .sticky-widget-lines{position:absolute;background-color:inherit}.monaco-editor .sticky-widget .sticky-line-number,.monaco-editor .sticky-widget .sticky-line-content{color:var(--vscode-editorLineNumber-foreground);white-space:nowrap;display:inline-block;position:absolute;background-color:inherit}.monaco-editor .sticky-widget .sticky-line-number .codicon-folding-expanded,.monaco-editor .sticky-widget .sticky-line-number .codicon-folding-collapsed{float:right;transition:var(--vscode-editorStickyScroll-foldingOpacityTransition);position:absolute;margin-left:2px}.monaco-editor .sticky-widget .sticky-line-content{width:var(--vscode-editorStickyScroll-scrollableWidth);background-color:inherit;white-space:nowrap}.monaco-editor .sticky-widget .sticky-line-number-inner{display:inline-block;text-align:right}.monaco-editor .sticky-widget .sticky-line-content:hover{background-color:var(--vscode-editorStickyScrollHover-background);cursor:pointer}.monaco-editor{--inline-edit-border-radius: 3px;.inline-edits-view-indicator{display:flex;z-index:34;height:20px;color:var(--vscode-inlineEdit-gutterIndicator-primaryForeground);background-color:var(--vscode-inlineEdit-gutterIndicator-background);border:1px solid var(--vscode-inlineEdit-gutterIndicator-primaryBorder);border-radius:var(--inline-edit-border-radius);align-items:center;padding:2px 10px 2px 2px;margin:0 4px;opacity:0;&.contained{transition:opacity .2s ease-in-out;transition-delay:.4s}&.visible{opacity:1}&.top{opacity:1;.icon{transform:rotate(90deg)}}&.bottom{opacity:1;.icon{transform:rotate(-90deg)}}.icon{display:flex;align-items:center;margin:0 2px;transform:none;transition:transform .2s ease-in-out;.codicon{color:var(--vscode-inlineEdit-gutterIndicator-primaryForeground)}}.label{margin:0 2px;display:flex;justify-content:center;width:100%}}.inline-edits-view .editorContainer{.preview .monaco-editor{.view-overlays .current-line-exact,.current-line-margin{border:none}}.inline-edits-view-zone.diagonal-fill{opacity:.5}}.strike-through{text-decoration:line-through}.inlineCompletions-line-insert{background:var(--vscode-inlineEdit-modifiedChangedLineBackground)}.inlineCompletions-line-delete{background:var(--vscode-inlineEdit-originalChangedLineBackground)}.inlineCompletions-char-insert{background:var(--vscode-inlineEdit-modifiedChangedTextBackground);cursor:pointer}.inlineCompletions-char-delete{background:var(--vscode-inlineEdit-originalChangedTextBackground)}.inlineCompletions-char-delete.diff-range-empty{margin-left:-1px;border-left:solid var(--vscode-inlineEdit-originalChangedTextBackground) 3px}.inlineCompletions-char-insert.diff-range-empty{border-left:solid var(--vscode-inlineEdit-modifiedChangedTextBackground) 3px}.inlineCompletions-char-delete.single-line-inline{border:1px solid var(--vscode-editorHoverWidget-border);margin:-2px 0 0 -2px}.inlineCompletions-char-insert.single-line-inline{border-top:1px solid var(--vscode-inlineEdit-modifiedBorder);border-bottom:1px solid var(--vscode-inlineEdit-modifiedBorder)}.inlineCompletions-char-insert.single-line-inline.start{border-top-left-radius:var(--inline-edit-border-radius);border-bottom-left-radius:var(--inline-edit-border-radius);border-left:1px solid var(--vscode-inlineEdit-modifiedBorder)}.inlineCompletions-char-insert.single-line-inline.end{border-top-right-radius:var(--inline-edit-border-radius);border-bottom-right-radius:var(--inline-edit-border-radius);border-right:1px solid var(--vscode-inlineEdit-modifiedBorder)}.inlineCompletions-char-delete.single-line-inline.empty,.inlineCompletions-char-insert.single-line-inline.empty{display:none}.inlineCompletions.strike-through{text-decoration-thickness:1px}.inlineCompletions-modified-bubble{background:var(--vscode-inlineEdit-modifiedChangedTextBackground)}.inlineCompletions-original-bubble{background:var(--vscode-inlineEdit-originalChangedTextBackground)}.inlineCompletions-modified-bubble,.inlineCompletions-original-bubble{pointer-events:none;display:inline-block}.inline-edit.ghost-text,.inline-edit.ghost-text-decoration,.inline-edit.ghost-text-decoration-preview,.inline-edit.suggest-preview-text .ghost-text{&.syntax-highlighted{opacity:1!important}font-style:normal!important}.inline-edit.modified-background.ghost-text,.inline-edit.modified-background.ghost-text-decoration,.inline-edit.modified-background.ghost-text-decoration-preview,.inline-edit.modified-background.suggest-preview-text .ghost-text{background:var(--vscode-inlineEdit-modifiedChangedTextBackground)!important;display:inline-block!important}.inlineCompletions-original-lines{background:var(--vscode-editor-background)}.inline-edit-jump-to-widget{.monaco-keybinding{.monaco-keybinding-key{font-size:11px;padding:1px 2px 2px}}}}.monaco-menu-option{color:var(--vscode-editorActionList-foreground);font-size:13px;padding:0 4px;line-height:28px;display:flex;gap:4px;align-items:center;border-radius:3px;cursor:pointer;.monaco-keybinding-key{font-size:13px;opacity:.7;padding:0;border:none;margin:0;min-width:unset}&.active{background:var(--vscode-editorActionList-focusBackground);color:var(--vscode-editorActionList-focusForeground);outline:1px solid var(--vscode-menu-selectionBorder, transparent);outline-offset:-1px;.monaco-keybinding-key{color:var(--vscode-editorActionList-focusForeground)}}}.inline-edits-long-distance-hint-widget .go-to-label:before{content:"";position:absolute;left:-12px;top:0;width:12px;height:100%;background:linear-gradient(to left,var(--vscode-editorWidget-background) 0,transparent 12px)}.hc-black .inline-edits-long-distance-hint-widget .go-to-label:before,.hc-light .inline-edits-long-distance-hint-widget .go-to-label:before{background:var(--vscode-editorWidget-background)}.inline-edit-alternative-action-label .codicon{font-size:12px!important;padding-right:4px}.inline-edit-alternative-action-label .monaco-keybinding-key{padding:2px 3px}.inline-edit-alternative-action-label .inline-edit-alternative-action-label-separator{width:4px}.inline-edits-long-distance-hint-widget.show-file-icons .target-file .file-icon:before{display:inline-block;width:16px;height:16px;vertical-align:text-bottom;background-size:16px;background-position:center;background-repeat:no-repeat}.monaco-editor.vs .valueSetReplacement{outline:solid 2px var(--vscode-editorBracketMatch-border)}.monaco-editor .tokens-inspect-widget{z-index:50;user-select:text;-webkit-user-select:text;padding:10px;color:var(--vscode-editorHoverWidget-foreground);background-color:var(--vscode-editorHoverWidget-background);border:1px solid var(--vscode-editorHoverWidget-border)}.monaco-editor.hc-black .tokens-inspect-widget,.monaco-editor.hc-light .tokens-inspect-widget{border-width:2px}.monaco-editor .tokens-inspect-widget .tokens-inspect-separator{height:1px;border:0;background-color:var(--vscode-editorHoverWidget-border)}.monaco-editor .tokens-inspect-widget .tm-token{font-family:var(--monaco-monospace-font)}.monaco-editor .tokens-inspect-widget .tm-token-length{font-weight:400;font-size:60%;float:right}.monaco-editor .tokens-inspect-widget .tm-metadata-table{width:100%}.monaco-editor .tokens-inspect-widget .tm-metadata-value{font-family:var(--monaco-monospace-font);text-align:right}.monaco-editor .tokens-inspect-widget .tm-token-type{font-family:var(--monaco-monospace-font)}.monaco-editor .iPadShowKeyboard{width:58px;min-width:0;height:36px;min-height:0;margin:0;padding:0;position:absolute;resize:none;overflow:hidden;background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIHZpZXdCb3g9IjAgMCA1MyAzNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwKSI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNDguMDM2NCA0LjAxMDQySDQuMDA3NzlMNC4wMDc3OSAzMi4wMjg2SDQ4LjAzNjRWNC4wMTA0MlpNNC4wMDc3OSAwLjAwNzgxMjVDMS43OTcyMSAwLjAwNzgxMjUgMC4wMDUxODc5OSAxLjc5OTg0IDAuMDA1MTg3OTkgNC4wMTA0MlYzMi4wMjg2QzAuMDA1MTg3OTkgMzQuMjM5MiAxLjc5NzIxIDM2LjAzMTIgNC4wMDc3OSAzNi4wMzEySDQ4LjAzNjRDNTAuMjQ3IDM2LjAzMTIgNTIuMDM5IDM0LjIzOTIgNTIuMDM5IDMyLjAyODZWNC4wMTA0MkM1Mi4wMzkgMS43OTk4NCA1MC4yNDcgMC4wMDc4MTI1IDQ4LjAzNjQgMC4wMDc4MTI1SDQuMDA3NzlaTTguMDEwNDIgOC4wMTMwMkgxMi4wMTNWMTIuMDE1Nkg4LjAxMDQyVjguMDEzMDJaTTIwLjAxODIgOC4wMTMwMkgxNi4wMTU2VjEyLjAxNTZIMjAuMDE4MlY4LjAxMzAyWk0yNC4wMjA4IDguMDEzMDJIMjguMDIzNFYxMi4wMTU2SDI0LjAyMDhWOC4wMTMwMlpNMzYuMDI4NiA4LjAxMzAySDMyLjAyNlYxMi4wMTU2SDM2LjAyODZWOC4wMTMwMlpNNDAuMDMxMiA4LjAxMzAySDQ0LjAzMzlWMTIuMDE1Nkg0MC4wMzEyVjguMDEzMDJaTTE2LjAxNTYgMTYuMDE4Mkg4LjAxMDQyVjIwLjAyMDhIMTYuMDE1NlYxNi4wMTgyWk0yMC4wMTgyIDE2LjAxODJIMjQuMDIwOFYyMC4wMjA4SDIwLjAxODJWMTYuMDE4MlpNMzIuMDI2IDE2LjAxODJIMjguMDIzNFYyMC4wMjA4SDMyLjAyNlYxNi4wMTgyWk00NC4wMzM5IDE2LjAxODJWMjAuMDIwOEgzNi4wMjg2VjE2LjAxODJINDQuMDMzOVpNMTIuMDEzIDI0LjAyMzRIOC4wMTA0MlYyOC4wMjZIMTIuMDEzVjI0LjAyMzRaTTE2LjAxNTYgMjQuMDIzNEgzNi4wMjg2VjI4LjAyNkgxNi4wMTU2VjI0LjAyMzRaTTQ0LjAzMzkgMjQuMDIzNEg0MC4wMzEyVjI4LjAyNkg0NC4wMzM5VjI0LjAyMzRaIiBmaWxsPSIjNDI0MjQyIi8+CjwvZz4KPGRlZnM+CjxjbGlwUGF0aCBpZD0iY2xpcDAiPgo8cmVjdCB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIGZpbGw9IndoaXRlIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg==) center center no-repeat;border:4px solid #F6F6F6;border-radius:4px}.monaco-editor.vs-dark .iPadShowKeyboard{background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIHZpZXdCb3g9IjAgMCA1MyAzNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwKSI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNDguMDM2NCA0LjAxMDQySDQuMDA3NzlMNC4wMDc3OSAzMi4wMjg2SDQ4LjAzNjRWNC4wMTA0MlpNNC4wMDc3OSAwLjAwNzgxMjVDMS43OTcyMSAwLjAwNzgxMjUgMC4wMDUxODc5OSAxLjc5OTg0IDAuMDA1MTg3OTkgNC4wMTA0MlYzMi4wMjg2QzAuMDA1MTg3OTkgMzQuMjM5MiAxLjc5NzIxIDM2LjAzMTIgNC4wMDc3OSAzNi4wMzEySDQ4LjAzNjRDNTAuMjQ3IDM2LjAzMTIgNTIuMDM5IDM0LjIzOTIgNTIuMDM5IDMyLjAyODZWNC4wMTA0MkM1Mi4wMzkgMS43OTk4NCA1MC4yNDcgMC4wMDc4MTI1IDQ4LjAzNjQgMC4wMDc4MTI1SDQuMDA3NzlaTTguMDEwNDIgOC4wMTMwMkgxMi4wMTNWMTIuMDE1Nkg4LjAxMDQyVjguMDEzMDJaTTIwLjAxODIgOC4wMTMwMkgxNi4wMTU2VjEyLjAxNTZIMjAuMDE4MlY4LjAxMzAyWk0yNC4wMjA4IDguMDEzMDJIMjguMDIzNFYxMi4wMTU2SDI0LjAyMDhWOC4wMTMwMlpNMzYuMDI4NiA4LjAxMzAySDMyLjAyNlYxMi4wMTU2SDM2LjAyODZWOC4wMTMwMlpNNDAuMDMxMiA4LjAxMzAySDQ0LjAzMzlWMTIuMDE1Nkg0MC4wMzEyVjguMDEzMDJaTTE2LjAxNTYgMTYuMDE4Mkg4LjAxMDQyVjIwLjAyMDhIMTYuMDE1NlYxNi4wMTgyWk0yMC4wMTgyIDE2LjAxODJIMjQuMDIwOFYyMC4wMjA4SDIwLjAxODJWMTYuMDE4MlpNMzIuMDI2IDE2LjAxODJIMjguMDIzNFYyMC4wMjA4SDMyLjAyNlYxNi4wMTgyWk00NC4wMzM5IDE2LjAxODJWMjAuMDIwOEgzNi4wMjg2VjE2LjAxODJINDQuMDMzOVpNMTIuMDEzIDI0LjAyMzRIOC4wMTA0MlYyOC4wMjZIMTIuMDEzVjI0LjAyMzRaTTE2LjAxNTYgMjQuMDIzNEgzNi4wMjg2VjI4LjAyNkgxNi4wMTU2VjI0LjAyMzRaTTQ0LjAzMzkgMjQuMDIzNEg0MC4wMzEyVjI4LjAyNkg0NC4wMzM5VjI0LjAyMzRaIiBmaWxsPSIjQzVDNUM1Ii8+CjwvZz4KPGRlZnM+CjxjbGlwUGF0aCBpZD0iY2xpcDAiPgo8cmVjdCB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIGZpbGw9IndoaXRlIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg==) center center no-repeat;border:4px solid #252526}.monaco-editor .linked-editing-decoration{background-color:var(--vscode-editor-linkedEditingBackground);min-width:1px}.monaco-editor .detected-link,.monaco-editor .detected-link-active{text-decoration:underline;text-underline-position:under}.monaco-editor .detected-link-active{cursor:pointer;color:var(--vscode-editorLink-activeForeground)!important}.monaco-editor{.scroll-editor-on-middle-click-dot{cursor:all-scroll;position:absolute;z-index:1;background-color:var(--vscode-editor-foreground, white);border:1px solid var(--vscode-editor-background, black);opacity:.5;width:5px;height:5px;border-radius:50%;transform:translate(-50%,-50%);&.hidden{display:none}}&.scroll-editor-on-middle-click-editor *{cursor:all-scroll}}.monaco-editor .focused .selectionHighlight{background-color:var(--vscode-editor-selectionHighlightBackground);box-sizing:border-box;border:1px solid var(--vscode-editor-selectionHighlightBorder)}.monaco-editor.hc-black .focused .selectionHighlight,.monaco-editor.hc-light .focused .selectionHighlight{border-style:dotted}.monaco-editor .wordHighlight{background-color:var(--vscode-editor-wordHighlightBackground);box-sizing:border-box;border:1px solid var(--vscode-editor-wordHighlightBorder)}.monaco-editor.hc-black .wordHighlight,.monaco-editor.hc-light .wordHighlight{border-style:dotted}.monaco-editor .wordHighlightStrong{background-color:var(--vscode-editor-wordHighlightStrongBackground);box-sizing:border-box;border:1px solid var(--vscode-editor-wordHighlightStrongBorder)}.monaco-editor.hc-black .wordHighlightStrong,.monaco-editor.hc-light .wordHighlightStrong{border-style:dotted}.monaco-editor .wordHighlightText{background-color:var(--vscode-editor-wordHighlightTextBackground);box-sizing:border-box;border:1px solid var(--vscode-editor-wordHighlightTextBorder)}.monaco-editor.hc-black .wordHighlightText,.monaco-editor.hc-light .wordHighlightText{border-style:dotted}.monaco-editor .parameter-hints-widget{z-index:39;display:flex;flex-direction:column;line-height:1.5em;cursor:default;color:var(--vscode-editorHoverWidget-foreground);background-color:var(--vscode-editorHoverWidget-background);border:1px solid var(--vscode-editorHoverWidget-border);border-radius:var(--vscode-cornerRadius-large);box-shadow:var(--vscode-shadow-lg)}.hc-black .monaco-editor .parameter-hints-widget,.hc-light .monaco-editor .parameter-hints-widget{border-width:2px}.monaco-editor .parameter-hints-widget>.phwrapper{max-width:440px;display:flex;flex-direction:row}.monaco-editor .parameter-hints-widget.multiple{min-height:3.3em;padding:0}.monaco-editor .parameter-hints-widget.multiple .body:before{content:"";display:block;height:100%;position:absolute;opacity:.5;border-left:1px solid var(--vscode-editorHoverWidget-border)}.monaco-editor .parameter-hints-widget p,.monaco-editor .parameter-hints-widget ul{margin:8px 0}.monaco-editor .parameter-hints-widget .monaco-scrollable-element,.monaco-editor .parameter-hints-widget .body{display:flex;flex:1;flex-direction:column;min-height:100%}.monaco-editor .parameter-hints-widget .signature{padding:4px 5px;position:relative}.monaco-editor .parameter-hints-widget .signature.has-docs:after{content:"";display:block;position:absolute;left:0;width:100%;padding-top:4px;opacity:.5;border-bottom:1px solid var(--vscode-editorHoverWidget-border)}.monaco-editor .parameter-hints-widget .code{font-family:var(--vscode-parameterHintsWidget-editorFontFamily),var(--vscode-parameterHintsWidget-editorFontFamilyDefault)}.monaco-editor .parameter-hints-widget .docs{padding:0 10px 0 5px;white-space:pre-wrap;overflow-wrap:break-word;word-break:break-word;min-width:0}.monaco-editor .parameter-hints-widget .docs.empty{display:none}.monaco-editor .parameter-hints-widget .docs a{color:var(--vscode-textLink-foreground)}.monaco-editor .parameter-hints-widget .docs a:hover{color:var(--vscode-textLink-activeForeground);cursor:pointer}.monaco-editor .parameter-hints-widget .docs .markdown-docs{white-space:initial;overflow-wrap:break-word;word-break:break-word;max-width:100%}.monaco-editor .parameter-hints-widget .docs code{font-family:var(--monaco-monospace-font);border-radius:3px;padding:0 .4em;background-color:var(--vscode-textCodeBlock-background)}.monaco-editor .parameter-hints-widget .docs .monaco-tokenized-source,.monaco-editor .parameter-hints-widget .docs .code{white-space:pre-wrap}.monaco-editor .parameter-hints-widget .controls{display:none;flex-direction:column;align-items:center;min-width:22px;justify-content:flex-end}.monaco-editor .parameter-hints-widget.multiple .controls{display:flex;padding:0 2px}.monaco-editor .parameter-hints-widget.multiple .button{width:16px;height:16px;background-repeat:no-repeat;cursor:pointer}.monaco-editor .parameter-hints-widget .button.previous{bottom:24px}.monaco-editor .parameter-hints-widget .overloads{text-align:center;height:12px;line-height:12px;font-family:var(--monaco-monospace-font)}.monaco-editor .parameter-hints-widget .signature .parameter.active{color:var(--vscode-editorHoverWidget-highlightForeground);font-weight:700}.monaco-editor .parameter-hints-widget .documentation-parameter>.parameter{font-weight:700;margin-right:.5em}.monaco-editor{.editorPlaceholder{top:0;position:absolute;overflow:hidden;text-overflow:ellipsis;text-wrap:nowrap;pointer-events:none;color:var(--vscode-editor-placeholder-foreground)}}.monaco-editor .unicode-highlight{border:1px solid var(--vscode-editorUnicodeHighlight-border);background-color:var(--vscode-editorUnicodeHighlight-background);box-sizing:border-box}.editor-banner{box-sizing:border-box;cursor:default;width:100%;font-size:12px;display:flex;overflow:visible;height:26px;background:var(--vscode-banner-background)}.editor-banner .icon-container{display:flex;flex-shrink:0;align-items:center;padding:0 6px 0 10px}.editor-banner .icon-container.custom-icon{background-repeat:no-repeat;background-position:center center;background-size:16px;width:16px;padding:0;margin:0 6px 0 10px}.editor-banner .message-container{display:flex;align-items:center;line-height:26px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.editor-banner .message-container p{margin-block-start:0;margin-block-end:0}.editor-banner .message-actions-container{flex-grow:1;flex-shrink:0;line-height:26px;margin:0 4px}.editor-banner .message-actions-container a.monaco-button{width:inherit;margin:2px 8px;padding:0 12px}.editor-banner .message-actions-container a{padding:3px;margin-left:12px;text-decoration:underline}.editor-banner .action-container{padding:0 10px 0 6px}.editor-banner{background-color:var(--vscode-banner-background)}.editor-banner,.editor-banner .action-container .codicon,.editor-banner .message-actions-container .monaco-link{color:var(--vscode-banner-foreground)}.editor-banner .icon-container .codicon{color:var(--vscode-banner-iconForeground)}.monaco-link{color:var(--vscode-textLink-foreground)}.monaco-link:hover{color:var(--vscode-textLink-activeForeground)} diff --git a/plugins/diff-explorer/monaco/editor.js b/plugins/diff-explorer/monaco/editor.js new file mode 100644 index 0000000..fb01c7b --- /dev/null +++ b/plugins/diff-explorer/monaco/editor.js @@ -0,0 +1,1241 @@ +var EOe=Object.defineProperty;var x=(o,e,t)=>()=>{if(t)throw t[0];try{return o&&(e=o(o=0)),e}catch(i){throw t=[i],i}};var nt=(o,e)=>{for(var t in e)EOe(o,t,{get:e[t],enumerable:!0})};function yfe(o){if(o.length===0)throw new Error("Invalid tail call");return[o.slice(0,o.length-1),o[o.length-1]]}function Bt(o,e,t=(i,n)=>i===n){if(o===e)return!0;if(!o||!e||o.length!==e.length)return!1;for(let i=0,n=o.length;it(o[i],e))}function __(o,e){let t=0,i=o-1;for(;t<=i;){let n=(t+i)/2|0,s=e(n);if(s<0)t=n+1;else if(s>0)i=n-1;else return n}return-(t+1)}function CM(o,e,t){if(o=o|0,o>=e.length)throw new TypeError("invalid index");let i=e[Math.floor(e.length*Math.random())],n=[],s=[],r=[];for(let a of e){let l=t(a,i);l<0?n.push(a):l>0?s.push(a):r.push(a)}return o!!e)}function Uq(o){let e=0;for(let t=0;t0}function vl(o,e=t=>t){let t=new Set;return o.filter(i=>{let n=e(i);return t.has(n)?!1:(t.add(n),!0)})}function mr(o,e){let t=typeof e=="number"?o:0;typeof e=="number"?t=o:(t=0,e=o);let i=[];if(t<=e)for(let n=t;ne;n--)i.push(n);return i}function b_(o,e,t){let i=o.slice(0,e),n=o.slice(e);return i.concat(t,n)}function kM(o,e){let t=o.indexOf(e);t>-1&&(o.splice(t,1),o.unshift(e))}function LI(o,e){let t=o.indexOf(e);t>-1&&(o.splice(t,1),o.push(e))}function mm(o,e){for(let t of e)o.push(t)}function kfe(o,e){let t=[];for(let i of o){let n=e(i);n!==void 0&&t.push(n)}return t}function JS(o){return Array.isArray(o)?o:[o]}function TOe(o,e,t){let i=Lfe(o,e),n=o.length,s=t.length;o.length=n+s;for(let r=n-1;r>=i;r--)o[r+s]=o[r];for(let r=0;re(o(t),o(i))}function Ife(...o){return(e,t)=>{for(let i of o){let n=i(e,t);if(!p_.isNeitherLessOrGreaterThan(n))return n}return p_.neitherLessOrGreaterThan}}function II(o){return(e,t)=>-o(e,t)}function Efe(o){return(e,t)=>e===void 0?t===void 0?p_.neitherLessOrGreaterThan:p_.lessThan:t===void 0?p_.greaterThan:o(e,t)}function ex(o){return o.reduce((e,t)=>e+t,0)}var p_,is,LM,Ld,gm,yM,qe=x(()=>{(function(o){function e(s){return s<0}o.isLessThan=e;function t(s){return s<=0}o.isLessThanOrEqual=t;function i(s){return s>0}o.isGreaterThan=i;function n(s){return s===0}o.isNeitherLessOrGreaterThan=n,o.greaterThan=1,o.lessThan=-1,o.neitherLessOrGreaterThan=0})(p_||(p_={}));is=(o,e)=>o-e,LM=(o,e)=>is(o?1:0,e?1:0);Ld=class{constructor(e){this.firstIdx=0,this.items=e,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(e){let t=this.firstIdx;for(;t{})}constructor(e){this.iterate=e}toArray(){let e=[];return this.iterate(t=>(e.push(t),!0)),e}filter(e){return new o(t=>this.iterate(i=>e(i)?t(i):!0))}map(e){return new o(t=>this.iterate(i=>t(e(i))))}findLast(e){let t;return this.iterate(i=>(e(i)&&(t=i),!0)),t}findLastMaxBy(e){let t,i=!0;return this.iterate(n=>((i||p_.isGreaterThan(e(n,t)))&&(i=!1,t=n),!0)),t}},yM=class o{constructor(e){this._indexMap=e}static createSortPermutation(e,t){let i=Array.from(e.keys()).sort((n,s)=>t(e[n],e[s]));return new o(i)}apply(e){return e.map((t,i)=>e[this._indexMap[i]])}inverse(){let e=this._indexMap.slice();for(let t=0;t{$q=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?EI.isErrorNoTelemetry(e)?new EI(e.message+` + +`+e.stack):new Error(e.message+` + +`+e.stack):e},0)}}emit(e){this.listeners.forEach(t=>{t(e)})}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}},qq=new $q;IM="Canceled";Pr=class extends Error{constructor(){super(IM),this.name=this.message}};EM=class extends Error{constructor(e){super("NotSupported"),e&&(this.message=e)}},EI=class o extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof o)return e;let t=new o;return t.message=e.message,t.stack=e.stack,t}static isErrorNoTelemetry(e){return e.name==="CodeExpectedError"}},xe=class o extends Error{constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,o.prototype)}}});function DM(o,e){if(!o)throw new Error(e?`Assertion failed (${e})`:"Assertion Failed")}function ph(o,e="Unreachable"){throw new Error(e)}function pm(o,e="unexpected state"){if(!o)throw typeof e=="string"?new xe(`Assertion Failed: ${e}`):e}function jq(o,e="Soft Assertion Failed"){o||De(new xe(e))}function ec(o){if(!o()){debugger;o(),De(new xe("Assertion Failed"))}}function pf(o,e){let t=0;for(;t{Ae()});function Ln(o){return typeof o=="string"}function Dfe(o,e){return Array.isArray(o)&&o.every(e)}function ln(o){return typeof o=="object"&&o!==null&&!Array.isArray(o)&&!(o instanceof RegExp)&&!(o instanceof Date)}function Nfe(o){let e=Object.getPrototypeOf(Uint8Array);return typeof o=="object"&&o instanceof e}function wl(o){return typeof o=="number"&&!isNaN(o)}function TI(o){return!!o&&typeof o[Symbol.iterator]=="function"}function DI(o){return o===!0||o===!1}function ns(o){return typeof o>"u"}function oo(o){return!ka(o)}function ka(o){return ns(o)||o===null}function bt(o,e){if(!o)throw new Error(e?`Unexpected type, expected '${e}'`:"Unexpected type")}function _h(o){return pm(o!=null,"Argument is `undefined` or `null`."),o}function bh(o){return typeof o=="function"}function Rfe(o,e){let t=Math.min(o.length,e.length);for(let i=0;i{Fr()});function Rc(o){if(!o||typeof o!="object"||o instanceof RegExp)return o;let e=Array.isArray(o)?[]:{};return Object.entries(o).forEach(([t,i])=>{e[t]=i&&typeof i=="object"?Rc(i):i}),e}function Afe(o){if(!o||typeof o!="object")return o;let e=[o];for(;e.length>0;){let t=e.shift();Object.freeze(t);for(let i in t)if(Mfe.call(t,i)){let n=t[i];typeof n=="object"&&!Object.isFrozen(n)&&!Nfe(n)&&e.push(n)}}return o}function ix(o,e){return Kq(o,e,new Set)}function Kq(o,e,t){if(ka(o))return o;let i=e(o);if(typeof i<"u")return i;if(Array.isArray(o)){let n=[];for(let s of o)n.push(Kq(s,e,t));return n}if(ln(o)){if(t.has(o))throw new Error("Cannot clone recursive data-structure");t.add(o);let n={};for(let s in o)Mfe.call(o,s)&&(n[s]=Kq(o[s],e,t));return t.delete(o),n}return o}function mw(o,e,t=!0){return ln(o)?(ln(e)&&Object.keys(e).forEach(i=>{i in o?t&&(ln(o[i])&&ln(e[i])?mw(o[i],e[i],t):o[i]=e[i]):o[i]=e[i]}),o):e}function os(o,e){if(o===e)return!0;if(o==null||e===null||e===void 0||typeof o!=typeof e||typeof o!="object"||Array.isArray(o)!==Array.isArray(e))return!1;let t,i;if(Array.isArray(o)){if(o.length!==e.length)return!1;for(t=0;t{Rt();Mfe=Object.prototype.hasOwnProperty});function Gq(){return globalThis._VSCODE_NLS_MESSAGES}function NI(){return globalThis._VSCODE_NLS_LANGUAGE}function NM(o,e){let t;return e.length===0?t=o:t=o.replace(/\{(\d+)\}/g,(i,n)=>{let s=n[0],r=e[s],a=i;return typeof r=="string"?a=r:(typeof r=="number"||typeof r=="boolean"||r===void 0||r===null)&&(a=String(r)),a}),NOe&&(t="\uFF3B"+t.replace(/[aouei]/g,"$&$&")+"\uFF3D"),t}function m(o,e,...t){return NM(typeof o=="number"?Ofe(o,e):e,t)}function Ofe(o,e){let t=Gq()?.[o];if(typeof t!="string"){if(typeof e=="string")return e;throw new Error(`!!! NLS MISSING: ${o} !!!`)}return t}function U(o,e,...t){let i;typeof o=="number"?i=Ofe(o,e):i=e;let n=NM(i,t);return{value:n,original:e===i?n:NM(e,t)}}var NOe,le=x(()=>{NOe=NI()==="pseudo"||typeof document<"u"&&document.location&&typeof document.location.hash=="string"&&document.location.hash.indexOf("pseudo=true")>=0});function FM(){if(!Bfe){Bfe=!0;let o=new Uint8Array(2);o[0]=1,o[1]=2,Ffe=new Uint16Array(o.buffer)[0]===513}return Ffe}var v_,AI,MI,RI,Wfe,Yq,Zq,Hfe,RM,AM,Pfe,ROe,_m,bm,Ac,AOe,MOe,MM,sn,Ye,po,La,Cl,OOe,Vfe,pr,OM,PM,_f,zfe,POe,Mc,Po,Ffe,Bfe,OI,Ufe,$fe,BM,qfe,rt=x(()=>{le();v_="en",AI=!1,MI=!1,RI=!1,Wfe=!1,Yq=!1,Zq=!1,Hfe=!1,AM=v_,Pfe=v_,bm=globalThis;typeof bm.vscode<"u"&&typeof bm.vscode.process<"u"?Ac=bm.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(Ac=process);AOe=typeof Ac?.versions?.electron=="string",MOe=AOe&&Ac?.type==="renderer";if(typeof Ac=="object"){AI=Ac.platform==="win32",MI=Ac.platform==="darwin",RI=Ac.platform==="linux",RI&&Ac.env.SNAP&&Ac.env.SNAP_REVISION,Ac.env.CI||Ac.env.BUILD_ARTIFACTSTAGINGDIRECTORY||Ac.env.GITHUB_WORKSPACE,RM=v_,AM=v_;let o=Ac.env.VSCODE_NLS_CONFIG;if(o)try{let e=JSON.parse(o);RM=e.userLocale,Pfe=e.osLocale,AM=e.resolvedLanguage||v_,ROe=e.languagePack?.translationsConfigFile}catch{}Wfe=!0}else typeof navigator=="object"&&!MOe?(_m=navigator.userAgent,AI=_m.indexOf("Windows")>=0,MI=_m.indexOf("Macintosh")>=0,Zq=(_m.indexOf("Macintosh")>=0||_m.indexOf("iPad")>=0||_m.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,RI=_m.indexOf("Linux")>=0,Hfe=_m?.indexOf("Mobi")>=0,Yq=!0,AM=NI()||v_,RM=navigator.language.toLowerCase(),Pfe=RM):console.error("Unable to resolve platform.");MM=0;MI?MM=1:AI?MM=3:RI&&(MM=2);sn=AI,Ye=MI,po=RI,La=Wfe,Cl=Yq,OOe=Yq&&typeof bm.importScripts=="function",Vfe=OOe?bm.origin:void 0,pr=Zq,OM=Hfe,PM=MM,_f=_m,zfe=AM,POe=typeof bm.postMessage=="function"&&!bm.importScripts,Mc=(()=>{if(POe){let o=[];bm.addEventListener("message",t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let i=0,n=o.length;i{let i=++e;o.push({id:i,callback:t}),bm.postMessage({vscodeScheduleAsyncWork:i},"*")}}return o=>setTimeout(o)})(),Po=MI||Zq?2:AI?1:3,Ffe=!0,Bfe=!1;OI=!!(_f&&_f.indexOf("Chrome")>=0),Ufe=!!(_f&&_f.indexOf("Firefox")>=0),$fe=!!(!OI&&_f&&_f.indexOf("Safari")>=0),BM=!!(_f&&_f.indexOf("Edg/")>=0),qfe=!!(_f&&_f.indexOf("Android")>=0)});function Id(o,e){let t=this,i=!1,n;return function(){return i||(i=!0,n=o.apply(t,arguments)),n}}var pw=x(()=>{});var ut,oa=x(()=>{Rt();(function(o){function e(I){return!!I&&typeof I=="object"&&typeof I[Symbol.iterator]=="function"}o.is=e;let t=Object.freeze([]);function i(){return t}o.empty=i;function*n(I){yield I}o.single=n;function s(I){return e(I)?I:n(I)}o.wrap=s;function r(I){return I??t}o.from=r;function*a(I){for(let E=I.length-1;E>=0;E--)yield I[E]}o.reverse=a;function l(I){return!I||I[Symbol.iterator]().next().done===!0}o.isEmpty=l;function c(I){return I[Symbol.iterator]().next().value}o.first=c;function d(I,E){let D=0;for(let O of I)if(E(O,D++))return!0;return!1}o.some=d;function h(I,E){let D=0;for(let O of I)if(!E(O,D++))return!1;return!0}o.every=h;function u(I,E){for(let D of I)if(E(D))return D}o.find=u;function*f(I,E){for(let D of I)E(D)&&(yield D)}o.filter=f;function*g(I,E){let D=0;for(let O of I)yield E(O,D++)}o.map=g;function*p(I,E){let D=0;for(let O of I)yield*E(O,D++)}o.flatMap=p;function*_(...I){for(let E of I)TI(E)?yield*E:yield E}o.concat=_;function b(I,E,D){let O=D;for(let P of I)O=E(O,P);return O}o.reduce=b;function v(I){let E=0;for(let D of I)E++;return E}o.length=v;function*w(I,E,D=I.length){for(E<-I.length&&(E=0),E<0&&(E+=I.length),D<0?D+=I.length:D>I.length&&(D=I.length);E1)throw new AggregateError(e,"Encountered errors while disposing of store");return Array.isArray(o)?[]:o}else if(o)return o.dispose(),o}function sa(...o){return ne(()=>Ct(o))}function ne(o){return new Xq(o)}var Xq,F,T,Qe,WM,HM,vh,W=x(()=>{oa();Xq=class{constructor(e){this._isDisposed=!1,this._fn=e}dispose(){if(!this._isDisposed){if(!this._fn)throw new Error("Unbound disposable context: Need to use an arrow function to preserve the value of this");this._isDisposed=!0,this._fn()}}};F=class o{static{this.DISABLE_DISPOSED_WARNING=!1}constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{Ct(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e||e===T.None)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?o.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}delete(e){if(e){if(e===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(e),e.dispose()}}},T=class{static{this.None=Object.freeze({dispose(){}})}constructor(){this._store=new F,this._store}dispose(){this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}},Qe=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(e){this._isDisposed||e===this._value||(this._value?.dispose(),this._value=e)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,this._value?.dispose(),this._value=void 0}},WM=class{constructor(e){this._disposable=e,this._counter=1}acquire(){return this._counter++,this}release(){return--this._counter===0&&this._disposable.dispose(),this}},HM=class{constructor(e){this.object=e}dispose(){}},vh=class{constructor(e=new Map){this._isDisposed=!1,this._store=e}dispose(){this._isDisposed=!0,this.clearAndDisposeAll()}clearAndDisposeAll(){if(this._store.size)try{Ct(this._store.values())}finally{this._store.clear()}}get(e){return this._store.get(e)}set(e,t,i=!1){this._isDisposed&&console.warn(new Error("Trying to add a disposable to a DisposableMap that has already been disposed of. The added object will be leaked!").stack),i||this._store.get(e)?.dispose(),this._store.set(e,t)}deleteAndDispose(e){this._store.get(e)?.dispose(),this._store.delete(e)}keys(){return this._store.keys()}values(){return this._store.values()}[Symbol.iterator](){return this._store[Symbol.iterator]()}}});var ss,In,tc=x(()=>{ss=class o{static{this.Undefined=new o(void 0)}constructor(e){this.element=e,this.next=o.Undefined,this.prev=o.Undefined}},In=class{constructor(){this._first=ss.Undefined,this._last=ss.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===ss.Undefined}clear(){let e=this._first;for(;e!==ss.Undefined;){let t=e.next;e.prev=ss.Undefined,e.next=ss.Undefined,e=t}this._first=ss.Undefined,this._last=ss.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){let i=new ss(e);if(this._first===ss.Undefined)this._first=i,this._last=i;else if(t){let s=this._last;this._last=i,i.prev=s,s.next=i}else{let s=this._first;this._first=i,i.next=s,s.prev=i}this._size+=1;let n=!1;return()=>{n||(n=!0,this._remove(i))}}shift(){if(this._first!==ss.Undefined){let e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==ss.Undefined){let e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==ss.Undefined&&e.next!==ss.Undefined){let t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===ss.Undefined&&e.next===ss.Undefined?(this._first=ss.Undefined,this._last=ss.Undefined):e.next===ss.Undefined?(this._last=this._last.prev,this._last.next=ss.Undefined):e.prev===ss.Undefined&&(this._first=this._first.next,this._first.prev=ss.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==ss.Undefined;)yield e.element,e=e.next}}});var nx,Qq,PI,vm,jfe,FI=x(()=>{rt();Qq=globalThis.vscode;if(typeof Qq<"u"&&typeof Qq.process<"u"){let o=Qq.process;nx={get platform(){return o.platform},get arch(){return o.arch},get env(){return o.env},cwd(){return o.cwd()}}}else typeof process<"u"&&typeof process?.versions?.node=="string"?nx={get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env.VSCODE_CWD||process.cwd()}}:nx={get platform(){return sn?"win32":Ye?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};PI=nx.cwd,vm=nx.env,jfe=nx.platform});var FOe,cn,qa=x(()=>{FOe=globalThis.performance.now.bind(globalThis.performance),cn=class o{static create(e){return new o(e)}constructor(e){this._now=e===!1?Date.now:FOe,this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}}});function Gfe(){return!!vm.VSCODE_DEV}function ij(o,e){e instanceof F?e.add(o):Array.isArray(e)&&e.push(o)}function Yfe(o,e){if(e instanceof F)e.delete(o);else if(Array.isArray(e)){let t=e.indexOf(o);t!==-1&&e.splice(t,1)}o.dispose()}var BOe,Kfe,Q,Jq,WOe,ej,VM,zM,tj,BI,HOe,N,Zfe,UM,Ed,$M,ox,qM,wh,w_,ae=x(()=>{Ae();pw();W();tc();FI();qa();BOe=100,Kfe=6e4;(function(o){o.None=()=>T.None;function e(z,Y,Z){return u(z,()=>{},0,void 0,Y??!0,void 0,Z)}o.defer=e;function t(z){return(Y,Z=null,te)=>{let se=!1,he;return he=z(ce=>{if(!se)return he?he.dispose():se=!0,Y.call(Z,ce)},null,te),se&&he.dispose(),he}}o.once=t;function i(z,Y){return o.once(o.filter(z,Y))}o.onceIf=i;function n(z,Y,Z){return d((te,se=null,he)=>z(ce=>te.call(se,Y(ce)),null,he),Z)}o.map=n;function s(z,Y,Z){return d((te,se=null,he)=>z(ce=>{Y(ce),te.call(se,ce)},null,he),Z)}o.forEach=s;function r(z,Y,Z){return d((te,se=null,he)=>z(ce=>Y(ce)&&te.call(se,ce),null,he),Z)}o.filter=r;function a(z){return z}o.signal=a;function l(...z){return(Y,Z=null,te)=>{let se=sa(...z.map(he=>he(ce=>Y.call(Z,ce))));return h(se,te)}}o.any=l;function c(z,Y,Z,te){let se=Z;return n(z,he=>(se=Y(se,he),se),te)}o.reduce=c;function d(z,Y){let Z,te={onWillAddFirstListener(){Z=z(se.fire,se)},onDidRemoveLastListener(){Z?.dispose()}},se=new N(te);return Y?.add(se),se.event}function h(z,Y){return Y instanceof Array?Y.push(z):Y&&Y.add(z),z}function u(z,Y,Z=100,te=!1,se=!1,he,ce){let Be,Ge,tt,Nt=0,mt,Pt={leakWarningThreshold:he,onWillAddFirstListener(){Be=z(Fn=>{Nt++,Ge=Y(Ge,Fn),te&&!tt&&(ct.fire(Ge),Ge=void 0),mt=()=>{let di=Ge;Ge=void 0,tt=void 0,(!te||Nt>1)&&ct.fire(di),Nt=0},typeof Z=="number"?(tt&&clearTimeout(tt),tt=setTimeout(mt,Z)):tt===void 0&&(tt=null,queueMicrotask(mt))})},onWillRemoveListener(){se&&Nt>0&&mt?.()},onDidRemoveLastListener(){mt=void 0,Be.dispose()}},ct=new N(Pt);return ce?.add(ct),ct.event}o.debounce=u;function f(z,Y=0,Z,te){return o.debounce(z,(se,he)=>se?(se.push(he),se):[he],Y,void 0,Z??!0,void 0,te)}o.accumulate=f;function g(z,Y,Z=100,te=!0,se=!0,he,ce){let Be,Ge,tt,Nt=0,mt={leakWarningThreshold:he,onWillAddFirstListener(){Be=z(ct=>{Nt++,Ge=Y(Ge,ct),tt===void 0&&(te&&(Pt.fire(Ge),Ge=void 0,Nt=0),typeof Z=="number"?tt=setTimeout(()=>{se&&Nt>0&&Pt.fire(Ge),Ge=void 0,tt=void 0,Nt=0},Z):(tt=0,queueMicrotask(()=>{se&&Nt>0&&Pt.fire(Ge),Ge=void 0,tt=void 0,Nt=0})))})},onDidRemoveLastListener(){Be.dispose()}},Pt=new N(mt);return ce?.add(Pt),Pt.event}o.throttle=g;function p(z,Y=(te,se)=>te===se,Z){let te=!0,se;return r(z,he=>{let ce=te||!Y(he,se);return te=!1,se=he,ce},Z)}o.latch=p;function _(z,Y,Z){return[o.filter(z,Y,Z),o.filter(z,te=>!Y(te),Z)]}o.split=_;function b(z,Y,Z=!1,te=[],se){let he=te.slice(),ce;Gfe()&&(ce={stack:VM.create(),timerId:setTimeout(()=>{he&&he.length>0&&ce&&!ce.warned&&(ce.warned=!0,console.warn(`[Event.buffer][${Y}] potential LEAK detected: ${he.length} events buffered for ${Kfe/1e3}s without being consumed. Buffered here:`),ce.stack.print())},Kfe),warned:!1},se&&se.add(ne(()=>clearTimeout(ce.timerId))));let Be=()=>{ce&&clearTimeout(ce.timerId)},Ge=z(mt=>{he?(he.push(mt),Gfe()&&ce&&!ce.warned&&he.length>=BOe&&(ce.warned=!0,console.warn(`[Event.buffer][${Y}] potential LEAK detected: ${he.length} events buffered without being consumed. Buffered here:`),ce.stack.print())):Nt.fire(mt)});se&&se.add(Ge);let tt=()=>{he?.forEach(mt=>Nt.fire(mt)),he=null,Be()},Nt=new N({onWillAddFirstListener(){Ge||(Ge=z(mt=>Nt.fire(mt)),se&&se.add(Ge))},onDidAddFirstListener(){he&&(Z?setTimeout(tt):tt())},onDidRemoveLastListener(){Ge&&Ge.dispose(),Ge=null,Be()}});return se&&se.add(Nt),Nt.event}o.buffer=b;function v(z,Y){return(te,se,he)=>{let ce=Y(new C);return z(function(Be){let Ge=ce.evaluate(Be);Ge!==w&&te.call(se,Ge)},void 0,he)}}o.chain=v;let w=Symbol("HaltChainable");class C{constructor(){this.steps=[]}map(Y){return this.steps.push(Y),this}forEach(Y){return this.steps.push(Z=>(Y(Z),Z)),this}filter(Y){return this.steps.push(Z=>Y(Z)?Z:w),this}reduce(Y,Z){let te=Z;return this.steps.push(se=>(te=Y(te,se),te)),this}latch(Y=(Z,te)=>Z===te){let Z=!0,te;return this.steps.push(se=>{let he=Z||!Y(se,te);return Z=!1,te=se,he?se:w}),this}evaluate(Y){for(let Z of this.steps)if(Y=Z(Y),Y===w)break;return Y}}function y(z,Y,Z=te=>te){let te=(...Be)=>ce.fire(Z(...Be)),se=()=>z.on(Y,te),he=()=>z.removeListener(Y,te),ce=new N({onWillAddFirstListener:se,onDidRemoveLastListener:he});return ce.event}o.fromNodeEventEmitter=y;function k(z,Y,Z=te=>te){let te=(...Be)=>ce.fire(Z(...Be)),se=()=>z.addEventListener(Y,te),he=()=>z.removeEventListener(Y,te),ce=new N({onWillAddFirstListener:se,onDidRemoveLastListener:he});return ce.event}o.fromDOMEventEmitter=k;function I(z,Y){let Z,te,se=new Promise(he=>{te=t(z)(he),ij(te,Y),Z=()=>{Yfe(te,Y)}});return se.cancel=Z,Y&&se.finally(()=>Yfe(te,Y)),se}o.toPromise=I;function E(z,Y){return z(Z=>Y.fire(Z))}o.forward=E;function D(z,Y,Z){return Y(Z),z(te=>Y(te))}o.runAndSubscribe=D;class O{constructor(Y,Z){this._observable=Y,this._counter=0,this._hasChanged=!1;let te={onWillAddFirstListener:()=>{Y.addObserver(this),this._observable.reportChanges()},onDidRemoveLastListener:()=>{Y.removeObserver(this)}};this.emitter=new N(te),Z&&Z.add(this.emitter)}beginUpdate(Y){this._counter++}handlePossibleChange(Y){}handleChange(Y,Z){this._hasChanged=!0}endUpdate(Y){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function P(z,Y){return new O(z,Y).emitter.event}o.fromObservable=P;function H(z){return(Y,Z,te)=>{let se=0,he=!1,ce={beginUpdate(){se++},endUpdate(){se--,se===0&&(z.reportChanges(),he&&(he=!1,Y.call(Z)))},handlePossibleChange(){},handleChange(){he=!0}};z.addObserver(ce),z.reportChanges();let Be={dispose(){z.removeObserver(ce)}};return ij(Be,te),Be}}o.fromObservableLight=H})(Q||(Q={}));Jq=class o{static{this.all=new Set}static{this._idPool=0}constructor(e){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${e}_${o._idPool++}`,o.all.add(this)}start(e){this._stopWatch=new cn,this.listenerCount=e}stop(){if(this._stopWatch){let e=this._stopWatch.elapsed();this.durations.push(e),this.elapsedOverall+=e,this.invocationCount+=1,this._stopWatch=void 0}}},WOe=-1,ej=class o{static{this._idPool=1}constructor(e,t,i=(o._idPool++).toString(16).padStart(3,"0")){this._errorHandler=e,this.threshold=t,this.name=i,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(e,t){let i=this.threshold;if(i<=0||t.3?"dominated":"popular",d=new zM(c,l,s,t,a);this._errorHandler(d)}return()=>{let s=this._stacks.get(e.value)||0;this._stacks.set(e.value,s-1)}}getMostFrequentStack(){if(!this._stacks)return;let e,t=0;for(let[i,n]of this._stacks)(!e||t{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let a=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(a);let l=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],c=l[1]/this._size>.3?"dominated":"popular",d=new tj(c,`${a}. HINT: Stack shows most frequent listener (${l[1]}-times)`,l[0],this._size,this._options?.leakWarningName);return(this._options?.onListenerError||De)(d),T.None}if(this._disposed)return T.None;t&&(e=e.bind(t));let n=new BI(e),s;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(n.stack=VM.create(),s=this._leakageMon.check(n.stack,this._size+1)),this._listeners?this._listeners instanceof BI?(this._deliveryQueue??=new UM,this._listeners=[this._listeners,n]):this._listeners.push(n):(this._options?.onWillAddFirstListener?.(this),this._listeners=n,this._options?.onDidAddFirstListener?.(this)),this._options?.onDidAddListener?.(this),this._size++;let r=ne(()=>{s?.(),this._removeListener(n)});return ij(r,i),r},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let t=this._listeners,i=t.indexOf(e);if(i===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,t[i]=void 0;let n=this._deliveryQueue.current===this;if(this._size*HOe<=t.length){let s=0;for(let r=0;r0}},Zfe=()=>new UM,UM=class{constructor(){this.i=-1,this.end=0}enqueue(e,t,i){this.i=0,this.end=i,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},Ed=class extends N{constructor(e){super(e),this._isPaused=0,this._eventQueue=new In,this._mergeFn=e?.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){if(this._eventQueue.size>0){let e=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(e))}}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(e){this._size&&(this._isPaused!==0?this._eventQueue.push(e):super.fire(e))}},$M=class extends Ed{constructor(e){super(e),this._delay=e.delay??100}fire(e){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(e)}},ox=class extends N{constructor(e){super(e),this._queuedEvents=[],this._mergeFn=e?.merge}fire(e){this.hasListeners()&&(this._queuedEvents.push(e),this._queuedEvents.length===1&&queueMicrotask(()=>{this._mergeFn?super.fire(this._mergeFn(this._queuedEvents)):this._queuedEvents.forEach(t=>super.fire(t)),this._queuedEvents=[]}))}},qM=class{constructor(){this.hasListeners=!1,this.events=[],this.emitter=new N({onWillAddFirstListener:()=>this.onFirstListenerAdd(),onDidRemoveLastListener:()=>this.onLastListenerRemove()})}get event(){return this.emitter.event}add(e){let t={event:e,listener:null};return this.events.push(t),this.hasListeners&&this.hook(t),ne(Id(()=>{this.hasListeners&&this.unhook(t);let n=this.events.indexOf(t);this.events.splice(n,1)}))}onFirstListenerAdd(){this.hasListeners=!0,this.events.forEach(e=>this.hook(e))}onLastListenerRemove(){this.hasListeners=!1,this.events.forEach(e=>this.unhook(e))}hook(e){e.listener=e.event(t=>this.emitter.fire(t))}unhook(e){e.listener?.dispose(),e.listener=null}dispose(){this.emitter.dispose();for(let e of this.events)e.listener?.dispose();this.events=[]}},wh=class{constructor(){this.data=[]}wrapEvent(e,t,i){return(n,s,r)=>e(a=>{let l=this.data[this.data.length-1];if(!t){l?l.buffers.push(()=>n.call(s,a)):n.call(s,a);return}let c=l;if(!c){n.call(s,t(i,a));return}c.items??=[],c.items.push(a),c.buffers.length===0&&l.buffers.push(()=>{c.reducedResult??=i?c.items.reduce(t,i):c.items.reduce(t),n.call(s,c.reducedResult)})},void 0,r)}bufferEvents(e){let t={buffers:new Array};this.data.push(t);let i=e();return this.data.pop(),t.buffers.forEach(n=>n()),i}},w_=class{constructor(){this.listening=!1,this.inputEvent=Q.None,this.inputEventListener=T.None,this.emitter=new N({onDidAddFirstListener:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onDidRemoveLastListener:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(e){this.inputEvent=e,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=e(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}});var Ia,sx=x(()=>{ae();Ia=new class{constructor(){this._zoomLevel=0,this._onDidChangeZoomLevel=new N,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event}getZoomLevel(){return this._zoomLevel}setZoomLevel(o){o=Math.min(Math.max(-5,o),20),this._zoomLevel!==o&&(this._zoomLevel=o,this._onDidChangeZoomLevel.fire(this._zoomLevel))}}});var VOe,nj,C_,zOe,wm,oj,sj,UOe,$Oe,qOe,_r,Cm=x(()=>{rt();sx();VOe=Ye?1.5:1.35,nj=8,C_=class o{static _create(e,t,i,n,s,r,a,l,c){r===0?r=VOe*i:r{_s={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0,bracketPairColorizationOptions:{enabled:!0,independentColorPoolPerBracketType:!1}}});function jOe(o=""){let e="(-?\\d*\\.\\d\\w*)|([^";for(let t of rx)o.indexOf(t)>=0||(e+="\\"+t);return e+="\\s]+)",new RegExp(e,"g")}function VI(o){let e=HI;if(o&&o instanceof RegExp)if(o.global)e=o;else{let t="g";o.ignoreCase&&(t+="i"),o.multiline&&(t+="m"),o.unicode&&(t+="u"),e=new RegExp(o.source,t)}return e.lastIndex=0,e}function y_(o,e,t,i,n){if(e=VI(e),n||(n=ut.first(Xfe)),t.length>n.maxLen){let c=o-n.maxLen/2;return c<0?c=0:i+=c,t=t.substring(c,o+n.maxLen/2),y_(o,e,t,i,n)}let s=Date.now(),r=o-1-i,a=-1,l=null;for(let c=1;!(Date.now()-s>=n.timeBudget);c++){let d=r-n.windowSize*c;e.lastIndex=Math.max(0,d);let h=KOe(e,t,r,a);if(!h&&l||(l=h,d<=0))break;a=d}if(l){let c={word:l[0],startColumn:i+1+l.index,endColumn:i+1+l.index+l[0].length};return e.lastIndex=0,c}return null}function KOe(o,e,t,i){let n;for(;n=o.exec(e);){let s=n.index||0;if(s<=t&&o.lastIndex>=t)return n;if(i>0&&s>i)return null}return null}var rx,HI,Xfe,_w=x(()=>{oa();tc();rx="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";HI=jOe();Xfe=new In;Xfe.unshift({maxLen:1e3,windowSize:15,timeBudget:150})});function jM(o,e){if(typeof o!="object"||typeof e!="object"||!o||!e)return new S_(e,o!==e);if(Array.isArray(o)||Array.isArray(e)){let i=Array.isArray(o)&&Array.isArray(e)&&Bt(o,e);return new S_(e,!i)}let t=!1;for(let i in e)if(e.hasOwnProperty(i)){let n=jM(o[i],e[i]);n.didChange&&(o[i]=n.newValue,t=!0)}return new S_(o,t)}function We(o,e){return typeof o>"u"?e:o==="false"?!1:!!o}function mu(o,e,t,i){if(typeof o=="string"&&(o=parseInt(o,10)),typeof o!="number"||isNaN(o))return e;let n=o;return n=Math.max(t,n),n=Math.min(i,n),n|0}function ege(o,e,t,i){if(typeof o>"u")return e;let n=Sl.float(o,e);return Sl.clamp(n,t,i)}function dn(o,e,t,i){return typeof o!="string"?e:i&&o in i?i[o]:t.indexOf(o)===-1?e:o}function GOe(o){switch(o){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}function YOe(o){switch(o){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}function Qfe(o){switch(o){case"line":return rs.Line;case"block":return rs.Block;case"underline":return rs.Underline;case"line-thin":return rs.LineThin;case"block-outline":return rs.BlockOutline;case"underline-thin":return rs.UnderlineThin}}function ZOe(o){return o==="ctrlCmd"?Ye?"metaKey":"ctrlKey":"altKey"}function vw(o){let e=o.get(112);return e==="editable"?o.get(104):e!=="on"}function ww(o){return!o.get(172)}function Jfe(o,e){if(typeof o!="string")return e;switch(o){case"hidden":return 2;case"visible":return 3;default:return 1}}function ax(o,e,t){let i=t.indexOf(o);return i===-1?e:t[i]}function ge(o){return k_[o.id]=o,o}var gu,lx,zI,Tn,S_,bf,x_,kt,Pi,Sl,Ea,En,bw,rj,aj,rs,lj,cj,dj,nc,hj,uj,fj,gj,mj,pj,_j,bj,vj,UI,wj,yl,Cj,yj,Sj,xj,kj,Lj,Ij,Ej,Tj,Dj,Nj,Rj,Aj,Mj,Oj,ic,ja,Pj,Fj,Bj,Wj,Hj,Vj,zj,Uj,$j,qj,jj,k_,bs,Uo=x(()=>{qe();$a();rt();Cm();WI();_w();le();gu=8,lx=class{constructor(e){this._values=e}hasChanged(e){return this._values[e]}},zI=class{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}},Tn=class{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}applyUpdate(e,t){return jM(e,t)}compute(e,t,i){return i}},S_=class{constructor(e,t){this.newValue=e,this.didChange=t}};bf=class{constructor(e,t){this.schema=void 0,this.id=e,this.name="_never_",this.defaultValue=t}applyUpdate(e,t){return jM(e,t)}validate(e){return this.defaultValue}},x_=class{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}applyUpdate(e,t){return jM(e,t)}compute(e,t,i){return i}};kt=class extends x_{constructor(e,t,i,n=void 0){typeof n<"u"&&(n.type="boolean",n.default=i),super(e,t,i,n)}validate(e){return We(e,this.defaultValue)}};Pi=class o extends x_{static clampedInt(e,t,i,n){return mu(e,t,i,n)}constructor(e,t,i,n,s,r=void 0){typeof r<"u"&&(r.type="integer",r.default=i,r.minimum=n,r.maximum=s),super(e,t,i,r),this.minimum=n,this.maximum=s}validate(e){return o.clampedInt(e,this.defaultValue,this.minimum,this.maximum)}};Sl=class o extends x_{static clamp(e,t,i){return ei?i:e}static float(e,t){return typeof e=="string"&&(e=parseFloat(e)),typeof e!="number"||isNaN(e)?t:e}constructor(e,t,i,n,s,r,a){typeof s<"u"&&(s.type="number",s.default=i,s.minimum=r,s.maximum=a),super(e,t,i,s),this.validationFn=n,this.minimum=r,this.maximum=a}validate(e){return this.validationFn(o.float(e,this.defaultValue))}},Ea=class o extends x_{static string(e,t){return typeof e!="string"?t:e}constructor(e,t,i,n=void 0){typeof n<"u"&&(n.type="string",n.default=i),super(e,t,i,n)}validate(e){return o.string(e,this.defaultValue)}};En=class extends x_{constructor(e,t,i,n,s=void 0){typeof s<"u"&&(s.type="string",s.enum=n.slice(0),s.default=i),super(e,t,i,s),this._allowedValues=n}validate(e){return dn(e,this.defaultValue,this._allowedValues)}},bw=class extends Tn{constructor(e,t,i,n,s,r,a=void 0){typeof a<"u"&&(a.type="string",a.enum=s,a.default=n),super(e,t,i,a),this._allowedValues=s,this._convert=r}validate(e){return typeof e!="string"?this.defaultValue:this._allowedValues.indexOf(e)===-1?this.defaultValue:this._convert(e)}};rj=class extends Tn{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[m(220,"Use platform APIs to detect when a Screen Reader is attached."),m(221,"Optimize for usage with a Screen Reader."),m(222,"Assume a screen reader is not attached.")],default:"auto",tags:["accessibility"],description:m(223,"Controls if the UI should run in a mode where it is optimized for screen readers.")})}validate(e){switch(e){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(e,t,i){return i===0?e.accessibilitySupport:i}},aj=class extends Tn{constructor(){let e={insertSpace:!0,ignoreEmptyLines:!0};super(29,"comments",e,{"editor.comments.insertSpace":{type:"boolean",default:e.insertSpace,description:m(224,"Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:e.ignoreEmptyLines,description:m(225,"Controls if empty lines should be ignored with toggle, add or remove actions for line comments.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return{insertSpace:We(t.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:We(t.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}};(function(o){o[o.Line=1]="Line",o[o.Block=2]="Block",o[o.Underline=3]="Underline",o[o.LineThin=4]="LineThin",o[o.BlockOutline=5]="BlockOutline",o[o.UnderlineThin=6]="UnderlineThin"})(rs||(rs={}));lj=class extends bf{constructor(){super(162,"")}compute(e,t,i){let n=["monaco-editor"];return t.get(48)&&n.push(t.get(48)),e.extraEditorClassName&&n.push(e.extraEditorClassName),t.get(82)==="default"?n.push("mouse-default"):t.get(82)==="copy"&&n.push("mouse-copy"),t.get(127)&&n.push("showUnused"),t.get(157)&&n.push("showDeprecated"),n.join(" ")}},cj=class extends kt{constructor(){super(45,"emptySelectionClipboard",!0,{description:m(226,"Controls whether copying without a selection copies the current line.")})}compute(e,t,i){return i&&e.emptySelectionClipboard}},dj=class extends Tn{constructor(){let e={cursorMoveOnType:!0,findOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0,closeOnResult:!1,history:"workspace",replaceHistory:"workspace"};super(50,"find",e,{"editor.find.cursorMoveOnType":{type:"boolean",default:e.cursorMoveOnType,description:m(227,"Controls whether the cursor should jump to find matches while typing.")},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:e.seedSearchStringFromSelection,enumDescriptions:[m(228,"Never seed search string from the editor selection."),m(229,"Always seed search string from the editor selection, including word at cursor position."),m(230,"Only seed search string from the editor selection.")],description:m(231,"Controls whether the search string in the Find Widget is seeded from the editor selection.")},"editor.find.autoFindInSelection":{type:"string",enum:["never","always","multiline"],default:e.autoFindInSelection,enumDescriptions:[m(232,"Never turn on Find in Selection automatically (default)."),m(233,"Always turn on Find in Selection automatically."),m(234,"Turn on Find in Selection automatically when multiple lines of content are selected.")],description:m(235,"Controls the condition for turning on Find in Selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:e.globalFindClipboard,description:m(236,"Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:Ye},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:e.addExtraSpaceOnTop,description:m(237,"Controls whether the Find Widget should add extra lines on top of the editor. When true, you can scroll beyond the first line when the Find Widget is visible.")},"editor.find.loop":{type:"boolean",default:e.loop,description:m(238,"Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found.")},"editor.find.closeOnResult":{type:"boolean",default:e.closeOnResult,description:m(239,"Controls whether the Find Widget closes after an explicit find navigation command lands on a result.")},"editor.find.history":{type:"string",enum:["never","workspace"],default:"workspace",enumDescriptions:[m(240,"Do not store search history from the find widget."),m(241,"Store search history across the active workspace")],description:m(242,"Controls how the find widget history should be stored")},"editor.find.replaceHistory":{type:"string",enum:["never","workspace"],default:"workspace",enumDescriptions:[m(243,"Do not store history from the replace widget."),m(244,"Store replace history across the active workspace")],description:m(245,"Controls how the replace widget history should be stored")},"editor.find.findOnType":{type:"boolean",default:e.findOnType,description:m(246,"Controls whether the Find Widget should search as you type.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return{cursorMoveOnType:We(t.cursorMoveOnType,this.defaultValue.cursorMoveOnType),findOnType:We(t.findOnType,this.defaultValue.findOnType),seedSearchStringFromSelection:typeof t.seedSearchStringFromSelection=="boolean"?t.seedSearchStringFromSelection?"always":"never":dn(t.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:typeof t.autoFindInSelection=="boolean"?t.autoFindInSelection?"always":"never":dn(t.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:We(t.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:We(t.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:We(t.loop,this.defaultValue.loop),closeOnResult:We(t.closeOnResult,this.defaultValue.closeOnResult),history:dn(t.history,this.defaultValue.history,["never","workspace"]),replaceHistory:dn(t.replaceHistory,this.defaultValue.replaceHistory,["never","workspace"])}}},nc=class o extends Tn{static{this.OFF='"liga" off, "calt" off'}static{this.ON='"liga" on, "calt" on'}constructor(){super(60,"fontLigatures",o.OFF,{anyOf:[{type:"boolean",description:m(247,"Enables/Disables font ligatures ('calt' and 'liga' font features). Change this to a string for fine-grained control of the 'font-feature-settings' CSS property.")},{type:"string",description:m(248,"Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.")}],description:m(249,"Configures font ligatures or font features. Can be either a boolean to enable/disable ligatures or a string for the value of the CSS 'font-feature-settings' property."),default:!1})}validate(e){return typeof e>"u"?this.defaultValue:typeof e=="string"?e==="false"||e.length===0?o.OFF:e==="true"?o.ON:e:e?o.ON:o.OFF}},hj=class o extends Tn{static{this.OFF=oj}static{this.TRANSLATE=sj}constructor(){super(63,"fontVariations",o.OFF,{anyOf:[{type:"boolean",description:m(250,"Enables/Disables the translation from font-weight to font-variation-settings. Change this to a string for fine-grained control of the 'font-variation-settings' CSS property.")},{type:"string",description:m(251,"Explicit 'font-variation-settings' CSS property. A boolean can be passed instead if one only needs to translate font-weight to font-variation-settings.")}],description:m(252,"Configures font variations. Can be either a boolean to enable/disable the translation from font-weight to font-variation-settings or a string for the value of the CSS 'font-variation-settings' property."),default:!1})}validate(e){return typeof e>"u"?this.defaultValue:typeof e=="string"?e==="false"?o.OFF:e==="true"?o.TRANSLATE:e:e?o.TRANSLATE:o.OFF}compute(e,t,i){return e.fontInfo.fontVariationSettings}},uj=class extends bf{constructor(){super(59,new wm({pixelRatio:0,fontFamily:"",fontWeight:"",fontSize:0,fontFeatureSettings:"",fontVariationSettings:"",lineHeight:0,letterSpacing:0,isMonospace:!1,typicalHalfwidthCharacterWidth:0,typicalFullwidthCharacterWidth:0,canUseHalfwidthRightwardsArrow:!1,spaceWidth:0,middotWidth:0,wsmiddotWidth:0,maxDigitWidth:0},!1))}compute(e,t,i){return e.fontInfo}},fj=class extends bf{constructor(){super(161,rs.Line)}compute(e,t,i){return e.inputMode==="overtype"?t.get(92):t.get(34)}},gj=class extends bf{constructor(){super(170,!1)}compute(e,t){return e.editContextSupported&&t.get(44)}},mj=class extends bf{constructor(){super(172,!1)}compute(e,t){return e.accessibilitySupport===2?t.get(7):t.get(6)}},pj=class extends x_{constructor(){super(61,"fontSize",_r.fontSize,{type:"number",minimum:6,maximum:100,default:_r.fontSize,description:m(253,"Controls the font size in pixels.")})}validate(e){let t=Sl.float(e,this.defaultValue);return t===0?_r.fontSize:Sl.clamp(t,6,100)}compute(e,t,i){return e.fontInfo.fontSize}},_j=class o extends Tn{static{this.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"]}static{this.MINIMUM_VALUE=1}static{this.MAXIMUM_VALUE=1e3}constructor(){super(62,"fontWeight",_r.fontWeight,{anyOf:[{type:"number",minimum:o.MINIMUM_VALUE,maximum:o.MAXIMUM_VALUE,errorMessage:m(254,'Only "normal" and "bold" keywords or numbers between 1 and 1000 are allowed.')},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:o.SUGGESTION_VALUES}],default:_r.fontWeight,description:m(255,'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.')})}validate(e){return e==="normal"||e==="bold"?e:String(Pi.clampedInt(e,_r.fontWeight,o.MINIMUM_VALUE,o.MAXIMUM_VALUE))}},bj=class extends Tn{constructor(){let e={multiple:"peek",multipleDefinitions:"peek",multipleTypeDefinitions:"peek",multipleDeclarations:"peek",multipleImplementations:"peek",multipleReferences:"peek",multipleTests:"peek",alternativeDefinitionCommand:"editor.action.goToReferences",alternativeTypeDefinitionCommand:"editor.action.goToReferences",alternativeDeclarationCommand:"editor.action.goToReferences",alternativeImplementationCommand:"",alternativeReferenceCommand:"",alternativeTestsCommand:""},t={type:"string",enum:["peek","gotoAndPeek","goto"],default:e.multiple,enumDescriptions:[m(256,"Show Peek view of the results (default)"),m(257,"Go to the primary result and show a Peek view"),m(258,"Go to the primary result and enable Peek-less navigation to others")]},i=["","editor.action.referenceSearch.trigger","editor.action.goToReferences","editor.action.peekImplementation","editor.action.goToImplementation","editor.action.peekTypeDefinition","editor.action.goToTypeDefinition","editor.action.peekDeclaration","editor.action.revealDeclaration","editor.action.peekDefinition","editor.action.revealDefinitionAside","editor.action.revealDefinition"];super(67,"gotoLocation",e,{"editor.gotoLocation.multiple":{deprecationMessage:m(259,"This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead.")},"editor.gotoLocation.multipleDefinitions":{description:m(260,"Controls the behavior the 'Go to Definition'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleTypeDefinitions":{description:m(261,"Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleDeclarations":{description:m(262,"Controls the behavior the 'Go to Declaration'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleImplementations":{description:m(263,"Controls the behavior the 'Go to Implementations'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleReferences":{description:m(264,"Controls the behavior the 'Go to References'-command when multiple target locations exist."),...t},"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:e.alternativeDefinitionCommand,enum:i,description:m(265,"Alternative command id that is being executed when the result of 'Go to Definition' is the current location.")},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:e.alternativeTypeDefinitionCommand,enum:i,description:m(266,"Alternative command id that is being executed when the result of 'Go to Type Definition' is the current location.")},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:e.alternativeDeclarationCommand,enum:i,description:m(267,"Alternative command id that is being executed when the result of 'Go to Declaration' is the current location.")},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:e.alternativeImplementationCommand,enum:i,description:m(268,"Alternative command id that is being executed when the result of 'Go to Implementation' is the current location.")},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:e.alternativeReferenceCommand,enum:i,description:m(269,"Alternative command id that is being executed when the result of 'Go to Reference' is the current location.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return{multiple:dn(t.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:dn(t.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:dn(t.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:dn(t.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:dn(t.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:dn(t.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),multipleTests:dn(t.multipleTests,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:Ea.string(t.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:Ea.string(t.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:Ea.string(t.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:Ea.string(t.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:Ea.string(t.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand),alternativeTestsCommand:Ea.string(t.alternativeTestsCommand,this.defaultValue.alternativeTestsCommand)}}},vj=class extends Tn{constructor(){let e={enabled:"on",delay:300,hidingDelay:300,sticky:!0,above:!0,showLongLineWarning:!0};super(69,"hover",e,{"editor.hover.enabled":{type:"string",enum:["on","off","onKeyboardModifier"],default:e.enabled,markdownEnumDescriptions:[m(270,"Hover is enabled."),m(271,"Hover is disabled."),m(272,"Hover is shown when holding `{0}` or `Alt` (the opposite modifier of `#editor.multiCursorModifier#`)",Ye?"Command":"Control")],description:m(273,"Controls whether the hover is shown."),keywords:["hint","info","tooltip"]},"editor.hover.delay":{type:"number",default:e.delay,minimum:0,maximum:1e4,description:m(274,"Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:e.sticky,description:m(275,"Controls whether the hover should remain visible when mouse is moved over it.")},"editor.hover.hidingDelay":{type:"integer",minimum:0,default:e.hidingDelay,markdownDescription:m(276,"Controls the delay in milliseconds after which the hover is hidden. Requires `#editor.hover.sticky#` to be enabled.")},"editor.hover.above":{type:"boolean",default:e.above,description:m(277,"Prefer showing hovers above the line, if there's space.")},"editor.hover.showLongLineWarning":{type:"boolean",default:e.showLongLineWarning,description:m(278,"Controls whether long line warning hovers are shown, such as when tokenization is skipped or rendering is paused.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return{enabled:dn(t.enabled,this.defaultValue.enabled,["on","off","onKeyboardModifier"]),delay:Pi.clampedInt(t.delay,this.defaultValue.delay,0,1e4),sticky:We(t.sticky,this.defaultValue.sticky),hidingDelay:Pi.clampedInt(t.hidingDelay,this.defaultValue.hidingDelay,0,6e5),above:We(t.above,this.defaultValue.above),showLongLineWarning:We(t.showLongLineWarning,this.defaultValue.showLongLineWarning)}}},UI=class o extends bf{constructor(){super(165,{width:0,height:0,glyphMarginLeft:0,glyphMarginWidth:0,glyphMarginDecorationLaneCount:0,lineNumbersLeft:0,lineNumbersWidth:0,decorationsLeft:0,decorationsWidth:0,contentLeft:0,contentWidth:0,minimap:{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:0,minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:0},viewportColumn:0,isWordWrapMinified:!1,isViewportWrapping:!1,wrappingColumn:-1,verticalScrollbarWidth:0,horizontalScrollbarHeight:0,overviewRuler:{top:0,width:0,height:0,right:0}})}compute(e,t,i){return o.computeLayout(t,{memory:e.memory,outerWidth:e.outerWidth,outerHeight:e.outerHeight,isDominatedByLongLines:e.isDominatedByLongLines,lineHeight:e.fontInfo.lineHeight,viewLineCount:e.viewLineCount,lineNumbersDigitCount:e.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:e.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:e.fontInfo.maxDigitWidth,pixelRatio:e.pixelRatio,glyphMarginDecorationLaneCount:e.glyphMarginDecorationLaneCount})}static computeContainedMinimapLineCount(e){let t=e.height/e.lineHeight,i=Math.floor(e.paddingTop/e.lineHeight),n=Math.floor(e.paddingBottom/e.lineHeight);e.scrollBeyondLastLine&&(n=Math.max(n,t-1));let s=(i+e.viewLineCount+n)/(e.pixelRatio*e.height),r=Math.floor(e.viewLineCount/s);return{typicalViewportLineCount:t,extraLinesBeforeFirstLine:i,extraLinesBeyondLastLine:n,desiredRatio:s,minimapLineCount:r}}static _computeMinimapLayout(e,t){let i=e.outerWidth,n=e.outerHeight,s=e.pixelRatio;if(!e.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(s*n),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:n};let r=t.stableMinimapLayoutInput,a=r&&e.outerHeight===r.outerHeight&&e.lineHeight===r.lineHeight&&e.typicalHalfwidthCharacterWidth===r.typicalHalfwidthCharacterWidth&&e.pixelRatio===r.pixelRatio&&e.scrollBeyondLastLine===r.scrollBeyondLastLine&&e.paddingTop===r.paddingTop&&e.paddingBottom===r.paddingBottom&&e.minimap.enabled===r.minimap.enabled&&e.minimap.side===r.minimap.side&&e.minimap.size===r.minimap.size&&e.minimap.showSlider===r.minimap.showSlider&&e.minimap.renderCharacters===r.minimap.renderCharacters&&e.minimap.maxColumn===r.minimap.maxColumn&&e.minimap.scale===r.minimap.scale&&e.verticalScrollbarWidth===r.verticalScrollbarWidth&&e.isViewportWrapping===r.isViewportWrapping,l=e.lineHeight,c=e.typicalHalfwidthCharacterWidth,d=e.scrollBeyondLastLine,h=e.minimap.renderCharacters,u=s>=2?Math.round(e.minimap.scale*2):e.minimap.scale,f=e.minimap.maxColumn,g=e.minimap.size,p=e.minimap.side,_=e.verticalScrollbarWidth,b=e.viewLineCount,v=e.remainingWidth,w=e.isViewportWrapping,C=h?2:3,y=Math.floor(s*n),k=y/s,I=!1,E=!1,D=C*u,O=u/s,P=1;if(g==="fill"||g==="fit"){let{typicalViewportLineCount:he,extraLinesBeforeFirstLine:ce,extraLinesBeyondLastLine:Be,desiredRatio:Ge,minimapLineCount:tt}=o.computeContainedMinimapLineCount({viewLineCount:b,scrollBeyondLastLine:d,paddingTop:e.paddingTop,paddingBottom:e.paddingBottom,height:n,lineHeight:l,pixelRatio:s});if(b/tt>1)I=!0,E=!0,u=1,D=1,O=u/s;else{let mt=!1,Pt=u+1;if(g==="fit"){let ct=Math.ceil((ce+b+Be)*D);w&&a&&v<=t.stableFitRemainingWidth?(mt=!0,Pt=t.stableFitMaxMinimapScale):mt=ct>y}if(g==="fill"||mt){I=!0;let ct=u;D=Math.min(l*s,Math.max(1,Math.floor(1/Ge))),w&&a&&v<=t.stableFitRemainingWidth&&(Pt=t.stableFitMaxMinimapScale),u=Math.min(Pt,Math.max(1,Math.floor(D/C))),u>ct&&(P=Math.min(2,u/ct)),O=u/s/P,y=Math.ceil(Math.max(he,ce+b+Be)*D),w?(t.stableMinimapLayoutInput=e,t.stableFitRemainingWidth=v,t.stableFitMaxMinimapScale=u):(t.stableMinimapLayoutInput=null,t.stableFitRemainingWidth=0)}}}let H=Math.floor(f*O),z=Math.min(H,Math.max(0,Math.floor((v-_-2)*O/(c+O)))+gu),Y=Math.floor(s*z),Z=Y/s;Y=Math.floor(Y*P);let te=h?1:2,se=p==="left"?0:i-z-_;return{renderMinimap:te,minimapLeft:se,minimapWidth:z,minimapHeightIsEditorHeight:I,minimapIsSampling:E,minimapScale:u,minimapLineHeight:D,minimapCanvasInnerWidth:Y,minimapCanvasInnerHeight:y,minimapCanvasOuterWidth:Z,minimapCanvasOuterHeight:k}}static computeLayout(e,t){let i=t.outerWidth|0,n=t.outerHeight|0,s=t.lineHeight|0,r=t.lineNumbersDigitCount|0,a=t.typicalHalfwidthCharacterWidth,l=t.maxDigitWidth,c=t.pixelRatio,d=t.viewLineCount,h=e.get(154),u=h==="inherit"?e.get(153):h,f=u==="inherit"?e.get(149):u,g=e.get(152),p=t.isDominatedByLongLines,_=e.get(66),b=e.get(76).renderType!==0,v=e.get(77),w=e.get(119),C=e.get(96),y=e.get(81),k=e.get(117),I=k.verticalScrollbarSize,E=k.verticalHasArrows,D=k.arrowSize,O=k.horizontalScrollbarSize,P=e.get(52),H=e.get(126)!=="never",z=e.get(74);P&&H&&(z+=16);let Y=0;if(b){let di=Math.max(r,v);Y=Math.round(di*l)}let Z=0;_&&(Z=s*t.glyphMarginDecorationLaneCount);let te=0,se=te+Z,he=se+Y,ce=he+z,Be=i-Z-Y-z,Ge=!1,tt=!1,Nt=-1;e.get(2)===2&&u==="inherit"&&p?(Ge=!0,tt=!0):f==="on"||f==="bounded"?tt=!0:f==="wordWrapColumn"&&(Nt=g);let mt=o._computeMinimapLayout({outerWidth:i,outerHeight:n,lineHeight:s,typicalHalfwidthCharacterWidth:a,pixelRatio:c,scrollBeyondLastLine:w,paddingTop:C.top,paddingBottom:C.bottom,minimap:y,verticalScrollbarWidth:I,viewLineCount:d,remainingWidth:Be,isViewportWrapping:tt},t.memory||new zI);mt.renderMinimap!==0&&mt.minimapLeft===0&&(te+=mt.minimapWidth,se+=mt.minimapWidth,he+=mt.minimapWidth,ce+=mt.minimapWidth);let Pt=Be-mt.minimapWidth,ct=Math.max(1,Math.floor((Pt-I-2)/a)),Fn=E?D:0;return tt&&(Nt=Math.max(1,ct),f==="bounded"&&(Nt=Math.min(Nt,g))),{width:i,height:n,glyphMarginLeft:te,glyphMarginWidth:Z,glyphMarginDecorationLaneCount:t.glyphMarginDecorationLaneCount,lineNumbersLeft:se,lineNumbersWidth:Y,decorationsLeft:he,decorationsWidth:z,contentLeft:ce,contentWidth:Pt,minimap:mt,viewportColumn:ct,isWordWrapMinified:Ge,isViewportWrapping:tt,wrappingColumn:Nt,verticalScrollbarWidth:I,horizontalScrollbarHeight:O,overviewRuler:{top:Fn,width:I,height:n-2*Fn,right:0}}}},wj=class extends Tn{constructor(){super(156,"wrappingStrategy","simple",{"editor.wrappingStrategy":{enumDescriptions:[m(279,"Assumes that all characters are of the same width. This is a fast algorithm that works correctly for monospace fonts and certain scripts (like Latin characters) where glyphs are of equal width."),m(280,"Delegates wrapping points computation to the browser. This is a slow algorithm, that might cause freezes for large files, but it works correctly in all cases.")],type:"string",enum:["simple","advanced"],default:"simple",description:m(281,"Controls the algorithm that computes wrapping points. Note that when in accessibility mode, advanced will be used for the best experience.")}})}validate(e){return dn(e,"simple",["simple","advanced"])}compute(e,t,i){return t.get(2)===2?"advanced":i}};(function(o){o.Off="off",o.OnCode="onCode",o.On="on"})(yl||(yl={}));Cj=class extends Tn{constructor(){let e={enabled:yl.OnCode};super(73,"lightbulb",e,{"editor.lightbulb.enabled":{type:"string",enum:[yl.Off,yl.OnCode,yl.On],default:e.enabled,enumDescriptions:[m(282,"Disable the code action menu."),m(283,"Show the code action menu when the cursor is on lines with code."),m(284,"Show the code action menu when the cursor is on lines with code or on empty lines.")],description:m(285,"Enables the Code Action lightbulb in the editor.")}})}validate(e){return!e||typeof e!="object"?this.defaultValue:{enabled:dn(e.enabled,this.defaultValue.enabled,[yl.Off,yl.OnCode,yl.On])}}},yj=class extends Tn{constructor(){let e={enabled:!0,maxLineCount:5,defaultModel:"outlineModel",scrollWithEditor:!0};super(131,"stickyScroll",e,{"editor.stickyScroll.enabled":{type:"boolean",default:e.enabled,description:m(286,"Shows the nested current scopes during the scroll at the top of the editor.")},"editor.stickyScroll.maxLineCount":{type:"number",default:e.maxLineCount,minimum:1,maximum:20,description:m(287,"Defines the maximum number of sticky lines to show.")},"editor.stickyScroll.defaultModel":{type:"string",enum:["outlineModel","foldingProviderModel","indentationModel"],default:e.defaultModel,description:m(288,"Defines the model to use for determining which lines to stick. If the outline model does not exist, it will fall back on the folding provider model which falls back on the indentation model. This order is respected in all three cases.")},"editor.stickyScroll.scrollWithEditor":{type:"boolean",default:e.scrollWithEditor,description:m(289,"Enable scrolling of Sticky Scroll with the editor's horizontal scrollbar.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return{enabled:We(t.enabled,this.defaultValue.enabled),maxLineCount:Pi.clampedInt(t.maxLineCount,this.defaultValue.maxLineCount,1,20),defaultModel:dn(t.defaultModel,this.defaultValue.defaultModel,["outlineModel","foldingProviderModel","indentationModel"]),scrollWithEditor:We(t.scrollWithEditor,this.defaultValue.scrollWithEditor)}}},Sj=class extends Tn{constructor(){let e={enabled:"on",fontSize:0,fontFamily:"",padding:!1,maximumLength:43};super(159,"inlayHints",e,{"editor.inlayHints.enabled":{type:"string",default:e.enabled,description:m(290,"Enables the inlay hints in the editor."),enum:["on","onUnlessPressed","offUnlessPressed","off"],markdownEnumDescriptions:[m(291,"Inlay hints are enabled"),m(292,"Inlay hints are showing by default and hide when holding {0}",Ye?"Ctrl+Option":"Ctrl+Alt"),m(293,"Inlay hints are hidden by default and show when holding {0}",Ye?"Ctrl+Option":"Ctrl+Alt"),m(294,"Inlay hints are disabled")]},"editor.inlayHints.fontSize":{type:"number",default:e.fontSize,markdownDescription:m(295,"Controls font size of inlay hints in the editor. As default the {0} is used when the configured value is less than {1} or greater than the editor font size.","`#editor.fontSize#`","`5`")},"editor.inlayHints.fontFamily":{type:"string",default:e.fontFamily,markdownDescription:m(296,"Controls font family of inlay hints in the editor. When set to empty, the {0} is used.","`#editor.fontFamily#`")},"editor.inlayHints.padding":{type:"boolean",default:e.padding,description:m(297,"Enables the padding around the inlay hints in the editor.")},"editor.inlayHints.maximumLength":{type:"number",default:e.maximumLength,markdownDescription:m(298,"Maximum overall length of inlay hints, for a single line, before they get truncated by the editor. Set to `0` to never truncate")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;let t=e;return typeof t.enabled=="boolean"&&(t.enabled=t.enabled?"on":"off"),{enabled:dn(t.enabled,this.defaultValue.enabled,["on","off","offUnlessPressed","onUnlessPressed"]),fontSize:Pi.clampedInt(t.fontSize,this.defaultValue.fontSize,0,100),fontFamily:Ea.string(t.fontFamily,this.defaultValue.fontFamily),padding:We(t.padding,this.defaultValue.padding),maximumLength:Pi.clampedInt(t.maximumLength,this.defaultValue.maximumLength,0,Number.MAX_SAFE_INTEGER)}}},xj=class extends Tn{constructor(){super(74,"lineDecorationsWidth",10)}validate(e){return typeof e=="string"&&/^\d+(\.\d+)?ch$/.test(e)?-parseFloat(e.substring(0,e.length-2)):Pi.clampedInt(e,this.defaultValue,0,1e3)}compute(e,t,i){return i<0?Pi.clampedInt(-i*e.fontInfo.typicalHalfwidthCharacterWidth,this.defaultValue,0,1e3):i}},kj=class extends Sl{constructor(){super(75,"lineHeight",_r.lineHeight,e=>Sl.clamp(e,0,150),{markdownDescription:m(299,`Controls the line height. + - Use 0 to automatically compute the line height from the font size. + - Values between 0 and 8 will be used as a multiplier with the font size. + - Values greater than or equal to 8 will be used as effective values.`)},0,150)}compute(e,t,i){return e.fontInfo.lineHeight}},Lj=class extends Tn{constructor(){let e={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",autohide:"none",renderCharacters:!0,maxColumn:120,scale:1,showRegionSectionHeaders:!0,showMarkSectionHeaders:!0,markSectionHeaderRegex:"\\bMARK:\\s*(?-?)\\s*(?
");let g=null;return d&&p1&&X4e&&r.isBasicASCII&&u.isLTR&&a.useMonospaceOptimizations&&f.containsForeignElements===0&&(g=new m1(this._renderedViewLine?this._renderedViewLine.domNode:null,u,f.characterMapping)),g||(g=Mve(this._renderedViewLine?this._renderedViewLine.domNode:null,u,f.characterMapping,f.containsForeignElements)),this._renderedViewLine=g,!0}layoutLine(e,t,i){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(t),this._renderedViewLine.domNode.setHeight(i),this._renderedViewLine.domNode.setLineHeight(i))}isRenderedRTL(){return this._renderedViewLine?this._renderedViewLine.input.textDirection===Fs.RTL:!1}getWidth(e){return this._renderedViewLine?this._renderedViewLine.getWidth(e):0}getWidthIsFast(){return this._renderedViewLine?this._renderedViewLine.getWidthIsFast():!0}needsMonospaceFontCheck(){return this._renderedViewLine?this._renderedViewLine instanceof m1:!1}monospaceAssumptionsAreValid(){return this._renderedViewLine&&this._renderedViewLine instanceof m1?this._renderedViewLine.monospaceAssumptionsAreValid():p1}onMonospaceAssumptionsInvalidated(){this._renderedViewLine&&this._renderedViewLine instanceof m1&&(this._renderedViewLine=this._renderedViewLine.toSlowRenderedLine())}getVisibleRangesForRange(e,t,i,n){if(!this._renderedViewLine)return null;t=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,t)),i=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,i));let s=this._renderedViewLine.input.stopRenderingLineAfter;if(s!==-1&&t>s+1&&i>s+1)return new yC(!0,[new Kd(this.getWidth(n),0)]);s!==-1&&t>s+1&&(t=s+1),s!==-1&&i>s+1&&(i=s+1);let r=this._renderedViewLine.getVisibleRangesForRange(e,t,i,n);return r&&r.length>0?new yC(!1,r):null}getColumnOfNodeOffset(e,t){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(e,t):1}resetCachedWidth(){this._renderedViewLine?.resetCachedWidth()}},m1=class{constructor(e,t,i){this._cachedWidth=-1,this.domNode=e,this.input=t;let n=Math.floor(t.lineContent.length/300);if(n>0){this._keyColumnPixelOffsetCache=new Float32Array(n);for(let s=0;s=2&&(console.warn("monospace assumptions have been violated, therefore disabling monospace optimizations!"),p1=!1)}return p1}toSlowRenderedLine(){return Mve(this.domNode,this.input,this._characterMapping,0)}getVisibleRangesForRange(e,t,i,n){let s=this._getColumnPixelOffset(e,t,n),r=this._getColumnPixelOffset(e,i,n);return[new Kd(s,r-s)]}_getColumnPixelOffset(e,t,i){if(t<=300){let c=this._characterMapping.getHorizontalOffset(t);return this._charWidth*c}let n=Math.floor((t-1)/300)-1,s=(n+1)*300+1,r=-1;if(this._keyColumnPixelOffsetCache&&(r=this._keyColumnPixelOffsetCache[n],r===-1&&(r=this._actualReadPixelOffset(e,s,i),this._keyColumnPixelOffsetCache[n]=r)),r===-1){let c=this._characterMapping.getHorizontalOffset(t);return this._charWidth*c}let a=this._characterMapping.getHorizontalOffset(s),l=this._characterMapping.getHorizontalOffset(t);return r+this._charWidth*(l-a)}_getReadingTarget(e){return e.domNode.firstChild}_actualReadPixelOffset(e,t,i){if(!this.domNode)return-1;let n=this._characterMapping.getDomPosition(t),s=xC.readHorizontalRanges(this._getReadingTarget(this.domNode),n.partIndex,n.charIndex,n.partIndex,n.charIndex,i);return!s||s.length===0?-1:s[0].left}getColumnOfNodeOffset(e,t){return ip(this._characterMapping,e,t)}},$F=class{constructor(e,t,i,n){if(this.domNode=e,this.input=t,this._characterMapping=i,this._isWhitespaceOnly=/^\s*$/.test(t.lineContent),this._containsForeignElements=n,this._cachedWidth=-1,this._pixelOffsetCache=null,t.isLTR){this._pixelOffsetCache=new Float32Array(Math.max(2,this._characterMapping.length+1));for(let s=0,r=this._characterMapping.length;s<=r;s++)this._pixelOffsetCache[s]=-1}}_getReadingTarget(e){return e.domNode.firstChild}getWidth(e){return this.domNode?(this._cachedWidth===-1&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth,e?.markDidDomLayout()),this._cachedWidth):0}getWidthIsFast(){return this._cachedWidth!==-1}resetCachedWidth(){if(this._cachedWidth=-1,this._pixelOffsetCache!==null)for(let e=0,t=this._pixelOffsetCache.length;e{He();mi=class o{static _nextVisibleColumn(e,t,i){return e===9?o.nextRenderTabStop(t,i):ac(e)||JI(e)?t+2:t+1}static visibleColumnFromColumn(e,t,i){let n=Math.min(t-1,e.length),s=e.substring(0,n),r=new Iw(s),a=0;for(;!r.eol();){let l=px(s,n,r.offset);r.nextGraphemeLength(),a=this._nextVisibleColumn(l,a,i)}return a}static columnFromVisibleColumn(e,t,i){if(t<=0)return 1;let n=e.length,s=new Iw(e),r=0,a=1;for(;!s.eol();){let l=px(e,n,s.offset);s.nextGraphemeLength();let c=this._nextVisibleColumn(l,r,i),d=s.offset+1;if(c>=t){let h=t-r;return c-t{Fl();LC=class o{static whitespaceVisibleColumn(e,t,i){let n=e.length,s=0,r=-1,a=-1;for(let l=0;ls.left+s.width)b=p.length;else{let w=yZ.getInstance();for(let C=0;C{kb();Dr();_1();Pe();ue();Fl();re();vZ();ho();vu();Kf=class{constructor(e=null){this.hitTarget=e,this.type=0}},qF=class{get hitTarget(){return this.spanNode}constructor(e,t,i){this.position=e,this.spanNode=t,this.injectedText=i,this.type=1}};(function(o){function e(t,i,n){let s=t.getPositionFromDOMInfo(i,n);return s?new qF(s,i,null):new Kf(i)}o.createFromDOMInfo=e})(EC||(EC={}));jF=class{constructor(e,t){this.lastViewCursorsRenderData=e,this.lastTextareaPosition=t}},xs=class{static _deduceRage(e,t=null){return!t&&e?new S(e.lineNumber,e.column,e.lineNumber,e.column):t??null}static createUnknown(e,t,i){return{type:0,element:e,mouseColumn:t,position:i,range:this._deduceRage(i)}}static createTextarea(e,t){return{type:1,element:e,mouseColumn:t,position:null,range:null}}static createMargin(e,t,i,n,s,r){return{type:e,element:t,mouseColumn:i,position:n,range:s,detail:r}}static createViewZone(e,t,i,n,s){return{type:e,element:t,mouseColumn:i,position:n,range:this._deduceRage(n),detail:s}}static createContentText(e,t,i,n,s){return{type:6,element:e,mouseColumn:t,position:i,range:this._deduceRage(i,n),detail:s}}static createContentEmpty(e,t,i,n){return{type:7,element:e,mouseColumn:t,position:i,range:this._deduceRage(i),detail:n}}static createContentWidget(e,t,i){return{type:9,element:e,mouseColumn:t,position:null,range:null,detail:i}}static createScrollbar(e,t,i){return{type:11,element:e,mouseColumn:t,position:i,range:this._deduceRage(i)}}static createOverlayWidget(e,t,i){return{type:12,element:e,mouseColumn:t,position:null,range:null,detail:i}}static createOutsideEditor(e,t,i,n){return{type:13,element:null,mouseColumn:e,position:t,range:this._deduceRage(t),outsidePosition:i,outsideDistance:n}}static _typeToString(e){return e===1?"TEXTAREA":e===2?"GUTTER_GLYPH_MARGIN":e===3?"GUTTER_LINE_NUMBERS":e===4?"GUTTER_LINE_DECORATIONS":e===5?"GUTTER_VIEW_ZONE":e===6?"CONTENT_TEXT":e===7?"CONTENT_EMPTY":e===8?"CONTENT_VIEW_ZONE":e===9?"CONTENT_WIDGET":e===10?"OVERVIEW_RULER":e===11?"SCROLLBAR":e===12?"OVERLAY_WIDGET":"UNKNOWN"}static toString(e){return this._typeToString(e.type)+": "+e.position+" - "+e.range+" - "+JSON.stringify(e.detail)}},ma=class{static isTextArea(e){return e.length===2&&e[0]===3&&e[1]===7}static isChildOfViewLines(e){return e.length>=4&&e[0]===3&&e[3]===8}static isStrictChildOfViewLines(e){return e.length>4&&e[0]===3&&e[3]===8}static isChildOfScrollableElement(e){return e.length>=2&&e[0]===3&&e[1]===6}static isChildOfMinimap(e){return e.length>=2&&e[0]===3&&e[1]===9}static isChildOfContentWidgets(e){return e.length>=4&&e[0]===3&&e[3]===1}static isChildOfOverflowGuard(e){return e.length>=1&&e[0]===3}static isChildOfOverflowingContentWidgets(e){return e.length>=1&&e[0]===2}static isChildOfOverlayWidgets(e){return e.length>=2&&e[0]===3&&e[1]===4}static isChildOfOverflowingOverlayWidgets(e){return e.length>=1&&e[0]===5}},b1=class o{constructor(e,t,i){this.viewModel=e.viewModel;let n=e.configuration.options;this.layoutInfo=n.get(165),this.viewDomNode=t.viewDomNode,this.viewLinesGpu=t.viewLinesGpu,this.lineHeight=n.get(75),this.stickyTabStops=n.get(132),this.typicalHalfwidthCharacterWidth=n.get(59).typicalHalfwidthCharacterWidth,this.lastRenderData=i,this._context=e,this._viewHelper=t}getZoneAtCoord(e){return o.getZoneAtCoord(this._context,e)}static getZoneAtCoord(e,t){let i=e.viewLayout.getWhitespaceAtVerticalOffset(t);if(i){let n=i.verticalOffset+i.height/2,s=e.viewModel.getLineCount(),r=null,a,l=null;return i.afterLineNumber!==s&&(l=new M(i.afterLineNumber+1,1)),i.afterLineNumber>0&&(r=new M(i.afterLineNumber,e.viewModel.getLineMaxColumn(i.afterLineNumber))),l===null?a=r:r===null?a=l:t=e.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,v1._getMouseColumn(this.mouseContentHorizontalOffset,e.typicalHalfwidthCharacterWidth))}},CZ=class extends wZ{get target(){return this._useHitTestTarget?this.hitTestResult.value.hitTarget:this._eventTarget}get targetPath(){return this._targetPathCacheElement!==this.target&&(this._targetPathCacheElement=this.target,this._targetPathCacheValue=Tr.collect(this.target,this._ctx.viewDomNode)),this._targetPathCacheValue}constructor(e,t,i,n,s){super(e,t,i,n),this.hitTestResult=new _o(()=>v1.doHitTest(this._ctx,this)),this._targetPathCacheElement=null,this._targetPathCacheValue=new Uint8Array(0),this._ctx=e,this._eventTarget=s;let r=!!this._eventTarget;this._useHitTestTarget=!r}toString(){return`pos(${this.pos.x},${this.pos.y}), editorPos(${this.editorPos.x},${this.editorPos.y}), relativePos(${this.relativePos.x},${this.relativePos.y}), mouseVerticalOffset: ${this.mouseVerticalOffset}, mouseContentHorizontalOffset: ${this.mouseContentHorizontalOffset} + target: ${this.target?this.target.outerHTML:null}`}get wouldBenefitFromHitTestTargetSwitch(){return!this._useHitTestTarget&&this.hitTestResult.value.hitTarget!==null&&this.target!==this.hitTestResult.value.hitTarget}switchToHitTestTarget(){this._useHitTestTarget=!0}_getMouseColumn(e=null){return e&&e.columnr.contentLeft+r.width)continue;let a=e.getVerticalOffsetForLineNumber(r.position.lineNumber);if(a<=s&&s<=a+r.height)return t.fulfillContentText(r.position,null,{mightBeForeignElement:!1,injectedText:null})}}return null}static _hitTestViewZone(e,t){let i=e.getZoneAtCoord(t.mouseVerticalOffset);if(i){let n=t.isInContentArea?8:5;return t.fulfillViewZone(n,i.position,i)}return null}static _hitTestTextArea(e,t){return ma.isTextArea(t.targetPath)?e.lastRenderData.lastTextareaPosition?t.fulfillContentText(e.lastRenderData.lastTextareaPosition,null,{mightBeForeignElement:!1,injectedText:null}):t.fulfillTextarea():null}static _hitTestMargin(e,t){if(t.isInMarginArea){let i=e.getFullLineRangeAtCoord(t.mouseVerticalOffset),n=i.range.getStartPosition(),s=Math.abs(t.relativePos.x),r={isAfterLines:i.isAfterLines,glyphMarginLeft:e.layoutInfo.glyphMarginLeft,glyphMarginWidth:e.layoutInfo.glyphMarginWidth,lineNumbersWidth:e.layoutInfo.lineNumbersWidth,offsetX:s};if(s-=e.layoutInfo.glyphMarginLeft,s<=e.layoutInfo.glyphMarginWidth){let a=e.viewModel.coordinatesConverter.convertViewPositionToModelPosition(i.range.getStartPosition()),l=e.viewModel.glyphLanes.getLanesAtLine(a.lineNumber);return r.glyphMarginLane=l[Math.floor(s/e.lineHeight)],t.fulfillMargin(2,n,i.range,r)}return s-=e.layoutInfo.glyphMarginWidth,s<=e.layoutInfo.lineNumbersWidth?t.fulfillMargin(3,n,i.range,r):(s-=e.layoutInfo.lineNumbersWidth,t.fulfillMargin(4,n,i.range,r))}return null}static _hitTestViewLines(e,t){if(!ma.isChildOfViewLines(t.targetPath))return null;if(e.isInTopPadding(t.mouseVerticalOffset))return t.fulfillContentEmpty(new M(1,1),Ove);if(e.isAfterLines(t.mouseVerticalOffset)||e.isInBottomPadding(t.mouseVerticalOffset)){let n=e.viewModel.getLineCount(),s=e.viewModel.getLineMaxColumn(n);return t.fulfillContentEmpty(new M(n,s),Ove)}if(ma.isStrictChildOfViewLines(t.targetPath)){let n=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),s=e.viewModel.getLineLength(n),r=e.getLineWidth(n);if(s===0){let l=IC(t.mouseContentHorizontalOffset-r);return t.fulfillContentEmpty(new M(n,1),l)}if(e.isRtl(n)){if(t.mouseContentHorizontalOffset+r<=e.layoutInfo.contentWidth-e.layoutInfo.verticalScrollbarWidth){let l=IC(t.mouseContentHorizontalOffset-r),c=new M(n,e.viewModel.getLineMaxColumn(n));return t.fulfillContentEmpty(c,l)}}else if(t.mouseContentHorizontalOffset>=r){let l=IC(t.mouseContentHorizontalOffset-r),c=new M(n,e.viewModel.getLineMaxColumn(n));return t.fulfillContentEmpty(c,l)}}else if(e.viewLinesGpu){let n=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset);if(e.viewModel.getLineLength(n)===0){let l=e.getLineWidth(n),c=IC(t.mouseContentHorizontalOffset-l);return t.fulfillContentEmpty(new M(n,1),c)}let s=e.getLineWidth(n);if(e.isRtl(n)){if(t.mouseContentHorizontalOffset+s<=e.layoutInfo.contentWidth-e.layoutInfo.verticalScrollbarWidth){let l=IC(t.mouseContentHorizontalOffset-s),c=new M(n,e.viewModel.getLineMaxColumn(n));return t.fulfillContentEmpty(c,l)}}else if(t.mouseContentHorizontalOffset>=s){let l=IC(t.mouseContentHorizontalOffset-s),c=new M(n,e.viewModel.getLineMaxColumn(n));return t.fulfillContentEmpty(c,l)}let a=e.viewLinesGpu.getPositionAtCoordinate(n,t.mouseContentHorizontalOffset);if(a){let l={injectedText:null,mightBeForeignElement:!1};return t.fulfillContentText(a,S.fromPositions(a,a),l)}}let i=t.hitTestResult.value;return i.type===1?o.createMouseTargetFromHitTestPosition(e,t,i.spanNode,i.position,i.injectedText):t.wouldBenefitFromHitTestTargetSwitch?(t.switchToHitTestTarget(),this._createMouseTarget(e,t)):t.fulfillUnknown()}static _hitTestMinimap(e,t){if(ma.isChildOfMinimap(t.targetPath)){let i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.viewModel.getLineMaxColumn(i);return t.fulfillScrollbar(new M(i,n))}return null}static _hitTestScrollbarSlider(e,t){if(ma.isChildOfScrollableElement(t.targetPath)&&t.target&&t.target.nodeType===1){let i=t.target.className;if(i&&/\b(slider|scrollbar)\b/.test(i)){let n=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),s=e.viewModel.getLineMaxColumn(n);return t.fulfillScrollbar(new M(n,s))}}return null}static _hitTestScrollbar(e,t){if(ma.isChildOfScrollableElement(t.targetPath)){let i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.viewModel.getLineMaxColumn(i);return t.fulfillScrollbar(new M(i,n))}return null}getMouseColumn(e){let t=this._context.configuration.options,i=t.get(165),n=this._context.viewLayout.getCurrentScrollLeft()+e.x-i.contentLeft;return o._getMouseColumn(n,t.get(59).typicalHalfwidthCharacterWidth)}static _getMouseColumn(e,t){return e<0?1:Math.round(e/t)+1}static createMouseTargetFromHitTestPosition(e,t,i,n,s){let r=n.lineNumber,a=n.column,l=e.getLineWidth(r);if(t.mouseContentHorizontalOffset>l){let b=IC(t.mouseContentHorizontalOffset-l);return t.fulfillContentEmpty(n,b)}let c=e.visibleRangeForPosition(r,a);if(!c)return t.fulfillUnknown(n);let d=c.left;if(Math.abs(t.mouseContentHorizontalOffset-d)<1)return t.fulfillContentText(n,null,{mightBeForeignElement:!!s,injectedText:s});let h=[];if(h.push({offset:c.left,column:a}),a>1){let b=e.visibleRangeForPosition(r,a-1);b&&h.push({offset:b.left,column:a-1})}let u=e.viewModel.getLineMaxColumn(r);if(ab.offset-v.offset);let f=t.pos.toClientCoordinates(we(e.viewDomNode)),g=i.getBoundingClientRect(),p=g.left<=f.clientX&&f.clientX<=g.right,_=null;for(let b=1;bs)){let a=Math.floor((n+s)/2),l=t.pos.y+(a-t.mouseVerticalOffset);l<=t.editorPos.y&&(l=t.editorPos.y+1),l>=t.editorPos.y+t.editorPos.height&&(l=t.editorPos.y+t.editorPos.height-1);let c=new tp(t.pos.x,l),d=this._actualDoHitTestWithCaretRangeFromPoint(e,c.toClientCoordinates(we(e.viewDomNode)));if(d.type===1)return d}return this._actualDoHitTestWithCaretRangeFromPoint(e,t.pos.toClientCoordinates(we(e.viewDomNode)))}static _actualDoHitTestWithCaretRangeFromPoint(e,t){let i=Wd(e.viewDomNode),n;if(i?typeof i.caretRangeFromPoint>"u"?n=e5e(i,t.clientX,t.clientY):n=i.caretRangeFromPoint(t.clientX,t.clientY):n=e.viewDomNode.ownerDocument.caretRangeFromPoint(t.clientX,t.clientY),!n||!n.startContainer)return new Kf;let s=n.startContainer;if(s.nodeType===s.TEXT_NODE){let r=s.parentNode,a=r?r.parentNode:null,l=a?a.parentNode:null;return(l&&l.nodeType===l.ELEMENT_NODE?l.className:null)===Fu.CLASS_NAME?EC.createFromDOMInfo(e,r,n.startOffset):new Kf(s.parentNode)}else if(s.nodeType===s.ELEMENT_NODE){let r=s.parentNode,a=r?r.parentNode:null;return(a&&a.nodeType===a.ELEMENT_NODE?a.className:null)===Fu.CLASS_NAME?EC.createFromDOMInfo(e,s,s.textContent.length):new Kf(s)}return new Kf}static _doHitTestWithCaretPositionFromPoint(e,t){let i=e.viewDomNode.ownerDocument.caretPositionFromPoint(t.clientX,t.clientY);if(i.offsetNode.nodeType===i.offsetNode.TEXT_NODE){let n=i.offsetNode.parentNode,s=n?n.parentNode:null,r=s?s.parentNode:null;return(r&&r.nodeType===r.ELEMENT_NODE?r.className:null)===Fu.CLASS_NAME?EC.createFromDOMInfo(e,i.offsetNode.parentNode,i.offset):new Kf(i.offsetNode.parentNode)}if(i.offsetNode.nodeType===i.offsetNode.ELEMENT_NODE){let n=i.offsetNode.parentNode,s=n&&n.nodeType===n.ELEMENT_NODE?n.className:null,r=n?n.parentNode:null,a=r&&r.nodeType===r.ELEMENT_NODE?r.className:null;if(s===Fu.CLASS_NAME){let l=i.offsetNode.childNodes[Math.min(i.offset,i.offsetNode.childNodes.length-1)];if(l)return EC.createFromDOMInfo(e,l,0)}else if(a===Fu.CLASS_NAME)return EC.createFromDOMInfo(e,i.offsetNode,0)}return new Kf(i.offsetNode)}static _snapToSoftTabBoundary(e,t){let i=t.getLineContent(e.lineNumber),{tabSize:n}=t.model.getOptions(),s=LC.atomicPosition(i,e.column-1,n,2);return s!==-1?new M(e.lineNumber,s+1):e}static doHitTest(e,t){let i=new Kf;if(typeof e.viewDomNode.ownerDocument.caretRangeFromPoint=="function"?i=this._doHitTestWithCaretRangeFromPoint(e,t):e.viewDomNode.ownerDocument.caretPositionFromPoint&&(i=this._doHitTestWithCaretPositionFromPoint(e,t.pos.toClientCoordinates(we(e.viewDomNode)))),i.type===1){let n=e.viewModel.getInjectedTextAt(i.position),s=e.viewModel.normalizePosition(i.position,2);(n||!s.equals(i.position))&&(i=new qF(s,i.spanNode,n))}return i}};yZ=class o{static{this._INSTANCE=null}static getInstance(){return o._INSTANCE||(o._INSTANCE=new o),o._INSTANCE}constructor(){this._cache={},this._canvas=document.createElement("canvas")}getCharWidth(e,t){let i=e+t;if(this._cache[i])return this._cache[i];let n=this._canvas.getContext("2d");n.font=t;let r=n.measureText(e).width;return this._cache[i]=r,r}}});function _n(o,e,t){let i=null,n=null;if(typeof t.value=="function"?(i="value",n=t.value,n.length!==0&&console.warn("Memoize should only be used in functions with zero parameters")):typeof t.get=="function"&&(i="get",n=t.get),!n)throw new Error("not supported");let s=`$memoize$${e}`;t[i]=function(...r){return this.hasOwnProperty(s)||Object.defineProperty(this,s,{configurable:!1,enumerable:!1,writable:!1,value:n.apply(this,r)}),this[s]}}var np=x(()=>{});var t5e,vi,jn,Bl=x(()=>{re();br();np();ae();W();tc();t5e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s};(function(o){o.Tap="-monaco-gesturetap",o.Change="-monaco-gesturechange",o.Start="-monaco-gesturestart",o.End="-monaco-gesturesend",o.Contextmenu="-monaco-gesturecontextmenu"})(vi||(vi={}));jn=class o extends T{static{this.SCROLL_FRICTION=-.005}static{this.HOLD_DELAY=700}static{this.CLEAR_TAP_COUNT_TIME=400}constructor(){super(),this.dispatched=!1,this.targets=new In,this.ignoreTargets=new In,this.activeTouches={},this.handle=null,this._lastSetTapCountTime=0,this._register(Q.runAndSubscribe(Fm,({window:e,disposables:t})=>{t.add(B(e.document,"touchstart",i=>this.onTouchStart(i),{passive:!1})),t.add(B(e.document,"touchend",i=>this.onTouchEnd(e,i))),t.add(B(e.document,"touchmove",i=>this.onTouchMove(i),{passive:!1}))},{window:Tt,disposables:this._store}))}static addTarget(e){if(!o.isTouchDevice())return T.None;o.INSTANCE||(o.INSTANCE=new o);let t=o.INSTANCE.targets.push(e);return ne(t)}static ignoreTarget(e){if(!o.isTouchDevice())return T.None;o.INSTANCE||(o.INSTANCE=new o);let t=o.INSTANCE.ignoreTargets.push(e);return ne(t)}static isTouchDevice(){return"ontouchstart"in Tt||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(e){let t=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let i=0,n=e.targetTouches.length;i=o.HOLD_DELAY&&Math.abs(l.initialPageX-l.rollingPageX.at(-1))<30&&Math.abs(l.initialPageY-l.rollingPageY.at(-1))<30){let d=this.newGestureEvent(vi.Contextmenu,l.initialTarget);d.pageX=l.rollingPageX.at(-1),d.pageY=l.rollingPageY.at(-1),this.dispatchEvent(d)}else if(n===1){let d=l.rollingPageX.at(-1),h=l.rollingPageY.at(-1),u=l.rollingTimestamps.at(-1)-l.rollingTimestamps[0],f=d-l.rollingPageX[0],g=h-l.rollingPageY[0],p=[...this.targets].filter(_=>l.initialTarget instanceof Node&&_.contains(l.initialTarget));this.inertia(e,p,i,Math.abs(f)/u,f>0?1:-1,d,Math.abs(g)/u,g>0?1:-1,h)}this.dispatchEvent(this.newGestureEvent(vi.End,l.initialTarget)),delete this.activeTouches[a.identifier]}this.dispatched&&(t.preventDefault(),t.stopPropagation(),this.dispatched=!1)}newGestureEvent(e,t){let i=document.createEvent("CustomEvent");return i.initEvent(e,!1,!0),i.initialTarget=t,i.tapCount=0,i}dispatchEvent(e){if(e.type===vi.Tap){let t=new Date().getTime(),i=0;t-this._lastSetTapCountTime>o.CLEAR_TAP_COUNT_TIME?i=1:i=2,this._lastSetTapCountTime=t,e.tapCount=i}else(e.type===vi.Change||e.type===vi.Contextmenu)&&(this._lastSetTapCountTime=0);if(e.initialTarget instanceof Node){for(let i of this.ignoreTargets)if(i.contains(e.initialTarget))return;let t=[];for(let i of this.targets)if(i.contains(e.initialTarget)){let n=0,s=e.initialTarget;for(;s&&s!==i;)n++,s=s.parentElement;t.push([n,i])}t.sort((i,n)=>i[0]-n[0]);for(let[i,n]of t)n.dispatchEvent(e),this.dispatched=!0}}inertia(e,t,i,n,s,r,a,l,c){this.handle=ws(e,()=>{let d=Date.now(),h=d-i,u=0,f=0,g=!0;n+=o.SCROLL_FRICTION*h,a+=o.SCROLL_FRICTION*h,n>0&&(g=!1,u=s*n*h),a>0&&(g=!1,f=l*a*h);let p=this.newGestureEvent(vi.Change);p.translationX=u,p.translationY=f,t.forEach(_=>_.dispatchEvent(p)),g||this.inertia(e,t,d,n,s,r+u,a,l,c+f)})}onTouchMove(e){let t=Date.now();for(let i=0,n=e.changedTouches.length;i3&&(r.rollingPageX.shift(),r.rollingPageY.shift(),r.rollingTimestamps.shift()),r.rollingPageX.push(s.pageX),r.rollingPageY.push(s.pageY),r.rollingTimestamps.push(t)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}};t5e([_n],jn,"isTouchDevice",null)});var xo,Gd=x(()=>{re();wr();Ya();Bl();W();xo=class extends T{onclick(e,t){this._register(B(e,ee.CLICK,i=>t(new so(we(e),i))))}onmousedown(e,t){this._register(B(e,ee.MOUSE_DOWN,i=>t(new so(we(e),i))))}onmouseover(e,t){this._register(B(e,ee.MOUSE_OVER,i=>t(new so(we(e),i))))}onmouseleave(e,t){this._register(B(e,ee.MOUSE_LEAVE,i=>t(new so(we(e),i))))}onkeydown(e,t){this._register(B(e,ee.KEY_DOWN,i=>t(new Mt(i))))}onkeyup(e,t){this._register(B(e,ee.KEY_UP,i=>t(new Mt(i))))}oninput(e,t){this._register(B(e,ee.INPUT,t))}onblur(e,t){this._register(B(e,ee.BLUR,t))}onfocus(e,t){this._register(B(e,ee.FOCUS,t))}ignoreGesture(e){return jn.ignoreTarget(e)}}});var Eb,GF,YF=x(()=>{fC();Gd();Ze();Li();re();Eb=11,GF=class extends xo{constructor(e){super(),this._onActivate=e.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=e.bgWidth+"px",this.bgDomNode.style.height=e.bgHeight+"px",typeof e.top<"u"&&(this.bgDomNode.style.top="0px"),typeof e.left<"u"&&(this.bgDomNode.style.left="0px"),typeof e.bottom<"u"&&(this.bgDomNode.style.bottom="0px"),typeof e.right<"u"&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=e.className,this.domNode.classList.add(...Ee.asClassNameArray(e.icon)),this.domNode.style.position="absolute",this.domNode.style.width=Eb+"px",this.domNode.style.height=Eb+"px",typeof e.top<"u"&&(this.domNode.style.top=e.top+"px"),typeof e.left<"u"&&(this.domNode.style.left=e.left+"px"),typeof e.bottom<"u"&&(this.domNode.style.bottom=e.bottom+"px"),typeof e.right<"u"&&(this.domNode.style.right=e.right+"px"),this._pointerMoveMonitor=this._register(new zc),this._register(_i(this.bgDomNode,ee.POINTER_DOWN,t=>this._arrowPointerDown(t))),this._register(_i(this.domNode,ee.POINTER_DOWN,t=>this._arrowPointerDown(t))),this._pointerdownRepeatTimer=this._register(new B_),this._pointerdownScheduleRepeatTimer=this._register(new ro)}_arrowPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=()=>{this._pointerdownRepeatTimer.cancelAndSet(()=>this._onActivate(),1e3/24,we(e))};this._onActivate(),this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancelAndSet(t,200),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,i=>{},()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()}),e.preventDefault()}}});var ZF,Pve=x(()=>{Ze();W();ZF=class extends T{constructor(e,t,i){super(),this._visibility=e,this._visibleClassName=t,this._invisibleClassName=i,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new ro)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this._updateShouldBeVisible())}setShouldBeVisible(e){this._rawShouldBeVisible=e,this._updateShouldBeVisible()}_applyVisibilitySetting(){return this._visibility===2?!1:this._visibility===3?!0:this._rawShouldBeVisible}_updateShouldBeVisible(){let e=this._applyVisibilitySetting();this._shouldBeVisible!==e&&(this._shouldBeVisible=e,this.ensureVisibility())}setIsNeeded(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())}setDomNode(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){if(!this._isNeeded){this._hide(!1);return}this._shouldBeVisible?this._reveal():this._hide(!0)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet(()=>{this._domNode?.setClassName(this._visibleClassName)},0))}_hide(e){this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,this._domNode?.setClassName(this._invisibleClassName+(e?" fade":"")))}}});var i5e,w1,SZ=x(()=>{re();Go();fC();YF();Pve();Gd();rt();i5e=140,w1=class extends xo{constructor(e){super(),this._lazyRender=e.lazyRender,this._host=e.host,this._scrollable=e.scrollable,this._scrollByPage=e.scrollByPage,this._scrollbarState=e.scrollbarState,this._visibilityController=this._register(new ZF(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._pointerMoveMonitor=this._register(new zc),this._shouldRender=!0,this.domNode=wt(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this._register(B(this.domNode.domNode,ee.POINTER_DOWN,t=>this._domNodePointerDown(t)))}_createArrow(e){let t=this._register(new GF(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,i,n){this.slider=wt(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),typeof i=="number"&&this.slider.setWidth(i),typeof n=="number"&&this.slider.setHeight(n),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this._register(B(this.slider.domNode,ee.POINTER_DOWN,s=>{s.button===0&&(s.preventDefault(),this._sliderPointerDown(s))})),this.onclick(this.slider.domNode,s=>{s.leftButton&&s.stopPropagation()})}_onElementSize(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodePointerDown(e){e.target===this.domNode.domNode&&this._onPointerDown(e)}delegatePointerDown(e){let t=this.domNode.domNode.getClientRects()[0].top,i=t+this._scrollbarState.getSliderPosition(),n=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),s=this._sliderPointerPosition(e);i<=s&&s<=n?e.button===0&&(e.preventDefault(),this._sliderPointerDown(e)):this._onPointerDown(e)}_onPointerDown(e){let t,i;if(e.target===this.domNode.domNode&&typeof e.offsetX=="number"&&typeof e.offsetY=="number")t=e.offsetX,i=e.offsetY;else{let r=ii(this.domNode.domNode);t=e.pageX-r.left,i=e.pageY-r.top}let n=e.pointerType==="mouse",s=e.button===0;if(s||!n){let r=this._pointerDownRelativePosition(t,i);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(r):this._scrollbarState.getDesiredScrollPositionFromOffset(r))}s&&(e.preventDefault(),this._sliderPointerDown(e))}_sliderPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=this._sliderPointerPosition(e),i=this._sliderOrthogonalPointerPosition(e),n=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,s=>{let r=this._sliderOrthogonalPointerPosition(s),a=Math.abs(r-i);if(sn&&a>i5e){this._setDesiredScrollPositionNow(n.getScrollPosition());return}let c=this._sliderPointerPosition(s)-t;this._setDesiredScrollPositionNow(n.getDesiredScrollPositionFromDelta(c))},()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd()}),this._host.onDragStart()}_setDesiredScrollPositionNow(e){let t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)}updateScrollbarSize(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}}});var Tb,XF=x(()=>{Tb=class o{constructor(e,t,i,n,s,r){this._scrollbarSize=Math.round(t),this._oppositeScrollbarSize=Math.round(i),this._arrowSize=Math.round(e),this._visibleSize=n,this._scrollSize=s,this._scrollPosition=r,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new o(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(e){let t=Math.round(e);return this._visibleSize!==t?(this._visibleSize=t,this._refreshComputedValues(),!0):!1}setScrollSize(e){let t=Math.round(e);return this._scrollSize!==t?(this._scrollSize=t,this._refreshComputedValues(),!0):!1}setScrollPosition(e){let t=Math.round(e);return this._scrollPosition!==t?(this._scrollPosition=t,this._refreshComputedValues(),!0):!1}setScrollbarSize(e){this._scrollbarSize=Math.round(e)}setOppositeScrollbarSize(e){this._oppositeScrollbarSize=Math.round(e)}static _computeValues(e,t,i,n,s){let r=Math.max(0,i-e),a=Math.max(0,r-2*t),l=n>0&&n>i;if(!l)return{computedAvailableSize:Math.round(r),computedIsNeeded:l,computedSliderSize:Math.round(a),computedSliderRatio:0,computedSliderPosition:0};let c=Math.round(Math.max(20,Math.floor(i*a/n))),d=(a-c)/(n-i),h=s*d;return{computedAvailableSize:Math.round(r),computedIsNeeded:l,computedSliderSize:Math.round(c),computedSliderRatio:d,computedSliderPosition:Math.round(h)}}_refreshComputedValues(){let e=o._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=e.computedAvailableSize,this._computedIsNeeded=e.computedIsNeeded,this._computedSliderSize=e.computedSliderSize,this._computedSliderRatio=e.computedSliderRatio,this._computedSliderPosition=e.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(e){if(!this._computedIsNeeded)return 0;let t=e-this._arrowSize-this._computedSliderSize/2;return Math.round(t/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(e){if(!this._computedIsNeeded)return 0;let t=e-this._arrowSize,i=this._scrollPosition;return t{Ya();SZ();YF();XF();ti();QF=class extends w1{constructor(e,t,i){let n=e.getScrollDimensions(),s=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:i,scrollbarState:new Tb(t.horizontalHasArrows?t.arrowSize:0,t.horizontal===2?0:t.horizontalScrollbarSize,t.vertical===2?0:t.verticalScrollbarSize,n.width,n.scrollWidth,s.scrollLeft),visibility:t.horizontal,extraScrollbarClassName:"horizontal",scrollable:e,scrollByPage:t.scrollByPage}),t.horizontalHasArrows){let r=(t.arrowSize-Eb)/2,a=(t.horizontalScrollbarSize-Eb)/2;this._createArrow({className:"scra",icon:$.scrollbarButtonLeft,top:a,left:r,bottom:void 0,right:void 0,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new Od(null,1,0))}),this._createArrow({className:"scra",icon:$.scrollbarButtonRight,top:a,left:void 0,bottom:void 0,right:r,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new Od(null,-1,0))})}this._createSlider(Math.floor((t.horizontalScrollbarSize-t.horizontalSliderSize)/2),0,void 0,t.horizontalSliderSize)}_updateSlider(e,t){this.slider.setWidth(e),this.slider.setLeft(t)}_renderDomNode(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return e}_sliderPointerPosition(e){return e.pageX}_sliderOrthogonalPointerPosition(e){return e.pageY}_updateScrollbarSize(e){this.slider.setHeight(e)}writeScrollPosition(e,t){e.scrollLeft=t}updateOptions(e){this.updateScrollbarSize(e.horizontal===2?0:e.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._visibilityController.setVisibility(e.horizontal),this._scrollByPage=e.scrollByPage}}});var JF,Bve=x(()=>{Ya();SZ();YF();XF();ti();JF=class extends w1{constructor(e,t,i){let n=e.getScrollDimensions(),s=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:i,scrollbarState:new Tb(t.verticalHasArrows?t.arrowSize:0,t.vertical===2?0:t.verticalScrollbarSize,0,n.height,n.scrollHeight,s.scrollTop),visibility:t.vertical,extraScrollbarClassName:"vertical",scrollable:e,scrollByPage:t.scrollByPage}),t.verticalHasArrows){let r=(t.arrowSize-Eb)/2,a=(t.verticalScrollbarSize-Eb)/2;this._createArrow({className:"scra",icon:$.scrollbarButtonUp,top:r,left:a,bottom:void 0,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new Od(null,0,1))}),this._createArrow({className:"scra",icon:$.scrollbarButtonDown,top:void 0,left:a,bottom:r,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new Od(null,0,-1))})}this._createSlider(0,Math.floor((t.verticalScrollbarSize-t.verticalSliderSize)/2),t.verticalSliderSize,void 0)}_updateSlider(e,t){this.slider.setHeight(e),this.slider.setTop(t)}_renderDomNode(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return t}_sliderPointerPosition(e){return e.pageY}_sliderOrthogonalPointerPosition(e){return e.pageX}_updateScrollbarSize(e){this.slider.setWidth(e)}writeScrollPosition(e,t){e.scrollTop=t}updateOptions(e){this.updateScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(e.vertical),this._scrollByPage=e.scrollByPage}}});function xZ(o,e){let t=e-o;return function(i){return o+t*s5e(i)}}function n5e(o,e,t){return function(i){return i{ae();W();kZ=class o{constructor(e,t,i,n,s,r,a){this._forceIntegerValues=e,this._scrollStateBrand=void 0,this._forceIntegerValues&&(t=t|0,i=i|0,n=n|0,s=s|0,r=r|0,a=a|0),this.rawScrollLeft=n,this.rawScrollTop=a,t<0&&(t=0),n+t>i&&(n=i-t),n<0&&(n=0),s<0&&(s=0),a+s>r&&(a=r-s),a<0&&(a=0),this.width=t,this.scrollWidth=i,this.scrollLeft=n,this.height=s,this.scrollHeight=r,this.scrollTop=a}equals(e){return this.rawScrollLeft===e.rawScrollLeft&&this.rawScrollTop===e.rawScrollTop&&this.width===e.width&&this.scrollWidth===e.scrollWidth&&this.scrollLeft===e.scrollLeft&&this.height===e.height&&this.scrollHeight===e.scrollHeight&&this.scrollTop===e.scrollTop}withScrollDimensions(e,t){return new o(this._forceIntegerValues,typeof e.width<"u"?e.width:this.width,typeof e.scrollWidth<"u"?e.scrollWidth:this.scrollWidth,t?this.rawScrollLeft:this.scrollLeft,typeof e.height<"u"?e.height:this.height,typeof e.scrollHeight<"u"?e.scrollHeight:this.scrollHeight,t?this.rawScrollTop:this.scrollTop)}withScrollPosition(e){return new o(this._forceIntegerValues,this.width,this.scrollWidth,typeof e.scrollLeft<"u"?e.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,typeof e.scrollTop<"u"?e.scrollTop:this.rawScrollTop)}createScrollEvent(e,t){let i=this.width!==e.width,n=this.scrollWidth!==e.scrollWidth,s=this.scrollLeft!==e.scrollLeft,r=this.height!==e.height,a=this.scrollHeight!==e.scrollHeight,l=this.scrollTop!==e.scrollTop;return{inSmoothScrolling:t,oldWidth:e.width,oldScrollWidth:e.scrollWidth,oldScrollLeft:e.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:e.height,oldScrollHeight:e.scrollHeight,oldScrollTop:e.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:i,scrollWidthChanged:n,scrollLeftChanged:s,heightChanged:r,scrollHeightChanged:a,scrollTopChanged:l}}},Yd=class extends T{constructor(e){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new N),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e.smoothScrollDuration,this._scheduleAtNextAnimationFrame=e.scheduleAtNextAnimationFrame,this._state=new kZ(e.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(e){this._smoothScrollDuration=e}validateScrollPosition(e){return this._state.withScrollPosition(e)}getScrollDimensions(){return this._state}setScrollDimensions(e,t){let i=this._state.withScrollDimensions(e,t);this._setState(i,!!this._smoothScrolling),this._smoothScrolling?.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(e){let t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t,!1)}setScrollPositionSmooth(e,t){if(this._smoothScrollDuration===0)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:typeof e.scrollLeft>"u"?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:typeof e.scrollTop>"u"?this._smoothScrolling.to.scrollTop:e.scrollTop};let i=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===i.scrollLeft&&this._smoothScrolling.to.scrollTop===i.scrollTop)return;let n;t?n=new t4(this._smoothScrolling.from,i,this._smoothScrolling.startTime,this._smoothScrolling.duration):n=this._smoothScrolling.combine(this._state,i,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=n}else{let i=this._state.withScrollPosition(e);this._smoothScrolling=t4.start(this._state,i,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}hasPendingScrollAnimation(){return!!this._smoothScrolling}_performSmoothScrolling(){if(!this._smoothScrolling)return;let e=this._smoothScrolling.tick(),t=this._state.withScrollPosition(e);if(this._setState(t,!0),!!this._smoothScrolling){if(e.isDone){this._smoothScrolling.dispose(),this._smoothScrolling=null;return}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}}_setState(e,t){let i=this._state;i.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(i,t)))}},e4=class{constructor(e,t,i){this.scrollLeft=e,this.scrollTop=t,this.isDone=i}};t4=class o{constructor(e,t,i,n){this.from=e,this.to=t,this.duration=n,this.startTime=i,this.animationFrameDisposable=null,this._initAnimations()}_initAnimations(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)}_initAnimation(e,t,i){if(Math.abs(e-t)>2.5*i){let s,r;return e{});function a5e(o){let e={lazyRender:typeof o.lazyRender<"u"?o.lazyRender:!1,className:typeof o.className<"u"?o.className:"",useShadows:typeof o.useShadows<"u"?o.useShadows:!0,handleMouseWheel:typeof o.handleMouseWheel<"u"?o.handleMouseWheel:!0,flipAxes:typeof o.flipAxes<"u"?o.flipAxes:!1,consumeMouseWheelIfScrollbarIsNeeded:typeof o.consumeMouseWheelIfScrollbarIsNeeded<"u"?o.consumeMouseWheelIfScrollbarIsNeeded:!1,alwaysConsumeMouseWheel:typeof o.alwaysConsumeMouseWheel<"u"?o.alwaysConsumeMouseWheel:!1,scrollYToX:typeof o.scrollYToX<"u"?o.scrollYToX:!1,mouseWheelScrollSensitivity:typeof o.mouseWheelScrollSensitivity<"u"?o.mouseWheelScrollSensitivity:1,fastScrollSensitivity:typeof o.fastScrollSensitivity<"u"?o.fastScrollSensitivity:5,scrollPredominantAxis:typeof o.scrollPredominantAxis<"u"?o.scrollPredominantAxis:!0,mouseWheelSmoothScroll:typeof o.mouseWheelSmoothScroll<"u"?o.mouseWheelSmoothScroll:!0,inertialScroll:typeof o.inertialScroll<"u"?o.inertialScroll:!1,arrowSize:typeof o.arrowSize<"u"?o.arrowSize:11,listenOnDomNode:typeof o.listenOnDomNode<"u"?o.listenOnDomNode:null,horizontal:typeof o.horizontal<"u"?o.horizontal:1,horizontalScrollbarSize:typeof o.horizontalScrollbarSize<"u"?o.horizontalScrollbarSize:10,horizontalSliderSize:typeof o.horizontalSliderSize<"u"?o.horizontalSliderSize:0,horizontalHasArrows:typeof o.horizontalHasArrows<"u"?o.horizontalHasArrows:!1,vertical:typeof o.vertical<"u"?o.vertical:1,verticalScrollbarSize:typeof o.verticalScrollbarSize<"u"?o.verticalScrollbarSize:10,verticalHasArrows:typeof o.verticalHasArrows<"u"?o.verticalHasArrows:!1,verticalSliderSize:typeof o.verticalSliderSize<"u"?o.verticalSliderSize:0,scrollByPage:typeof o.scrollByPage<"u"?o.scrollByPage:!1};return e.horizontalSliderSize=typeof o.horizontalSliderSize<"u"?o.horizontalSliderSize:e.horizontalScrollbarSize,e.verticalSliderSize=typeof o.verticalSliderSize<"u"?o.verticalSliderSize:e.verticalScrollbarSize,Ye&&(e.className+=" mac"),e}var r5e,Hve,LZ,cT,dT,y1,Gf,Fh,Gc=x(()=>{Ns();re();Go();Ya();Fve();Bve();Gd();Ze();ae();W();rt();C1();Wve();r5e=500,Hve=50,LZ=class{constructor(e,t,i){this.timestamp=e,this.deltaX=t,this.deltaY=i,this.score=0}},cT=class o{static{this.INSTANCE=new o}constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(this._front===-1&&this._rear===-1)return!1;let e=1,t=0,i=1,n=this._rear;do{let s=n===this._front?e:Math.pow(2,-i);if(e-=s,t+=this._memory[n].score*s,n===this._front)break;n=(this._capacity+n-1)%this._capacity,i++}while(!0);return t<=.5}acceptStandardWheelEvent(e){if(N_){let t=we(e.browserEvent),i=eE(t);this.accept(Date.now(),e.deltaX*i,e.deltaY*i)}else this.accept(Date.now(),e.deltaX,e.deltaY)}accept(e,t,i){let n=null,s=new LZ(e,t,i);this._front===-1&&this._rear===-1?(this._memory[0]=s,this._front=0,this._rear=0):(n=this._memory[this._rear],this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=s),s.score=this._computeScore(s,n)}_computeScore(e,t){if(Math.abs(e.deltaX)>0&&Math.abs(e.deltaY)>0)return 1;let i=.5;if((!this._isAlmostInt(e.deltaX)||!this._isAlmostInt(e.deltaY))&&(i+=.25),t){let n=Math.abs(e.deltaX),s=Math.abs(e.deltaY),r=Math.abs(t.deltaX),a=Math.abs(t.deltaY),l=Math.max(Math.min(n,r),1),c=Math.max(Math.min(s,a),1),d=Math.max(n,r),h=Math.max(s,a);d%l===0&&h%c===0&&(i-=.5)}return Math.min(Math.max(i,0),1)}_isAlmostInt(e){let t=Number.EPSILON*100;return Math.abs(Math.round(e)-e)<.01+t}},dT=class extends xo{get onScroll(){return this._onScroll.event}get options(){return this._options}constructor(e,t,i){super(),this._inertialTimeout=null,this._inertialSpeed={X:0,Y:0},this._onScroll=this._register(new N),this._onWillScroll=this._register(new N),e.style.overflow="hidden",this._options=a5e(t),this._scrollable=i,this._register(this._scrollable.onScroll(s=>{this._onWillScroll.fire(s),this._onDidScroll(s),this._onScroll.fire(s)}));let n={onMouseWheel:s=>this._onMouseWheel(s),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new JF(this._scrollable,this._options,n)),this._horizontalScrollbar=this._register(new QF(this._scrollable,this._options,n)),this._domNode=document.createElement("div"),this._domNode.className="monaco-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.style.overflow="hidden",this._domNode.appendChild(e),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=wt(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=wt(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=wt(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,s=>this._onMouseOver(s)),this.onmouseleave(this._listenOnDomNode,s=>this._onMouseLeave(s)),this._hideTimeout=this._register(new ro),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}dispose(){this._mouseWheelToDispose=Ct(this._mouseWheelToDispose),this._inertialTimeout&&(this._inertialTimeout.dispose(),this._inertialTimeout=null),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarPointerDown(e){this._verticalScrollbar.delegatePointerDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,Ye&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className}updateOptions(e){typeof e.handleMouseWheel<"u"&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),typeof e.mouseWheelScrollSensitivity<"u"&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),typeof e.fastScrollSensitivity<"u"&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),typeof e.scrollPredominantAxis<"u"&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),typeof e.horizontal<"u"&&(this._options.horizontal=e.horizontal),typeof e.vertical<"u"&&(this._options.vertical=e.vertical),typeof e.horizontalScrollbarSize<"u"&&(this._options.horizontalScrollbarSize=e.horizontalScrollbarSize),typeof e.verticalScrollbarSize<"u"&&(this._options.verticalScrollbarSize=e.verticalScrollbarSize),typeof e.scrollByPage<"u"&&(this._options.scrollByPage=e.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}delegateScrollFromMouseWheelEvent(e){this._onMouseWheel(new Od(e))}async _periodicSync(){let e=!1;(this._inertialSpeed.X!==0||this._inertialSpeed.Y!==0)&&(this._scrollable.setScrollPositionNow({scrollTop:this._scrollable.getCurrentScrollPosition().scrollTop-this._inertialSpeed.Y*100,scrollLeft:this._scrollable.getCurrentScrollPosition().scrollLeft-this._inertialSpeed.X*100}),this._inertialSpeed.X*=.9,this._inertialSpeed.Y*=.9,Math.abs(this._inertialSpeed.X)<.01&&(this._inertialSpeed.X=0),Math.abs(this._inertialSpeed.Y)<.01&&(this._inertialSpeed.Y=0),e=this._inertialSpeed.X!==0||this._inertialSpeed.Y!==0),e?(this._inertialTimeout||(this._inertialTimeout=new ro),this._inertialTimeout.cancelAndSet(()=>this._periodicSync(),1e3/60)):(this._inertialTimeout?.dispose(),this._inertialTimeout=null)}_setListeningToMouseWheel(e){if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=Ct(this._mouseWheelToDispose),e)){let i=n=>{this._onMouseWheel(new Od(n))};this._mouseWheelToDispose.push(B(this._listenOnDomNode,ee.MOUSE_WHEEL,i,{passive:!1}))}}_onMouseWheel(e){if(e.browserEvent?.defaultPrevented)return;let t=cT.INSTANCE;t.acceptStandardWheelEvent(e);let i=!1;if(e.deltaY||e.deltaX){let s=e.deltaY*this._options.mouseWheelScrollSensitivity,r=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(this._options.scrollYToX&&r+s===0?r=s=0:Math.abs(s)>=Math.abs(r)?r=0:s=0),this._options.flipAxes&&([s,r]=[r,s]);let a=!Ye&&e.browserEvent&&e.browserEvent.shiftKey;(this._options.scrollYToX||a)&&!r&&(r=s,s=0),e.browserEvent&&e.browserEvent.altKey&&(r=r*this._options.fastScrollSensitivity,s=s*this._options.fastScrollSensitivity);let l=this._scrollable.getFutureScrollPosition(),c={};if(s){let d=Hve*s,h=l.scrollTop-(d<0?Math.floor(d):Math.ceil(d));this._verticalScrollbar.writeScrollPosition(c,h)}if(r){let d=Hve*r,h=l.scrollLeft-(d<0?Math.floor(d):Math.ceil(d));this._horizontalScrollbar.writeScrollPosition(c,h)}if(c=this._scrollable.validateScrollPosition(c),this._options.inertialScroll&&(r||s)&&!t.isPhysicalMouseWheel()){let d=!1;this._inertialSpeed.X===0&&this._inertialSpeed.Y===0&&(d=!0),this._inertialSpeed.Y=(s<0?-1:1)*Math.abs(s)**1.02,this._inertialSpeed.X=(r<0?-1:1)*Math.abs(r)**1.02,d&&this._periodicSync()}(l.scrollLeft!==c.scrollLeft||l.scrollTop!==c.scrollTop)&&(this._options.mouseWheelSmoothScroll&&t.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(c):this._scrollable.setScrollPositionNow(c),i=!0)}let n=i;!n&&this._options.alwaysConsumeMouseWheel&&(n=!0),!n&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(n=!0),n&&(e.preventDefault(),e.stopPropagation())}_onDidScroll(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){let e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,i=e.scrollLeft>0,n=i?" left":"",s=t?" top":"",r=i||t?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${n}`),this._topShadowDomNode.setClassName(`shadow${s}`),this._topLeftShadowDomNode.setClassName(`shadow${r}${s}${n}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseLeave(e){this._mouseIsOver=!1,this._hide()}_onMouseOver(e){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){!this._mouseIsOver&&!this._isDragging&&(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){!this._mouseIsOver&&!this._isDragging&&this._hideTimeout.cancelAndSet(()=>this._hide(),r5e)}},y1=class extends dT{constructor(e,t){t=t||{},t.mouseWheelSmoothScroll=!1;let i=new Yd({forceIntegerValues:!0,smoothScrollDuration:0,scheduleAtNextAnimationFrame:n=>ws(we(e),n)});super(e,t,i),this._register(i)}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}},Gf=class extends dT{constructor(e,t,i){super(e,t,i)}setScrollPosition(e){e.reuseAnimation?this._scrollable.setScrollPositionSmooth(e,e.reuseAnimation):this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}},Fh=class extends dT{constructor(e,t){t=t||{},t.mouseWheelSmoothScroll=!1;let i=new Yd({forceIntegerValues:!1,smoothScrollDuration:0,scheduleAtNextAnimationFrame:n=>ws(we(e),n)});super(e,t,i),this._register(i),this._element=e,this._register(this.onScroll(n=>{n.scrollTopChanged&&(this._element.scrollTop=n.scrollTop),n.scrollLeftChanged&&(this._element.scrollLeft=n.scrollLeft)})),this.scanDomNode()}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}scanDomNode(){this.setScrollDimensions({width:this._element.clientWidth,scrollWidth:this._element.scrollWidth,height:this._element.clientHeight,scrollHeight:this._element.scrollHeight}),this.setScrollPosition({scrollLeft:this._element.scrollLeft,scrollTop:this._element.scrollTop})}}});var i4,n4,o4,IZ,s4,EZ,Vve=x(()=>{re();W();Pe();kb();KF();i4=class extends T{constructor(e,t,i,n){super(),this._context=e,this._viewHelper=t,this._mouseTargetFactory=i,this._dispatchMouse=n,this._operation=null}dispose(){super.dispose(),this.stop()}start(e,t){this._operation?this._operation.setPosition(e,t):this._operation=this._createDragScrollingOperation(e,t)}stop(){this._operation&&(this._operation.dispose(),this._operation=null)}},n4=class extends T{constructor(e,t,i,n,s,r){super(),this._context=e,this._viewHelper=t,this._mouseTargetFactory=i,this._dispatchMouse=n,this._position=s,this._mouseEvent=r,this._lastTime=Date.now(),this._animationFrameDisposable=ws(we(r.browserEvent),()=>this._execute())}dispose(){this._animationFrameDisposable.dispose(),super.dispose()}setPosition(e,t){this._position=e,this._mouseEvent=t}_tick(){let e=Date.now(),t=e-this._lastTime;return this._lastTime=e,t}},o4=class extends i4{_createDragScrollingOperation(e,t){return new IZ(this._context,this._viewHelper,this._mouseTargetFactory,this._dispatchMouse,e,t)}},IZ=class extends n4{_getScrollSpeed(){let e=this._context.configuration.options.get(75),t=this._context.configuration.options.get(165).height/e,i=this._position.outsideDistance/e;return i<=1.5?Math.max(30,t*(1+i)):i<=3?Math.max(60,t*(2+i)):Math.max(200,t*(7+i))}_execute(){let e=this._context.configuration.options.get(75),t=this._getScrollSpeed(),i=this._tick(),n=t*(i/1e3)*e,s=this._position.outsidePosition==="above"?-n:n;this._context.viewModel.viewLayout.deltaScrollNow(0,s),this._viewHelper.renderNow();let r=this._context.viewLayout.getLinesViewportData(),a=this._position.outsidePosition==="above"?r.startLineNumber:r.endLineNumber,l=this._position.outsidePosition==="above"?r.startLineNumber===1:r.endLineNumber===this._context.viewModel.getLineCount(),c;{let d=h1(this._viewHelper.viewDomNode),h=this._context.configuration.options.get(165).horizontalScrollbarHeight,u=new tp(this._mouseEvent.pos.x,d.y+d.height-h-.1),f=u1(this._viewHelper.viewDomNode,d,u);c=this._mouseTargetFactory.createMouseTarget(this._viewHelper.getLastRenderData(),d,u,f,null)}(!c.position||c.position.lineNumber!==a||l)&&(this._position.outsidePosition==="above"?c=xs.createOutsideEditor(this._position.mouseColumn,new M(a,1),"above",this._position.outsideDistance):c=xs.createOutsideEditor(this._position.mouseColumn,new M(a,this._context.viewModel.getLineMaxColumn(a)),"below",this._position.outsideDistance)),this._dispatchMouse(c,!0,2),this._animationFrameDisposable=ws(we(c.element),()=>this._execute())}},s4=class extends i4{_createDragScrollingOperation(e,t){return new EZ(this._context,this._viewHelper,this._mouseTargetFactory,this._dispatchMouse,e,t)}},EZ=class extends n4{_getScrollSpeed(){let e=this._context.configuration.options.get(59).typicalFullwidthCharacterWidth,t=this._context.configuration.options.get(165).contentWidth/e,i=this._position.outsideDistance/e;return i<=1.5?Math.max(30,t*(1+i)):i<=3?Math.max(60,t*(2+i)):Math.max(200,t*(7+i))}_execute(){let e=this._context.configuration.options.get(59).typicalFullwidthCharacterWidth,t=this._getScrollSpeed(),i=this._tick(),n=t*(i/1e3)*e*.5,s=this._position.outsidePosition==="left"?-n:n;if(this._context.viewModel.viewLayout.deltaScrollNow(s,0),this._viewHelper.renderNow(),!this._position.position)return;let r=this._position.position.lineNumber,a;{let l=h1(this._viewHelper.viewDomNode),c=this._context.configuration.options.get(165).horizontalScrollbarHeight,d=new tp(this._mouseEvent.pos.x,l.y+l.height-c-.1),h=u1(this._viewHelper.viewDomNode,l,d);a=this._mouseTargetFactory.createMouseTarget(this._viewHelper.getLastRenderData(),l,d,h,null)}this._position.outsidePosition==="left"?a=xs.createOutsideEditor(a.mouseColumn,new M(r,a.mouseColumn),"left",this._position.outsideDistance):a=xs.createOutsideEditor(a.mouseColumn,new M(r,a.mouseColumn),"right",this._position.outsideDistance),this._dispatchMouse(a,!0,2),this._animationFrameDisposable=ws(we(a.element),()=>this._execute())}}});var S1,TZ,DZ,zve=x(()=>{re();Ya();W();rt();KF();kb();sx();Pe();gi();Lb();Gc();Vve();ho();S1=class extends Pl{constructor(e,t,i){super(),this._mouseLeaveMonitor=null,this._context=e,this.viewController=t,this.viewHelper=i,this.mouseTargetFactory=new v1(this._context,i),this._mouseDownOperation=this._register(new TZ(this._context,this.viewController,this.viewHelper,this.mouseTargetFactory,(r,a)=>this._createMouseTarget(r,a),r=>this._getMouseColumn(r))),this.lastMouseLeaveTime=-1,this._height=this._context.configuration.options.get(165).height;let n=new HF(this.viewHelper.viewDomNode);this._register(n.onContextMenu(this.viewHelper.viewDomNode,r=>this._onContextMenu(r,!0))),this._register(n.onMouseMove(this.viewHelper.viewDomNode,r=>{this._onMouseMove(r),this._mouseLeaveMonitor||(this._mouseLeaveMonitor=B(this.viewHelper.viewDomNode.ownerDocument,"mousemove",a=>{this.viewHelper.viewDomNode.contains(a.target)||this._onMouseLeave(new jc(a,!1,this.viewHelper.viewDomNode))}))})),this._register(n.onMouseUp(this.viewHelper.viewDomNode,r=>this._onMouseUp(r))),this._register(n.onMouseLeave(this.viewHelper.viewDomNode,r=>this._onMouseLeave(r)));let s=0;this._register(n.onPointerDown(this.viewHelper.viewDomNode,(r,a)=>{s=a})),this._register(B(this.viewHelper.viewDomNode,ee.POINTER_UP,r=>{this._mouseDownOperation.onPointerUp()})),this._register(n.onMouseDown(this.viewHelper.viewDomNode,r=>this._onMouseDown(r,s))),this._setupMouseWheelZoomListener(),this._context.addEventHandler(this)}_setupMouseWheelZoomListener(){let e=cT.INSTANCE,t=0,i=Ia.getZoomLevel(),n=!1,s=0,r=l=>{if(this.viewController.emitMouseWheel(l),!this._context.configuration.options.get(84))return;let c=new Od(l);if(e.acceptStandardWheelEvent(c),e.isPhysicalMouseWheel()){if(a(l)){let d=Ia.getZoomLevel(),h=c.deltaY>0?1:-1;Ia.setZoomLevel(d+h),c.preventDefault(),c.stopPropagation()}}else Date.now()-t>50&&(i=Ia.getZoomLevel(),n=a(l),s=0),t=Date.now(),s+=c.deltaY,n&&(Ia.setZoomLevel(i+s/5),c.preventDefault(),c.stopPropagation())};this._register(B(this.viewHelper.viewDomNode,ee.MOUSE_WHEEL,r,{capture:!0,passive:!1}));function a(l){return Ye?(l.metaKey||l.ctrlKey)&&!l.shiftKey&&!l.altKey:l.ctrlKey&&!l.metaKey&&!l.shiftKey&&!l.altKey}}dispose(){this._context.removeEventHandler(this),this._mouseLeaveMonitor&&(this._mouseLeaveMonitor.dispose(),this._mouseLeaveMonitor=null),super.dispose()}onConfigurationChanged(e){if(e.hasChanged(165)){let t=this._context.configuration.options.get(165).height;this._height!==t&&(this._height=t,this._mouseDownOperation.onHeightChanged())}return!1}onCursorStateChanged(e){return this._mouseDownOperation.onCursorStateChanged(e),!1}onFocusChanged(e){return!1}getTargetAtClientPoint(e,t){let n=new lT(e,t).toPageCoordinates(we(this.viewHelper.viewDomNode)),s=h1(this.viewHelper.viewDomNode);if(n.ys.y+s.height||n.xs.x+s.width)return null;let r=u1(this.viewHelper.viewDomNode,s,n);return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),s,n,r,null)}_createMouseTarget(e,t){let i=e.target;if(!this.viewHelper.viewDomNode.contains(i)){let n=Wd(this.viewHelper.viewDomNode);n&&(i=n.elementsFromPoint(e.posx,e.posy).find(r=>this.viewHelper.viewDomNode.contains(r))??null)}return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),e.editorPos,e.pos,e.relativePos,t?i:null)}_getMouseColumn(e){return this.mouseTargetFactory.getMouseColumn(e.relativePos)}_onContextMenu(e,t){this.viewController.emitContextMenu({event:e,target:this._createMouseTarget(e,t)})}_onMouseMove(e){this.mouseTargetFactory.mouseTargetIsWidget(e)||e.preventDefault(),!(this._mouseDownOperation.isActive()||e.timestamp{e.preventDefault(),this.viewHelper.focusTextArea()};if(d&&(n||r&&a))h(),this._mouseDownOperation.start(i.type,e,t);else if(s)e.preventDefault();else if(l){let u=i.detail;d&&this.viewHelper.shouldSuppressMouseDownOnViewZone(u.viewZoneId)&&(h(),this._mouseDownOperation.start(i.type,e,t),e.preventDefault())}else c&&this.viewHelper.shouldSuppressMouseDownOnWidget(i.detail)&&(h(),e.preventDefault());this.viewController.emitMouseDown({event:e,target:i})}},TZ=class extends T{constructor(e,t,i,n,s,r){super(),this._context=e,this._viewController=t,this._viewHelper=i,this._mouseTargetFactory=n,this._createMouseTarget=s,this._getMouseColumn=r,this._mouseMoveMonitor=this._register(new zF(this._viewHelper.viewDomNode)),this._topBottomDragScrolling=this._register(new o4(this._context,this._viewHelper,this._mouseTargetFactory,(a,l,c)=>this._dispatchMouse(a,l,c))),this._leftRightDragScrolling=this._register(new s4(this._context,this._viewHelper,this._mouseTargetFactory,(a,l,c)=>this._dispatchMouse(a,l,c))),this._mouseState=new DZ,this._currentSelection=new me(1,1,1,1),this._isActive=!1,this._lastMouseEvent=null}isActive(){return this._isActive}_onMouseDownThenMove(e){this._lastMouseEvent=e,this._mouseState.setModifiers(e);let t=this._findMousePosition(e,!1);t&&(this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:e,target:t}):t.type===13?t.outsidePosition==="above"||t.outsidePosition==="below"?(this._topBottomDragScrolling.start(t,e),this._leftRightDragScrolling.stop()):(this._leftRightDragScrolling.start(t,e),this._topBottomDragScrolling.stop()):(this._topBottomDragScrolling.stop(),this._leftRightDragScrolling.stop(),this._dispatchMouse(t,!0,1)))}start(e,t,i){this._lastMouseEvent=t,this._mouseState.setStartedOnLineNumbers(e===3),this._mouseState.setStartButtons(t),this._mouseState.setModifiers(t);let n=this._findMousePosition(t,!0);if(!n||!n.position)return;this._mouseState.trySetCount(t.detail,n.position),t.detail=this._mouseState.count;let s=this._context.configuration.options;if(!s.get(104)&&s.get(42)&&!s.get(28)&&!this._mouseState.altKey&&t.detail<2&&!this._isActive&&!this._currentSelection.isEmpty()&&n.type===6&&n.position&&this._currentSelection.containsPosition(n.position)){this._mouseState.isDragAndDrop=!0,this._isActive=!0,this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,i,t.buttons,r=>this._onMouseDownThenMove(r),r=>{let a=this._findMousePosition(this._lastMouseEvent,!1);Th(r)?this._viewController.emitMouseDropCanceled():this._viewController.emitMouseDrop({event:this._lastMouseEvent,target:a?this._createMouseTarget(this._lastMouseEvent,!0):null}),this._stop()});return}this._mouseState.isDragAndDrop=!1,this._dispatchMouse(n,t.shiftKey,1),this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,i,t.buttons,r=>this._onMouseDownThenMove(r),()=>this._stop()))}_stop(){this._isActive=!1,this._topBottomDragScrolling.stop(),this._leftRightDragScrolling.stop()}onHeightChanged(){this._mouseMoveMonitor.stopMonitoring()}onPointerUp(){this._mouseMoveMonitor.stopMonitoring()}onCursorStateChanged(e){this._currentSelection=e.selections[0]}_getPositionOutsideEditor(e){let t=e.editorPos,i=this._context.viewModel,n=this._context.viewLayout,s=this._getMouseColumn(e);if(e.posyt.y+t.height){let h=e.posy-t.y-t.height,u=n.getCurrentScrollTop()+e.relativePos.y,f=b1.getZoneAtCoord(this._context,u);if(f){let p=this._helpPositionJumpOverViewZone(f);if(p)return xs.createOutsideEditor(s,p,"below",h)}let g=n.getLineNumberAtVerticalOffset(u);return xs.createOutsideEditor(s,new M(g,i.getLineMaxColumn(g)),"below",h)}let r=n.getLineNumberAtVerticalOffset(n.getCurrentScrollTop()+e.relativePos.y),a=this._context.configuration.options.get(165),l=a.contentLeft;if(e.relativePos.x<=l){let h=l-e.relativePos.x,u=i.getTextDirection(r)===Fs.RTL;return xs.createOutsideEditor(s,new M(r,u?i.getLineMaxColumn(r):1),"left",h)}let d=a.minimap.minimapLeft===0?a.width-a.verticalScrollbarWidth:a.minimap.minimapLeft;if(e.relativePos.x>=d){let h=e.relativePos.x-d,u=i.getTextDirection(r)===Fs.RTL;return xs.createOutsideEditor(s,new M(r,u?1:i.getLineMaxColumn(r)),"right",h)}return null}_findMousePosition(e,t){let i=this._getPositionOutsideEditor(e);if(i)return i;let n=this._createMouseTarget(e,t);if(!n.position)return null;if(n.type===8||n.type===5){let r=this._helpPositionJumpOverViewZone(n.detail);if(r)return xs.createViewZone(n.type,n.element,n.mouseColumn,r,n.detail)}return n}_helpPositionJumpOverViewZone(e){let t=new M(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),i=e.positionBefore,n=e.positionAfter;return i&&n?i.isBefore(t)?i:n:null}_dispatchMouse(e,t,i){e.position&&this._viewController.dispatchMouse({position:e.position,mouseColumn:e.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,revealType:i,inSelectionMode:t,mouseDownCount:this._mouseState.count,altKey:this._mouseState.altKey,ctrlKey:this._mouseState.ctrlKey,metaKey:this._mouseState.metaKey,shiftKey:this._mouseState.shiftKey,leftButton:this._mouseState.leftButton,middleButton:this._mouseState.middleButton,onInjectedText:e.type===6&&e.detail.injectedText!==null})}},DZ=class o{static{this.CLEAR_MOUSE_DOWN_COUNT_TIME=400}get altKey(){return this._altKey}get ctrlKey(){return this._ctrlKey}get metaKey(){return this._metaKey}get shiftKey(){return this._shiftKey}get leftButton(){return this._leftButton}get middleButton(){return this._middleButton}get startedOnLineNumbers(){return this._startedOnLineNumbers}constructor(){this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1,this._shiftKey=!1,this._leftButton=!1,this._middleButton=!1,this._startedOnLineNumbers=!1,this._lastMouseDownPosition=null,this._lastMouseDownPositionEqualCount=0,this._lastMouseDownCount=0,this._lastSetMouseDownCountTime=0,this.isDragAndDrop=!1}get count(){return this._lastMouseDownCount}setModifiers(e){this._altKey=e.altKey,this._ctrlKey=e.ctrlKey,this._metaKey=e.metaKey,this._shiftKey=e.shiftKey}setStartButtons(e){this._leftButton=e.leftButton,this._middleButton=e.middleButton}setStartedOnLineNumbers(e){this._startedOnLineNumbers=e}trySetCount(e,t){let i=new Date().getTime();i-this._lastSetMouseDownCountTime>o.CLEAR_MOUSE_DOWN_COUNT_TIME&&(e=1),this._lastSetMouseDownCountTime=i,e>this._lastMouseDownCount+1&&(e=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(t)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=t,this._lastMouseDownCount=Math.min(e,this._lastMouseDownPositionEqualCount)}}});var Xt,Yf=x(()=>{ae();Xt=class{get event(){return this.emitter.event}constructor(e,t,i){let n=s=>this.emitter.fire(s);this.emitter=new N({onWillAddFirstListener:()=>e.addEventListener(t,n,i),onDidRemoveLastListener:()=>e.removeEventListener(t,n,i)})}dispose(){this.emitter.dispose()}}});function r4(o){return`${o}-${Bu()}`}var Bu,Db=x(()=>{Bu=(function(){if(typeof crypto.randomUUID=="function")return crypto.randomUUID.bind(crypto);let o=new Uint8Array(16),e=[];for(let t=0;t<256;t++)e.push(t.toString(16).padStart(2,"0"));return function(){crypto.getRandomValues(o),o[6]=o[6]&15|64,o[8]=o[8]&63|128;let i=0,n="";return n+=e[o[i++]],n+=e[o[i++]],n+=e[o[i++]],n+=e[o[i++]],n+="-",n+=e[o[i++]],n+=e[o[i++]],n+="-",n+=e[o[i++]],n+=e[o[i++]],n+="-",n+=e[o[i++]],n+=e[o[i++]],n+="-",n+=e[o[i++]],n+=e[o[i++]],n+=e[o[i++]],n+=e[o[i++]],n+=e[o[i++]],n+=e[o[i++]],n}})()});var Wu,x1=x(()=>{Q_();Wu={RESOURCES:"ResourceURLs",TEXT:yn.text,INTERNAL_URI_LIST:"application/vnd.code.uri-list"}});function hT(o,e){return{id:e,asString:async()=>o,asFile:()=>{},value:typeof o=="string"?o:void 0}}function Uve(o,e,t,i){let n={id:Bu(),name:o,uri:e,data:t};return{id:i,asString:async()=>"",asFile:()=>n,value:void 0}}function a4(o){return o.toLowerCase()}function NZ(o,e){return $ve(a4(o),e.map(a4))}function $ve(o,e){if(o==="*/*")return e.length>0;if(e.includes(o))return!0;let t=o.match(/^([a-z]+)\/([a-z]+|\*)$/i);if(!t)return!1;let[i,n,s]=t;return s==="*"?e.some(r=>r.startsWith(n+"/")):!1}var Nb,TC,uT=x(()=>{qe();oa();Db();Nb=class{constructor(){this._entries=new Map}get size(){let e=0;for(let t of this._entries)e++;return e}has(e){return this._entries.has(this.toKey(e))}matches(e){let t=[...this._entries.keys()];return ut.some(this,([i,n])=>n.asFile())&&t.push("files"),$ve(a4(e),t)}get(e){return this._entries.get(this.toKey(e))?.[0]}append(e,t){let i=this._entries.get(e);i?i.push(t):this._entries.set(this.toKey(e),[t])}replace(e,t){this._entries.set(this.toKey(e),[t])}delete(e){this._entries.delete(this.toKey(e))}*[Symbol.iterator](){for(let[e,t]of this._entries)for(let i of t)yield[e,i]}toKey(e){return a4(e)}};TC=Object.freeze({create:o=>vl(o.map(e=>e.toString())).join(`\r +`),split:o=>o.split(`\r +`),parse:o=>TC.split(o).filter(e=>!e.startsWith("#"))})});function MZ(o){if(La&&typeof globalThis.vscode?.webUtils?.getPathForFile=="function")return globalThis.vscode?.webUtils?.getPathForFile(o)}var AZ,RZ,l5e,l4,OZ=x(()=>{rt();ls();AZ={EDITORS:"CodeEditors",FILES:"CodeFiles"},RZ=class{},l5e={DragAndDropContribution:"workbench.contributions.dragAndDrop"};jt.add(l5e.DragAndDropContribution,new RZ);l4=class o{static{this.INSTANCE=new o}constructor(){}static getInstance(){return o.INSTANCE}hasData(e){return e&&e===this.proto}getData(e){if(this.hasData(e))return this.data}}});function c5e(o){let e=new Nb;for(let t of o.items){let i=t.type;if(t.kind==="string"){let n=new Promise(s=>t.getAsString(s));e.append(i,hT(n))}else if(t.kind==="file"){let n=t.getAsFile();n&&e.append(i,d5e(n))}}return e}function d5e(o){let e=MZ(o),t=e?Le.parse(e):void 0;return Uve(o.name,t,async()=>new Uint8Array(await o.arrayBuffer()))}function c4(o,e=!1){let t=c5e(o),i=t.get(Wu.INTERNAL_URI_LIST);if(i)t.replace(yn.uriList,i);else if(e||!t.has(yn.uriList)){let n=[];for(let s of o.items){let r=s.getAsFile();if(r){let a=MZ(r);try{a?n.push(Le.file(a).toString()):n.push(Le.parse(r.name,!0).toString())}catch{}}}n.length&&t.replace(yn.uriList,hT(TC.create(n)))}for(let n of h5e)t.delete(n);return t}var h5e,PZ=x(()=>{x1();uT();Q_();ai();OZ();h5e=Object.freeze([AZ.EDITORS,AZ.FILES,Wu.RESOURCES,Wu.INTERNAL_URI_LIST])});function qve(o,e,t){let{dataToCopy:i,metadata:n}=Kve(o);return jve(i.text,n,t),{dataToCopy:i,metadata:n}}function jve(o,e,t){Rb.INSTANCE.set(t?o.replace(/\r\n/g,` +`):o,e)}function Kve(o){let e=o.getEditorOption(45),t=o.getEditorOption(31),i=o.getCursorStates().map(r=>r.modelState.selection),n=u5e(o,i,e,t),s={version:1,id:Bu(),isFromEmptySelection:n.isFromEmptySelection,multicursorText:n.multicursorText,mode:n.mode};return{dataToCopy:n,metadata:s}}function u5e(o,e,t,i){let{sourceRanges:n,sourceText:s}=o.getPlainTextToCopy(e,t,sn),r=o.model.getEOL(),a=t&&e.length===1&&e[0].isEmpty(),l=Array.isArray(s)?s:null,c=Array.isArray(s)?s.join(r):s,d,h=null;if(Zf.forceCopyWithSyntaxHighlighting||i&&s.length<65536){let f=o.getRichTextToCopy(e,t);f&&(d=f.html,h=f.mode)}return{isFromEmptySelection:a,sourceRanges:n,multicursorText:l,text:c,html:d,mode:h}}function k1(o,e,t,i,n){let{dataToCopy:s,metadata:r}=Kve(t.viewModel),a=!1;return{isCut:e,clipboardData:{setData:(l,c)=>{o.clipboardData?.setData(l,c)}},dataToCopy:s,ensureClipboardGetsEditorData:()=>{o.preventDefault(),o.clipboardData&&Gve.setTextData(o.clipboardData,s.text,s.html,r),jve(s.text,r,n),i.trace("ensureClipboardGetsEditorSelection with id : ",r.id," with text.length: ",s.text.length)},setHandled:()=>{a=!0,o.preventDefault(),o.stopImmediatePropagation()},get isHandled(){return a}}}function d4(o){let e=!1,[t,i]=o.clipboardData?Gve.getTextData(o.clipboardData):["",null];return i=i||Rb.INSTANCE.get(t),{clipboardData:f5e(o.clipboardData),metadata:i,text:t,toExternalVSDataTransfer:()=>o.clipboardData?c4(o.clipboardData):void 0,browserEvent:o,setHandled:()=>{e=!0,o.preventDefault(),o.stopImmediatePropagation()},get isHandled(){return e}}}function f5e(o){return{types:Array.from(o?.types??[]),files:Array.prototype.slice.call(o?.files??[],0),getData:e=>o?.getData(e)??""}}var Rb,Zf,Gve,h4=x(()=>{rt();Q_();Db();PZ();Rb=class o{static{this.INSTANCE=new o}constructor(){this._lastState=null}set(e,t){this._lastState={lastCopiedValue:e,data:t}}get(e){return this._lastState&&this._lastState.lastCopiedValue===e?this._lastState.data:(this._lastState=null,null)}},Zf={forceCopyWithSyntaxHighlighting:!1,electronBugWorkaroundCopyEventHasFired:!1},Gve={getTextData(o){let e=o.getData(yn.text),t=null,i=o.getData("vscode-editor-data");if(typeof i=="string")try{t=JSON.parse(i),t.version!==1&&(t=null)}catch{}return e.length===0&&t===null&&o.files.length>0?[Array.prototype.slice.call(o.files,0).map(s=>s.name).join(` +`),null]:[e,t]},setTextData(o,e,t,i){o.setData(yn.text,e),typeof t=="string"&&o.setData("text/html",t),o.setData("vscode-editor-data",JSON.stringify(i))}}});var $r,FZ=x(()=>{He();$r=class o{static{this.EMPTY=new o("",0,0,null,void 0)}constructor(e,t,i,n,s){this.value=e,this.selectionStart=t,this.selectionEnd=i,this.selection=n,this.newlineCountBeforeSelection=s}toString(){return`[ <${this.value}>, selectionStart: ${this.selectionStart}, selectionEnd: ${this.selectionEnd}]`}static readFromTextArea(e,t){let i=e.getValue(),n=e.getSelectionStart(),s=e.getSelectionEnd(),r;if(t){let a=i.substring(0,n),l=t.value.substring(0,t.selectionStart);a===l&&(r=t.newlineCountBeforeSelection)}return new o(i,n,s,null,r)}collapseSelection(){return this.selectionStart===this.value.length?this:new o(this.value,this.value.length,this.value.length,null,void 0)}isWrittenToTextArea(e,t){let i=this.value===e.getValue();return t?this.selectionStart===e.getSelectionStart()&&this.selectionEnd===e.getSelectionEnd()&&i:i}writeToTextArea(e,t,i){t.setValue(e,this.value),i&&t.setSelectionRange(e,this.selectionStart,this.selectionEnd)}deduceEditorPosition(e){if(e<=this.selectionStart){let n=this.value.substring(e,this.selectionStart);return this._finishDeduceEditorPosition(this.selection?.getStartPosition()??null,n,-1)}if(e>=this.selectionEnd){let n=this.value.substring(this.selectionEnd,e);return this._finishDeduceEditorPosition(this.selection?.getEndPosition()??null,n,1)}let t=this.value.substring(this.selectionStart,e);if(t.indexOf("\u2026")===-1)return this._finishDeduceEditorPosition(this.selection?.getStartPosition()??null,t,1);let i=this.value.substring(e,this.selectionEnd);return this._finishDeduceEditorPosition(this.selection?.getEndPosition()??null,i,-1)}_finishDeduceEditorPosition(e,t,i){let n=0,s=-1;for(;(s=t.indexOf(` +`,s+1))!==-1;)n++;return[e,i*t.length,n]}static deduceInput(e,t,i){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};let n=Math.min(vr(e.value,t.value),e.selectionStart,t.selectionStart),s=Math.min(rc(e.value,t.value),e.value.length-e.selectionEnd,t.value.length-t.selectionEnd);e.value.substring(n,e.value.length-s);let r=t.value.substring(n,t.value.length-s),a=e.selectionStart-n,l=e.selectionEnd-n,c=t.selectionStart-n,d=t.selectionEnd-n;if(c===d){let u=e.selectionStart-n;return{text:r,replacePrevCharCnt:u,replaceNextCharCnt:0,positionDelta:0}}let h=l-a;return{text:r,replacePrevCharCnt:h,replaceNextCharCnt:0,positionDelta:0}}static deduceAndroidCompositionInput(e,t){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};if(e.value===t.value)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:t.selectionEnd-e.selectionEnd};let i=Math.min(vr(e.value,t.value),e.selectionEnd),n=Math.min(rc(e.value,t.value),e.value.length-e.selectionEnd),s=e.value.substring(i,e.value.length-n),r=t.value.substring(i,t.value.length-n);e.selectionStart-i;let a=e.selectionEnd-i;t.selectionStart-i;let l=t.selectionEnd-i;return{text:r,replacePrevCharCnt:a,replaceNextCharCnt:s.length-a,positionDelta:l-r.length}}static fromScreenReaderContentState(e){let t,i;switch(e.selection.getDirection()){case 0:t=e.selectionStart,i=e.selectionEnd;break;case 1:t=e.selectionEnd,i=e.selectionStart;break}return new o(e.value,t,i,e.selection,e.newlineCountBeforeSelection)}}});var g5e,Yve,fT,BZ,u4,f4,WZ=x(()=>{Ns();re();Yf();wr();bF();Ze();ae();W();He();gi();us();So();h4();FZ();g5e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Yve=function(o,e){return function(t,i){e(t,i,o)}};(function(o){o.Tap="-monaco-textarea-synthetic-tap"})(fT||(fT={}));BZ=class{constructor(){this._lastTypeTextLength=0}handleCompositionUpdate(e){e=e||"";let t={text:e,replacePrevCharCnt:this._lastTypeTextLength,replaceNextCharCnt:0,positionDelta:0};return this._lastTypeTextLength=e.length,t}},u4=class extends T{get textAreaState(){return this._textAreaState}constructor(e,t,i,n,s,r){super(),this._host=e,this._textArea=t,this._OS=i,this._browser=n,this._accessibilityService=s,this._logService=r,this._onFocus=this._register(new N),this.onFocus=this._onFocus.event,this._onBlur=this._register(new N),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new N),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new N),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new N),this.onCut=this._onCut.event,this._onPaste=this._register(new N),this.onPaste=this._onPaste.event,this._onWillCopy=this._register(new N),this.onWillCopy=this._onWillCopy.event,this._onWillCut=this._register(new N),this.onWillCut=this._onWillCut.event,this._onWillPaste=this._register(new N),this.onWillPaste=this._onWillPaste.event,this._onType=this._register(new N),this.onType=this._onType.event,this._onCompositionStart=this._register(new N),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new N),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new N),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new N),this.onSelectionChangeRequest=this._onSelectionChangeRequest.event,this._asyncFocusGainWriteScreenReaderContent=this._register(new Qe),this._asyncTriggerCut=this._register(new at(()=>this._onCut.fire(),0)),this._textAreaState=$r.EMPTY,this._selectionChangeListener=null,this._accessibilityService.isScreenReaderOptimized()&&this.writeNativeTextAreaContent("ctor"),this._register(Q.runAndSubscribe(this._accessibilityService.onDidChangeScreenReaderOptimized,()=>{this._accessibilityService.isScreenReaderOptimized()&&!this._asyncFocusGainWriteScreenReaderContent.value?this._asyncFocusGainWriteScreenReaderContent.value=new at(()=>this.writeNativeTextAreaContent("asyncFocusGain"),0):this._asyncFocusGainWriteScreenReaderContent.clear()})),this._hasFocus=!1,this._currentComposition=null;let a=null;this._register(this._textArea.onKeyDown(l=>{let c=new Mt(l);(c.keyCode===114||this._currentComposition&&c.keyCode===1)&&c.stopPropagation(),c.equals(9)&&c.preventDefault(),a=c,this._onKeyDown.fire(c)})),this._register(this._textArea.onKeyUp(l=>{let c=new Mt(l);this._onKeyUp.fire(c)})),this._register(this._textArea.onCompositionStart(l=>{let c=new BZ;if(this._currentComposition){this._currentComposition=c;return}if(this._currentComposition=c,this._OS===2&&a&&a.equals(114)&&this._textAreaState.selectionStart===this._textAreaState.selectionEnd&&this._textAreaState.selectionStart>0&&this._textAreaState.value.substr(this._textAreaState.selectionStart-1,1)===l.data&&(a.code==="ArrowRight"||a.code==="ArrowLeft")){c.handleCompositionUpdate("x"),this._onCompositionStart.fire({data:l.data});return}if(this._browser.isAndroid){this._onCompositionStart.fire({data:l.data});return}this._onCompositionStart.fire({data:l.data})})),this._register(this._textArea.onCompositionUpdate(l=>{let c=this._currentComposition;if(!c)return;if(this._browser.isAndroid){let h=$r.readFromTextArea(this._textArea,this._textAreaState),u=$r.deduceAndroidCompositionInput(this._textAreaState,h);this._textAreaState=h,this._onType.fire(u),this._onCompositionUpdate.fire(l);return}let d=c.handleCompositionUpdate(l.data);this._textAreaState=$r.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(d),this._onCompositionUpdate.fire(l)})),this._register(this._textArea.onCompositionEnd(l=>{let c=this._currentComposition;if(!c)return;if(this._currentComposition=null,this._browser.isAndroid){let h=$r.readFromTextArea(this._textArea,this._textAreaState),u=$r.deduceAndroidCompositionInput(this._textAreaState,h);this._textAreaState=h,this._onType.fire(u),this._onCompositionEnd.fire();return}let d=c.handleCompositionUpdate(l.data);this._textAreaState=$r.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(d),this._onCompositionEnd.fire()})),this._register(this._textArea.onInput(l=>{if(this._textArea.setIgnoreSelectionChangeTime("received input event"),this._currentComposition)return;let c=$r.readFromTextArea(this._textArea,this._textAreaState),d=$r.deduceInput(this._textAreaState,c,this._OS===2);d.replacePrevCharCnt===0&&d.text.length===1&&(Dn(d.text.charCodeAt(0))||d.text.charCodeAt(0)===127)||(this._textAreaState=c,(d.text!==""||d.replacePrevCharCnt!==0||d.replaceNextCharCnt!==0||d.positionDelta!==0)&&(l.inputType==="insertFromPaste"?this._onPaste.fire({text:d.text,metadata:Rb.INSTANCE.get(d.text)}):this._onType.fire(d)))})),this._register(this._textArea.onCut(l=>{this._logService.trace("TextAreaInput#onCut",l);let c=k1(l,!0,this._host.context,this._logService,this._browser.isFirefox);this._onWillCut.fire(c),!c.isHandled&&(this._textArea.setIgnoreSelectionChangeTime("received cut event"),c.ensureClipboardGetsEditorData(),this._asyncTriggerCut.schedule())})),this._register(this._textArea.onCopy(l=>{this._logService.trace("TextAreaInput#onCopy",l),Zf.electronBugWorkaroundCopyEventHasFired=!0;let c=k1(l,!1,this._host.context,this._logService,this._browser.isFirefox);this._onWillCopy.fire(c),!c.isHandled&&c.ensureClipboardGetsEditorData()})),this._register(this._textArea.onPaste(l=>{this._logService.trace("TextAreaInput#onPaste",l);let c=d4(l);this._onWillPaste.fire(c),!c.isHandled&&(this._textArea.setIgnoreSelectionChangeTime("received paste event"),l.preventDefault(),this._logService.trace("TextAreaInput#onPaste with id : ",c.metadata?.id," with text.length: ",c.text.length),c.text&&(this._logService.trace("TextAreaInput#onPaste (before onPaste)"),this._onPaste.fire({text:c.text,metadata:c.metadata})))})),this._register(this._textArea.onFocus(()=>{let l=this._hasFocus;this._setHasFocus(!0),this._accessibilityService.isScreenReaderOptimized()&&this._browser.isSafari&&!l&&this._hasFocus&&(this._asyncFocusGainWriteScreenReaderContent.value||(this._asyncFocusGainWriteScreenReaderContent.value=new at(()=>this.writeNativeTextAreaContent("asyncFocusGain"),0)),this._asyncFocusGainWriteScreenReaderContent.value.schedule())})),this._register(this._textArea.onBlur(()=>{this._currentComposition&&(this._currentComposition=null,this.writeNativeTextAreaContent("blurWithoutCompositionEnd"),this._onCompositionEnd.fire()),this._setHasFocus(!1)})),this._register(this._textArea.onSyntheticTap(()=>{this._browser.isAndroid&&this._currentComposition&&(this._currentComposition=null,this.writeNativeTextAreaContent("tapWithoutCompositionEnd"),this._onCompositionEnd.fire())}))}_installSelectionChangeListener(){let e=0;return B(this._textArea.ownerDocument,"selectionchange",t=>{if(Ml.onSelectionChange(),!this._hasFocus||this._currentComposition||!this._browser.isChrome)return;let i=Date.now(),n=i-e;if(e=i,n<5)return;let s=i-this._textArea.getIgnoreSelectionChangeTime();if(this._textArea.resetSelectionChangeTime(),s<100||!this._textAreaState.selection)return;let r=this._textArea.getValue();if(this._textAreaState.value!==r)return;let a=this._textArea.getSelectionStart(),l=this._textArea.getSelectionEnd();if(this._textAreaState.selectionStart===a&&this._textAreaState.selectionEnd===l)return;let c=this._textAreaState.deduceEditorPosition(a),d=this._host.deduceModelPosition(c[0],c[1],c[2]),h=this._textAreaState.deduceEditorPosition(l),u=this._host.deduceModelPosition(h[0],h[1],h[2]),f=new me(d.lineNumber,d.column,u.lineNumber,u.column);this._onSelectionChangeRequest.fire(f)})}dispose(){super.dispose(),this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null)}focusTextArea(){this._setHasFocus(!0),this.refreshFocusState()}isFocused(){return this._hasFocus}refreshFocusState(){this._setHasFocus(this._textArea.hasFocus())}_setHasFocus(e){this._hasFocus!==e&&(this._hasFocus=e,this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null),this._hasFocus&&(this._selectionChangeListener=this._installSelectionChangeListener()),this._hasFocus&&this.writeNativeTextAreaContent("focusgain"),this._hasFocus?this._onFocus.fire():this._onBlur.fire())}_setAndWriteTextAreaState(e,t){this._hasFocus||(t=t.collapseSelection()),t.isWrittenToTextArea(this._textArea,this._hasFocus)||this._logService.trace(`writeTextAreaState(reason: ${e})`),t.writeToTextArea(e,this._textArea,this._hasFocus),this._textAreaState=t}writeNativeTextAreaContent(e){!this._accessibilityService.isScreenReaderOptimized()&&e==="render"||this._currentComposition||this._setAndWriteTextAreaState(e,this._host.getScreenReaderContent())}};u4=g5e([Yve(4,Ri),Yve(5,Ot)],u4);f4=class extends T{get ownerDocument(){return this._actual.ownerDocument}constructor(e){super(),this._actual=e,this._onSyntheticTap=this._register(new N),this.onSyntheticTap=this._onSyntheticTap.event,this._ignoreSelectionChangeTime=0,this.onKeyDown=this._register(new Xt(this._actual,"keydown")).event,this.onKeyPress=this._register(new Xt(this._actual,"keypress")).event,this.onKeyUp=this._register(new Xt(this._actual,"keyup")).event,this.onCompositionStart=this._register(new Xt(this._actual,"compositionstart")).event,this.onCompositionUpdate=this._register(new Xt(this._actual,"compositionupdate")).event,this.onCompositionEnd=this._register(new Xt(this._actual,"compositionend")).event,this.onBeforeInput=this._register(new Xt(this._actual,"beforeinput")).event,this.onInput=this._register(new Xt(this._actual,"input")).event,this.onCut=this._register(new Xt(this._actual,"cut")).event,this.onCopy=this._register(new Xt(this._actual,"copy")).event,this.onPaste=this._register(new Xt(this._actual,"paste")).event,this.onFocus=this._register(new Xt(this._actual,"focus")).event,this.onBlur=this._register(new Xt(this._actual,"blur")).event,this._register(this.onKeyDown(()=>Ml.onKeyDown())),this._register(this.onBeforeInput(()=>Ml.onBeforeInput())),this._register(this.onInput(()=>Ml.onInput())),this._register(this.onKeyUp(()=>Ml.onKeyUp())),this._register(B(this._actual,fT.Tap,()=>this._onSyntheticTap.fire()))}hasFocus(){let e=Wd(this._actual);return e?e.activeElement===this._actual:this._actual.isConnected?Ui()===this._actual:!1}setIgnoreSelectionChangeTime(e){this._ignoreSelectionChangeTime=Date.now()}getIgnoreSelectionChangeTime(){return this._ignoreSelectionChangeTime}resetSelectionChangeTime(){this._ignoreSelectionChangeTime=0}getValue(){return this._actual.value}setValue(e,t){let i=this._actual;i.value!==t&&(this.setIgnoreSelectionChangeTime("setValue"),i.value=t)}getSelectionStart(){return this._actual.selectionDirection==="backward"?this._actual.selectionEnd:this._actual.selectionStart}getSelectionEnd(){return this._actual.selectionDirection==="backward"?this._actual.selectionStart:this._actual.selectionEnd}setSelectionRange(e,t,i){let n=this._actual,s=null,r=Wd(n);r?s=r.activeElement:s=Ui();let a=we(s),l=s===n,c=n.selectionStart,d=n.selectionEnd;if(l&&c===t&&d===i){bo&&a.parent!==a&&n.focus();return}if(l){this.setIgnoreSelectionChangeTime("setSelectionRange"),n.setSelectionRange(t,i),bo&&a.parent!==a&&n.focus();return}try{let h=bme(n);this.setIgnoreSelectionChangeTime("setSelectionRange"),n.focus(),n.setSelectionRange(t,i),vme(n,h)}catch{}}}});var HZ,VZ,g4,Zve=x(()=>{uO();re();Bl();br();W();rt();zve();kb();WZ();HZ=class extends S1{constructor(e,t,i){super(e,t,i),this._register(jn.addTarget(this.viewHelper.linesContentDomNode)),this._register(B(this.viewHelper.linesContentDomNode,vi.Tap,s=>this.onTap(s))),this._register(B(this.viewHelper.linesContentDomNode,vi.Change,s=>this.onChange(s))),this._register(B(this.viewHelper.linesContentDomNode,vi.Contextmenu,s=>this._onContextMenu(new jc(s,!1,this.viewHelper.viewDomNode),!1))),this._lastPointerType="mouse",this._register(B(this.viewHelper.linesContentDomNode,"pointerdown",s=>{let r=s.pointerType;if(r==="mouse"){this._lastPointerType="mouse";return}else r==="touch"?this._lastPointerType="touch":this._lastPointerType="pen"}));let n=new VF(this.viewHelper.viewDomNode);this._register(n.onPointerMove(this.viewHelper.viewDomNode,s=>this._onMouseMove(s))),this._register(n.onPointerUp(this.viewHelper.viewDomNode,s=>this._onMouseUp(s))),this._register(n.onPointerLeave(this.viewHelper.viewDomNode,s=>this._onMouseLeave(s))),this._register(n.onPointerDown(this.viewHelper.viewDomNode,(s,r)=>this._onMouseDown(s,r)))}onTap(e){!e.initialTarget||!this.viewHelper.linesContentDomNode.contains(e.initialTarget)||(e.preventDefault(),this.viewHelper.focusTextArea(),this._dispatchGesture(e,!1))}onChange(e){this._lastPointerType==="touch"&&this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY),this._lastPointerType==="pen"&&this._dispatchGesture(e,!0)}_dispatchGesture(e,t){let i=this._createMouseTarget(new jc(e,!1,this.viewHelper.viewDomNode),!1);i.position&&this.viewController.dispatchMouse({position:i.position,mouseColumn:i.position.column,startedOnLineNumbers:!1,revealType:1,mouseDownCount:e.tapCount,inSelectionMode:t,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1,onInjectedText:i.type===6&&i.detail.injectedText!==null})}_onMouseDown(e,t){e.browserEvent.pointerType!=="touch"&&super._onMouseDown(e,t)}},VZ=class extends S1{constructor(e,t,i){super(e,t,i),this._register(jn.addTarget(this.viewHelper.linesContentDomNode)),this._register(B(this.viewHelper.linesContentDomNode,vi.Tap,n=>this.onTap(n))),this._register(B(this.viewHelper.linesContentDomNode,vi.Change,n=>this.onChange(n))),this._register(B(this.viewHelper.linesContentDomNode,vi.Contextmenu,n=>this._onContextMenu(new jc(n,!1,this.viewHelper.viewDomNode),!1)))}onTap(e){e.preventDefault(),this.viewHelper.focusTextArea();let t=this._createMouseTarget(new jc(e,!1,this.viewHelper.viewDomNode),!1);if(t.position){let i=document.createEvent("CustomEvent");i.initEvent(fT.Tap,!1,!0),this.viewHelper.dispatchTextAreaEvent(i),this.viewController.moveTo(t.position,1)}}onChange(e){this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)}},g4=class extends T{constructor(e,t,i){super(),(pr||qfe&&OM)&&R_.pointerEvents?this.handler=this._register(new HZ(e,t,i)):Tt.TouchEvent?this.handler=this._register(new VZ(e,t,i)):this.handler=this._register(new S1(e,t,i))}getTargetAtClientPoint(e,t){return this.handler.getTargetAtClientPoint(e,t)}}});function m5e(o,e,t){let i=0;for(let s=0;s{He();Fl()});function Hu(o){return o==="'"||o==='"'||o==="`"}var p5e,_5e,b5e,op,At,zZ,UZ,ks,Ws,Yc=x(()=>{Pe();ue();gi();Nx();Fl();m4();ZY();p5e=()=>!0,_5e=()=>!1,b5e=o=>o===" "||o===" ",op=class{static shouldRecreate(e){return e.hasChanged(165)||e.hasChanged(148)||e.hasChanged(45)||e.hasChanged(85)||e.hasChanged(88)||e.hasChanged(89)||e.hasChanged(10)||e.hasChanged(11)||e.hasChanged(15)||e.hasChanged(13)||e.hasChanged(14)||e.hasChanged(20)||e.hasChanged(145)||e.hasChanged(141)||e.hasChanged(59)||e.hasChanged(104)||e.hasChanged(147)||e.hasChanged(93)}constructor(e,t,i,n){this.languageConfigurationService=n,this._cursorMoveConfigurationBrand=void 0,this._languageId=e;let s=i.options,r=s.get(165),a=s.get(59);this.readOnly=s.get(104),this.tabSize=t.tabSize,this.indentSize=t.indentSize,this.insertSpaces=t.insertSpaces,this.stickyTabStops=s.get(132),this.lineHeight=a.lineHeight,this.typicalHalfwidthCharacterWidth=a.typicalHalfwidthCharacterWidth,this.pageSize=Math.max(1,Math.floor(r.height/this.lineHeight)-2),this.useTabStops=s.get(145),this.trimWhitespaceOnDelete=s.get(141),this.wordSeparators=s.get(148),this.emptySelectionClipboard=s.get(45),this.copyWithSyntaxHighlighting=s.get(31),this.multiCursorMergeOverlapping=s.get(85),this.multiCursorPaste=s.get(88),this.multiCursorLimit=s.get(89),this.autoClosingBrackets=s.get(10),this.autoClosingComments=s.get(11),this.autoClosingQuotes=s.get(15),this.autoClosingDelete=s.get(13),this.autoClosingOvertype=s.get(14),this.autoSurround=s.get(20),this.autoIndent=s.get(16),this.wordSegmenterLocales=s.get(147),this.overtypeOnPaste=s.get(93),this.surroundingPairs={},this._electricChars=null,this.shouldAutoCloseBefore={quote:this._getShouldAutoClose(e,this.autoClosingQuotes,!0),comment:this._getShouldAutoClose(e,this.autoClosingComments,!1),bracket:this._getShouldAutoClose(e,this.autoClosingBrackets,!1)},this.autoClosingPairs=this.languageConfigurationService.getLanguageConfiguration(e).getAutoClosingPairs();let l=this.languageConfigurationService.getLanguageConfiguration(e).getSurroundingPairs();if(l)for(let d of l)this.surroundingPairs[d.open]=d.close;let c=this.languageConfigurationService.getLanguageConfiguration(e).comments;this.blockCommentStartToken=c?.blockCommentStartToken??null}get electricChars(){if(!this._electricChars){this._electricChars={};let e=this.languageConfigurationService.getLanguageConfiguration(this._languageId).electricCharacter?.getElectricCharacters();if(e)for(let t of e)this._electricChars[t]=!0}return this._electricChars}get inputMode(){return eT.getInputMode()}onElectricCharacter(e,t,i){let n=Df(t,i-1),s=this.languageConfigurationService.getLanguageConfiguration(n.languageId).electricCharacter;return s?s.onElectricCharacter(e,n,i-n.firstCharOffset):null}normalizeIndentation(e){return L1(e,this.indentSize,this.insertSpaces)}_getShouldAutoClose(e,t,i){switch(t){case"beforeWhitespace":return b5e;case"languageDefined":return this._getLanguageDefinedShouldAutoClose(e,i);case"always":return p5e;case"never":return _5e}}_getLanguageDefinedShouldAutoClose(e,t){let i=this.languageConfigurationService.getLanguageConfiguration(e).getAutoCloseBeforeSet(t);return n=>i.indexOf(n)!==-1}visibleColumnFromColumn(e,t){return mi.visibleColumnFromColumn(e.getLineContent(t.lineNumber),t.column,this.tabSize)}columnFromVisibleColumn(e,t,i){let n=mi.columnFromVisibleColumn(e.getLineContent(t),i,this.tabSize),s=e.getLineMinColumn(t);if(nr?r:n}},At=class o{static fromModelState(e){return new zZ(e)}static fromViewState(e){return new UZ(e)}static fromModelSelection(e){let t=me.liftSelection(e),i=new ks(S.fromPositions(t.getSelectionStart()),0,0,t.getPosition(),0);return o.fromModelState(i)}static fromModelSelections(e){let t=[];for(let i=0,n=e.length;i{Yc();Pe();ue();Ab=class o{static columnSelect(e,t,i,n,s,r){let a=Math.abs(s-i)+1,l=i>s,c=n>r,d=nr||bn||_0&&n--,o.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,i.toViewLineNumber,n)}static columnSelectRight(e,t,i){let n=0,s=Math.min(i.fromViewLineNumber,i.toViewLineNumber),r=Math.max(i.fromViewLineNumber,i.toViewLineNumber);for(let l=s;l<=r;l++){let c=t.getLineMaxColumn(l),d=e.visibleColumnFromColumn(t,new M(l,c));n=Math.max(n,d)}let a=i.toViewVisualColumn;return a{Pe();ue();gi();No=class{constructor(e,t,i=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=i}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let n=t.getInverseEditOperations()[0].range;return me.fromPositions(n.getEndPosition())}},I1=class{constructor(e,t,i=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=i}getEditOperations(e,t){let i=this._range.getStartPosition(),n=this._range.getEndPosition(),s=n.lineNumber,r=this._text.length+(this._range.isEmpty()?0:-1),a=Qve(e,n,r);a.lineNumber>s&&(a=new M(s,e.getLineMaxColumn(s)));let l=S.fromPositions(i,a);t.addTrackedEditOperation(l,this._text)}computeCursorState(e,t){let n=t.getInverseEditOperations()[0].range;return me.fromPositions(n.getEndPosition())}},p4=class{constructor(e,t){this._range=e,this._text=t}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let n=t.getInverseEditOperations()[0].range;return me.fromRange(n,0)}},DC=class{constructor(e,t,i=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=i}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let n=t.getInverseEditOperations()[0].range;return me.fromPositions(n.getStartPosition())}},NC=class{constructor(e,t,i,n,s=!1){this._range=e,this._text=t,this._columnDeltaOffset=n,this._lineNumberDeltaOffset=i,this.insertsAutoWhitespace=s}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let n=t.getInverseEditOperations()[0].range;return me.fromPositions(n.getEndPosition().delta(this._lineNumberDeltaOffset,this._columnDeltaOffset))}},_4=class{constructor(e){this._range=e}getEditOperations(e,t){let i=e.getValueInRange(this._range),n=this._range.getEndPosition(),s=n.lineNumber,r=Qve(e,n,i.length);r.lineNumber>s&&(r=new M(s,e.getLineMaxColumn(s)));let a=S.fromPositions(n,r);t.addTrackedEditOperation(a,"")}computeCursorState(e,t){let n=t.getInverseEditOperations()[0].range;return me.fromPositions(n.getEndPosition())}},Mb=class{constructor(e,t,i,n=!1){this._range=e,this._text=t,this._initialSelection=i,this._forceMoveMarkers=n,this._selectionId=null}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text,this._forceMoveMarkers),this._selectionId=t.trackSelection(this._initialSelection)}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}});var gT,kn,b4=x(()=>{He();Fl();Pe();ue();vZ();Yc();gT=class{constructor(e,t,i){this._cursorPositionBrand=void 0,this.lineNumber=e,this.column=t,this.leftoverVisibleColumns=i}},kn=class o{static leftPosition(e,t){if(t.column>e.getLineMinColumn(t.lineNumber))return t.delta(void 0,-oK(e.getLineContent(t.lineNumber),t.column-1));if(t.lineNumber>1){let i=t.lineNumber-1;return new M(i,e.getLineMaxColumn(i))}else return t}static leftPositionAtomicSoftTabs(e,t,i){if(t.column<=e.getLineIndentColumn(t.lineNumber)){let n=e.getLineMinColumn(t.lineNumber),s=e.getLineContent(t.lineNumber),r=LC.atomicPosition(s,t.column-1,i,0);if(r!==-1&&r+1>=n)return new M(t.lineNumber,r+1)}return this.leftPosition(e,t)}static left(e,t,i){let n=e.stickyTabStops?o.leftPositionAtomicSoftTabs(t,i,e.tabSize):o.leftPosition(t,i);return new gT(n.lineNumber,n.column,0)}static moveLeft(e,t,i,n,s){let r,a;if(i.hasSelection()&&!n)r=i.selection.startLineNumber,a=i.selection.startColumn;else{let l=i.position.delta(void 0,-(s-1)),c=t.normalizePosition(o.clipPositionColumn(l,t),0),d=o.left(e,t,c);r=d.lineNumber,a=d.column}return i.move(n,r,a,0)}static clipPositionColumn(e,t){return new M(e.lineNumber,o.clipRange(e.column,t.getLineMinColumn(e.lineNumber),t.getLineMaxColumn(e.lineNumber)))}static clipRange(e,t,i){return ei?i:e}static rightPosition(e,t,i){return id?(i=d,a?n=t.getLineMaxColumn(i):n=Math.min(t.getLineMaxColumn(i),n)):n=e.columnFromVisibleColumn(t,i,c),f?s=0:s=c-mi.visibleColumnFromColumn(t.getLineContent(i),n,e.tabSize),l!==void 0){let g=new M(i,n),p=t.normalizePosition(g,l);s=s+(n-p.column),i=p.lineNumber,n=p.column}return new gT(i,n,s)}static down(e,t,i,n,s,r,a){return this.vertical(e,t,i,n,s,i+r,a,4)}static moveDown(e,t,i,n,s){let r,a;i.hasSelection()&&!n?(r=i.selection.endLineNumber,a=i.selection.endColumn):(r=i.position.lineNumber,a=i.position.column);let l=0,c;do if(c=o.down(e,t,r+l,a,i.leftoverVisibleColumns,s,!0),t.normalizePosition(new M(c.lineNumber,c.column),2).lineNumber>r)break;while(l++<10&&r+l1&&this._isBlankLine(t,s);)s--;for(;s>1&&!this._isBlankLine(t,s);)s--;return i.move(n,s,t.getLineMinColumn(s),0)}static moveToNextBlankLine(e,t,i,n){let s=t.getLineCount(),r=i.position.lineNumber;for(;r{He();RC();Yc();Fl();b4();ue();Pe();sp=class o{static deleteRight(e,t,i,n){let s=[],r=e!==3;for(let a=0,l=n.length;a0,a=t.getLineFirstNonWhitespaceColumn(s.lineNumber);if(r&&a>0)return new S(s.lineNumber,a,n.lineNumber,n.column)}return new S(s.lineNumber,s.column,n.lineNumber,n.column)}static isAutoClosingPairDelete(e,t,i,n,s,r,a){if(t==="never"&&i==="never"||e==="never")return!1;for(let l=0,c=r.length;l=u.length+1)return!1;let f=u.charAt(h.column-2),g=n.get(f);if(!g)return!1;if(Hu(f)){if(i==="never")return!1}else if(t==="never")return!1;let p=u.charAt(h.column-1),_=!1;for(let b of g)b.open===f&&b.close===p&&(_=!0);if(!_)return!1;if(e==="auto"){let b=!1;for(let v=0,w=a.length;v1){let s=t.getLineContent(n.lineNumber),r=Zn(s),a=r===-1?s.length+1:r+1;if(n.column<=a){let l=i.visibleColumnFromColumn(t,n),c=mi.prevIndentTabStop(l,i.indentSize),d=i.columnFromVisibleColumn(t,n.lineNumber,c);return new S(n.lineNumber,d,n.lineNumber,n.column)}}return S.fromPositions(o.getPositionAfterDeleteLeft(n,t),n)}static getPositionAfterDeleteLeft(e,t){if(e.column>1){let i=Ige(e.column-1,t.getLineContent(e.lineNumber));return e.with(void 0,i+1)}else if(e.lineNumber>1){let i=e.lineNumber-1;return new M(i,t.getLineMaxColumn(i))}else return e}static cut(e,t,i){let n=[],s=null;i.sort((r,a)=>M.compare(r.getStartPosition(),a.getEndPosition()));for(let r=0,a=i.length;r1&&s?.endLineNumber!==c.lineNumber?(d=c.lineNumber-1,h=t.getLineMaxColumn(c.lineNumber-1),u=c.lineNumber,f=t.getLineMaxColumn(c.lineNumber)):(d=c.lineNumber,h=1,u=c.lineNumber,f=t.getLineMaxColumn(c.lineNumber));let g=new S(d,h,u,f);s=g,g.isEmpty()?n[r]=null:n[r]=new No(g,"")}else n[r]=null;else n[r]=new No(l,"")}return new Ws(0,n,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}});function w4(o){return o.filter(e=>!!e)}var fs,AC,mT=x(()=>{He();Yc();v4();Px();Pe();ue();fs=class o{static _createWord(e,t,i,n,s){return{start:n,end:s,wordType:t,nextCharClass:i}}static _createIntlWord(e,t){return{start:e.index,end:e.index+e.segment.length,wordType:1,nextCharClass:t}}static _findPreviousWordOnLine(e,t,i){let n=t.getLineContent(i.lineNumber);return this._doFindPreviousWordOnLine(n,e,i)}static _doFindPreviousWordOnLine(e,t,i){let n=0,s=t.findPrevIntlWordBeforeOrAtOffset(e,i.column-2);for(let r=i.column-2;r>=0;r--){let a=e.charCodeAt(r),l=t.get(a);if(s&&r===s.index)return this._createIntlWord(s,l);if(l===0){if(n===2)return this._createWord(e,n,l,r+1,this._findEndOfWord(e,t,n,r+1));n=1}else if(l===2){if(n===1)return this._createWord(e,n,l,r+1,this._findEndOfWord(e,t,n,r+1));n=2}else if(l===1&&n!==0)return this._createWord(e,n,l,r+1,this._findEndOfWord(e,t,n,r+1))}return n!==0?this._createWord(e,n,1,0,this._findEndOfWord(e,t,n,0)):null}static _findEndOfWord(e,t,i,n){let s=t.findNextIntlWordAtOrAfterOffset(e,n),r=e.length;for(let a=n;a=0;r--){let a=e.charCodeAt(r),l=t.get(a);if(s&&r===s.index)return r;if(l===1||i===1&&l===2||i===2&&l===0)return r+1}return 0}static moveWordLeft(e,t,i,n,s){let r=i.lineNumber,a=i.column;a===1&&r>1&&(r=r-1,a=t.getLineMaxColumn(r));let l=o._findPreviousWordOnLine(e,t,new M(r,a));if(n===0)return new M(r,l?l.start+1:1);if(n===1)return!s&&l&&l.wordType===2&&l.end-l.start===1&&l.nextCharClass===0&&(l=o._findPreviousWordOnLine(e,t,new M(r,l.start+1))),new M(r,l?l.start+1:1);if(n===3){for(;l&&l.wordType===2;)l=o._findPreviousWordOnLine(e,t,new M(r,l.start+1));return new M(r,l?l.start+1:1)}return l&&a<=l.end+1&&(l=o._findPreviousWordOnLine(e,t,new M(r,l.start+1))),new M(r,l?l.end+1:1)}static _moveWordPartLeft(e,t){let i=t.lineNumber,n=e.getLineMaxColumn(i);if(t.column===1)return i>1?new M(i-1,e.getLineMaxColumn(i-1)):t;let s=e.getLineContent(i);for(let r=t.column-1;r>1;r--){let a=s.charCodeAt(r-2),l=s.charCodeAt(r-1);if(a===95&&l!==95)return new M(i,r);if(a===45&&l!==45)return new M(i,r);if((vf(a)||XI(a))&&Ad(l))return new M(i,r);if(Ad(a)&&Ad(l)&&r+1=l.start+1&&(l=o._findNextWordOnLine(e,t,new M(s,l.end+1))),l?r=l.start+1:r=t.getLineMaxColumn(s);return new M(s,r)}static _moveWordPartRight(e,t){let i=t.lineNumber,n=e.getLineMaxColumn(i);if(t.column===n)return i1?c=1:(l--,c=n.getLineMaxColumn(l)):(d&&c<=d.end+1&&(d=o._findPreviousWordOnLine(i,n,new M(l,d.start+1))),d?c=d.end+1:c>1?c=1:(l--,c=n.getLineMaxColumn(l))),new S(l,c,a.lineNumber,a.column)}static deleteInsideWord(e,t,i,n=!1){if(!i.isEmpty())return i;let s=new M(i.positionLineNumber,i.positionColumn),r=this._deleteInsideWordWhitespace(t,s);return r||this._deleteInsideWordDetermineDeleteRange(e,t,s,n)}static _charAtIsWhitespace(e,t){let i=e.charCodeAt(t);return i===32||i===9}static _deleteInsideWordWhitespace(e,t){let i=e.getLineContent(t.lineNumber),n=i.length;if(n===0)return null;let s=Math.max(t.column-2,0);if(!this._charAtIsWhitespace(i,s))return null;let r=Math.min(t.column-1,n-1);if(!this._charAtIsWhitespace(i,r))return null;for(;s>0&&this._charAtIsWhitespace(i,s-1);)s--;for(;r+11?new S(i.lineNumber-1,t.getLineMaxColumn(i.lineNumber-1),i.lineNumber,1):i.lineNumberu.start+1<=i.column&&i.column<=u.end+1,l=(u,f)=>(u=Math.min(u,i.column),f=Math.max(f,i.column),new S(i.lineNumber,u,i.lineNumber,f)),c=u=>{let f=u.start+1,g=u.end+1;if(n)return l(f,g);let p=!1;for(;g-11&&this._charAtIsWhitespace(s,f-2);)f--;return l(f,g)},d=o._findPreviousWordOnLine(e,t,i);if(d&&a(d))return c(d);let h=o._findNextWordOnLine(e,t,i);return h&&a(h)?c(h):d&&h?l(d.end+1,h.start+1):d?l(d.start+1,d.end+1):h?l(h.start+1,h.end+1):l(1,r+1)}static _deleteWordPartLeft(e,t){if(!t.isEmpty())return t;let i=t.getPosition(),n=o._moveWordPartLeft(e,i);return new S(i.lineNumber,i.column,n.lineNumber,n.column)}static _findFirstNonWhitespaceChar(e,t){let i=e.length;for(let n=t;n=u.start+1&&(u=o._findNextWordOnLine(i,n,new M(l,u.end+1))),u?c=u.start+1:c{Rt();Yc();b4();mT();Pe();ue();ho();es=class o{static addCursorDown(e,t,i){let n=[],s=0;for(let r=0,a=t.length;rc&&(d=c,h=e.model.getLineMaxColumn(d)),At.fromModelState(new ks(new S(r.lineNumber,1,d,h),2,0,new M(d,h),0))}let l=t.modelState.selectionStart.getStartPosition().lineNumber;if(r.lineNumberl){let c=e.getLineCount(),d=a.lineNumber+1,h=1;return d>c&&(d=c,h=e.getLineMaxColumn(d)),At.fromViewState(t.viewState.move(!0,d,h,0))}else{let c=t.modelState.selectionStart.getEndPosition();return At.fromModelState(t.modelState.move(!0,c.lineNumber,c.column,0))}}static word(e,t,i,n){let s=e.model.validatePosition(n);return At.fromModelState(fs.word(e.cursorConfig,e.model,t.modelState,i,s))}static cancelSelection(e,t){if(!t.modelState.hasSelection())return new At(t.modelState,t.viewState);let i=t.viewState.position.lineNumber,n=t.viewState.position.column;return At.fromViewState(new ks(new S(i,n,i,n),0,0,new M(i,n),0))}static moveTo(e,t,i,n,s){if(i){if(t.modelState.selectionStartKind===1)return this.word(e,t,i,n);if(t.modelState.selectionStartKind===2)return this.line(e,t,i,n,s)}let r=e.model.validatePosition(n),a=s?e.coordinatesConverter.validateViewPosition(new M(s.lineNumber,s.column),r):e.coordinatesConverter.convertModelPositionToViewPosition(r);return At.fromViewState(t.viewState.move(i,a.lineNumber,a.column,0))}static simpleMove(e,t,i,n,s,r){switch(i){case 0:return r===4?this._moveHalfLineLeft(e,t,n):this._moveLeft(e,t,n,s);case 1:return r===4?this._moveHalfLineRight(e,t,n):this._moveRight(e,t,n,s);case 2:return r===2?this._moveUpByViewLines(e,t,n,s):r===5?this._moveUpByFoldedLines(e,t,n,s):this._moveUpByModelLines(e,t,n,s);case 3:return r===2?this._moveDownByViewLines(e,t,n,s):r===5?this._moveDownByFoldedLines(e,t,n,s):this._moveDownByModelLines(e,t,n,s);case 4:return r===2?t.map(a=>At.fromViewState(kn.moveToPrevBlankLine(e.cursorConfig,e,a.viewState,n))):t.map(a=>At.fromModelState(kn.moveToPrevBlankLine(e.cursorConfig,e.model,a.modelState,n)));case 5:return r===2?t.map(a=>At.fromViewState(kn.moveToNextBlankLine(e.cursorConfig,e,a.viewState,n))):t.map(a=>At.fromModelState(kn.moveToNextBlankLine(e.cursorConfig,e.model,a.modelState,n)));case 6:return this._moveToViewMinColumn(e,t,n);case 7:return this._moveToViewFirstNonWhitespaceColumn(e,t,n);case 8:return this._moveToViewCenterColumn(e,t,n);case 9:return this._moveToViewMaxColumn(e,t,n);case 10:return this._moveToViewLastNonWhitespaceColumn(e,t,n);default:return null}}static viewportMove(e,t,i,n,s){let r=e.getCompletelyVisibleViewRange(),a=e.coordinatesConverter.convertViewRangeToModelRange(r);switch(i){case 11:{let l=this._firstLineNumberInRange(e.model,a,s),c=e.model.getLineFirstNonWhitespaceColumn(l);return[this._moveToModelPosition(e,t[0],n,l,c)]}case 13:{let l=this._lastLineNumberInRange(e.model,a,s),c=e.model.getLineFirstNonWhitespaceColumn(l);return[this._moveToModelPosition(e,t[0],n,l,c)]}case 12:{let l=Math.round((a.startLineNumber+a.endLineNumber)/2),c=e.model.getLineFirstNonWhitespaceColumn(l);return[this._moveToModelPosition(e,t[0],n,l,c)]}case 14:{let l=[];for(let c=0,d=t.length;ci.endLineNumber-1?r=i.endLineNumber-1:s{let a=e.getTextDirection(s.viewState.position.lineNumber)===Fs.RTL;return At.fromViewState(a?kn.moveRight(e.cursorConfig,e,s.viewState,i,n):kn.moveLeft(e.cursorConfig,e,s.viewState,i,n))})}static _moveHalfLineLeft(e,t,i){let n=[];for(let s=0,r=t.length;s{let a=e.getTextDirection(s.viewState.position.lineNumber)===Fs.RTL;return At.fromViewState(a?kn.moveLeft(e.cursorConfig,e,s.viewState,i,n):kn.moveRight(e.cursorConfig,e,s.viewState,i,n))})}static _moveHalfLineRight(e,t,i){let n=[];for(let s=0,r=t.length;s{let c=l.modelState.hasSelection()&&!i?l.modelState.selection.endLineNumber:l.modelState.position.lineNumber,h=o._targetFoldedDown(c,n,a,r)-c;return h===0?At.fromModelState(l.modelState):At.fromModelState(kn.moveDown(e.cursorConfig,s,l.modelState,i,h))})}static _moveUpByFoldedLines(e,t,i,n){let s=e.model,r=e.getHiddenAreas();return t.map(a=>{let l=a.modelState.hasSelection()&&!i?a.modelState.selection.startLineNumber:a.modelState.position.lineNumber,c=o._targetFoldedUp(l,n,r),d=l-c;return d===0?At.fromModelState(a.modelState):At.fromModelState(kn.moveUp(e.cursorConfig,s,a.modelState,i,d))})}static _targetFoldedDown(e,t,i,n){let s=e,r=0;for(;r=n)return n;let l=s+1;for(;rn)return s;s=l}return s}static _targetFoldedUp(e,t,i){let n=e,s=i.length-1;for(;s>=0&&i[s].startLineNumber>n-1;)s--;for(let r=0;r=0&&i[s].startLineNumber>a;)s--;if(s>=0&&i[s].endLineNumber>=a&&(a=i[s].startLineNumber-1),a<1)return n;n=a}return n}static _moveToViewPosition(e,t,i,n,s){return At.fromViewState(t.viewState.move(i,n,s,0))}static _moveToModelPosition(e,t,i,n,s){return At.fromModelState(t.modelState.move(i,n,s,0))}static _moveToViewMinColumn(e,t,i){let n=[];for(let s=0,r=t.length;s{He();Nx();ua();MC=class{constructor(e,t,i){this._indentRulesSupport=t,this._indentationLineProcessor=new y4(e,i)}shouldIncrease(e,t){let i=this._indentationLineProcessor.getProcessedLine(e,t);return this._indentRulesSupport.shouldIncrease(i)}shouldDecrease(e,t){let i=this._indentationLineProcessor.getProcessedLine(e,t);return this._indentRulesSupport.shouldDecrease(i)}shouldIgnore(e,t){let i=this._indentationLineProcessor.getProcessedLine(e,t);return this._indentRulesSupport.shouldIgnore(i)}shouldIndentNextLine(e,t){let i=this._indentationLineProcessor.getProcessedLine(e,t);return this._indentRulesSupport.shouldIndentNextLine(i)}},OC=class{constructor(e,t){this.model=e,this.indentationLineProcessor=new y4(e,t)}getProcessedTokenContextAroundRange(e){let t=this._getProcessedTokensBeforeRange(e),i=this._getProcessedTokensAfterRange(e),n=this._getProcessedPreviousLineTokens(e);return{beforeRangeProcessedTokens:t,afterRangeProcessedTokens:i,previousLineProcessedTokens:n}}_getProcessedTokensBeforeRange(e){this.model.tokenization.forceTokenization(e.startLineNumber);let t=this.model.tokenization.getLineTokens(e.startLineNumber),i=Df(t,e.startColumn-1),n;if(S4(this.model,e.getStartPosition())){let r=e.startColumn-1-i.firstCharOffset,a=i.firstCharOffset,l=a+r;n=t.sliceAndInflate(a,l,0)}else{let r=e.startColumn-1;n=t.sliceAndInflate(0,r,0)}return this.indentationLineProcessor.getProcessedTokens(n)}_getProcessedTokensAfterRange(e){let t=e.isEmpty()?e.getStartPosition():e.getEndPosition();this.model.tokenization.forceTokenization(t.lineNumber);let i=this.model.tokenization.getLineTokens(t.lineNumber),n=Df(i,t.column-1),s=t.column-1-n.firstCharOffset,r=n.firstCharOffset+s,a=n.firstCharOffset+n.getLineLength(),l=i.sliceAndInflate(r,a,0);return this.indentationLineProcessor.getProcessedTokens(l)}_getProcessedPreviousLineTokens(e){let t=f=>{this.model.tokenization.forceTokenization(f);let g=this.model.tokenization.getLineTokens(f),p=this.model.getLineMaxColumn(f)-1;return Df(g,p)};this.model.tokenization.forceTokenization(e.startLineNumber);let i=this.model.tokenization.getLineTokens(e.startLineNumber),n=Df(i,e.startColumn-1),s=Si.createEmpty("",n.languageIdCodec),r=e.startLineNumber-1;if(r===0||!(n.firstCharOffset===0))return s;let c=t(r);if(!(n.languageId===c.languageId))return s;let h=c.toIViewLineTokens();return this.indentationLineProcessor.getProcessedTokens(h)}},y4=class{constructor(e,t){this.model=e,this.languageConfigurationService=t}getProcessedLine(e,t){let i=(r,a)=>{let l=hi(r);return a+r.substring(l.length)};this.model.tokenization.forceTokenization?.(e);let n=this.model.tokenization.getLineTokens(e),s=this.getProcessedTokens(n).getLineContent();return t!==void 0&&(s=i(s,t)),s}getProcessedTokens(e){let t=l=>l===2||l===3||l===1,i=e.getLanguageId(0),s=this.languageConfigurationService.getLanguageConfiguration(i).bracketsNew.getBracketRegExp({global:!0}),r=[];return e.forEach(l=>{let c=e.getStandardTokenType(l),d=e.getTokenText(l);t(c)&&(d=d.replace(s,""));let h=e.getMetadata(l);r.push({text:d,metadata:h})}),Si.createFromTextAndMetadata(r,e.languageIdCodec)}}});function rp(o,e,t,i){e.tokenization.forceTokenization(t.startLineNumber);let n=e.getLanguageIdAtPosition(t.startLineNumber,t.startColumn),s=i.getLanguageConfiguration(n);if(!s)return null;let a=new OC(e,i).getProcessedTokenContextAroundRange(t),l=a.previousLineProcessedTokens.getLineContent(),c=a.beforeRangeProcessedTokens.getLineContent(),d=a.afterRangeProcessedTokens.getLineContent(),h=s.onEnter(o,l,c,d);if(!h)return null;let u=h.indentAction,f=h.appendText,g=h.removeText||0;f?u===co.Indent&&(f=" "+f):u===co.Indent||u===co.IndentOutdent?f=" ":f="";let p=AP(e,t.startLineNumber,t.startColumn);return g&&(p=p.substring(0,p.length-g)),{indentAction:u,appendText:f,removeText:g,indentation:p}}var k4=x(()=>{X_();Do();x4()});function PC(o,e){if(e<=0)return"";$Z[o]||($Z[o]=["",o]);let t=$Z[o];for(let i=t.length;i<=e;i++)t[i]=t[i-1]+o;return t[e]}var v5e,w5e,L4,$Z,Ba,E1=x(()=>{He();Fl();ue();gi();k4();Do();v5e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},w5e=function(o,e){return function(t,i){e(t,i,o)}},$Z=Object.create(null);Ba=L4=class{static unshiftIndent(e,t,i,n,s){let r=mi.visibleColumnFromColumn(e,t,i);if(s){let a=PC(" ",n),c=mi.prevIndentTabStop(r,n)/n;return PC(a,c)}else{let c=mi.prevRenderTabStop(r,i)/i;return PC(" ",c)}}static shiftIndent(e,t,i,n,s){let r=mi.visibleColumnFromColumn(e,t,i);if(s){let a=PC(" ",n),c=mi.nextIndentTabStop(r,n)/n;return PC(a,c)}else{let c=mi.nextRenderTabStop(r,i)/i;return PC(" ",c)}}constructor(e,t,i){this._languageConfigurationService=i,this._opts=t,this._selection=e,this._selectionId=null,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}_addEditOperation(e,t,i){this._useLastEditRangeForCursorEndPosition?e.addTrackedEditOperation(t,i):e.addEditOperation(t,i)}getEditOperations(e,t){let i=this._selection.startLineNumber,n=this._selection.endLineNumber;this._selection.endColumn===1&&i!==n&&(n=n-1);let{tabSize:s,indentSize:r,insertSpaces:a}=this._opts,l=i===n;if(this._opts.useTabStops){this._selection.isEmpty()&&/^\s*$/.test(e.getLineContent(i))&&(this._useLastEditRangeForCursorEndPosition=!0);let c=0,d=0;for(let h=i;h<=n;h++,c=d){d=0;let u=e.getLineContent(h),f=Zn(u);if(this._opts.isUnshift&&(u.length===0||f===0)||!l&&!this._opts.isUnshift&&u.length===0)continue;if(f===-1&&(f=u.length),h>1&&mi.visibleColumnFromColumn(u,f+1,s)%r!==0&&e.tokenization.isCheapToTokenize(h-1)){let _=rp(this._opts.autoIndent,e,new S(h-1,e.getLineMaxColumn(h-1),h-1,e.getLineMaxColumn(h-1)),this._languageConfigurationService);if(_){if(d=c,_.appendText)for(let b=0,v=_.appendText.length;b{ue();gi();I4=class{constructor(e,t,i){this._range=e,this._charBeforeSelection=t,this._charAfterSelection=i}getEditOperations(e,t){t.addTrackedEditOperation(new S(this._range.startLineNumber,this._range.startColumn,this._range.startLineNumber,this._range.startColumn),this._charBeforeSelection),t.addTrackedEditOperation(new S(this._range.endLineNumber,this._range.endColumn,this._range.endLineNumber,this._range.endColumn),this._charAfterSelection||null)}computeCursorState(e,t){let i=t.getInverseEditOperations(),n=i[0].range,s=i[1].range;return new me(n.endLineNumber,n.endColumn,s.endLineNumber,s.endColumn-this._charAfterSelection.length)}},E4=class{constructor(e,t,i){this._position=e,this._text=t,this._charAfter=i}getEditOperations(e,t){t.addTrackedEditOperation(new S(this._position.lineNumber,this._position.column,this._position.lineNumber,this._position.column),this._text+this._charAfter)}computeCursorState(e,t){let n=t.getInverseEditOperations()[0].range;return new me(n.endLineNumber,n.startColumn,n.endLineNumber,n.endColumn-this._charAfter.length)}}});function C5e(o,e,t){let i=o.tokenization.getLanguageIdAtPosition(e,0);if(e>1){let n,s=-1;for(n=e-1;n>=1;n--){if(o.tokenization.getLanguageIdAtPosition(n,0)!==i)return s;let r=o.getLineContent(n);if(t.shouldIgnore(n)||/^\s+$/.test(r)||r===""){s=n;continue}return n}}return-1}function T1(o,e,t,i=!0,n){if(o<4)return null;let s=n.getLanguageConfiguration(e.tokenization.getLanguageId()).indentRulesSupport;if(!s)return null;let r=new MC(e,s,n);if(t<=1)return{indentation:"",action:null};for(let l=t-1;l>0&&e.getLineContent(l)==="";l--)if(l===1)return{indentation:"",action:null};let a=C5e(e,t,r);if(a<0)return null;if(a<1)return{indentation:"",action:null};if(r.shouldIncrease(a)||r.shouldIndentNextLine(a)){let l=e.getLineContent(a);return{indentation:hi(l),action:co.Indent,line:a}}else if(r.shouldDecrease(a)){let l=e.getLineContent(a);return{indentation:hi(l),action:null,line:a}}else{if(a===1)return{indentation:hi(e.getLineContent(a)),action:null,line:a};let l=a-1,c=s.getIndentMetadata(e.getLineContent(l));if(!(c&3)&&c&4){let d=0;for(let h=l-1;h>0;h--)if(!r.shouldIndentNextLine(h)){d=h;break}return{indentation:hi(e.getLineContent(d+1)),action:null,line:d+1}}if(i)return{indentation:hi(e.getLineContent(a)),action:null,line:a};for(let d=a;d>0;d--){if(r.shouldIncrease(d))return{indentation:hi(e.getLineContent(d)),action:co.Indent,line:d};if(r.shouldIndentNextLine(d)){let h=0;for(let u=d-1;u>0;u--)if(!r.shouldIndentNextLine(d)){h=u;break}return{indentation:hi(e.getLineContent(h+1)),action:null,line:h+1}}else if(r.shouldDecrease(d))return{indentation:hi(e.getLineContent(d)),action:null,line:d}}return{indentation:hi(e.getLineContent(1)),action:null,line:1}}}function FC(o,e,t,i,n,s){if(o<4)return null;let r=s.getLanguageConfiguration(t);if(!r)return null;let a=s.getLanguageConfiguration(t).indentRulesSupport;if(!a)return null;let l=new MC(e,a,s),c=T1(o,e,i,void 0,s);if(c){let d=c.line;if(d!==void 0){let h=!0;for(let u=d;u0){let b=e.getLineContent(_);if(c.shouldIndentNextLine(b)&&c.shouldIncrease(p)){let w=T1(r,e,t.startLineNumber,!1,s)?.indentation;if(w!==void 0){let C=e.getLineContent(t.startLineNumber),y=hi(C),I=n.shiftIndent(w)===y,E=/^\s*$/.test(g),D=o.autoClosingPairs.autoClosingPairsOpenByEnd.get(i),P=D&&D.length>0&&E;if(I&&P)return w}}}return null}function T4(o,e,t){let i=t.getLanguageConfiguration(o.getLanguageId()).indentRulesSupport;return!i||e<1||e>o.getLineCount()?null:i.getIndentMetadata(o.getLineContent(e))}function y5e(o,e,t){return{tokenization:{getLineTokens:n=>n===e?t:o.tokenization.getLineTokens(n),getLanguageId:()=>o.getLanguageId(),getLanguageIdAtPosition:(n,s)=>o.getLanguageIdAtPosition(n,s)},getLineContent:n=>n===e?t.getLineContent():o.getLineContent(n)}}var D4=x(()=>{He();X_();x4()});function GZ(o,e){return o===" "?e===5||e===6?6:5:4}function z4(o,e){return iwe(o)&&!iwe(e)?!0:o===5?!1:twe(o)!==twe(e)}function twe(o){return o===6||o===5?"space":o}function iwe(o){return o===4||o===5||o===6}function nwe(o,e,t,i,n){if(o.autoClosingOvertype==="never"||!o.autoClosingPairs.autoClosingPairsCloseSingleChar.has(n))return!1;for(let s=0,r=t.length;s2?c.charCodeAt(l.column-2):0)===92&&h)return!1;if(o.autoClosingOvertype==="auto"){let f=!1;for(let g=0,p=i.length;g{Ae();He();RC();E1();qZ();Yc();Px();ue();Pe();X_();Do();Nx();D4();k4();N4=class{static getEdits(e,t,i,n,s){if(!s&&this._isAutoIndentType(e,t,i)){let r=[];for(let l of i){let c=this._findActualIndentationForSelection(e,t,l,n);if(c===null)return;r.push({selection:l,indentation:c})}let a=D1.getAutoClosingPairClose(e,t,i,n,!1);return this._getIndentationAndAutoClosingPairEdits(e,t,r,n,a)}}static _isAutoIndentType(e,t,i){if(e.autoIndent<4)return!1;for(let n=0,s=i.length;nYZ(e,a),unshiftIndent:a=>V4(e,a)},e.languageConfigurationService);if(s===null)return null;let r=AP(t,i.startLineNumber,i.startColumn);return s===e.normalizeIndentation(r)?null:s}static _getIndentationAndAutoClosingPairEdits(e,t,i,n,s){let r=i.map(({selection:l,indentation:c})=>{if(s!==null){let d=this._getEditFromIndentationAndSelection(e,t,c,l,n,!1);return new KZ(d,l,n,s)}else{let d=this._getEditFromIndentationAndSelection(e,t,c,l,n,!0);return BC(d.range,d.text,!1)}}),a={shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1};return new Ws(4,r,a)}static _getEditFromIndentationAndSelection(e,t,i,n,s,r=!0){let a=n.startLineNumber,l=t.getLineFirstNonWhitespaceColumn(a),c=e.normalizeIndentation(i);if(l!==0){let h=t.getLineContent(a);c+=h.substring(l-1,n.startColumn-1)}return c+=r?s:"",{range:new S(a,1,n.endLineNumber,n.endColumn),text:c}}},R4=class{static getEdits(e,t,i,n,s,r){if(nwe(t,i,n,s,r))return this._runAutoClosingOvertype(e,n,r)}static _runAutoClosingOvertype(e,t,i){let n=[];for(let s=0,r=t.length;snew No(new S(a.positionLineNumber,a.positionColumn,a.positionLineNumber,a.positionColumn+1),"",!1));return new Ws(4,r,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}}},D1=class{static getEdits(e,t,i,n,s,r){if(!r){let a=this.getAutoClosingPairClose(e,t,i,n,s);if(a!==null)return this._runAutoClosingOpenCharType(i,n,s,a)}}static _runAutoClosingOpenCharType(e,t,i,n){let s=[];for(let r=0,a=e.length;r{let p=g.getPosition();return s?{lineNumber:p.lineNumber,beforeColumn:p.column-n.length,afterColumn:p.column}:{lineNumber:p.lineNumber,beforeColumn:p.column,afterColumn:p.column}}),a=this._findAutoClosingPairOpen(e,t,r.map(g=>new M(g.lineNumber,g.beforeColumn)),n);if(!a)return null;let l,c;if(Hu(n)?(l=e.autoClosingQuotes,c=e.shouldAutoCloseBefore.quote):(e.blockCommentStartToken?a.open.includes(e.blockCommentStartToken):!1)?(l=e.autoClosingComments,c=e.shouldAutoCloseBefore.comment):(l=e.autoClosingBrackets,c=e.shouldAutoCloseBefore.bracket),l==="never")return null;let h=this._findContainedAutoClosingPair(e,a),u=h?h.close:"",f=!0;for(let g of r){let{lineNumber:p,beforeColumn:_,afterColumn:b}=g,v=t.getLineContent(p),w=v.substring(0,_-1),C=v.substring(b-1);if(C.startsWith(u)||(f=!1),C.length>0){let E=C.charAt(0);if(!this._isBeforeClosingBrace(e,C)&&!c(E))return null}if(a.open.length===1&&(n==="'"||n==='"')&&l!=="always"){let E=Ma(e.wordSeparators,[]);if(w.length>0){let D=w.charCodeAt(w.length-1);if(E.get(D)===0)return null}}if(!t.tokenization.isCheapToTokenize(p))return null;t.tokenization.forceTokenization(p);let y=t.tokenization.getLineTokens(p),k=Df(y,_-1);if(!a.shouldAutoClose(k,_-k.firstCharOffset))return null;let I=a.findNeutralCharacter();if(I){let E=t.tokenization.getTokenTypeIfInsertingCharacter(p,_,I);if(!a.isOK(E))return null}}return f?a.close.substring(0,a.close.length-u.length):a.close}static _findContainedAutoClosingPair(e,t){if(t.open.length<=1)return null;let i=t.close.charAt(t.close.length-1),n=e.autoClosingPairs.autoClosingPairsCloseByEnd.get(i)||[],s=null;for(let r of n)r.open!==t.open&&t.open.includes(r.open)&&t.close.endsWith(r.close)&&(!s||r.open.length>s.open.length)&&(s=r);return s}static _findAutoClosingPairOpen(e,t,i,n){let s=e.autoClosingPairs.autoClosingPairsOpenByEnd.get(n);if(!s)return null;let r=null;for(let a of s)if(r===null||a.open.length>r.open.length){let l=!0;for(let c of i)if(t.getValueInRange(new S(c.lineNumber,c.column-a.open.length+1,c.lineNumber,c.column))+n!==a.open){l=!1;break}l&&(r=a)}return r}static _isBeforeClosingBrace(e,t){let i=t.charAt(0),n=e.autoClosingPairs.autoClosingPairsOpenByStart.get(i)||[],s=e.autoClosingPairs.autoClosingPairsCloseByStart.get(i)||[],r=n.some(l=>t.startsWith(l.open)),a=s.some(l=>t.startsWith(l.close));return!r&&a}},_T=class{static getEdits(e,t){if(!(e.inputMode==="overtype"))return null;let n=t.map(s=>new _4(s.insertedTextRange));return new Ws(4,n,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}},M4=class{static getEdits(e,t,i,n,s){if(!s&&this._isSurroundSelectionType(e,t,i,n))return this._runSurroundSelectionType(e,i,n)}static _runSurroundSelectionType(e,t,i){let n=[];for(let s=0,r=t.length;s=4){let l=Jve(e.autoIndent,t,n,{unshiftIndent:c=>V4(e,c),shiftIndent:c=>YZ(e,c),normalizeIndentation:c=>e.normalizeIndentation(c)},e.languageConfigurationService);if(l){let c=e.visibleColumnFromColumn(t,n.getEndPosition()),d=n.endColumn,h=t.getLineContent(n.endLineNumber),u=Zn(h);if(u>=0?n=n.setEndPosition(n.endLineNumber,Math.max(n.endColumn,u+1)):n=n.setEndPosition(n.endLineNumber,t.getLineMaxColumn(n.endLineNumber)),i)return new DC(n,` +`+e.normalizeIndentation(l.afterEnter),!0);{let f=0;return d<=u+1&&(e.insertSpaces||(c=Math.ceil(c/e.indentSize)),f=Math.min(c+1-e.normalizeIndentation(l.afterEnter).length-1,0)),new NC(n,` +`+e.normalizeIndentation(l.afterEnter),0,f,!0)}}}return BC(n,` +`+e.normalizeIndentation(a),i)}static lineInsertBefore(e,t,i){if(t===null||i===null)return[];let n=[];for(let s=0,r=i.length;sthis._compositionType(i,d,s,r,a,l));return new Ws(4,c,{shouldPushStackElementBefore:z4(e,4),shouldPushStackElementAfter:!1})}static _compositionType(e,t,i,n,s,r){if(!t.isEmpty())return null;let a=t.getPosition(),l=Math.max(1,a.column-n),c=Math.min(e.getLineMaxColumn(a.lineNumber),a.column+s),d=new S(a.lineNumber,l,a.lineNumber,c);return new NC(d,i,0,r)}},W4=class{static getEdits(e,t,i){let n=[];for(let r=0,a=t.length;r1){let a;for(a=i-1;a>=1;a--){let d=t.getLineContent(a);if(Js(d)>=0)break}if(a<1)return null;let l=t.getLineMaxColumn(a),c=rp(e.autoIndent,t,new S(a,l,a,l),e.languageConfigurationService);c&&(s=c.indentation+c.appendText)}return n&&(n===co.Indent&&(s=YZ(e,s)),n===co.Outdent&&(s=V4(e,s)),s=e.normalizeIndentation(s)),s||null}static _replaceJumpToNextIndent(e,t,i,n){let s="",r=i.getStartPosition();if(e.insertSpaces){let a=e.visibleColumnFromColumn(t,r),l=e.indentSize,c=l-a%l;for(let d=0;d{E1();qZ();Yc();bT();Zd=class{static indent(e,t,i){if(t===null||i===null)return[];let n=[];for(let s=0,r=i.length;s{le();je();(function(o){o.editorSimpleInput=new fe("editorSimpleInput",!1,!0),o.editorTextFocus=new fe("editorTextFocus",!1,m(714,"Whether the editor text has focus (cursor is blinking)")),o.focus=new fe("editorFocus",!1,m(715,"Whether the editor or an editor widget has focus (e.g. focus is in the find widget)")),o.textInputFocus=new fe("textInputFocus",!1,m(716,"Whether an editor or a rich text input has focus (cursor is blinking)")),o.readOnly=new fe("editorReadonly",!1,m(717,"Whether the editor is read-only")),o.inDiffEditor=new fe("inDiffEditor",!1,m(718,"Whether the context is a diff editor")),o.isEmbeddedDiffEditor=new fe("isEmbeddedDiffEditor",!1,m(719,"Whether the context is an embedded diff editor")),o.inMultiDiffEditor=new fe("inMultiDiffEditor",!1,m(720,"Whether the context is a multi diff editor")),o.multiDiffEditorAllCollapsed=new fe("multiDiffEditorAllCollapsed",void 0,m(721,"Whether all files in multi diff editor are collapsed")),o.hasChanges=new fe("diffEditorHasChanges",!1,m(722,"Whether the diff editor has changes")),o.comparingMovedCode=new fe("comparingMovedCode",!1,m(723,"Whether a moved code block is selected for comparison")),o.accessibleDiffViewerVisible=new fe("accessibleDiffViewerVisible",!1,m(724,"Whether the accessible diff viewer is visible")),o.diffEditorRenderSideBySideInlineBreakpointReached=new fe("diffEditorRenderSideBySideInlineBreakpointReached",!1,m(725,"Whether the diff editor render side by side inline breakpoint is reached")),o.diffEditorInlineMode=new fe("diffEditorInlineMode",!1,m(726,"Whether inline mode is active")),o.diffEditorOriginalWritable=new fe("diffEditorOriginalWritable",!1,m(727,"Whether modified is writable in the diff editor")),o.diffEditorModifiedWritable=new fe("diffEditorModifiedWritable",!1,m(728,"Whether modified is writable in the diff editor")),o.diffEditorOriginalUri=new fe("diffEditorOriginalUri","",m(729,"The uri of the original document")),o.diffEditorModifiedUri=new fe("diffEditorModifiedUri","",m(730,"The uri of the modified document")),o.columnSelection=new fe("editorColumnSelection",!1,m(731,"Whether `editor.columnSelection` is enabled")),o.writable=o.readOnly.toNegated(),o.hasNonEmptySelection=new fe("editorHasSelection",!1,m(732,"Whether the editor has text selected")),o.hasOnlyEmptySelection=o.hasNonEmptySelection.toNegated(),o.hasMultipleSelections=new fe("editorHasMultipleSelections",!1,m(733,"Whether the editor has multiple selections")),o.hasSingleSelection=o.hasMultipleSelections.toNegated(),o.tabMovesFocus=new fe("editorTabMovesFocus",!1,m(734,"Whether `Tab` will move focus out of the editor")),o.tabDoesNotMoveFocus=o.tabMovesFocus.toNegated(),o.isInEmbeddedEditor=new fe("isInEmbeddedEditor",!1,!0),o.canUndo=new fe("canUndo",!1,!0),o.canRedo=new fe("canRedo",!1,!0),o.hoverVisible=new fe("editorHoverVisible",!1,m(735,"Whether the editor hover is visible")),o.hoverFocused=new fe("editorHoverFocused",!1,m(736,"Whether the editor hover is focused")),o.stickyScrollFocused=new fe("stickyScrollFocused",!1,m(737,"Whether the sticky scroll is focused")),o.stickyScrollVisible=new fe("stickyScrollVisible",!1,m(738,"Whether the sticky scroll is visible")),o.standaloneColorPickerVisible=new fe("standaloneColorPickerVisible",!1,m(739,"Whether the standalone color picker is visible")),o.standaloneColorPickerFocused=new fe("standaloneColorPickerFocused",!1,m(740,"Whether the standalone color picker is focused")),o.isComposing=new fe("isComposing",!1,m(741,"Whether the editor is in the composition mode")),o.inCompositeEditor=new fe("inCompositeEditor",void 0,m(742,"Whether the editor is part of a larger editor (e.g. notebooks)")),o.notInCompositeEditor=o.inCompositeEditor.toNegated(),o.languageId=new fe("editorLangId","",m(743,"The language identifier of the editor")),o.hasCompletionItemProvider=new fe("editorHasCompletionItemProvider",!1,m(744,"Whether the editor has a completion item provider")),o.hasCodeActionsProvider=new fe("editorHasCodeActionsProvider",!1,m(745,"Whether the editor has a code actions provider")),o.hasCodeLensProvider=new fe("editorHasCodeLensProvider",!1,m(746,"Whether the editor has a code lens provider")),o.hasDefinitionProvider=new fe("editorHasDefinitionProvider",!1,m(747,"Whether the editor has a definition provider")),o.hasDeclarationProvider=new fe("editorHasDeclarationProvider",!1,m(748,"Whether the editor has a declaration provider")),o.hasImplementationProvider=new fe("editorHasImplementationProvider",!1,m(749,"Whether the editor has an implementation provider")),o.hasTypeDefinitionProvider=new fe("editorHasTypeDefinitionProvider",!1,m(750,"Whether the editor has a type definition provider")),o.hasHoverProvider=new fe("editorHasHoverProvider",!1,m(751,"Whether the editor has a hover provider")),o.hasDocumentHighlightProvider=new fe("editorHasDocumentHighlightProvider",!1,m(752,"Whether the editor has a document highlight provider")),o.hasDocumentSymbolProvider=new fe("editorHasDocumentSymbolProvider",!1,m(753,"Whether the editor has a document symbol provider")),o.hasReferenceProvider=new fe("editorHasReferenceProvider",!1,m(754,"Whether the editor has a reference provider")),o.hasRenameProvider=new fe("editorHasRenameProvider",!1,m(755,"Whether the editor has a rename provider")),o.hasSignatureHelpProvider=new fe("editorHasSignatureHelpProvider",!1,m(756,"Whether the editor has a signature help provider")),o.hasInlayHintsProvider=new fe("editorHasInlayHintsProvider",!1,m(757,"Whether the editor has an inline hints provider")),o.hasDocumentFormattingProvider=new fe("editorHasDocumentFormattingProvider",!1,m(758,"Whether the editor has a document formatting provider")),o.hasDocumentSelectionFormattingProvider=new fe("editorHasDocumentSelectionFormattingProvider",!1,m(759,"Whether the editor has a document selection formatting provider")),o.hasMultipleDocumentFormattingProvider=new fe("editorHasMultipleDocumentFormattingProvider",!1,m(760,"Whether the editor has multiple document formatting providers")),o.hasMultipleDocumentSelectionFormattingProvider=new fe("editorHasMultipleDocumentSelectionFormattingProvider",!1,m(761,"Whether the editor has multiple document selection formatting providers")),o.selectionHasDiagnostics=new fe("editorSelectionHasDiagnostics",!1,m(762,"Whether any diagnostic is present in the current editor selection"))})(R||(R={}))});function A1(o,e){Nn.registerKeybindingRule({id:o,primary:e,when:S5e,weight:ki+1})}function owe(o){return o.register(),o}function WC(o,e){owe(new q4("default:"+o,o)),owe(new q4(o,o,e))}var ki,uo,qr,R1,vT,Ls,S5e,Ob,q4,wT=x(()=>{le();Ns();Rt();hs();lt();ao();Xve();Yc();v4();C4();$4();Pe();ue();li();je();Rh();re();bT();ki=0,uo=class extends Gi{runEditorCommand(e,t,i){let n=t._getViewModel();n&&this.runCoreEditorCommand(n,i||{})}};(function(o){let e=function(i){if(!ln(i))return!1;let n=i;return!(!Ln(n.to)||!ns(n.by)&&!Ln(n.by)||!ns(n.value)&&!wl(n.value)||!ns(n.revealCursor)&&!DI(n.revealCursor))};o.metadata={description:"Scroll editor in the given direction",args:[{name:"Editor scroll argument object",description:"Property-value pairs that can be passed through this argument:\n * 'to': A mandatory direction value.\n ```\n 'up', 'down'\n ```\n * 'by': Unit to move. Default is computed based on 'to' value.\n ```\n 'line', 'wrappedLine', 'page', 'halfPage', 'editor'\n ```\n * 'value': Number of units to move. Default is '1'.\n * 'revealCursor': If 'true' reveals the cursor if it is outside view port.\n ",constraint:e,schema:{type:"object",required:["to"],properties:{to:{type:"string",enum:["up","down"]},by:{type:"string",enum:["line","wrappedLine","page","halfPage","editor"]},value:{type:"number",default:1},revealCursor:{type:"boolean"}}}}]},o.RawDirection={Up:"up",Right:"right",Down:"down",Left:"left"},o.RawUnit={Line:"line",WrappedLine:"wrappedLine",Page:"page",HalfPage:"halfPage",Editor:"editor",Column:"column"};function t(i){let n;switch(i.to){case o.RawDirection.Up:n=1;break;case o.RawDirection.Right:n=2;break;case o.RawDirection.Down:n=3;break;case o.RawDirection.Left:n=4;break;default:return null}let s;switch(i.by){case o.RawUnit.Line:s=1;break;case o.RawUnit.WrappedLine:s=2;break;case o.RawUnit.Page:s=3;break;case o.RawUnit.HalfPage:s=4;break;case o.RawUnit.Editor:s=5;break;case o.RawUnit.Column:s=6;break;default:s=2}let r=Math.floor(i.value||1),a=!!i.revealCursor;return{direction:n,unit:s,value:r,revealCursor:a,select:!!i.select}}o.parse=t})(qr||(qr={}));(function(o){let e=function(t){if(!ln(t))return!1;let i=t;return!(!wl(i.lineNumber)&&!Ln(i.lineNumber)||!ns(i.at)&&!Ln(i.at))};o.metadata={description:"Reveal the given line at the given logical position",args:[{name:"Reveal line argument object",description:"Property-value pairs that can be passed through this argument:\n * 'lineNumber': A mandatory line number value.\n * 'at': Logical position at which line has to be revealed.\n ```\n 'top', 'center', 'bottom'\n ```\n ",constraint:e,schema:{type:"object",required:["lineNumber"],properties:{lineNumber:{type:["number","string"]},at:{type:"string",enum:["top","center","bottom"]}}}}]},o.RawAtArgument={Top:"top",Center:"center",Bottom:"bottom"}})(R1||(R1={}));vT=class{constructor(e){e.addImplementation(1e4,"code-editor",(t,i)=>{let n=t.get(ot).getFocusedCodeEditor();return n&&n.hasTextFocus()?this._runEditorCommand(t,n,i):!1}),e.addImplementation(1e3,"generic-dom-input-textarea",(t,i)=>{let n=Ui();return n&&Ll(n)?(this.runDOMCommand(n),!0):!1}),e.addImplementation(0,"generic-dom",(t,i)=>{let n=t.get(ot).getActiveCodeEditor();return n?(n.focus(),this._runEditorCommand(t,n,i)):!1})}_runEditorCommand(e,t,i){let n=this.runEditorCommand(e,t,i);return n||!0}};(function(o){class e extends uo{constructor(v){super(v),this._inSelectionMode=v.inSelectionMode}runCoreEditorCommand(v,w){if(!w.position)return;v.model.pushStackElement(),v.setCursorStates(w.source,3,[es.moveTo(v,v.getPrimaryCursorState(),this._inSelectionMode,w.position,w.viewPosition)])&&w.revealType!==2&&v.revealAllCursors(w.source,!0,!0)}}o.MoveTo=ye(new e({id:"_moveTo",inSelectionMode:!1,precondition:void 0})),o.MoveToSelect=ye(new e({id:"_moveToSelect",inSelectionMode:!0,precondition:void 0}));class t extends uo{runCoreEditorCommand(v,w){v.model.pushStackElement();let C=this._getColumnSelectResult(v,v.getPrimaryCursorState(),v.getCursorColumnSelectData(),w);C!==null&&(v.setCursorStates(w.source,3,C.viewStates.map(y=>At.fromViewState(y))),v.setCursorColumnSelectData({isReal:!0,fromViewLineNumber:C.fromLineNumber,fromViewVisualColumn:C.fromVisualColumn,toViewLineNumber:C.toLineNumber,toViewVisualColumn:C.toVisualColumn}),C.reversed?v.revealTopMostCursor(w.source):v.revealBottomMostCursor(w.source))}}o.ColumnSelect=ye(new class extends t{constructor(){super({id:"columnSelect",precondition:void 0})}_getColumnSelectResult(b,v,w,C){if(typeof C.position>"u"||typeof C.viewPosition>"u"||typeof C.mouseColumn>"u")return null;let y=b.model.validatePosition(C.position),k=b.coordinatesConverter.validateViewPosition(new M(C.viewPosition.lineNumber,C.viewPosition.column),y),I=C.doColumnSelect?w.fromViewLineNumber:k.lineNumber,E=C.doColumnSelect?w.fromViewVisualColumn:C.mouseColumn-1;return Ab.columnSelect(b.cursorConfig,b,I,E,k.lineNumber,C.mouseColumn-1)}}),o.CursorColumnSelectLeft=ye(new class extends t{constructor(){super({id:"cursorColumnSelectLeft",precondition:void 0,kbOpts:{weight:ki,kbExpr:R.textInputFocus,primary:3599,linux:{primary:0}}})}_getColumnSelectResult(b,v,w,C){return Ab.columnSelectLeft(b.cursorConfig,b,w)}}),o.CursorColumnSelectRight=ye(new class extends t{constructor(){super({id:"cursorColumnSelectRight",precondition:void 0,kbOpts:{weight:ki,kbExpr:R.textInputFocus,primary:3601,linux:{primary:0}}})}_getColumnSelectResult(b,v,w,C){return Ab.columnSelectRight(b.cursorConfig,b,w)}});class i extends t{constructor(v){super(v),this._isPaged=v.isPaged}_getColumnSelectResult(v,w,C,y){return Ab.columnSelectUp(v.cursorConfig,v,C,this._isPaged)}}o.CursorColumnSelectUp=ye(new i({isPaged:!1,id:"cursorColumnSelectUp",precondition:void 0,kbOpts:{weight:ki,kbExpr:R.textInputFocus,primary:3600,linux:{primary:0}}})),o.CursorColumnSelectPageUp=ye(new i({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:void 0,kbOpts:{weight:ki,kbExpr:R.textInputFocus,primary:3595,linux:{primary:0}}}));class n extends t{constructor(v){super(v),this._isPaged=v.isPaged}_getColumnSelectResult(v,w,C,y){return Ab.columnSelectDown(v.cursorConfig,v,C,this._isPaged)}}o.CursorColumnSelectDown=ye(new n({isPaged:!1,id:"cursorColumnSelectDown",precondition:void 0,kbOpts:{weight:ki,kbExpr:R.textInputFocus,primary:3602,linux:{primary:0}}})),o.CursorColumnSelectPageDown=ye(new n({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:void 0,kbOpts:{weight:ki,kbExpr:R.textInputFocus,primary:3596,linux:{primary:0}}}));class s extends uo{constructor(){super({id:"cursorMove",precondition:void 0,metadata:pT.metadata})}runCoreEditorCommand(v,w){let C=pT.parse(w);C&&this._runCursorMove(v,w.source,C)}_runCursorMove(v,w,C){let y=C.noHistory?"api":w;v.model.pushStackElement(),v.setCursorStates(y,3,s._move(v,v.getCursorStates(),C)),v.revealAllCursors(y,!0)}static _move(v,w,C){let y=C.select,k=C.value;switch(C.direction){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:return es.simpleMove(v,w,C.direction,y,k,C.unit);case 11:case 13:case 12:case 14:return es.viewportMove(v,w,C.direction,y,k);default:return null}}}o.CursorMoveImpl=s,o.CursorMove=ye(new s);class r extends uo{constructor(v){super(v),this._staticArgs=v.args}runCoreEditorCommand(v,w){let C=this._staticArgs;this._staticArgs.value===-1&&(C={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:w.pageSize||v.cursorConfig.pageSize}),v.model.pushStackElement(),v.setCursorStates(w.source,3,es.simpleMove(v,v.getCursorStates(),C.direction,C.select,C.value,C.unit)),v.revealAllCursors(w.source,!0)}}o.CursorLeft=ye(new r({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:void 0,kbOpts:{weight:ki,kbExpr:R.textInputFocus,primary:15,mac:{primary:15,secondary:[288]}}})),o.CursorLeftSelect=ye(new r({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:void 0,kbOpts:{weight:ki,kbExpr:R.textInputFocus,primary:1039}})),o.CursorRight=ye(new r({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:void 0,kbOpts:{weight:ki,kbExpr:R.textInputFocus,primary:17,mac:{primary:17,secondary:[292]}}})),o.CursorRightSelect=ye(new r({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:void 0,kbOpts:{weight:ki,kbExpr:R.textInputFocus,primary:1041}})),o.CursorUp=ye(new r({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:void 0,kbOpts:{weight:ki,kbExpr:R.textInputFocus,primary:16,mac:{primary:16,secondary:[302]}}})),o.CursorUpSelect=ye(new r({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:void 0,kbOpts:{weight:ki,kbExpr:R.textInputFocus,primary:1040,secondary:[3088],mac:{primary:1040},linux:{primary:1040}}})),o.CursorPageUp=ye(new r({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:void 0,kbOpts:{weight:ki,kbExpr:R.textInputFocus,primary:11}})),o.CursorPageUpSelect=ye(new r({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:void 0,kbOpts:{weight:ki,kbExpr:R.textInputFocus,primary:1035}})),o.CursorDown=ye(new r({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:void 0,kbOpts:{weight:ki,kbExpr:R.textInputFocus,primary:18,mac:{primary:18,secondary:[300]}}})),o.CursorDownSelect=ye(new r({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:void 0,kbOpts:{weight:ki,kbExpr:R.textInputFocus,primary:1042,secondary:[3090],mac:{primary:1042},linux:{primary:1042}}})),o.CursorPageDown=ye(new r({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:void 0,kbOpts:{weight:ki,kbExpr:R.textInputFocus,primary:12}})),o.CursorPageDownSelect=ye(new r({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:void 0,kbOpts:{weight:ki,kbExpr:R.textInputFocus,primary:1036}})),o.CreateCursor=ye(new class extends uo{constructor(){super({id:"createCursor",precondition:void 0})}runCoreEditorCommand(b,v){if(!v.position)return;let w;v.wholeLine?w=es.line(b,b.getPrimaryCursorState(),!1,v.position,v.viewPosition):w=es.moveTo(b,b.getPrimaryCursorState(),!1,v.position,v.viewPosition);let C=b.getCursorStates();if(C.length>1){let y=w.modelState?w.modelState.position:null,k=w.viewState?w.viewState.position:null;for(let I=0,E=C.length;Ik&&(y=k);let I=new S(y,1,y,b.model.getLineMaxColumn(y)),E=0;if(w.at)switch(w.at){case R1.RawAtArgument.Top:E=3;break;case R1.RawAtArgument.Center:E=1;break;case R1.RawAtArgument.Bottom:E=4;break}let D=b.coordinatesConverter.convertModelRangeToViewRange(I);b.revealRange(v.source,!1,D,E,0)}}),o.SelectAll=new class extends vT{constructor(){super(Xme)}runDOMCommand(b){bo&&(b.focus(),b.select()),b.ownerDocument.execCommand("selectAll")}runEditorCommand(b,v,w){let C=v._getViewModel();C&&this.runCoreEditorCommand(C,w)}runCoreEditorCommand(b,v){b.model.pushStackElement(),b.setCursorStates("keyboard",3,[es.selectAll(b,b.getPrimaryCursorState())])}},o.SetSelection=ye(new class extends uo{constructor(){super({id:"setSelection",precondition:void 0})}runCoreEditorCommand(b,v){v.selection&&(b.model.pushStackElement(),b.setCursorStates(v.source,3,[At.fromModelSelection(v.selection)]))}})})(Ls||(Ls={}));S5e=G.and(R.textInputFocus,R.columnSelection);A1(Ls.CursorColumnSelectLeft.id,1039);A1(Ls.CursorColumnSelectRight.id,1041);A1(Ls.CursorColumnSelectUp.id,1040);A1(Ls.CursorColumnSelectPageUp.id,1035);A1(Ls.CursorColumnSelectDown.id,1042);A1(Ls.CursorColumnSelectPageDown.id,1036);(function(o){class e extends Gi{runEditorCommand(i,n,s){let r=n._getViewModel();r&&this.runCoreEditingCommand(n,r,s||{})}}o.CoreEditingCommand=e,o.LineBreakInsert=ye(new class extends e{constructor(){super({id:"lineBreakInsert",precondition:R.writable,kbOpts:{weight:ki,kbExpr:R.textInputFocus,primary:0,mac:{primary:301}}})}runCoreEditingCommand(t,i,n){t.pushUndoStop(),t.executeCommands(this.id,ap.lineBreakInsert(i.cursorConfig,i.model,i.getCursorStates().map(s=>s.modelState.selection)))}}),o.Outdent=ye(new class extends e{constructor(){super({id:"outdent",precondition:R.writable,kbOpts:{weight:ki,kbExpr:G.and(R.editorTextFocus,R.tabDoesNotMoveFocus),primary:1026}})}runCoreEditingCommand(t,i,n){t.pushUndoStop(),t.executeCommands(this.id,Zd.outdent(i.cursorConfig,i.model,i.getCursorStates().map(s=>s.modelState.selection))),t.pushUndoStop()}}),o.Tab=ye(new class extends e{constructor(){super({id:"tab",precondition:R.writable,kbOpts:{weight:ki,kbExpr:G.and(R.editorTextFocus,R.tabDoesNotMoveFocus),primary:2}})}runCoreEditingCommand(t,i,n){t.pushUndoStop(),t.executeCommands(this.id,Zd.tab(i.cursorConfig,i.model,i.getCursorStates().map(s=>s.modelState.selection))),t.pushUndoStop()}}),o.DeleteLeft=ye(new class extends e{constructor(){super({id:"deleteLeft",precondition:void 0,kbOpts:{weight:ki,kbExpr:R.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})}runCoreEditingCommand(t,i,n){let[s,r]=sp.deleteLeft(i.getPrevEditOperationType(),i.cursorConfig,i.model,i.getCursorStates().map(a=>a.modelState.selection),i.getCursorAutoClosedCharacters());s&&t.pushUndoStop(),t.executeCommands(this.id,r),i.setPrevEditOperationType(2)}}),o.DeleteRight=ye(new class extends e{constructor(){super({id:"deleteRight",precondition:void 0,kbOpts:{weight:ki,kbExpr:R.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})}runCoreEditingCommand(t,i,n){let[s,r]=sp.deleteRight(i.getPrevEditOperationType(),i.cursorConfig,i.model,i.getCursorStates().map(a=>a.modelState.selection));s&&t.pushUndoStop(),t.executeCommands(this.id,r),i.setPrevEditOperationType(3)}}),o.Undo=new class extends vT{constructor(){super(_G)}runDOMCommand(t){t.ownerDocument.execCommand("undo")}runEditorCommand(t,i,n){if(!(!i.hasModel()||i.getOption(104)===!0))return i.getModel().undo()}},o.Redo=new class extends vT{constructor(){super(bG)}runDOMCommand(t){t.ownerDocument.execCommand("redo")}runEditorCommand(t,i,n){if(!(!i.hasModel()||i.getOption(104)===!0))return i.getModel().redo()}}})(Ob||(Ob={}));q4=class extends jw{constructor(e,t,i){super({id:e,precondition:void 0,metadata:i}),this._handlerId=t}runCommand(e,t){let i=e.get(ot).getFocusedCodeEditor();i&&i.trigger("keyboard",this._handlerId,t)}};WC("type",{description:"Type",args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]});WC("replacePreviousChar");WC("compositionType");WC("compositionStart");WC("compositionEnd");WC("paste");WC("cut")});var j4,swe=x(()=>{wT();Pe();gi();rt();He();j4=class o{constructor(e,t,i,n){this.configuration=e,this.viewModel=t,this.userInputEvents=i,this.commandDelegate=n}paste(e,t,i,n){this.commandDelegate.paste(e,t,i,n)}type(e){this.commandDelegate.type(e)}compositionType(e,t,i,n){this.commandDelegate.compositionType(e,t,i,n)}compositionStart(){this.commandDelegate.startComposition()}compositionEnd(){this.commandDelegate.endComposition()}cut(){this.commandDelegate.cut()}setSelection(e){Ls.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:e})}_validateViewColumn(e){let t=this.viewModel.getLineMinColumn(e.lineNumber);return e.column1){let i=e.bracketPairs.matchBracket(t.with(void 0,t.column-1));if(i&&i[0].getEndPosition().equals(t))return me.fromPositions(i[0].getEndPosition(),i[1].getStartPosition())}if(t.column<=e.getLineMaxColumn(t.lineNumber)){let i=e.bracketPairs.matchBracket(t);if(i&&i[1].getStartPosition().equals(t))return me.fromPositions(i[0].getEndPosition(),i[1].getStartPosition())}}static _trySelectStringContent(e,t){let{lineNumber:i,column:n}=t,{tokenization:s}=e;if(!s.hasAccurateTokensForLine(i))if(s.isCheapToTokenize(i))s.forceTokenization(i);else return;let r=s.getLineTokens(i),a=r.findTokenIndexAtOffset(n-1),l=a;for(;a>0&&r.getStandardTokenType(a-1)===2;)a--;for(;l+1=4)this._selectAll();else if(e.mouseDownCount===3)this._hasMulticursorModifier(e)?e.inSelectionMode?this._lastCursorLineSelectDrag(e.position,e.revealType):this._lastCursorLineSelect(e.position,e.revealType):e.inSelectionMode?this._lineSelectDrag(e.position,e.revealType):this._lineSelect(e.position,e.revealType);else if(e.mouseDownCount===2){if(!e.onInjectedText)if(this._hasMulticursorModifier(e))this._lastCursorWordSelect(e.position,e.revealType);else if(e.inSelectionMode)this._wordSelectDrag(e.position,e.revealType);else{let r;if(t.get(173)){let a=this.viewModel.model,l=this._convertViewToModelPosition(e.position);r=o._trySelectBracketContent(a,l)||o._trySelectStringContent(a,l)}r?this._select(r):this._wordSelect(e.position,e.revealType)}}else this._hasMulticursorModifier(e)?this._hasNonMulticursorModifier(e)||(e.shiftKey?this._columnSelect(e.position,e.mouseColumn,!0):e.inSelectionMode?this._lastCursorMoveToSelect(e.position,e.revealType):this._createCursor(e.position,!1)):e.inSelectionMode?e.altKey?this._columnSelect(e.position,e.mouseColumn,!0):n?this._columnSelect(e.position,e.mouseColumn,!0):this._moveToSelect(e.position,e.revealType):this.moveTo(e.position,e.revealType)}_usualArgs(e,t){return e=this._validateViewColumn(e),{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,revealType:t}}moveTo(e,t){Ls.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_moveToSelect(e,t){Ls.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_columnSelect(e,t,i){e=this._validateViewColumn(e),Ls.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,mouseColumn:t,doColumnSelect:i})}_createCursor(e,t){e=this._validateViewColumn(e),Ls.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,wholeLine:t})}_lastCursorMoveToSelect(e,t){Ls.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_wordSelect(e,t){Ls.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_wordSelectDrag(e,t){Ls.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorWordSelect(e,t){Ls.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lineSelect(e,t){Ls.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lineSelectDrag(e,t){Ls.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorLineSelect(e,t){Ls.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorLineSelectDrag(e,t){Ls.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_select(e){Ls.SetSelection.runCoreEditorCommand(this.viewModel,{source:"mouse",selection:e})}_selectAll(){Ls.SelectAll.runCoreEditorCommand(this.viewModel,{source:"mouse"})}_convertViewToModelPosition(e){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(e)}emitKeyDown(e){this.userInputEvents.emitKeyDown(e)}emitKeyUp(e){this.userInputEvents.emitKeyUp(e)}emitContextMenu(e){this.userInputEvents.emitContextMenu(e)}emitMouseMove(e){this.userInputEvents.emitMouseMove(e)}emitMouseLeave(e){this.userInputEvents.emitMouseLeave(e)}emitMouseUp(e){this.userInputEvents.emitMouseUp(e)}emitMouseDown(e){this.userInputEvents.emitMouseDown(e)}emitMouseDrag(e){this.userInputEvents.emitMouseDrag(e)}emitMouseDrop(e){this.userInputEvents.emitMouseDrop(e)}emitMouseDropCanceled(){this.userInputEvents.emitMouseDropCanceled()}emitMouseWheel(e){this.userInputEvents.emitMouseWheel(e)}}});var CT,M1,XZ,K4=x(()=>{Go();Nu();Ae();Iu();CT=class{constructor(e){this._lineFactory=e,this._set(1,[])}flush(){this._set(1,[])}_set(e,t){this._lines=t,this._rendLineNumberStart=e}_get(){return{rendLineNumberStart:this._rendLineNumberStart,lines:this._lines}}getStartLineNumber(){return this._rendLineNumberStart}getEndLineNumber(){return this._rendLineNumberStart+this._lines.length-1}getCount(){return this._lines.length}getLine(e){let t=e-this._rendLineNumberStart;if(t<0||t>=this._lines.length)throw new xe("Illegal value for lineNumber");return this._lines[t]}onLinesDeleted(e,t){if(this.getCount()===0)return null;let i=this.getStartLineNumber(),n=this.getEndLineNumber();if(tn)return null;let s=0,r=0;for(let l=i;l<=n;l++){let c=l-this._rendLineNumberStart;e<=l&&l<=t&&(r===0?(s=c,r=1):r++)}if(e=n&&a<=s&&(this._lines[a-this._rendLineNumberStart].onContentChanged(),r=!0);return r}onLinesInserted(e,t){if(this.getCount()===0)return null;let i=t-e+1,n=this.getStartLineNumber(),s=this.getEndLineNumber();if(e<=n)return this._rendLineNumberStart+=i,null;if(e>s)return null;if(i+e>s)return this._lines.splice(e-this._rendLineNumberStart,s-e+1);let r=[];for(let h=0;hi)continue;let l=Math.max(t,a.fromLineNumber),c=Math.min(i,a.toLineNumber);for(let d=l;d<=c;d++){let h=d-this._rendLineNumberStart;this._lines[h].onTokensChanged(),n=!0}}return n}},M1=class{constructor(e,t){this._viewContext=e,this._lineFactory=t,this.domNode=this._createDomNode(),this._linesCollection=new CT(this._lineFactory)}_createDomNode(){let e=wt(document.createElement("div"));return e.setClassName("view-layer"),e.setPosition("absolute"),e.domNode.setAttribute("role","presentation"),e.domNode.setAttribute("aria-hidden","true"),e}onConfigurationChanged(e){return!!e.hasChanged(165)}onFlushed(e,t){if(t){let i=this._linesCollection.getStartLineNumber(),n=this._linesCollection.getEndLineNumber();for(let s=i;s<=n;s++)this._linesCollection.getLine(s).getDomNode()?.remove()}return this._linesCollection.flush(),!0}onLinesChanged(e){return this._linesCollection.onLinesChanged(e.fromLineNumber,e.count)}onLinesDeleted(e){let t=this._linesCollection.onLinesDeleted(e.fromLineNumber,e.toLineNumber);if(t)for(let i=0,n=t.length;ie})}constructor(e,t,i,n){this._domNode=e,this._lineFactory=t,this._viewportData=i,this._viewContext=n}render(e,t,i,n){let s={rendLineNumberStart:e.rendLineNumberStart,lines:e.lines.slice(0),linesLength:e.linesLength};if(s.rendLineNumberStart+s.linesLength-1t){let r=t,a=Math.min(i,s.rendLineNumberStart-1);r<=a&&(this._insertLinesBefore(s,r,a,n,t),s.linesLength+=a-r+1)}else if(s.rendLineNumberStart0&&(this._removeLinesBefore(s,r),s.linesLength-=r)}if(s.rendLineNumberStart=t,s.rendLineNumberStart+s.linesLength-1i){let r=Math.max(0,i-s.rendLineNumberStart+1),l=s.linesLength-1-r+1;l>0&&(this._removeLinesAfter(s,l),s.linesLength-=l)}return this._finishRendering(s,!1,n),s}_renderUntouchedLines(e,t,i,n,s){let r=e.rendLineNumberStart,a=e.lines;for(let l=t;l<=i;l++){let c=r+l;a[l].layoutLine(c,n[c-s],this._lineHeightForLineNumber(c))}}_insertLinesBefore(e,t,i,n,s){let r=[],a=0;for(let l=t;l<=i;l++)r[a++]=this._lineFactory.createLine();e.lines=r.concat(e.lines)}_removeLinesBefore(e,t){for(let i=0;i=0;a--){let l=e.lines[a];n[a]&&(l.setDomNode(r),r=r.previousSibling)}}_finishRenderingInvalidLines(e,t,i){let n=document.createElement("div");o._ttPolicy&&(t=o._ttPolicy.createHTML(t)),n.innerHTML=t;for(let s=0;s{Go();dc();K4();Dr();G4=class extends xn{constructor(e){super(e),this._dynamicOverlays=[],this._isFocused=!1,this._visibleLines=new M1(this._context,{createLine:()=>new QZ(this._dynamicOverlays)}),this.domNode=this._visibleLines.domNode;let i=this._context.configuration.options.get(59);wn(this.domNode,i),this.domNode.setClassName("view-overlays")}shouldRender(){if(super.shouldRender())return!0;for(let e=0,t=this._dynamicOverlays.length;ei.shouldRender());for(let i=0,n=t.length;i'),s.appendString(r),s.appendString("
"),!0)}layoutLine(e,t,i){this._domNode&&(this._domNode.setTop(t),this._domNode.setHeight(i),this._domNode.setLineHeight(i))}},Y4=class extends G4{constructor(e){super(e);let i=this._context.configuration.options.get(165);this._contentWidth=i.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(e){let i=this._context.configuration.options.get(165);return this._contentWidth=i.contentWidth,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollWidthChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e),this.domNode.setWidth(Math.max(e.scrollWidth,this._contentWidth))}},Z4=class extends G4{constructor(e){super(e);let t=this._context.configuration.options,i=t.get(165);this._contentLeft=i.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),wn(this.domNode,t.get(59))}onConfigurationChanged(e){let t=this._context.configuration.options;wn(this.domNode,t.get(59));let i=t.get(165);return this._contentLeft=i.contentLeft,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollHeightChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e);let t=Math.min(e.scrollHeight,1e6);this.domNode.setHeight(t),this.domNode.setWidth(this._contentLeft)}}});var O1,JZ=x(()=>{Pe();O1=class o{constructor(e){this.onKeyDown=null,this.onKeyUp=null,this.onContextMenu=null,this.onMouseMove=null,this.onMouseLeave=null,this.onMouseDown=null,this.onMouseUp=null,this.onMouseDrag=null,this.onMouseDrop=null,this.onMouseDropCanceled=null,this.onMouseWheel=null,this._coordinatesConverter=e}emitKeyDown(e){this.onKeyDown?.(e)}emitKeyUp(e){this.onKeyUp?.(e)}emitContextMenu(e){this.onContextMenu?.(this._convertViewToModelMouseEvent(e))}emitMouseMove(e){this.onMouseMove?.(this._convertViewToModelMouseEvent(e))}emitMouseLeave(e){this.onMouseLeave?.(this._convertViewToModelMouseEvent(e))}emitMouseDown(e){this.onMouseDown?.(this._convertViewToModelMouseEvent(e))}emitMouseUp(e){this.onMouseUp?.(this._convertViewToModelMouseEvent(e))}emitMouseDrag(e){this.onMouseDrag?.(this._convertViewToModelMouseEvent(e))}emitMouseDrop(e){this.onMouseDrop?.(this._convertViewToModelMouseEvent(e))}emitMouseDropCanceled(){this.onMouseDropCanceled?.()}emitMouseWheel(e){this.onMouseWheel?.(e)}_convertViewToModelMouseEvent(e){return e.target?{event:e.event,target:this._convertViewToModelMouseTarget(e.target)}:e}_convertViewToModelMouseTarget(e){return o.convertViewToModelMouseTarget(e,this._coordinatesConverter)}static convertViewToModelMouseTarget(e,t){let i={...e};return i.position&&(i.position=t.convertViewPositionToModelPosition(i.position)),i.range&&(i.range=t.convertViewRangeToModelRange(i.range)),(i.type===5||i.type===8)&&(i.detail=this.convertViewToModelViewZoneData(i.detail,t)),i}static convertViewToModelViewZoneData(e,t){return{viewZoneId:e.viewZoneId,positionBefore:e.positionBefore?t.convertViewPositionToModelPosition(e.positionBefore):e.positionBefore,positionAfter:e.positionAfter?t.convertViewPositionToModelPosition(e.positionAfter):e.positionAfter,position:t.convertViewPositionToModelPosition(e.position),afterLineNumber:t.convertViewPositionToModelPosition(new M(e.afterLineNumber,1)).lineNumber}}}});var awe=x(()=>{});var X4,lwe=x(()=>{Go();awe();Dr();X4=class extends xn{constructor(e){super(e),this.blocks=[],this.contentWidth=-1,this.contentLeft=0,this.domNode=wt(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("blockDecorations-container"),this.update()}update(){let e=!1,i=this._context.configuration.options.get(165),n=i.contentWidth-i.verticalScrollbarWidth;this.contentWidth!==n&&(this.contentWidth=n,e=!0);let s=i.contentLeft;return this.contentLeft!==s&&(this.contentLeft=s,e=!0),e}onConfigurationChanged(e){return this.update()}onScrollChanged(e){return e.scrollTopChanged||e.scrollLeftChanged}onDecorationsChanged(e){return!0}onZonesChanged(e){return!0}prepareRender(e){}render(e){let t=0,i=e.getDecorationsInViewport();for(let n of i){if(!n.options.blockClassName)continue;let s=this.blocks[t];s||(s=this.blocks[t]=wt(document.createElement("div")),this.domNode.appendChild(s));let r,a;n.options.blockIsAfterEnd?(r=e.getVerticalOffsetAfterLineNumber(n.range.endLineNumber,!1),a=e.getVerticalOffsetAfterLineNumber(n.range.endLineNumber,!0)):(r=e.getVerticalOffsetForLineNumber(n.range.startLineNumber,!0),a=n.range.isEmpty()&&!n.options.blockDoesNotCollapse?e.getVerticalOffsetForLineNumber(n.range.startLineNumber,!1):e.getVerticalOffsetAfterLineNumber(n.range.endLineNumber,!0));let[l,c,d,h]=n.options.blockPadding??[0,0,0,0];s.setClassName("blockDecorations-block "+n.options.blockClassName),s.setLeft(this.contentLeft-h),s.setWidth(this.contentWidth+h+c),s.setTop(r-e.scrollTop-l),s.setHeight(a-r+l+d),t++}for(let n=t;n{re();Go();Dr();Q4=class extends xn{constructor(e,t){super(e),this._viewDomNode=t,this._widgets={},this.domNode=wt(document.createElement("div")),Tr.write(this.domNode,1),this.domNode.setClassName("contentWidgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this.overflowingContentWidgetsDomNode=wt(document.createElement("div")),Tr.write(this.overflowingContentWidgetsDomNode,2),this.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets")}dispose(){super.dispose(),this._widgets={}}onConfigurationChanged(e){let t=Object.keys(this._widgets);for(let i of t)this._widgets[i].onConfigurationChanged(e);return!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLineMappingChanged(e){return this._updateAnchorsViewPositions(),!0}onLinesChanged(e){return this._updateAnchorsViewPositions(),!0}onLinesDeleted(e){return this._updateAnchorsViewPositions(),!0}onLinesInserted(e){return this._updateAnchorsViewPositions(),!0}onScrollChanged(e){return!0}onZonesChanged(e){return!0}_updateAnchorsViewPositions(){let e=Object.keys(this._widgets);for(let t of e)this._widgets[t].updateAnchorViewPosition()}addWidget(e){let t=new tX(this._context,this._viewDomNode,e);this._widgets[t.id]=t,t.allowEditorOverflow?this.overflowingContentWidgetsDomNode.appendChild(t.domNode):this.domNode.appendChild(t.domNode),this.setShouldRender()}setWidgetPosition(e,t,i,n,s){let r=this._widgets[e.getId()];r.setPosition(t,i,n,s),r.useDisplayNone||this.setShouldRender()}removeWidget(e){let t=e.getId();if(this._widgets.hasOwnProperty(t)){let i=this._widgets[t];delete this._widgets[t];let n=i.domNode.domNode;n.remove(),n.removeAttribute("monaco-visible-content-widget"),this.setShouldRender()}}shouldSuppressMouseDownOnWidget(e){return this._widgets.hasOwnProperty(e)?this._widgets[e].suppressMouseDown:!1}onBeforeRender(e){let t=Object.keys(this._widgets);for(let i of t)this._widgets[i].onBeforeRender(e)}prepareRender(e){let t=Object.keys(this._widgets);for(let i of t)this._widgets[i].prepareRender(e)}render(e){let t=Object.keys(this._widgets);for(let i of t)this._widgets[i].render(e)}},tX=class{constructor(e,t,i){this._primaryAnchor=new HC(null,null),this._secondaryAnchor=new HC(null,null),this._context=e,this._viewDomNode=t,this._actual=i;let n=this._context.configuration.options,s=n.get(165),r=n.get(4);this.domNode=wt(this._actual.getDomNode()),this.id=this._actual.getId(),this.allowEditorOverflow=(this._actual.allowEditorOverflow||!1)&&r,this.suppressMouseDown=this._actual.suppressMouseDown||!1,this.useDisplayNone=this._actual.useDisplayNone||!1,this._fixedOverflowWidgets=n.get(51),this._contentWidth=s.contentWidth,this._contentLeft=s.contentLeft,this._affinity=null,this._preference=[],this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1,this._maxWidth=this._getMaxWidth(),this._isVisible=!1,this._renderData=null,this.domNode.setPosition(this._fixedOverflowWidgets&&this.allowEditorOverflow?"fixed":"absolute"),this.domNode.setDisplay("none"),this.domNode.setVisibility("hidden"),this.domNode.setAttribute("widgetId",this.id),this.domNode.setMaxWidth(this._maxWidth)}onConfigurationChanged(e){let t=this._context.configuration.options;if(e.hasChanged(165)){let i=t.get(165);this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._maxWidth=this._getMaxWidth()}}updateAnchorViewPosition(){this._setPosition(this._affinity,this._primaryAnchor.modelPosition,this._secondaryAnchor.modelPosition)}_setPosition(e,t,i){this._affinity=e,this._primaryAnchor=n(t,this._context.viewModel,this._affinity),this._secondaryAnchor=n(i,this._context.viewModel,this._affinity);function n(s,r,a){if(!s)return new HC(null,null);let l=r.model.validatePosition(s);if(r.coordinatesConverter.modelPositionIsVisible(l)){let c=r.coordinatesConverter.convertModelPositionToViewPosition(l,a??void 0);return new HC(s,c)}return new HC(s,null)}}_getMaxWidth(){let e=this.domNode.domNode.ownerDocument,t=e.defaultView;return this.allowEditorOverflow?t?.innerWidth||e.documentElement.offsetWidth||e.body.offsetWidth:this._contentWidth}setPosition(e,t,i,n){this._setPosition(n,e,t),this._preference=i,!this.useDisplayNone&&this._primaryAnchor.viewPosition&&this._preference&&this._preference.length>0?this.domNode.setDisplay("block"):this.domNode.setDisplay("none"),this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1}_layoutBoxInViewport(e,t,i,n){let s=e.top,r=s,a=e.top+e.height,l=n.viewportHeight-a,c=s-i,d=r>=i,h=a,u=l>=i,f=e.left;return f+t>n.scrollLeft+n.viewportWidth&&(f=n.scrollLeft+n.viewportWidth-t),fl){let u=h-(l-n);h-=u,i-=u}if(h=p,v=h+i<=u.height-_;return this._fixedOverflowWidgets?{fitsAbove:b,aboveTop:Math.max(d,p),fitsBelow:v,belowTop:h,left:g}:{fitsAbove:b,aboveTop:s,fitsBelow:v,belowTop:r,left:f}}_prepareRenderWidgetAtExactPositionOverflowing(e){return new VC(e.top,e.left+this._contentLeft)}_getAnchorsCoordinates(e){let t=s(this._primaryAnchor.viewPosition,this._affinity),i=this._secondaryAnchor.viewPosition?.lineNumber===this._primaryAnchor.viewPosition?.lineNumber?this._secondaryAnchor.viewPosition:null,n=s(i,this._affinity);return{primary:t,secondary:n};function s(r,a){if(!r)return null;let l=e.visibleRangeForPosition(r);if(!l)return null;let c=r.column===1&&a===3?0:l.left,d=e.getVerticalOffsetForLineNumber(r.lineNumber)-e.scrollTop,h=e.getLineHeightForLineNumber(r.lineNumber);return new J4(d,c,h)}}_reduceAnchorCoordinates(e,t,i){if(!t)return e;let n=this._context.configuration.options.get(59),s=t.left;return se.endLineNumber||this.domNode.setMaxWidth(this._maxWidth)}prepareRender(e){this._renderData=this._prepareRenderWidget(e)}render(e){if(!this._renderData||this._renderData.kind==="offViewport"){this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this._renderData?.kind==="offViewport"&&this._renderData.preserveFocus?this.domNode.setTop(-1e3):this.domNode.setVisibility("hidden")),typeof this._actual.afterRender=="function"&&eX(this._actual.afterRender,this._actual,null,null);return}this.allowEditorOverflow?(this.domNode.setTop(this._renderData.coordinate.top),this.domNode.setLeft(this._renderData.coordinate.left)):(this.domNode.setTop(this._renderData.coordinate.top+e.scrollTop-e.bigNumbersDelta),this.domNode.setLeft(this._renderData.coordinate.left)),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0),typeof this._actual.afterRender=="function"&&eX(this._actual.afterRender,this._actual,this._renderData.position,this._renderData.coordinate)}},HC=class{constructor(e,t){this.modelPosition=e,this.viewPosition=t}},VC=class{constructor(e,t){this.top=e,this.left=t,this._coordinateBrand=void 0}},J4=class{constructor(e,t,i){this.top=e,this.left=t,this.height=i,this._anchorCoordinateBrand=void 0}}});var dwe=x(()=>{});var Wa,lp=x(()=>{Lb();Wa=class extends Pl{}});function gn(o){return{id:o}}function yT(o){switch(o){case pc.DARK:return kC.VS_DARK;case pc.HIGH_CONTRAST_DARK:return kC.HC_BLACK;case pc.HIGH_CONTRAST_LIGHT:return kC.HC_LIGHT;default:return kC.VS}}function Ro(o){return hwe.onColorThemeChange(o)}var yt,nX,iX,hwe,e5,Kt=x(()=>{ae();W();Ie();ls();Kc();yt=Ne("themeService");nX={ThemingContribution:"base.contributions.theming"},iX=class extends T{constructor(){super(),this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=this._register(new N)}onColorThemeChange(e){return this.themingParticipants.push(e),this.onThemingParticipantAddedEmitter.fire(e),ne(()=>{let t=this.themingParticipants.indexOf(e);this.themingParticipants.splice(t,1)})}getThemingParticipants(){return this.themingParticipants}},hwe=new iX;jt.add(nX.ThemingContribution,hwe);e5=class extends T{constructor(e){super(),this.themeService=e,this.theme=e.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(t=>this.onThemeChange(t)))}onThemeChange(e){this.theme=e,this.updateStyles()}updateStyles(){}}});var t5,uwe,oX,P1,i5,n5,fwe,o5,gwe,s5,mwe,x5e,k5e,zC,pwe,_we,bwe,vwe,wwe,UC,Cwe,ywe,Swe,xwe,kwe,L5e,Lwe,Iwe,Ewe,Twe,Dwe,Nwe,Rwe,I5e,r5,Awe,Mwe,Owe,a5,l5,c5,d5,h5,u5,Pwe,Fwe,Bwe,Wwe,Hwe,Vwe,zwe,Uwe,$we,qwe,jwe,Kwe,Gwe,Wl=x(()=>{le();Yi();$t();bi();Zi();xi();qi();Mi();Xi();$i();Vi();Qi();Ji();Kt();t5=A("editor.lineHighlightBackground",null,m(641,"Background color for the highlight of line at the cursor position.")),uwe=A("editor.inactiveLineHighlightBackground",t5,m(642,"Background color for the highlight of line at the cursor position when the editor is not focused.")),oX=A("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hcDark:"#f38518",hcLight:_t},m(643,"Background color for the border around the line at the cursor position."));A("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hcDark:null,hcLight:null},m(644,"Background color of highlighted ranges, like by quick open and find features. The color must not be opaque so as not to hide underlying decorations."),!0);A("editor.rangeHighlightBorder",{dark:null,light:null,hcDark:Ai,hcLight:Ai},m(645,"Background color of the border around highlighted ranges."));A("editor.symbolHighlightBackground",{dark:mc,light:mc,hcDark:null,hcLight:null},m(646,"Background color of highlighted symbol, like for go to definition or go next/previous symbol. The color must not be opaque so as not to hide underlying decorations."),!0);A("editor.symbolHighlightBorder",{dark:null,light:null,hcDark:Ai,hcLight:Ai},m(647,"Background color of the border around highlighted symbols."));P1=A("editorCursor.foreground",{dark:"#AEAFAD",light:K.black,hcDark:K.white,hcLight:"#0F4A85"},m(648,"Color of the editor cursor.")),i5=A("editorCursor.background",null,m(649,"The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.")),n5=A("editorMultiCursor.primary.foreground",P1,m(650,"Color of the primary editor cursor when multiple cursors are present.")),fwe=A("editorMultiCursor.primary.background",i5,m(651,"The background color of the primary editor cursor when multiple cursors are present. Allows customizing the color of a character overlapped by a block cursor.")),o5=A("editorMultiCursor.secondary.foreground",P1,m(652,"Color of secondary editor cursors when multiple cursors are present.")),gwe=A("editorMultiCursor.secondary.background",i5,m(653,"The background color of secondary editor cursors when multiple cursors are present. Allows customizing the color of a character overlapped by a block cursor.")),s5=A("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hcDark:"#e3e4e229",hcLight:"#CCCCCC"},m(654,"Color of whitespace characters in the editor.")),mwe=A("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hcDark:K.white,hcLight:"#292929"},m(655,"Color of editor line numbers.")),x5e=A("editorIndentGuide.background",s5,m(656,"Color of the editor indentation guides."),!1,m(657,"'editorIndentGuide.background' is deprecated. Use 'editorIndentGuide.background1' instead.")),k5e=A("editorIndentGuide.activeBackground",s5,m(658,"Color of the active editor indentation guides."),!1,m(659,"'editorIndentGuide.activeBackground' is deprecated. Use 'editorIndentGuide.activeBackground1' instead.")),zC=A("editorIndentGuide.background1",x5e,m(660,"Color of the editor indentation guides (1).")),pwe=A("editorIndentGuide.background2","#00000000",m(661,"Color of the editor indentation guides (2).")),_we=A("editorIndentGuide.background3","#00000000",m(662,"Color of the editor indentation guides (3).")),bwe=A("editorIndentGuide.background4","#00000000",m(663,"Color of the editor indentation guides (4).")),vwe=A("editorIndentGuide.background5","#00000000",m(664,"Color of the editor indentation guides (5).")),wwe=A("editorIndentGuide.background6","#00000000",m(665,"Color of the editor indentation guides (6).")),UC=A("editorIndentGuide.activeBackground1",k5e,m(666,"Color of the active editor indentation guides (1).")),Cwe=A("editorIndentGuide.activeBackground2","#00000000",m(667,"Color of the active editor indentation guides (2).")),ywe=A("editorIndentGuide.activeBackground3","#00000000",m(668,"Color of the active editor indentation guides (3).")),Swe=A("editorIndentGuide.activeBackground4","#00000000",m(669,"Color of the active editor indentation guides (4).")),xwe=A("editorIndentGuide.activeBackground5","#00000000",m(670,"Color of the active editor indentation guides (5).")),kwe=A("editorIndentGuide.activeBackground6","#00000000",m(671,"Color of the active editor indentation guides (6).")),L5e=A("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hcDark:Ai,hcLight:Ai},m(672,"Color of editor active line number"),!1,m(673,"Id is deprecated. Use 'editorLineNumber.activeForeground' instead."));A("editorLineNumber.activeForeground",L5e,m(674,"Color of editor active line number"));Lwe=A("editorLineNumber.dimmedForeground",null,m(675,"Color of the final editor line when editor.renderFinalNewline is set to dimmed.")),Iwe=A("editorRuler.foreground",{dark:"#5A5A5A",light:K.lightgrey,hcDark:K.white,hcLight:"#292929"},m(676,"Color of the editor rulers."));A("editorCodeLens.foreground",{dark:"#999999",light:"#919191",hcDark:"#999999",hcLight:"#292929"},m(677,"Foreground color of editor CodeLens"));A("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hcDark:"#0064001a",hcLight:"#0000"},m(678,"Background color behind matching brackets"));A("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hcDark:_t,hcLight:_t},m(679,"Color for matching brackets boxes"));Ewe=A("editorBracketMatch.foreground",null,m(680,"Foreground color for matching brackets")),Twe=A("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hcDark:"#7f7f7f4d",hcLight:"#666666"},m(681,"Color of the overview ruler border.")),Dwe=A("editorOverviewRuler.background",null,m(682,"Background color of the editor overview ruler."));A("editorGutter.background",Er,m(683,"Background color of the editor gutter. The gutter contains the glyph margins and the line numbers."));A("editorUnnecessaryCode.border",{dark:null,light:null,hcDark:K.fromHex("#fff").transparent(.8),hcLight:_t},m(684,"Border color of unnecessary (unused) source code in the editor."));Nwe=A("editorUnnecessaryCode.opacity",{dark:K.fromHex("#000a"),light:K.fromHex("#0007"),hcDark:null,hcLight:null},m(685,`Opacity of unnecessary (unused) source code in the editor. For example, "#000000c0" will render the code with 75% opacity. For high contrast themes, use the 'editorUnnecessaryCode.border' theme color to underline unnecessary code instead of fading it out.`));A("editorGhostText.border",{dark:null,light:null,hcDark:K.fromHex("#fff").transparent(.8),hcLight:K.fromHex("#292929").transparent(.8)},m(686,"Border color of ghost text in the editor."));Rwe=A("editorGhostText.foreground",{dark:K.fromHex("#ffffff56"),light:K.fromHex("#0007"),hcDark:null,hcLight:null},m(687,"Foreground color of the ghost text in the editor."));A("editorGhostText.background",null,m(688,"Background color of the ghost text in the editor."));I5e=new K(new J(0,122,204,.6)),r5=A("editorOverviewRuler.rangeHighlightForeground",I5e,m(689,"Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations."),!0),Awe=A("editorOverviewRuler.errorForeground",{dark:new K(new J(255,18,18,.7)),light:new K(new J(255,18,18,.7)),hcDark:new K(new J(255,50,50,1)),hcLight:"#B5200D"},m(690,"Overview ruler marker color for errors.")),Mwe=A("editorOverviewRuler.warningForeground",{dark:qc,light:qc,hcDark:wb,hcLight:wb},m(691,"Overview ruler marker color for warnings.")),Owe=A("editorOverviewRuler.infoForeground",{dark:Ol,light:Ol,hcDark:Cb,hcLight:Cb},m(692,"Overview ruler marker color for infos.")),a5=A("editorBracketHighlight.foreground1",{dark:"#FFD700",light:"#0431FAFF",hcDark:"#FFD700",hcLight:"#0431FAFF"},m(693,"Foreground color of brackets (1). Requires enabling bracket pair colorization.")),l5=A("editorBracketHighlight.foreground2",{dark:"#DA70D6",light:"#319331FF",hcDark:"#DA70D6",hcLight:"#319331FF"},m(694,"Foreground color of brackets (2). Requires enabling bracket pair colorization.")),c5=A("editorBracketHighlight.foreground3",{dark:"#179FFF",light:"#7B3814FF",hcDark:"#87CEFA",hcLight:"#7B3814FF"},m(695,"Foreground color of brackets (3). Requires enabling bracket pair colorization.")),d5=A("editorBracketHighlight.foreground4","#00000000",m(696,"Foreground color of brackets (4). Requires enabling bracket pair colorization.")),h5=A("editorBracketHighlight.foreground5","#00000000",m(697,"Foreground color of brackets (5). Requires enabling bracket pair colorization.")),u5=A("editorBracketHighlight.foreground6","#00000000",m(698,"Foreground color of brackets (6). Requires enabling bracket pair colorization.")),Pwe=A("editorBracketHighlight.unexpectedBracket.foreground",{dark:new K(new J(255,18,18,.8)),light:new K(new J(255,18,18,.8)),hcDark:new K(new J(255,50,50,1)),hcLight:"#B5200D"},m(699,"Foreground color of unexpected brackets.")),Fwe=A("editorBracketPairGuide.background1","#00000000",m(700,"Background color of inactive bracket pair guides (1). Requires enabling bracket pair guides.")),Bwe=A("editorBracketPairGuide.background2","#00000000",m(701,"Background color of inactive bracket pair guides (2). Requires enabling bracket pair guides.")),Wwe=A("editorBracketPairGuide.background3","#00000000",m(702,"Background color of inactive bracket pair guides (3). Requires enabling bracket pair guides.")),Hwe=A("editorBracketPairGuide.background4","#00000000",m(703,"Background color of inactive bracket pair guides (4). Requires enabling bracket pair guides.")),Vwe=A("editorBracketPairGuide.background5","#00000000",m(704,"Background color of inactive bracket pair guides (5). Requires enabling bracket pair guides.")),zwe=A("editorBracketPairGuide.background6","#00000000",m(705,"Background color of inactive bracket pair guides (6). Requires enabling bracket pair guides.")),Uwe=A("editorBracketPairGuide.activeBackground1","#00000000",m(706,"Background color of active bracket pair guides (1). Requires enabling bracket pair guides.")),$we=A("editorBracketPairGuide.activeBackground2","#00000000",m(707,"Background color of active bracket pair guides (2). Requires enabling bracket pair guides.")),qwe=A("editorBracketPairGuide.activeBackground3","#00000000",m(708,"Background color of active bracket pair guides (3). Requires enabling bracket pair guides.")),jwe=A("editorBracketPairGuide.activeBackground4","#00000000",m(709,"Background color of active bracket pair guides (4). Requires enabling bracket pair guides.")),Kwe=A("editorBracketPairGuide.activeBackground5","#00000000",m(710,"Background color of active bracket pair guides (5). Requires enabling bracket pair guides.")),Gwe=A("editorBracketPairGuide.activeBackground6","#00000000",m(711,"Background color of active bracket pair guides (6). Requires enabling bracket pair guides."));A("editorUnicodeHighlight.border",qc,m(712,"Border color used to highlight unicode characters."));A("editorUnicodeHighlight.background",obe,m(713,"Background color used to highlight unicode characters."));Ro((o,e)=>{let t=o.getColor(Er),i=o.getColor(t5),n=i&&!i.isTransparent()?i:t;n&&e.addRule(`.monaco-editor .inputarea.ime-input { background-color: ${n}; }`)})});var f5,g5,m5,Ywe=x(()=>{dwe();lp();Wl();qe();Kt();gi();Kc();Pe();f5=class extends Wa{constructor(e){super(),this._context=e;let t=this._context.configuration.options,i=t.get(165);this._renderLineHighlight=t.get(110),this._renderLineHighlightOnlyWhenFocus=t.get(111),this._wordWrap=i.isViewportWrapping,this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[1],this._selections=[new me(1,1,1,1)],this._renderData=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}_readFromSelections(){let e=!1,t=new Set;for(let s of this._selections)t.add(s.positionLineNumber);let i=Array.from(t);i.sort((s,r)=>s-r),Bt(this._cursorLineNumbers,i)||(this._cursorLineNumbers=i,e=!0);let n=this._selections.every(s=>s.isEmpty());return this._selectionIsEmpty!==n&&(this._selectionIsEmpty=n,e=!0),e}onThemeChanged(e){return this._readFromSelections()}onConfigurationChanged(e){let t=this._context.configuration.options,i=t.get(165);return this._renderLineHighlight=t.get(110),this._renderLineHighlightOnlyWhenFocus=t.get(111),this._wordWrap=i.isViewportWrapping,this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,!0}onCursorStateChanged(e){return this._selections=e.selections,this._readFromSelections()}onFlushed(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollWidthChanged||e.scrollTopChanged}onZonesChanged(e){return!0}onFocusChanged(e){return this._renderLineHighlightOnlyWhenFocus?(this._focused=e.isFocused,!0):!1}prepareRender(e){if(!this._shouldRenderThis()){this._renderData=null;return}let t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,n=[];for(let r=t;r<=i;r++){let a=r-t;n[a]=""}if(this._wordWrap){let r=this._renderOne(e,!1);for(let a of this._cursorLineNumbers){let l=this._context.viewModel.coordinatesConverter,c=l.convertViewPositionToModelPosition(new M(a,1)).lineNumber,d=l.convertModelPositionToViewPosition(new M(c,1)).lineNumber,h=l.convertModelPositionToViewPosition(new M(c,this._context.viewModel.model.getLineMaxColumn(c))).lineNumber,u=Math.max(d,t),f=Math.min(h,i);for(let g=u;g<=f;g++){let p=g-t;n[p]=r}}}let s=this._renderOne(e,!0);for(let r of this._cursorLineNumbers){if(ri)continue;let a=r-t;n[a]=s}this._renderData=n}render(e,t){if(!this._renderData)return"";let i=t-e;return i>=this._renderData.length?"":this._renderData[i]}_shouldRenderInMargin(){return(this._renderLineHighlight==="gutter"||this._renderLineHighlight==="all")&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderInContent(){return(this._renderLineHighlight==="line"||this._renderLineHighlight==="all")&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}},g5=class extends f5{_renderOne(e,t){return`
`}_shouldRenderThis(){return this._shouldRenderInContent()}_shouldRenderOther(){return this._shouldRenderInMargin()}},m5=class extends f5{_renderOne(e,t){return`
`}_shouldRenderThis(){return!0}_shouldRenderOther(){return this._shouldRenderInContent()}};Ro((o,e)=>{let t=o.getColor(t5),i=o.getColor(uwe);if(t&&(e.addRule(`.monaco-editor.focused .view-overlays .current-line { background-color: ${t}; }`),e.addRule(`.monaco-editor.focused .margin-view-overlays .current-line-margin { background-color: ${t}; border: none; }`)),i&&(e.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${i}; }`),e.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${i}; border: none; }`)),!t||t.isTransparent()||o.defines(oX)){let n=o.getColor(oX);n&&(e.addRule(`.monaco-editor .view-overlays .current-line-exact { border: 2px solid ${n}; }`),e.addRule(`.monaco-editor .margin-view-overlays .current-line-exact-margin { border: 2px solid ${n}; }`),ga(o.type)&&(e.addRule(".monaco-editor .view-overlays .current-line-exact { border-width: 1px; }"),e.addRule(".monaco-editor .margin-view-overlays .current-line-exact-margin { border-width: 1px; }")))}})});var Zwe=x(()=>{});var p5,Xwe=x(()=>{Zwe();lp();SC();ue();p5=class extends Wa{constructor(e){super(),this._context=e;let t=this._context.configuration.options;this._typicalHalfwidthCharacterWidth=t.get(59).typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){let t=this._context.configuration.options;return this._typicalHalfwidthCharacterWidth=t.get(59).typicalHalfwidthCharacterWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged||e.scrollWidthChanged}onZonesChanged(e){return!0}prepareRender(e){let t=e.getDecorationsInViewport(),i=[],n=0;for(let l=0,c=t.length;l{if(l.options.zIndexc.options.zIndex)return 1;let d=l.options.className,h=c.options.className;return dh?1:S.compareRangesUsingStarts(l.range,c.range)});let s=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber,a=[];for(let l=s;l<=r;l++){let c=l-s;a[c]=""}this._renderWholeLineDecorations(e,i,a),this._renderNormalDecorations(e,i,a),this._renderResult=a}_renderWholeLineDecorations(e,t,i){let n=e.visibleRange.startLineNumber,s=e.visibleRange.endLineNumber;for(let r=0,a=t.length;r',d=Math.max(l.range.startLineNumber,n),h=Math.min(l.range.endLineNumber,s);for(let u=d;u<=h;u++){let f=u-n;i[f]+=c}}}_renderNormalDecorations(e,t,i){let n=e.visibleRange.startLineNumber,s=null,r=!1,a=null,l=!1;for(let c=0,d=t.length;c';a[u]+=b}}}render(e,t){if(!this._renderResult)return"";let i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}});var _5,Qwe=x(()=>{re();Go();Gc();Dr();Kt();_5=class extends xn{constructor(e,t,i,n){super(e);let s=this._context.configuration.options,r=s.get(117),a=s.get(83),l=s.get(49),c=s.get(120),d=s.get(158),h={listenOnDomNode:i.domNode,className:"editor-scrollable "+yT(e.theme.type),useShadows:!1,lazyRender:!0,vertical:r.vertical,horizontal:r.horizontal,verticalHasArrows:r.verticalHasArrows,horizontalHasArrows:r.horizontalHasArrows,verticalScrollbarSize:r.verticalScrollbarSize,verticalSliderSize:r.verticalSliderSize,horizontalScrollbarSize:r.horizontalScrollbarSize,horizontalSliderSize:r.horizontalSliderSize,handleMouseWheel:r.handleMouseWheel,alwaysConsumeMouseWheel:r.alwaysConsumeMouseWheel,arrowSize:r.arrowSize,mouseWheelScrollSensitivity:a,fastScrollSensitivity:l,scrollPredominantAxis:c,scrollByPage:r.scrollByPage,inertialScroll:d};this.scrollbar=this._register(new Gf(t.domNode,h,this._context.viewLayout.getScrollable())),Tr.write(this.scrollbar.getDomNode(),6),this.scrollbarDomNode=wt(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();let u=(f,g,p)=>{let _={};{let b=f.scrollTop;b&&(_.scrollTop=this._context.viewLayout.getCurrentScrollTop()+b,f.scrollTop=0)}if(p){let b=f.scrollLeft;b&&(_.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+b,f.scrollLeft=0)}this._context.viewModel.viewLayout.setScrollPosition(_,1)};this._register(B(i.domNode,"scroll",f=>u(i.domNode,!0,!0))),this._register(B(t.domNode,"scroll",f=>u(t.domNode,!0,!1))),this._register(B(n.domNode,"scroll",f=>u(n.domNode,!0,!1))),this._register(B(this.scrollbarDomNode.domNode,"scroll",f=>u(this.scrollbarDomNode.domNode,!0,!1)))}_setLayout(){let e=this._context.configuration.options,t=e.get(165);this.scrollbarDomNode.setLeft(t.contentLeft),e.get(81).side==="right"?this.scrollbarDomNode.setWidth(t.contentWidth+t.minimap.minimapWidth):this.scrollbarDomNode.setWidth(t.contentWidth),this.scrollbarDomNode.setHeight(t.height)}getOverviewRulerLayoutInfo(){return this.scrollbar.getOverviewRulerLayoutInfo()}getDomNode(){return this.scrollbarDomNode}delegateVerticalScrollbarPointerDown(e){this.scrollbar.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){this.scrollbar.delegateScrollFromMouseWheelEvent(e)}onConfigurationChanged(e){if(e.hasChanged(117)||e.hasChanged(83)||e.hasChanged(49)){let t=this._context.configuration.options,i=t.get(117),n=t.get(83),s=t.get(49),r=t.get(120),a={vertical:i.vertical,horizontal:i.horizontal,verticalScrollbarSize:i.verticalScrollbarSize,horizontalScrollbarSize:i.horizontalScrollbarSize,scrollByPage:i.scrollByPage,handleMouseWheel:i.handleMouseWheel,mouseWheelScrollSensitivity:n,fastScrollSensitivity:s,scrollPredominantAxis:r};this.scrollbar.updateOptions(a)}return e.hasChanged(165)&&this._setLayout(),!0}onScrollChanged(e){return!0}onThemeChanged(e){return this.scrollbar.updateClassName("editor-scrollable "+yT(this._context.theme.type)),!0}prepareRender(e){}render(e){this.scrollbar.renderNow()}}});var Jwe=x(()=>{});var $C,sX,rX,F1,b5,aX,lX,cX,v5=x(()=>{Go();qe();Jwe();lp();Dr();Pe();ue();ho();$C=class{constructor(e,t,i,n,s){this.startLineNumber=e,this.endLineNumber=t,this.className=i,this.tooltip=n,this._decorationToRenderBrand=void 0,this.zIndex=s??0}},sX=class{constructor(e,t,i){this.className=e,this.zIndex=t,this.tooltip=i}},rX=class{constructor(){this.decorations=[]}add(e){this.decorations.push(e)}getDecorations(){return this.decorations}},F1=class extends Wa{_render(e,t,i){let n=[];for(let a=e;a<=t;a++){let l=a-e;n[l]=new rX}if(i.length===0)return n;i.sort((a,l)=>a.className===l.className?a.startLineNumber===l.startLineNumber?a.endLineNumber-l.endLineNumber:a.startLineNumber-l.startLineNumber:a.classNamen)continue;let c=Math.max(a,i),d=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new M(c,0)),h=this._context.viewModel.glyphLanes.getLanesAtLine(d.lineNumber).indexOf(s.preference.lane);t.push(new lX(c,h,s.preference.zIndex,s))}}_collectSortedGlyphRenderRequests(e){let t=[];return this._collectDecorationBasedGlyphRenderRequest(e,t),this._collectWidgetBasedGlyphRenderRequest(e,t),t.sort((i,n)=>i.lineNumber===n.lineNumber?i.laneIndex===n.laneIndex?i.zIndex===n.zIndex?n.type===i.type?i.type===0&&n.type===0?i.className0;){let n=t.peek();if(!n)break;let s=t.takeWhile(a=>a.lineNumber===n.lineNumber&&a.laneIndex===n.laneIndex);if(!s||s.length===0)break;let r=s[0];if(r.type===0){let a=[];for(let l of s){if(l.zIndex!==r.zIndex||l.type!==r.type)break;(a.length===0||a[a.length-1]!==l.className)&&a.push(l.className)}i.push(r.accept(a.join(" ")))}else r.widget.renderInfo={lineNumber:r.lineNumber,laneIndex:r.laneIndex}}this._decorationGlyphsToRender=i}render(e){if(!this._glyphMargin){for(let i of Object.values(this._widgets))i.domNode.setDisplay("none");for(;this._managedDomNodes.length>0;)this._managedDomNodes.pop()?.domNode.remove();return}let t=Math.round(this._glyphMarginWidth/this._glyphMarginDecorationLaneCount);for(let i of Object.values(this._widgets))if(!i.renderInfo)i.domNode.setDisplay("none");else{let n=e.viewportData.relativeVerticalOffset[i.renderInfo.lineNumber-e.viewportData.startLineNumber],s=this._glyphMarginLeft+i.renderInfo.laneIndex*this._lineHeight;i.domNode.setDisplay("block"),i.domNode.setTop(n),i.domNode.setLeft(s),i.domNode.setWidth(t),i.domNode.setHeight(this._lineHeight)}for(let i=0;ithis._decorationGlyphsToRender.length;)this._managedDomNodes.pop()?.domNode.remove()}},aX=class{constructor(e,t,i,n){this.lineNumber=e,this.laneIndex=t,this.zIndex=i,this.className=n,this.type=0}accept(e){return new cX(this.lineNumber,this.laneIndex,e)}},lX=class{constructor(e,t,i,n){this.lineNumber=e,this.laneIndex=t,this.zIndex=i,this.widget=n,this.type=1}},cX=class{constructor(e,t,i){this.lineNumber=e,this.laneIndex=t,this.combinedClassName=i}}});var eCe=x(()=>{});var B1,dX=x(()=>{W();B1=class extends T{constructor(){super(...arguments),this._isDisposed=!1}dispose(){super.dispose(),this._isDisposed=!0}assertNotDisposed(){if(this._isDisposed)throw new Error("TextModelPart is disposed!")}}});function qC(o,e){let t=0,i=0,n=o.length;for(;i{});var cp,Bh,dp,C5=x(()=>{(function(o){o[o.Disabled=0]="Disabled",o[o.EnabledForActive=1]="EnabledForActive",o[o.Enabled=2]="Enabled"})(cp||(cp={}));Bh=class{constructor(e,t,i,n,s,r){if(this.visibleColumn=e,this.column=t,this.className=i,this.horizontalLine=n,this.forWrappedLinesAfterColumn=s,this.forWrappedLinesBeforeOrAtColumn=r,e!==-1==(t!==-1))throw new Error}},dp=class{constructor(e,t){this.top=e,this.endColumn=t}}});var y5,ST,hX=x(()=>{ha();He();Fl();ue();dX();w5();C5();Ae();y5=class extends B1{constructor(e,t){super(),this.textModel=e,this.languageConfigurationService=t}getLanguageConfiguration(e){return this.languageConfigurationService.getLanguageConfiguration(e)}_computeIndentLevel(e){return qC(this.textModel.getLineContent(e+1),this.textModel.getOptions().tabSize)}getActiveIndentGuide(e,t,i){this.assertNotDisposed();let n=this.textModel.getLineCount();if(e<1||e>n)throw new xe("Illegal value for lineNumber");let s=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,r=!!(s&&s.offSide),a=-2,l=-1,c=-2,d=-1,h=I=>{if(a!==-1&&(a===-2||a>I-1)){a=-1,l=-1;for(let E=I-2;E>=0;E--){let D=this._computeIndentLevel(E);if(D>=0){a=E,l=D;break}}}if(c===-2){c=-1,d=-1;for(let E=I;E=0){c=E,d=D;break}}}},u=-2,f=-1,g=-2,p=-1,_=I=>{if(u===-2){u=-1,f=-1;for(let E=I-2;E>=0;E--){let D=this._computeIndentLevel(E);if(D>=0){u=E,f=D;break}}}if(g!==-1&&(g===-2||g=0){g=E,p=D;break}}}},b=0,v=!0,w=0,C=!0,y=0,k=0;for(let I=0;v||C;I++){let E=e-I,D=e+I;I>1&&(E<1||E1&&(D>n||D>i)&&(C=!1),I>5e4&&(v=!1,C=!1);let O=-1;if(v&&E>=1){let H=this._computeIndentLevel(E-1);H>=0?(c=E-1,d=H,O=Math.ceil(H/this.textModel.getOptions().indentSize)):(h(E),O=this._getIndentLevelForWhitespaceLine(r,l,d))}let P=-1;if(C&&D<=n){let H=this._computeIndentLevel(D-1);H>=0?(u=D-1,f=H,P=Math.ceil(H/this.textModel.getOptions().indentSize)):(_(D),P=this._getIndentLevelForWhitespaceLine(r,f,p))}if(I===0){k=O;continue}if(I===1){if(D<=n&&P>=0&&k+1===P){v=!1,b=D,w=D,y=P;continue}if(E>=1&&O>=0&&O-1===k){C=!1,b=E,w=E,y=O;continue}if(b=e,w=e,y=k,y===0)return{startLineNumber:b,endLineNumber:w,indent:y}}v&&(O>=y?b=E:v=!1),C&&(P>=y?w=D:C=!1)}return{startLineNumber:b,endLineNumber:w,indent:y}}getLinesBracketGuides(e,t,i,n){let s=[];for(let h=e;h<=t;h++)s.push([]);let r=!0,a=this.textModel.bracketPairs.getBracketPairsInRangeWithMinIndentation(new S(e,1,t,this.textModel.getLineMaxColumn(t))).toArray(),l;if(i&&a.length>0){let h=(e<=i.lineNumber&&i.lineNumber<=t?a:this.textModel.bracketPairs.getBracketPairsInRange(S.fromPositions(i)).toArray()).filter(u=>S.strictContainsPosition(u.range,i));l=Um(h,u=>r)?.range}let c=this.textModel.getOptions().bracketPairColorizationOptions.independentColorPoolPerBracketType,d=new ST;for(let h of a){if(!h.closingBracketRange)continue;let u=l&&h.range.equalsRange(l);if(!u&&!n.includeInactive)continue;let f=d.getInlineClassName(h.nestingLevel,h.nestingLevelOfEqualBracketType,c)+(n.highlightActive&&u?" "+d.activeClassName:""),g=h.openingBracketRange.getStartPosition(),p=h.closingBracketRange.getStartPosition(),_=n.horizontalGuides===cp.Enabled||n.horizontalGuides===cp.EnabledForActive&&u;if(h.range.startLineNumber===h.range.endLineNumber){_&&s[h.range.startLineNumber-e].push(new Bh(-1,h.openingBracketRange.getEndPosition().column,f,new dp(!1,p.column),-1,-1));continue}let b=this.getVisibleColumnFromPosition(p),v=this.getVisibleColumnFromPosition(h.openingBracketRange.getStartPosition()),w=Math.min(v,b,h.minVisibleColumnIndentation+1),C=!1;Zn(this.textModel.getLineContent(h.closingBracketRange.startLineNumber))=e&&v>w&&s[g.lineNumber-e].push(new Bh(w,-1,f,new dp(!1,g.column),-1,-1)),p.lineNumber<=t&&b>w&&s[p.lineNumber-e].push(new Bh(w,-1,f,new dp(!C,p.column),-1,-1)))}for(let h of s)h.sort((u,f)=>u.visibleColumn-f.visibleColumn);return s}getVisibleColumnFromPosition(e){return mi.visibleColumnFromColumn(this.textModel.getLineContent(e.lineNumber),e.column,this.textModel.getOptions().tabSize)+1}getLinesIndentGuides(e,t){this.assertNotDisposed();let i=this.textModel.getLineCount();if(e<1||e>i)throw new Error("Illegal value for startLineNumber");if(t<1||t>i)throw new Error("Illegal value for endLineNumber");let n=this.textModel.getOptions(),s=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,r=!!(s&&s.offSide),a=new Array(t-e+1),l=-2,c=-1,d=-2,h=-1;for(let u=e;u<=t;u++){let f=u-e,g=this._computeIndentLevel(u-1);if(g>=0){l=u-1,c=g,a[f]=Math.ceil(g/n.indentSize);continue}if(l===-2){l=-1,c=-1;for(let p=u-2;p>=0;p--){let _=this._computeIndentLevel(p);if(_>=0){l=p,c=_;break}}}if(d!==-1&&(d===-2||d=0){d=p,h=_;break}}}a[f]=this._getIndentLevelForWhitespaceLine(r,c,h)}return a}_getIndentLevelForWhitespaceLine(e,t,i){let n=this.textModel.getOptions();return t===-1||i===-1?0:t{eCe();lp();Wl();Kt();Pe();qe();Rt();hX();C5();S5=class extends Wa{constructor(e){super(),this._context=e,this._primaryPosition=null;let t=this._context.configuration.options,i=t.get(166),n=t.get(59);this._spaceWidth=n.spaceWidth,this._maxIndentLeft=i.wrappingColumn===-1?-1:i.wrappingColumn*n.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=t.get(22),this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){let t=this._context.configuration.options,i=t.get(166),n=t.get(59);return this._spaceWidth=n.spaceWidth,this._maxIndentLeft=i.wrappingColumn===-1?-1:i.wrappingColumn*n.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=t.get(22),!0}onCursorStateChanged(e){let i=e.selections[0].getPosition();return this._primaryPosition?.equals(i)?!1:(this._primaryPosition=i,!0)}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}onLanguageConfigurationChanged(e){return!0}prepareRender(e){if(!this._bracketPairGuideOptions.indentation&&this._bracketPairGuideOptions.bracketPairs===!1){this._renderResult=null;return}let t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,n=e.scrollWidth,s=this._primaryPosition,r=this.getGuidesByLine(t,Math.min(i+1,this._context.viewModel.getLineCount()),s),a=[];for(let l=t;l<=i;l++){let c=l-t,d=r[c],h="",u=e.visibleRangeForPosition(new M(l,1))?.left??0;for(let f of d){let g=f.column===-1?u+(f.visibleColumn-1)*this._spaceWidth:e.visibleRangeForPosition(new M(l,f.column)).left;if(g>n||this._maxIndentLeft>0&&g>this._maxIndentLeft)break;let p=f.horizontalLine?f.horizontalLine.top?"horizontal-top":"horizontal-bottom":"vertical",_=f.horizontalLine?(e.visibleRangeForPosition(new M(l,f.horizontalLine.endColumn))?.left??g+this._spaceWidth)-g:this._spaceWidth;h+=`
`}a[c]=h}this._renderResult=a}getGuidesByLine(e,t,i){let n=this._bracketPairGuideOptions.bracketPairs!==!1?this._context.viewModel.getBracketGuidesInRangeByLine(e,t,i,{highlightActive:this._bracketPairGuideOptions.highlightActiveBracketPair,horizontalGuides:this._bracketPairGuideOptions.bracketPairsHorizontal===!0?cp.Enabled:this._bracketPairGuideOptions.bracketPairsHorizontal==="active"?cp.EnabledForActive:cp.Disabled,includeInactive:this._bracketPairGuideOptions.bracketPairs===!0}):null,s=this._bracketPairGuideOptions.indentation?this._context.viewModel.getLinesIndentGuides(e,t):null,r=0,a=0,l=0;if(this._bracketPairGuideOptions.highlightActiveIndentation!==!1&&i){let h=this._context.viewModel.getActiveIndentGuide(i.lineNumber,e,t);r=h.startLineNumber,a=h.endLineNumber,l=h.indent}let{indentSize:c}=this._context.viewModel.model.getOptions(),d=[];for(let h=e;h<=t;h++){let u=new Array;d.push(u);let f=n?n[h-e]:[],g=new Ld(f),p=s?s[h-e]:0;for(let _=1;_<=p;_++){let b=(_-1)*c+1,v=(this._bracketPairGuideOptions.highlightActiveIndentation==="always"||f.length===0)&&r<=h&&h<=a&&_===l;u.push(...g.takeWhile(C=>C.visibleColumn!0)||[])}return d}render(e,t){if(!this._renderResult)return"";let i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}};Ro((o,e)=>{let t=[{bracketColor:a5,guideColor:Fwe,guideColorActive:Uwe},{bracketColor:l5,guideColor:Bwe,guideColorActive:$we},{bracketColor:c5,guideColor:Wwe,guideColorActive:qwe},{bracketColor:d5,guideColor:Hwe,guideColorActive:jwe},{bracketColor:h5,guideColor:Vwe,guideColorActive:Kwe},{bracketColor:u5,guideColor:zwe,guideColorActive:Gwe}],i=new ST,n=[{indentColor:zC,indentColorActive:UC},{indentColor:pwe,indentColorActive:Cwe},{indentColor:_we,indentColorActive:ywe},{indentColor:bwe,indentColorActive:Swe},{indentColor:vwe,indentColorActive:xwe},{indentColor:wwe,indentColorActive:kwe}],s=t.map(a=>{let l=o.getColor(a.bracketColor),c=o.getColor(a.guideColor),d=o.getColor(a.guideColorActive),h=W1(W1(c)??l?.transparent(.3)),u=W1(W1(d)??l);if(!(!h||!u))return{guideColor:h,guideColorActive:u}}).filter(oo),r=n.map(a=>{let l=o.getColor(a.indentColor),c=o.getColor(a.indentColorActive),d=W1(l),h=W1(c);if(!(!d||!h))return{indentColor:d,indentColorActive:h}}).filter(oo);if(s.length>0){for(let a=0;a<30;a++){let l=s[a%s.length];e.addRule(`.monaco-editor .${i.getInlineClassNameOfLevel(a).replace(/ /g,".")} { --guide-color: ${l.guideColor}; --guide-color-active: ${l.guideColorActive}; }`)}e.addRule(".monaco-editor .vertical { box-shadow: 1px 0 0 0 var(--guide-color) inset; }"),e.addRule(".monaco-editor .horizontal-top { border-top: 1px solid var(--guide-color); }"),e.addRule(".monaco-editor .horizontal-bottom { border-bottom: 1px solid var(--guide-color); }"),e.addRule(`.monaco-editor .vertical.${i.activeClassName} { box-shadow: 1px 0 0 0 var(--guide-color-active) inset; }`),e.addRule(`.monaco-editor .horizontal-top.${i.activeClassName} { border-top: 1px solid var(--guide-color-active); }`),e.addRule(`.monaco-editor .horizontal-bottom.${i.activeClassName} { border-bottom: 1px solid var(--guide-color-active); }`)}if(r.length>0){for(let a=0;a<30;a++){let l=r[a%r.length];e.addRule(`.monaco-editor .lines-content .core-guide-indent.lvl-${a} { --indent-color: ${l.indentColor}; --indent-color-active: ${l.indentColorActive}; }`)}e.addRule(".monaco-editor .lines-content .core-guide-indent { box-shadow: 1px 0 0 0 var(--indent-color) inset; }"),e.addRule(".monaco-editor .lines-content .core-guide-indent.indent-active { box-shadow: 1px 0 0 0 var(--indent-color-active) inset; }")}})});var iCe=x(()=>{});var H1,uX=x(()=>{iCe();rt();lp();Pe();ue();Kt();Wl();H1=class o extends Wa{static{this.CLASS_NAME="line-numbers"}constructor(e){super(),this._context=e,this._readConfig(),this._lastCursorModelPosition=new M(1,1),this._renderResult=null,this._activeModelLineNumber=1,this._context.addEventHandler(this)}_readConfig(){let e=this._context.configuration.options;this._lineHeight=e.get(75);let t=e.get(76);this._renderLineNumbers=t.renderType,this._renderCustomLineNumbers=t.renderFn,this._renderFinalNewline=e.get(109);let i=e.get(165);this._lineNumbersLeft=i.lineNumbersLeft,this._lineNumbersWidth=i.lineNumbersWidth}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return this._readConfig(),!0}onCursorStateChanged(e){let t=e.selections[0].getPosition();this._lastCursorModelPosition=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(t);let i=!1;return this._activeModelLineNumber!==this._lastCursorModelPosition.lineNumber&&(this._activeModelLineNumber=this._lastCursorModelPosition.lineNumber,i=!0),(this._renderLineNumbers===2||this._renderLineNumbers===3)&&(i=!0),i}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}onDecorationsChanged(e){return e.affectsLineNumber}_getLineRenderLineNumber(e){let t=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new M(e,1));if(t.column!==1)return"";let i=t.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(i);if(this._renderLineNumbers===2){let n=Math.abs(this._lastCursorModelPosition.lineNumber-i);return n===0?''+i+"":String(n)}if(this._renderLineNumbers===3){if(this._lastCursorModelPosition.lineNumber===i||i%10===0)return String(i);let n=this._context.viewModel.getLineCount();return i===n?String(i):""}return String(i)}prepareRender(e){if(this._renderLineNumbers===0){this._renderResult=null;return}let t=po?this._lineHeight%2===0?" lh-even":" lh-odd":"",i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,s=this._context.viewModel.getDecorationsInViewport(e.visibleRange).filter(c=>!!c.options.lineNumberClassName);s.sort((c,d)=>S.compareRangesUsingEnds(c.range,d.range));let r=0,a=this._context.viewModel.getLineCount(),l=[];for(let c=i;c<=n;c++){let d=c-i,h=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new M(c,1)).lineNumber,u=this._getLineRenderLineNumber(c),f="";for(;r${u}`}this._renderResult=l}render(e,t){if(!this._renderResult)return"";let i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}};Ro((o,e)=>{let t=o.getColor(mwe),i=o.getColor(Lwe);i?e.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${i}; }`):t&&e.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${t.transparent(.4)}; }`)})});var nCe=x(()=>{});var hp,x5=x(()=>{nCe();hp="monaco-mouse-cursor-text"});var oCe=x(()=>{});var V1,sCe=x(()=>{V1=class{get didDomLayout(){return this._didDomLayout}readClientRect(){if(!this._clientRectRead){this._clientRectRead=!0;let e=this._domNode.getBoundingClientRect();this.markDidDomLayout(),this._clientRectDeltaLeft=e.left;let t=this._domNode.offsetWidth;this._clientRectScale=t>0?e.width/t:1}}get clientRectDeltaLeft(){return this._clientRectRead||this.readClientRect(),this._clientRectDeltaLeft}get clientRectScale(){return this._clientRectRead||this.readClientRect(),this._clientRectScale}constructor(e,t){this._domNode=e,this.endNode=t,this._didDomLayout=!1,this._clientRectDeltaLeft=0,this._clientRectScale=1,this._clientRectRead=!1}markDidDomLayout(){this._didDomLayout=!0}}});var up,k5=x(()=>{up=class{constructor(e,t){this.themeType=t;let i=e.options,n=i.get(59);this.renderWhitespace=i.get(113),this.experimentalWhitespaceRendering=i.get(47),this.renderControlCharacters=i.get(108),this.spaceWidth=n.spaceWidth,this.middotWidth=n.middotWidth,this.wsmiddotWidth=n.wsmiddotWidth,this.useMonospaceOptimizations=n.isMonospace&&!i.get(40),this.canUseHalfwidthRightwardsArrow=n.canUseHalfwidthRightwardsArrow,this.lineHeight=i.get(75),this.stopRenderingLineAfter=i.get(133),this.fontLigatures=i.get(60),this.verticalScrollbarSize=i.get(117).verticalScrollbarSize,this.useGpu=i.get(46)==="on"}equals(e){return this.themeType===e.themeType&&this.renderWhitespace===e.renderWhitespace&&this.experimentalWhitespaceRendering===e.experimentalWhitespaceRendering&&this.renderControlCharacters===e.renderControlCharacters&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.fontLigatures===e.fontLigatures&&this.verticalScrollbarSize===e.verticalScrollbarSize&&this.useGpu===e.useGpu}}});var fX,gX,mX,L5,rCe=x(()=>{x5();Ze();rt();oCe();dc();SC();K4();Dr();sCe();_1();Pe();ue();k5();ho();fX=class{constructor(){this._currentVisibleRange=new S(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(e){this._currentVisibleRange=e}},gX=class{constructor(e,t,i,n,s,r,a){this.minimalReveal=e,this.lineNumber=t,this.startColumn=i,this.endColumn=n,this.startScrollTop=s,this.stopScrollTop=r,this.scrollType=a,this.type="range",this.minLineNumber=t,this.maxLineNumber=t}},mX=class{constructor(e,t,i,n,s){this.minimalReveal=e,this.selections=t,this.startScrollTop=i,this.stopScrollTop=n,this.scrollType=s,this.type="selections";let r=t[0].startLineNumber,a=t[0].endLineNumber;for(let l=1,c=t.length;lnew Fu(t,this._viewLineOptions)}),this.domNode=this._visibleLines.domNode,Tr.write(this.domNode,8),this.domNode.setClassName(`view-lines ${hp}`),wn(this.domNode,r),this._maxLineWidth=0,this._asyncUpdateLineWidths=new at(()=>{this._updateLineWidthsSlow()},200),this._asyncCheckMonospaceFontAssumptions=new at(()=>{this._checkMonospaceFontAssumptions()},2e3),this._lastRenderedData=new fX,this._horizontalRevealRequest=null,this._stickyScrollEnabled=s.get(131).enabled,this._maxNumberStickyLines=s.get(131).maxLineCount}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e),e.hasChanged(166)&&(this._maxLineWidth=0);let t=this._context.configuration.options,i=t.get(59),n=t.get(166);return this._lineHeight=t.get(75),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._isViewportWrapping=n.isViewportWrapping,this._revealHorizontalRightPadding=t.get(114),this._cursorSurroundingLines=t.get(35),this._cursorSurroundingLinesStyle=t.get(36),this._canUseLayerHinting=!t.get(39),this._stickyScrollEnabled=t.get(131).enabled,this._maxNumberStickyLines=t.get(131).maxLineCount,wn(this.domNode,i),this._onOptionsMaybeChanged(),e.hasChanged(165)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){let e=this._context.configuration,t=new up(e,this._context.theme.type);if(!this._viewLineOptions.equals(t)){this._viewLineOptions=t;let i=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let s=i;s<=n;s++)this._visibleLines.getVisibleLine(s).onOptionsChanged(this._viewLineOptions);return!0}return!1}onCursorStateChanged(e){let t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber(),n=!1;for(let s=t;s<=i;s++)n=this._visibleLines.getVisibleLine(s).onSelectionChanged()||n;return n}onDecorationsChanged(e){let t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let n=t;n<=i;n++)this._visibleLines.getVisibleLine(n).onDecorationsChanged();return!0}onFlushed(e){let t=this._visibleLines.onFlushed(e,this._viewLineOptions.useGpu);return this._maxLineWidth=0,t}onLinesChanged(e){return this._visibleLines.onLinesChanged(e)}onLinesDeleted(e){return this._visibleLines.onLinesDeleted(e)}onLinesInserted(e){return this._visibleLines.onLinesInserted(e)}onRevealRangeRequest(e){let t=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),e.source,e.minimalReveal,e.range,e.selections,e.verticalType);if(t===-1)return!1;let i=this._context.viewLayout.validateScrollPosition({scrollTop:t});e.revealHorizontal?e.range&&e.range.startLineNumber!==e.range.endLineNumber?i={scrollTop:i.scrollTop,scrollLeft:0}:e.range?this._horizontalRevealRequest=new gX(e.minimalReveal,e.range.startLineNumber,e.range.startColumn,e.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),i.scrollTop,e.scrollType):e.selections&&e.selections.length>0&&(this._horizontalRevealRequest=new mX(e.minimalReveal,e.selections,this._context.viewLayout.getCurrentScrollTop(),i.scrollTop,e.scrollType)):this._horizontalRevealRequest=null;let s=Math.abs(this._context.viewLayout.getCurrentScrollTop()-i.scrollTop)<=this._lineHeight?1:e.scrollType;return this._context.viewModel.viewLayout.setScrollPosition(i,s),!0}onScrollChanged(e){if(this._horizontalRevealRequest&&e.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&e.scrollTopChanged){let t=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),i=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(e.scrollTopi)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(e.scrollWidth),this._visibleLines.onScrollChanged(e)||e.scrollTopChanged||e.scrollLeftChanged}onTokensChanged(e){return this._visibleLines.onTokensChanged(e)}onZonesChanged(e){return this._context.viewModel.viewLayout.setMaxLineWidth(this._maxLineWidth),this._visibleLines.onZonesChanged(e)}onThemeChanged(e){return this._onOptionsMaybeChanged()}getPositionFromDOMInfo(e,t){let i=this._getViewLineDomNode(e);if(i===null)return null;let n=this._getLineNumberFor(i);if(n===-1||n<1||n>this._context.viewModel.getLineCount())return null;if(this._context.viewModel.getLineMaxColumn(n)===1)return new M(n,1);let s=this._visibleLines.getStartLineNumber(),r=this._visibleLines.getEndLineNumber();if(nr)return null;let a=this._visibleLines.getVisibleLine(n).getColumnOfNodeOffset(e,t),l=this._context.viewModel.getLineMinColumn(n);return ai)return-1;let n=new V1(this.domNode.domNode,this._textRangeRestingSpot),s=this._visibleLines.getVisibleLine(e).getWidth(n);return this._updateLineWidthsSlowIfDomDidLayout(n),s}resetLineWidthCaches(){let e=this._visibleLines.getStartLineNumber(),t=this._visibleLines.getEndLineNumber();for(let i=e;i<=t;i++)this._visibleLines.getVisibleLine(i).resetCachedWidth()}linesVisibleRangesForRange(e,t){let i=e.endLineNumber,n=S.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange());if(!n)return null;let s=[],r=0,a=new V1(this.domNode.domNode,this._textRangeRestingSpot),l=0;t&&(l=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new M(n.startLineNumber,1)).lineNumber);let c=this._visibleLines.getStartLineNumber(),d=this._visibleLines.getEndLineNumber();for(let h=n.startLineNumber;h<=n.endLineNumber;h++){if(hd)continue;let u=h===n.startLineNumber?n.startColumn:1,f=h!==i,g=f?this._context.viewModel.getLineMaxColumn(h):n.endColumn,_=this._visibleLines.getVisibleLine(h).getVisibleRangesForRange(h,u,g,a);if(_){if(t&&hthis._visibleLines.getEndLineNumber())return null;let n=new V1(this.domNode.domNode,this._textRangeRestingSpot),s=this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(e,t,i,n);return this._updateLineWidthsSlowIfDomDidLayout(n),s}_lineIsRenderedRTL(e){return ethis._visibleLines.getEndLineNumber()?!1:this._visibleLines.getVisibleLine(e).isRenderedRTL()}visibleRangeForPosition(e){let t=this._visibleRangesForLineRange(e.lineNumber,e.column,e.column);return t?new g1(t.outsideRenderedLine,t.ranges[0].left):null}_updateLineWidthsFast(){return this._updateLineWidths(!0)}_updateLineWidthsSlow(){this._updateLineWidths(!1)}_updateLineWidthsSlowIfDomDidLayout(e){e.didDomLayout&&this._asyncUpdateLineWidths.isScheduled()&&(this._asyncUpdateLineWidths.cancel(),this._updateLineWidthsSlow())}_updateLineWidths(e){let t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber(),n=1,s=!0;for(let r=t;r<=i;r++){let a=this._visibleLines.getVisibleLine(r);if(e&&!a.getWidthIsFast()){s=!1;continue}n=Math.max(n,a.getWidth(null))}return s&&t===1&&i===this._context.viewModel.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(n),s}_checkMonospaceFontAssumptions(){let e=-1,t=-1,i=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let s=i;s<=n;s++){let r=this._visibleLines.getVisibleLine(s);if(r.needsMonospaceFontCheck()){let a=r.getWidth(null);a>t&&(t=a,e=s)}}if(e!==-1&&!this._visibleLines.getVisibleLine(e).monospaceAssumptionsAreValid())for(let s=i;s<=n;s++)this._visibleLines.getVisibleLine(s).onMonospaceAssumptionsInvalidated()}prepareRender(){throw new Error("Not supported")}render(){throw new Error("Not supported")}renderText(e){if(this._visibleLines.renderLines(e),this._lastRenderedData.setCurrentVisibleRange(e.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){let i=this._horizontalRevealRequest;if(e.startLineNumber<=i.minLineNumber&&i.maxLineNumber<=e.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();let n=this._computeScrollLeftToReveal(i);n&&(!this._isViewportWrapping&&!n.hasRTL&&this._ensureMaxLineWidth(n.maxHorizontalOffset),this._context.viewModel.viewLayout.setScrollPosition({scrollLeft:n.scrollLeft},i.scrollType))}}if(this._updateLineWidthsFast()?this._asyncUpdateLineWidths.cancel():this._asyncUpdateLineWidths.schedule(),po&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){let i=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let s=i;s<=n;s++)if(this._visibleLines.getVisibleLine(s).needsMonospaceFontCheck()){this._asyncCheckMonospaceFontAssumptions.schedule();break}}this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");let t=this._context.viewLayout.getCurrentScrollTop()-e.bigNumbersDelta;this._linesContent.setTop(-t),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())}_ensureMaxLineWidth(e){if(this._viewLineOptions.useGpu)return;let t=Math.ceil(e);this._maxLineWidth0){let b=s[0].startLineNumber,v=s[0].endLineNumber;for(let w=1,C=s.length;wl){if(!d)return-1;_=h}else if(r===5||r===6)if(r===6&&a<=h&&u<=c)_=a;else{let b=Math.max(5*this._lineHeight,l*.2),v=h-b,w=u-l;_=Math.max(w,v)}else if(r===1||r===2)if(r===2&&a<=h&&u<=c)_=a;else{let b=(h+u)/2;_=Math.max(0,b-l/2)}else _=this._computeMinimumScrolling(a,c,h,u,r===3,r===4);return _}_computeScrollLeftToReveal(e){let t=this._context.viewLayout.getCurrentViewport(),i=this._context.configuration.options.get(165),n=t.left,s=n+t.width-i.verticalScrollbarWidth,r=1073741824,a=0,l=!1;if(e.type==="range"){l=this._lineIsRenderedRTL(e.lineNumber);let d=this._visibleRangesForLineRange(e.lineNumber,e.startColumn,e.endColumn);if(!d)return null;for(let h of d.ranges)r=Math.min(r,Math.round(h.left)),a=Math.max(a,Math.round(h.left+h.width))}else for(let d of e.selections){if(d.startLineNumber!==d.endLineNumber)return null;let h=this._visibleRangesForLineRange(d.startLineNumber,d.startColumn,d.endColumn);if(l||=this._lineIsRenderedRTL(d.startLineNumber),!h)return null;for(let u of h.ranges)r=Math.min(r,Math.round(u.left)),a=Math.max(a,Math.round(u.left+u.width))}return e.minimalReveal||(r=Math.max(0,r-o.HORIZONTAL_EXTRA_PX),a+=this._revealHorizontalRightPadding),e.type==="selections"&&a-r>t.width?null:{scrollLeft:this._computeMinimumScrolling(n,s,r,a),maxHorizontalOffset:a,hasRTL:l}}_computeMinimumScrolling(e,t,i,n,s,r){e=e|0,t=t|0,i=i|0,n=n|0,s=!!s,r=!!r;let a=t-e;if(n-it)return Math.max(0,n-a)}else return i;return e}}});var aCe=x(()=>{});var I5,lCe=x(()=>{aCe();v5();I5=class extends F1{constructor(e){super(),this._context=e;let i=this._context.configuration.options.get(165);this._decorationsLeft=i.decorationsLeft,this._decorationsWidth=i.decorationsWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){let i=this._context.configuration.options.get(165);return this._decorationsLeft=i.decorationsLeft,this._decorationsWidth=i.decorationsWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){let t=e.getDecorationsInViewport(),i=[],n=0;for(let s=0,r=t.length;s',l=[];for(let c=t;c<=i;c++){let d=c-t,h=n[d].getDecorations(),u="";for(let f of h){let g='
{});var z1,pX=x(()=>{cCe();Go();Dr();z1=class o extends xn{static{this.CLASS_NAME="glyph-margin"}static{this.OUTER_CLASS_NAME="margin"}constructor(e){super(e);let t=this._context.configuration.options,i=t.get(165);this._canUseLayerHinting=!t.get(39),this._contentLeft=i.contentLeft,this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,this._domNode=wt(document.createElement("div")),this._domNode.setClassName(o.OUTER_CLASS_NAME),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._glyphMarginBackgroundDomNode=wt(document.createElement("div")),this._glyphMarginBackgroundDomNode.setClassName(o.CLASS_NAME),this._domNode.appendChild(this._glyphMarginBackgroundDomNode)}getDomNode(){return this._domNode}onConfigurationChanged(e){let t=this._context.configuration.options,i=t.get(165);return this._canUseLayerHinting=!t.get(39),this._contentLeft=i.contentLeft,this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollTopChanged}prepareRender(e){}render(e){this._domNode.setLayerHinting(this._canUseLayerHinting),this._domNode.setContain("strict");let t=e.scrollTop-e.bigNumbersDelta;this._domNode.setTop(-t);let i=Math.min(e.scrollHeight,1e6);this._domNode.setHeight(i),this._domNode.setWidth(this._contentLeft),this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft),this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth),this._glyphMarginBackgroundDomNode.setHeight(i)}}});var dCe=x(()=>{});var E5,hCe=x(()=>{dCe();v5();E5=class extends F1{constructor(e){super(),this._context=e,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){let t=e.getDecorationsInViewport(),i=[],n=0;for(let s=0,r=t.length;s
';s[a]=c}this._renderResult=s}render(e,t){return this._renderResult?this._renderResult[t-e]:""}}});var uCe=x(()=>{});var Wh,_X=x(()=>{Wh=class o{static{this.Empty=new o(0,0,0,0)}constructor(e,t,i,n){this._rgba8Brand=void 0,this.r=o._clamp(e),this.g=o._clamp(t),this.b=o._clamp(i),this.a=o._clamp(n)}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}static _clamp(e){return e<0?0:e>255?255:e|0}}});var U1,bX=x(()=>{ae();W();_X();Ci();Ae();U1=class o extends T{static{this._INSTANCE=null}static getInstance(){return this._INSTANCE||(this._INSTANCE=new o),this._INSTANCE}constructor(){super(),this._onDidChange=this._register(new N),this.onDidChange=this._onDidChange.event,this._updateColorMap(),this._register(Ti.onDidChange(e=>{e.changedColorMap&&this._updateColorMap()}))}_updateColorMap(){let e=Ti.getColorMap();if(!e){this._colors=[];for(let i=0;i<=2;i++)this._colors[i]=Wh.Empty;this._backgroundIsLight=!0;return}this._colors=[Wh.Empty];for(let i=1;i=.5,this._onDidChange.fire(void 0)}getColor(e){(e<1||e>=this._colors.length)&&(e=2);let t=this._colors[e];return t||(De(new xe(`Missing color for colorId ${e}`)),t=Wh.Empty),t}backgroundIsLight(){return this._backgroundIsLight}}});var fCe,gCe,vX=x(()=>{fCe=(()=>{let o=[];for(let e=32;e<=126;e++)o.push(e);return o.push(65533),o})(),gCe=(o,e)=>(o-=32,o<0||o>96?e<=2?(o+96)%96:95:o)});var xT,mCe=x(()=>{vX();EE();xT=class o{constructor(e,t){this.scale=t,this._minimapCharRendererBrand=void 0,this.charDataNormal=o.soften(e,12/15),this.charDataLight=o.soften(e,50/60)}static soften(e,t){let i=new Uint8ClampedArray(e.length);for(let n=0,s=e.length;ne.width||i+g>e.height){console.warn("bad render request outside image data");return}let p=d?this.charDataLight:this.charDataNormal,_=gCe(n,c),b=e.width*4,v=a.r,w=a.g,C=a.b,y=s.r-v,k=s.g-w,I=s.b-C,E=Math.max(r,l),D=e.data,O=_*u*f,P=i*b+t*4;for(let H=0;He.width||i+h>e.height){console.warn("bad render request outside image data");return}let u=e.width*4,f=.5*(s/255),g=r.r,p=r.g,_=r.b,b=n.r-g,v=n.g-p,w=n.b-_,C=g+b*f,y=p+v*f,k=_+w*f,I=Math.max(s,a),E=e.data,D=i*u+t*4;for(let O=0;O{pw();pCe={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15},_Ce=o=>{let e=new Uint8ClampedArray(o.length/2);for(let t=0;t>1]=pCe[o[t]]<<4|pCe[o[t+1]]&15;return e},wX={1:Id(()=>_Ce("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792")),2:Id(()=>_Ce("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126"))}});var T5,vCe=x(()=>{mCe();vX();bCe();EE();T5=class o{static create(e,t){if(this.lastCreated&&e===this.lastCreated.scale&&t===this.lastFontFamily)return this.lastCreated;let i;return wX[e]?i=new xT(wX[e](),e):i=o.createFromSampleData(o.createSampleData(t).data,e),this.lastFontFamily=t,this.lastCreated=i,i}static createSampleData(e){let t=document.createElement("canvas"),i=t.getContext("2d");t.style.height="16px",t.height=16,t.width=960,t.style.width="960px",i.fillStyle="#ffffff",i.font=`bold 16px ${e}`,i.textBaseline="middle";let n=0;for(let s of fCe)i.fillText(String.fromCharCode(s),n,16/2),n+=10;return i.getImageData(0,0,960,16)}static createFromSampleData(e,t){if(e.length!==61440)throw new Error("Unexpected source in MinimapCharRenderer");let n=o._downsample(e,t);return new xT(n,t)}static _downsampleChar(e,t,i,n,s){let r=1*s,a=2*s,l=n,c=0;for(let d=0;d0){let c=255/l;for(let d=0;d{rt();wCe=sn?'"Segoe WPC", "Segoe UI", sans-serif':Ye?"-apple-system, BlinkMacSystemFont, sans-serif":'system-ui, "Ubuntu", "Droid Sans", sans-serif'});function kT(o,e){return!(e.options.hideInCommentTokens&&D5(o,e)||e.options.hideInStringTokens&&N5(o,e))}function D5(o,e){return yCe(o,e.range,t=>t===1)}function N5(o,e){return yCe(o,e.range,t=>t===2)}function yCe(o,e,t){for(let i=e.startLineNumber;i<=e.endLineNumber;i++){let n=o.tokenization.getLineTokens(i),s=i===e.startLineNumber,r=i===e.endLineNumber,a=s?n.findTokenIndexAtOffset(e.startColumn-1):0;for(;ae.endColumn-1);){if(!t(n.getStandardTokenType(a)))return!1;a++}}return!0}var $1,R5=x(()=>{$1=class{constructor(e,t){this._viewModelDecorationBrand=void 0,this.range=e,this.options=t}}});var E5e,T5e,A5,CX,M5,O5,yX,P5,F5,SX,B5,SCe=x(()=>{uCe();re();Go();fC();W();rt();He();K4();Dr();Uo();ue();_X();bX();$t();bi();Zi();xi();qi();Mi();Xi();$i();Vi();Qi();Ji();gi();Bl();vCe();pw();yo();CCe();R5();Ze();E5e=140,T5e=2,A5=class o{constructor(e,t,i){let n=e.options,s=n.get(163),r=n.get(165),a=r.minimap,l=n.get(59),c=n.get(81);this.renderMinimap=a.renderMinimap,this.size=c.size,this.minimapHeightIsEditorHeight=a.minimapHeightIsEditorHeight,this.scrollBeyondLastLine=n.get(119),this.paddingTop=n.get(96).top,this.paddingBottom=n.get(96).bottom,this.showSlider=c.showSlider,this.autohide=c.autohide,this.pixelRatio=s,this.typicalHalfwidthCharacterWidth=l.typicalHalfwidthCharacterWidth,this.lineHeight=n.get(75),this.minimapLeft=a.minimapLeft,this.minimapWidth=a.minimapWidth,this.minimapHeight=r.height,this.canvasInnerWidth=a.minimapCanvasInnerWidth,this.canvasInnerHeight=a.minimapCanvasInnerHeight,this.canvasOuterWidth=a.minimapCanvasOuterWidth,this.canvasOuterHeight=a.minimapCanvasOuterHeight,this.isSampling=a.minimapIsSampling,this.editorHeight=r.height,this.fontScale=a.minimapScale,this.minimapLineHeight=a.minimapLineHeight,this.minimapCharWidth=1*this.fontScale,this.sectionHeaderFontFamily=wCe,this.sectionHeaderFontSize=c.sectionHeaderFontSize*s,this.sectionHeaderLetterSpacing=c.sectionHeaderLetterSpacing,this.sectionHeaderFontColor=o._getSectionHeaderColor(t,i.getColor(1)),this.charRenderer=Id(()=>T5.create(this.fontScale,l.fontFamily)),this.defaultBackgroundColor=i.getColor(2),this.backgroundColor=o._getMinimapBackground(t,this.defaultBackgroundColor),this.foregroundAlpha=o._getMinimapForegroundOpacity(t)}static _getMinimapBackground(e,t){let i=e.getColor(Ibe);return i?new Wh(i.rgba.r,i.rgba.g,i.rgba.b,Math.round(255*i.rgba.a)):t}static _getMinimapForegroundOpacity(e){let t=e.getColor(Ebe);return t?Wh._clamp(Math.round(255*t.rgba.a)):255}static _getSectionHeaderColor(e,t){let i=e.getColor($c);return i?new Wh(i.rgba.r,i.rgba.g,i.rgba.b,Math.round(255*i.rgba.a)):t}equals(e){return this.renderMinimap===e.renderMinimap&&this.size===e.size&&this.minimapHeightIsEditorHeight===e.minimapHeightIsEditorHeight&&this.scrollBeyondLastLine===e.scrollBeyondLastLine&&this.paddingTop===e.paddingTop&&this.paddingBottom===e.paddingBottom&&this.showSlider===e.showSlider&&this.autohide===e.autohide&&this.pixelRatio===e.pixelRatio&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.lineHeight===e.lineHeight&&this.minimapLeft===e.minimapLeft&&this.minimapWidth===e.minimapWidth&&this.minimapHeight===e.minimapHeight&&this.canvasInnerWidth===e.canvasInnerWidth&&this.canvasInnerHeight===e.canvasInnerHeight&&this.canvasOuterWidth===e.canvasOuterWidth&&this.canvasOuterHeight===e.canvasOuterHeight&&this.isSampling===e.isSampling&&this.editorHeight===e.editorHeight&&this.fontScale===e.fontScale&&this.minimapLineHeight===e.minimapLineHeight&&this.minimapCharWidth===e.minimapCharWidth&&this.sectionHeaderFontSize===e.sectionHeaderFontSize&&this.sectionHeaderLetterSpacing===e.sectionHeaderLetterSpacing&&this.defaultBackgroundColor&&this.defaultBackgroundColor.equals(e.defaultBackgroundColor)&&this.backgroundColor&&this.backgroundColor.equals(e.backgroundColor)&&this.foregroundAlpha===e.foregroundAlpha}},CX=class o{constructor(e,t,i,n,s,r,a,l,c){this.scrollTop=e,this.scrollHeight=t,this.sliderNeeded=i,this._computedSliderRatio=n,this.sliderTop=s,this.sliderHeight=r,this.topPaddingLineCount=a,this.startLineNumber=l,this.endLineNumber=c}getDesiredScrollTopFromDelta(e){return Math.round(this.scrollTop+e/this._computedSliderRatio)}getDesiredScrollTopFromTouchLocation(e){return Math.round((e-this.sliderHeight/2)/this._computedSliderRatio)}intersectWithViewport(e){let t=Math.max(this.startLineNumber,e.startLineNumber),i=Math.min(this.endLineNumber,e.endLineNumber);return t>i?null:[t,i]}getYForLineNumber(e,t){return+(e-this.startLineNumber+this.topPaddingLineCount)*t}static create(e,t,i,n,s,r,a,l,c,d,h){let u=e.pixelRatio,f=e.minimapLineHeight,g=Math.floor(e.canvasInnerHeight/f),p=e.lineHeight;if(e.minimapHeightIsEditorHeight){let k=l*e.lineHeight+e.paddingTop+e.paddingBottom;e.scrollBeyondLastLine&&(k+=Math.max(0,s-e.lineHeight-e.paddingBottom));let I=Math.max(1,Math.floor(s*s/k)),E=Math.max(0,e.minimapHeight-I),D=E/(d-s),O=c*D,P=E>0,H=Math.floor(e.canvasInnerHeight/e.minimapLineHeight),z=Math.floor(e.paddingTop/e.lineHeight);return new o(c,d,P,D,O,I,z,1,Math.min(a,H))}let _;if(r&&i!==a){let k=i-t+1;_=Math.floor(k*f/u)}else{let k=s/p;_=Math.floor(k*f/u)}let b=Math.floor(e.paddingTop/p),v=Math.floor(e.paddingBottom/p);if(e.scrollBeyondLastLine){let k=s/p;v=Math.max(v,k-1)}let w;if(v>0){let k=s/p;w=(b+a+v-k-1)*f/u}else w=Math.max(0,(b+a)*f/u-_);w=Math.min(e.minimapHeight-_,w);let C=w/(d-s),y=c*C;if(g>=b+a+v){let k=w>0;return new o(c,d,k,C,y,_,b,1,a)}else{let k;t>1?k=t+b:k=Math.max(1,c/p);let I,E=Math.max(1,Math.floor(k-y*u/f));Ec&&(E=Math.min(E,h.startLineNumber),I=Math.max(I,h.topPaddingLineCount)),h.scrollTop=e.paddingTop?P=(t-E+I+O)*f/u:P=c/e.paddingTop*(I+O)*f/u,new o(c,d,!0,C,P,_,I,E,D)}}},M5=class o{static{this.INVALID=new o(-1)}constructor(e){this.dy=e}onContentChanged(){this.dy=-1}onTokensChanged(){this.dy=-1}},O5=class{constructor(e,t,i){this.renderedLayout=e,this._imageData=t,this._renderedLines=new CT({createLine:()=>M5.INVALID}),this._renderedLines._set(e.startLineNumber,i)}linesEquals(e){if(!this.scrollEquals(e))return!1;let i=this._renderedLines._get().lines;for(let n=0,s=i.length;n1){for(let b=0,v=n-1;b0&&this.minimapLines[i-1]>=e;)i--;let n=this.modelLineToMinimapLine(t)-1;for(;n+1t)return null}return[i+1,n+1]}decorationLineRangeToMinimapLineRange(e,t){let i=this.modelLineToMinimapLine(e),n=this.modelLineToMinimapLine(t);return e!==t&&n===i&&(n===this.minimapLines.length?i>1&&i--:n++),[i,n]}onLinesDeleted(e){let t=e.toLineNumber-e.fromLineNumber+1,i=this.minimapLines.length,n=0;for(let s=this.minimapLines.length-1;s>=0&&!(this.minimapLines[s]=0&&!(this.minimapLines[i]0,scrollWidth:e.scrollWidth,scrollHeight:e.scrollHeight,viewportStartLineNumber:t,viewportEndLineNumber:i,viewportStartLineNumberVerticalOffset:e.getVerticalOffsetForLineNumber(t),scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,viewportWidth:e.viewportWidth,viewportHeight:e.viewportHeight};this._actual.render(n)}_recreateLineSampling(){this._minimapSelections=null;let e=!!this._samplingState,[t,i]=P5.compute(this.options,this._context.viewModel.getLineCount(),this._samplingState);if(this._samplingState=t,e&&this._samplingState)for(let n of i)switch(n.type){case"deleted":this._actual.onLinesDeleted(n.deleteFromLineNumber,n.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(n.insertFromLineNumber,n.insertToLineNumber);break;case"flush":this._actual.onFlushed();break}}getLineCount(){return this._samplingState?this._samplingState.minimapLines.length:this._context.viewModel.getLineCount()}getRealLineCount(){return this._context.viewModel.getLineCount()}getLineContent(e){return this._samplingState?this._context.viewModel.getLineContent(this._samplingState.minimapLines[e-1]):this._context.viewModel.getLineContent(e)}getLineMaxColumn(e){return this._samplingState?this._context.viewModel.getLineMaxColumn(this._samplingState.minimapLines[e-1]):this._context.viewModel.getLineMaxColumn(e)}getMinimapLinesRenderingData(e,t,i){if(this._samplingState){let n=[];for(let s=0,r=t-e+1;s!i.options.minimap?.sectionHeaderStyle)}getSectionHeaderDecorationsInViewport(e,t){let i=this.options.sectionHeaderFontSize/this.options.minimapLineHeight;return e=Math.floor(Math.max(1,e-i)),this._getMinimapDecorationsInViewport(e,t).filter(n=>!!n.options.minimap?.sectionHeaderStyle)}_getMinimapDecorationsInViewport(e,t){let i;if(this._samplingState){let s=this._samplingState.minimapLines[e-1],r=this._samplingState.minimapLines[t-1];i=new S(s,1,r,this._context.viewModel.getLineMaxColumn(r))}else i=new S(e,1,t,this._context.viewModel.getLineMaxColumn(t));let n=this._context.viewModel.getMinimapDecorationsInRange(i);if(this._samplingState){let s=[];for(let r of n){if(!r.options.minimap)continue;let a=r.range,l=this._samplingState.modelLineToMinimapLine(a.startLineNumber),c=this._samplingState.modelLineToMinimapLine(a.endLineNumber);s.push(new $1(new S(l,a.startColumn,c,a.endColumn),r.options))}return s}return n}getSectionHeaderText(e,t){let i=e.options.minimap?.sectionHeaderText;if(!i)return null;let n=this._sectionHeaderCache.get(i);if(n)return n;let s=t(i);return this._sectionHeaderCache.set(i,s),s}getOptions(){return this._context.viewModel.model.getOptions()}revealLineNumber(e){this._samplingState&&(e=this._samplingState.minimapLines[e-1]),this._context.viewModel.revealRange("mouse",!1,new S(e,1,e,1),1,0)}setScrollTop(e){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:e},1)}},SX=class o extends T{constructor(e,t){super(),this._renderDecorations=!1,this._gestureInProgress=!1,this._isMouseOverMinimap=!1,this._theme=e,this._model=t,this._lastRenderData=null,this._buffers=null,this._selectionColor=this._theme.getColor(uZ),this._domNode=wt(document.createElement("div")),Tr.write(this._domNode,9),this._domNode.setClassName(this._getMinimapDomNodeClassName()),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._shadow=wt(document.createElement("div")),this._shadow.setClassName("minimap-shadow-hidden"),this._domNode.appendChild(this._shadow),this._canvas=wt(document.createElement("canvas")),this._canvas.setPosition("absolute"),this._canvas.setLeft(0),this._domNode.appendChild(this._canvas),this._decorationsCanvas=wt(document.createElement("canvas")),this._decorationsCanvas.setPosition("absolute"),this._decorationsCanvas.setClassName("minimap-decorations-layer"),this._decorationsCanvas.setLeft(0),this._domNode.appendChild(this._decorationsCanvas),this._slider=wt(document.createElement("div")),this._slider.setPosition("absolute"),this._slider.setClassName("minimap-slider"),this._slider.setLayerHinting(!0),this._slider.setContain("strict"),this._domNode.appendChild(this._slider),this._sliderHorizontal=wt(document.createElement("div")),this._sliderHorizontal.setPosition("absolute"),this._sliderHorizontal.setClassName("minimap-slider-horizontal"),this._slider.appendChild(this._sliderHorizontal),this._applyLayout(),this._hideDelayedScheduler=this._register(new at(()=>this._hideImmediatelyIfMouseIsOutside(),500)),this._register(_i(this._domNode.domNode,ee.MOUSE_OVER,()=>{this._isMouseOverMinimap=!0})),this._register(_i(this._domNode.domNode,ee.MOUSE_LEAVE,()=>{this._isMouseOverMinimap=!1})),this._pointerDownListener=_i(this._domNode.domNode,ee.POINTER_DOWN,i=>{i.preventDefault();let n=i.pointerType==="mouse",s=i.button===0;if(this._model.options.renderMinimap!==0&&this._lastRenderData){if(this._model.options.size!=="proportional"){if(s&&this._lastRenderData){let a=ii(this._slider.domNode),l=a.top+a.height/2;this._startSliderDragging(i,l,this._lastRenderData.renderedLayout)}return}if(s||!n){let a=this._model.options.minimapLineHeight,l=this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*i.offsetY,d=Math.floor(l/a)+this._lastRenderData.renderedLayout.startLineNumber-this._lastRenderData.renderedLayout.topPaddingLineCount;d=Math.min(d,this._model.getLineCount()),this._model.revealLineNumber(d)}}}),this._sliderPointerMoveMonitor=new zc,this._sliderPointerDownListener=_i(this._slider.domNode,ee.POINTER_DOWN,i=>{i.preventDefault(),i.stopPropagation(),i.button===0&&this._lastRenderData&&this._startSliderDragging(i,i.pageY,this._lastRenderData.renderedLayout)}),this._gestureDisposable=jn.addTarget(this._domNode.domNode),this._sliderTouchStartListener=B(this._domNode.domNode,vi.Start,i=>{i.preventDefault(),i.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(i))},{passive:!1}),this._sliderTouchMoveListener=B(this._domNode.domNode,vi.Change,i=>{i.preventDefault(),i.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(i)},{passive:!1}),this._sliderTouchEndListener=_i(this._domNode.domNode,vi.End,i=>{i.preventDefault(),i.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)})}_hideSoon(){this._hideDelayedScheduler.cancel(),this._hideDelayedScheduler.schedule()}_hideImmediatelyIfMouseIsOutside(){if(this._isMouseOverMinimap){this._hideSoon();return}this._domNode.toggleClassName("active",!1)}_startSliderDragging(e,t,i){if(!e.target||!(e.target instanceof Element))return;let n=e.pageX;this._slider.toggleClassName("active",!0);let s=(r,a)=>{let l=ii(this._domNode.domNode),c=Math.min(Math.abs(a-n),Math.abs(a-l.left),Math.abs(a-l.left-l.width));if(sn&&c>E5e){this._model.setScrollTop(i.scrollTop);return}let d=r-t;this._model.setScrollTop(i.getDesiredScrollTopFromDelta(d))};e.pageY!==t&&s(e.pageY,n),this._sliderPointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,r=>s(r.pageY,r.pageX),()=>{this._slider.toggleClassName("active",!1)})}scrollDueToTouchEvent(e){let t=this._domNode.domNode.getBoundingClientRect().top,i=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(e.pageY-t);this._model.setScrollTop(i)}dispose(){this._pointerDownListener.dispose(),this._sliderPointerMoveMonitor.dispose(),this._sliderPointerDownListener.dispose(),this._gestureDisposable.dispose(),this._sliderTouchStartListener.dispose(),this._sliderTouchMoveListener.dispose(),this._sliderTouchEndListener.dispose(),super.dispose()}_getMinimapDomNodeClassName(){let e=["minimap"];return this._model.options.showSlider==="always"?e.push("slider-always"):e.push("slider-mouseover"),this._model.options.autohide==="mouseover"?e.push("minimap-autohide-mouseover"):this._model.options.autohide==="scroll"&&e.push("minimap-autohide-scroll"),e.join(" ")}getDomNode(){return this._domNode}_applyLayout(){this._domNode.setLeft(this._model.options.minimapLeft),this._domNode.setWidth(this._model.options.minimapWidth),this._domNode.setHeight(this._model.options.minimapHeight),this._shadow.setHeight(this._model.options.minimapHeight),this._canvas.setWidth(this._model.options.canvasOuterWidth),this._canvas.setHeight(this._model.options.canvasOuterHeight),this._canvas.domNode.width=this._model.options.canvasInnerWidth,this._canvas.domNode.height=this._model.options.canvasInnerHeight,this._decorationsCanvas.setWidth(this._model.options.canvasOuterWidth),this._decorationsCanvas.setHeight(this._model.options.canvasOuterHeight),this._decorationsCanvas.domNode.width=this._model.options.canvasInnerWidth,this._decorationsCanvas.domNode.height=this._model.options.canvasInnerHeight,this._slider.setWidth(this._model.options.minimapWidth)}_getBuffer(){return this._buffers||this._model.options.canvasInnerWidth>0&&this._model.options.canvasInnerHeight>0&&(this._buffers=new yX(this._canvas.domNode.getContext("2d"),this._model.options.canvasInnerWidth,this._model.options.canvasInnerHeight,this._model.options.backgroundColor)),this._buffers?this._buffers.getBuffer():null}onDidChangeOptions(){this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName())}onSelectionChanged(){return this._renderDecorations=!0,!0}onDecorationsChanged(){return this._renderDecorations=!0,!0}onFlushed(){return this._lastRenderData=null,!0}onLinesChanged(e,t){return this._lastRenderData?this._lastRenderData.onLinesChanged(e,t):!1}onLinesDeleted(e,t){return this._lastRenderData?.onLinesDeleted(e,t),!0}onLinesInserted(e,t){return this._lastRenderData?.onLinesInserted(e,t),!0}onScrollChanged(e){return this._model.options.autohide==="scroll"&&(e.scrollTopChanged||e.scrollHeightChanged)&&(this._domNode.toggleClassName("active",!0),this._hideSoon()),this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(uZ),this._renderDecorations=!0,!0}onTokensChanged(e){return this._lastRenderData?this._lastRenderData.onTokensChanged(e):!1}onTokensColorsChanged(){return this._lastRenderData=null,this._buffers=null,!0}onZonesChanged(){return this._lastRenderData=null,!0}render(e){if(this._model.options.renderMinimap===0){this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),this._sliderHorizontal.setHeight(0);return}e.scrollLeft+e.viewportWidth>=e.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");let i=CX.create(this._model.options,e.viewportStartLineNumber,e.viewportEndLineNumber,e.viewportStartLineNumberVerticalOffset,e.viewportHeight,e.viewportContainsWhitespaceGaps,this._model.getLineCount(),this._model.getRealLineCount(),e.scrollTop,e.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setDisplay(i.sliderNeeded?"block":"none"),this._slider.setTop(i.sliderTop),this._slider.setHeight(i.sliderHeight),this._sliderHorizontal.setLeft(0),this._sliderHorizontal.setWidth(this._model.options.minimapWidth),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(i.sliderHeight),this.renderDecorations(i),this._lastRenderData=this.renderLines(i)}renderDecorations(e){if(this._renderDecorations){this._renderDecorations=!1;let t=this._model.getSelections();t.sort(S.compareRangesUsingStarts);let i=this._model.getMinimapDecorationsInViewport(e.startLineNumber,e.endLineNumber);i.sort((u,f)=>(u.options.zIndex||0)-(f.options.zIndex||0));let{canvasInnerWidth:n,canvasInnerHeight:s}=this._model.options,r=this._model.options.minimapLineHeight,a=this._model.options.minimapCharWidth,l=this._model.getOptions().tabSize,c=this._decorationsCanvas.domNode.getContext("2d");c.clearRect(0,0,n,s);let d=new B5(e.startLineNumber,e.endLineNumber,!1);this._renderSelectionLineHighlights(c,t,d,e,r),this._renderDecorationsLineHighlights(c,i,d,e,r);let h=new B5(e.startLineNumber,e.endLineNumber,null);this._renderSelectionsHighlights(c,t,h,e,r,l,a,n),this._renderDecorationsHighlights(c,i,h,e,r,l,a,n),this._renderSectionHeaders(e)}}_renderSelectionLineHighlights(e,t,i,n,s){if(!this._selectionColor||this._selectionColor.isTransparent())return;e.fillStyle=this._selectionColor.transparent(.5).toString();let r=0,a=0;for(let l of t){let c=n.intersectWithViewport(l);if(!c)continue;let[d,h]=c;for(let g=d;g<=h;g++)i.set(g,!0);let u=n.getYForLineNumber(d,s),f=n.getYForLineNumber(h,s);a>=u||(a>r&&e.fillRect(gu,r,e.canvas.width,a-r),r=u),a=f}a>r&&e.fillRect(gu,r,e.canvas.width,a-r)}_renderDecorationsLineHighlights(e,t,i,n,s){let r=new Map;for(let a=t.length-1;a>=0;a--){let l=t[a],c=l.options.minimap;if(!c||c.position!==1)continue;let d=n.intersectWithViewport(l.range);if(!d)continue;let[h,u]=d,f=c.getColor(this._theme.value);if(!f||f.isTransparent())continue;let g=r.get(f.toString());g||(g=f.transparent(.5).toString(),r.set(f.toString(),g)),e.fillStyle=g;for(let p=h;p<=u;p++){if(i.has(p))continue;i.set(p,!0);let _=n.getYForLineNumber(p,s);e.fillRect(gu,_,e.canvas.width,s)}}}_renderSelectionsHighlights(e,t,i,n,s,r,a,l){if(!(!this._selectionColor||this._selectionColor.isTransparent()))for(let c of t){let d=n.intersectWithViewport(c);if(!d)continue;let[h,u]=d;for(let f=h;f<=u;f++)this.renderDecorationOnLine(e,i,c,this._selectionColor,n,f,s,s,r,a,l)}}_renderDecorationsHighlights(e,t,i,n,s,r,a,l){for(let c of t){let d=c.options.minimap;if(!d)continue;let h=n.intersectWithViewport(c.range);if(!h)continue;let[u,f]=h,g=d.getColor(this._theme.value);if(!(!g||g.isTransparent()))for(let p=u;p<=f;p++)switch(d.position){case 1:this.renderDecorationOnLine(e,i,c.range,g,n,p,s,s,r,a,l);continue;case 2:{let _=n.getYForLineNumber(p,s);this.renderDecoration(e,g,2,_,T5e,s);continue}}}}renderDecorationOnLine(e,t,i,n,s,r,a,l,c,d,h){let u=s.getYForLineNumber(r,l);if(u+a<0||u>this._model.options.canvasInnerHeight)return;let{startLineNumber:f,endLineNumber:g}=i,p=f===r?i.startColumn:1,_=g===r?i.endColumn:this._model.getLineMaxColumn(r),b=this.getXOffsetForPosition(t,r,p,c,d,h),v=this.getXOffsetForPosition(t,r,_,c,d,h);this.renderDecoration(e,n,b,u,v-b,a)}getXOffsetForPosition(e,t,i,n,s,r){if(i===1)return gu;if((i-1)*s>=r)return r;let l=e.get(t);if(!l){let c=this._model.getLineContent(t);l=[gu];let d=gu;for(let h=1;h=r){l[h]=r;break}l[h]=g,d=g}e.set(t,l)}return i-1p.range.startLineNumber-_.range.startLineNumber);let g=o._fitSectionHeader.bind(null,u,r-gu);for(let p of f){let _=e.getYForLineNumber(p.range.startLineNumber,t)+i,b=_-i,v=b+2,w=this._model.getSectionHeaderText(p,g);o._renderSectionLabel(u,w,p.options.minimap?.sectionHeaderStyle===2,l,d,r,b,s,_,v)}}static _fitSectionHeader(e,t,i){if(!i)return i;let n="\u2026",s=e.measureText(i).width,r=e.measureText(n).width;if(s<=t||s<=r)return i;let a=i.length,l=s/i.length,c=Math.floor((t-r)/l)-1,d=Math.ceil(c/2);for(;d>0&&/\s/.test(i[d-1]);)--d;return i.substring(0,d)+n+i.substring(a-(c-d))}static _renderSectionLabel(e,t,i,n,s,r,a,l,c,d){t&&(e.fillStyle=n,e.fillRect(0,a,r,l),e.fillStyle=s,e.fillText(t,gu,c)),i&&(e.beginPath(),e.moveTo(0,d),e.lineTo(r,d),e.closePath(),e.stroke())}renderLines(e){let t=e.startLineNumber,i=e.endLineNumber,n=this._model.options.minimapLineHeight;if(this._lastRenderData&&this._lastRenderData.linesEquals(e)){let Z=this._lastRenderData._get();return new O5(e,Z.imageData,Z.lines)}let s=this._getBuffer();if(!s)return null;let[r,a,l]=o._renderUntouchedLines(s,e.topPaddingLineCount,t,i,n,this._lastRenderData),c=this._model.getMinimapLinesRenderingData(t,i,l),d=this._model.getOptions().tabSize,h=this._model.options.defaultBackgroundColor,u=this._model.options.backgroundColor,f=this._model.options.foregroundAlpha,g=this._model.tokensColorTracker,p=g.backgroundIsLight(),_=this._model.options.renderMinimap,b=this._model.options.charRenderer(),v=this._model.options.fontScale,w=this._model.options.minimapCharWidth,y=(_===1?2:3)*v,k=n>y?Math.floor((n-y)/2):0,I=u.a/255,E=new Wh(Math.round((u.r-h.r)*I+h.r),Math.round((u.g-h.g)*I+h.g),Math.round((u.b-h.b)*I+h.b),255),D=e.topPaddingLineCount*n,O=[];for(let Z=0,te=i-t+1;Z=0&&Pv)return;let H=_.charCodeAt(y);if(H===9){let z=u-(y+k)%u;k+=z-1,C+=z*r}else if(H===32)C+=r;else{let z=ac(H)?2:1;for(let Y=0;Yv)return}}}}},B5=class{constructor(e,t,i){this._startLineNumber=e,this._endLineNumber=t,this._defaultValue=i,this._values=[];for(let n=0,s=this._endLineNumber-this._startLineNumber+1;nthis._endLineNumber||(this._values[e-this._startLineNumber]=t)}get(e){return ethis._endLineNumber?this._defaultValue:this._values[e-this._startLineNumber]}}});var xCe=x(()=>{});var W5,kCe=x(()=>{xCe();Go();Dr();re();W5=class extends xn{constructor(e,t){super(e),this._viewDomNode=t;let n=this._context.configuration.options.get(165);this._widgets={},this._verticalScrollbarWidth=n.verticalScrollbarWidth,this._minimapWidth=n.minimap.minimapWidth,this._horizontalScrollbarHeight=n.horizontalScrollbarHeight,this._editorHeight=n.height,this._editorWidth=n.width,this._viewDomNodeRect={top:0,left:0,width:0,height:0},this._domNode=wt(document.createElement("div")),Tr.write(this._domNode,4),this._domNode.setClassName("overlayWidgets"),this.overflowingOverlayWidgetsDomNode=wt(document.createElement("div")),Tr.write(this.overflowingOverlayWidgetsDomNode,5),this.overflowingOverlayWidgetsDomNode.setClassName("overflowingOverlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(e){let i=this._context.configuration.options.get(165);return this._verticalScrollbarWidth=i.verticalScrollbarWidth,this._minimapWidth=i.minimap.minimapWidth,this._horizontalScrollbarHeight=i.horizontalScrollbarHeight,this._editorHeight=i.height,this._editorWidth=i.width,!0}_widgetCanOverflow(e){let i=this._context.configuration.options.get(4);return(e.allowEditorOverflow||!1)&&i}addWidget(e){let t=wt(e.getDomNode());this._widgets[e.getId()]={widget:e,preference:null,domNode:t},t.setPosition("absolute"),t.setAttribute("widgetId",e.getId()),this._widgetCanOverflow(e)?this.overflowingOverlayWidgetsDomNode.appendChild(t):this._domNode.appendChild(t),this.setShouldRender(),this._updateMaxMinWidth()}setWidgetPosition(e,t){let i=this._widgets[e.getId()],n=t?t.preference:null,s=t?.stackOrdinal;return i.preference===n&&i.stack===s?(this._updateMaxMinWidth(),!1):(i.preference=n,i.stack=s,this.setShouldRender(),this._updateMaxMinWidth(),!0)}removeWidget(e){let t=e.getId();if(this._widgets.hasOwnProperty(t)){let n=this._widgets[t].domNode.domNode;delete this._widgets[t],n.remove(),this.setShouldRender(),this._updateMaxMinWidth()}}_updateMaxMinWidth(){let e=0,t=Object.keys(this._widgets);for(let i=0,n=t.length;i0);t.sort((n,s)=>(this._widgets[n].stack||0)-(this._widgets[s].stack||0));for(let n=0,s=t.length;n{Go();Yi();Dr();Pe();Ci();Wl();Km();qe();xX=class{constructor(e,t){let i=e.options;this.lineHeight=i.get(75),this.pixelRatio=i.get(163),this.overviewRulerLanes=i.get(95),this.renderBorder=i.get(94);let n=t.getColor(Twe);this.borderColor=n?n.toString():null,this.hideCursor=i.get(68);let s=t.getColor(P1);this.cursorColorSingle=s?s.transparent(.7).toString():null;let r=t.getColor(n5);this.cursorColorPrimary=r?r.transparent(.7).toString():null;let a=t.getColor(o5);this.cursorColorSecondary=a?a.transparent(.7).toString():null,this.themeType=t.type;let l=i.get(81),c=l.enabled,d=l.side,h=t.getColor(Dwe),u=Ti.getDefaultBackground();h?this.backgroundColor=h:c&&d==="right"?this.backgroundColor=u:this.backgroundColor=null;let g=i.get(165).overviewRuler;this.top=g.top,this.right=g.right,this.domWidth=g.width,this.domHeight=g.height,this.overviewRulerLanes===0?(this.canvasWidth=0,this.canvasHeight=0):(this.canvasWidth=this.domWidth*this.pixelRatio|0,this.canvasHeight=this.domHeight*this.pixelRatio|0);let[p,_]=this._initLanes(1,this.canvasWidth,this.overviewRulerLanes);this.x=p,this.w=_}_initLanes(e,t,i){let n=t-e;if(i>=3){let s=Math.floor(n/3),r=Math.floor(n/3),a=n-s-r,l=e,c=l+s,d=l+s+a;return[[0,l,c,l,d,l,c,l],[0,s,a,s+a,r,s+a+r,a+r,s+a+r]]}else if(i===2){let s=Math.floor(n/2),r=n-s,a=e,l=a+s;return[[0,a,a,a,l,a,a,a],[0,s,s,s,r,s+r,s+r,s+r]]}else{let s=e,r=n;return[[0,s,s,s,s,s,s,s],[0,r,r,r,r,r,r,r]]}}equals(e){return this.lineHeight===e.lineHeight&&this.pixelRatio===e.pixelRatio&&this.overviewRulerLanes===e.overviewRulerLanes&&this.renderBorder===e.renderBorder&&this.borderColor===e.borderColor&&this.hideCursor===e.hideCursor&&this.cursorColorSingle===e.cursorColorSingle&&this.cursorColorPrimary===e.cursorColorPrimary&&this.cursorColorSecondary===e.cursorColorSecondary&&this.themeType===e.themeType&&K.equals(this.backgroundColor,e.backgroundColor)&&this.top===e.top&&this.right===e.right&&this.domWidth===e.domWidth&&this.domHeight===e.domHeight&&this.canvasWidth===e.canvasWidth&&this.canvasHeight===e.canvasHeight}},H5=class extends xn{constructor(e){super(e),this._actualShouldRender=0,this._renderedDecorations=[],this._renderedCursorPositions=[],this._domNode=wt(document.createElement("canvas")),this._domNode.setClassName("decorationsOverviewRuler"),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._domNode.setAttribute("aria-hidden","true"),this._updateSettings(!1),this._tokensColorTrackerListener=Ti.onDidChange(t=>{t.changedColorMap&&this._updateSettings(!0)}),this._cursorPositions=[{position:new M(1,1),color:this._settings.cursorColorSingle}]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(e){let t=new xX(this._context.configuration,this._context.theme);return this._settings&&this._settings.equals(t)?!1:(this._settings=t,this._domNode.setTop(this._settings.top),this._domNode.setRight(this._settings.right),this._domNode.setWidth(this._settings.domWidth),this._domNode.setHeight(this._settings.domHeight),this._domNode.domNode.width=this._settings.canvasWidth,this._domNode.domNode.height=this._settings.canvasHeight,e&&this._render(),!0)}_markRenderingIsNeeded(){return this._actualShouldRender=2,!0}_markRenderingIsMaybeNeeded(){return this._actualShouldRender=1,!0}onConfigurationChanged(e){return this._updateSettings(!1)?this._markRenderingIsNeeded():!1}onCursorStateChanged(e){this._cursorPositions=[];for(let t=0,i=e.selections.length;t1&&(n=t===0?this._settings.cursorColorPrimary:this._settings.cursorColorSecondary),this._cursorPositions.push({position:e.selections[t].getPosition(),color:n})}return this._cursorPositions.sort((t,i)=>M.compare(t.position,i.position)),this._markRenderingIsMaybeNeeded()}onDecorationsChanged(e){return e.affectsOverviewRuler?this._markRenderingIsMaybeNeeded():!1}onFlushed(e){return this._markRenderingIsNeeded()}onScrollChanged(e){return e.scrollHeightChanged?this._markRenderingIsNeeded():!1}onZonesChanged(e){return this._markRenderingIsNeeded()}onThemeChanged(e){return this._updateSettings(!1)?this._markRenderingIsNeeded():!1}getDomNode(){return this._domNode.domNode}prepareRender(e){}render(e){this._render(),this._actualShouldRender=0}_render(){let e=this._settings.backgroundColor;if(this._settings.overviewRulerLanes===0){this._domNode.setBackgroundColor(e?K.Format.CSS.formatHexA(e):""),this._domNode.setDisplay("none");return}let t=this._context.viewModel.getAllOverviewRulerDecorations(this._context.theme);if(t.sort(cC.compareByRenderingProps),this._actualShouldRender===1&&!cC.equalsArr(this._renderedDecorations,t)&&(this._actualShouldRender=2),this._actualShouldRender===1&&!Bt(this._renderedCursorPositions,this._cursorPositions,(g,p)=>g.position.lineNumber===p.position.lineNumber&&g.color===p.color)&&(this._actualShouldRender=2),this._actualShouldRender===1)return;this._renderedDecorations=t,this._renderedCursorPositions=this._cursorPositions,this._domNode.setDisplay("block");let i=this._settings.canvasWidth,n=this._settings.canvasHeight,s=this._settings.lineHeight,r=this._context.viewLayout,a=this._context.viewLayout.getScrollHeight(),l=n/a,c=6*this._settings.pixelRatio|0,d=c/2|0,h=this._domNode.domNode.getContext("2d");e?e.isOpaque()?(h.fillStyle=K.Format.CSS.formatHexA(e),h.fillRect(0,0,i,n)):(h.clearRect(0,0,i,n),h.fillStyle=K.Format.CSS.formatHexA(e),h.fillRect(0,0,i,n)):h.clearRect(0,0,i,n);let u=this._settings.x,f=this._settings.w;for(let g of t){let p=g.color,_=g.data;h.fillStyle=p;let b=0,v=0,w=0;for(let C=0,y=_.length/3;Cn&&(H=n-d),D=H-d,O=H+d}D>w+1||k!==b?(C!==0&&h.fillRect(u[b],v,f[b],w-v),b=k,v=D,w=O):O>w&&(w=O)}h.fillRect(u[b],v,f[b],w-v)}if(!this._settings.hideCursor){let g=2*this._settings.pixelRatio|0,p=g/2|0,_=this._settings.x[7],b=this._settings.w[7],v=-100,w=-100,C=null;for(let y=0,k=this._cursorPositions.length;yn&&(D=n-p);let O=D-p,P=O+g;O>w+1||I!==C?(y!==0&&C&&h.fillRect(_,v,b,w-v),v=O,w=P):P>w&&(w=P),C=I,h.fillStyle=I}C&&h.fillRect(_,v,b,w-v)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(h.beginPath(),h.lineWidth=1,h.strokeStyle=this._settings.borderColor,h.moveTo(0,0),h.lineTo(0,n),h.moveTo(1,0),h.lineTo(i,0),h.stroke())}}});var V5,LT,z5,kX=x(()=>{V5=class{constructor(e,t,i){this._colorZoneBrand=void 0,this.from=e|0,this.to=t|0,this.colorId=i|0}static compare(e,t){return e.colorId===t.colorId?e.from===t.from?e.to-t.to:e.from-t.from:e.colorId-t.colorId}},LT=class{constructor(e,t,i,n){this._overviewRulerZoneBrand=void 0,this.startLineNumber=e,this.endLineNumber=t,this.heightInLines=i,this.color=n,this._colorZone=null}static compare(e,t){return e.color===t.color?e.startLineNumber===t.startLineNumber?e.heightInLines===t.heightInLines?e.endLineNumber-t.endLineNumber:e.heightInLines-t.heightInLines:e.startLineNumber-t.startLineNumber:e.colori&&(p=i-_);let b=d.color,v=this._color2Id[b];v||(v=++this._lastAssignedId,this._color2Id[b]=v,this._id2Color[v]=b);let w=new V5(p-_,p+_,v);d.setColorZone(w),a.push(w)}return this._colorZonesInvalid=!1,a.sort(V5.compare),a}}});var U5,ICe=x(()=>{Go();kX();Lb();U5=class extends Pl{constructor(e,t){super(),this._context=e;let i=this._context.configuration.options;this._domNode=wt(document.createElement("canvas")),this._domNode.setClassName(t),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._zoneManager=new z5(n=>this._context.viewLayout.getVerticalOffsetForLineNumber(n)),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()),this._zoneManager.setLineHeight(i.get(75)),this._zoneManager.setPixelRatio(i.get(163)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(e){let t=this._context.configuration.options;return e.hasChanged(75)&&(this._zoneManager.setLineHeight(t.get(75)),this._render()),e.hasChanged(163)&&(this._zoneManager.setPixelRatio(t.get(163)),this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render()),!0}onFlushed(e){return this._render(),!0}onScrollChanged(e){return e.scrollHeightChanged&&(this._zoneManager.setOuterHeight(e.scrollHeight),this._render()),!0}onZonesChanged(e){return this._render(),!0}getDomNode(){return this._domNode.domNode}setLayout(e){this._domNode.setTop(e.top),this._domNode.setRight(e.right);let t=!1;t=this._zoneManager.setDOMWidth(e.width)||t,t=this._zoneManager.setDOMHeight(e.height)||t,t&&(this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render())}setZones(e){this._zoneManager.setZones(e),this._render()}_render(){if(this._zoneManager.getOuterHeight()===0)return!1;let e=this._zoneManager.getCanvasWidth(),t=this._zoneManager.getCanvasHeight(),i=this._zoneManager.resolveColorZones(),n=this._zoneManager.getId2Color(),s=this._domNode.domNode.getContext("2d");return s.clearRect(0,0,e,t),i.length>0&&this._renderOneLane(s,i,n,e),!0}_renderOneLane(e,t,i,n){let s=0,r=0,a=0;for(let l of t){let c=l.colorId,d=l.from,h=l.to;c!==s?(s!==0&&e.fillRect(0,r,n,a-r),s=c,e.fillStyle=i[s],r=d,a=h):a>=d?a=Math.max(a,h):(e.fillRect(0,r,n,a-r),r=d,a=h)}e.fillRect(0,r,n,a-r)}}});var ECe=x(()=>{});var $5,TCe=x(()=>{ECe();Go();Dr();$5=class extends xn{constructor(e){super(e),this.domNode=wt(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("view-rulers"),this._renderedRulers=[];let t=this._context.configuration.options;this._rulers=t.get(116),this._typicalHalfwidthCharacterWidth=t.get(59).typicalHalfwidthCharacterWidth}onConfigurationChanged(e){let t=this._context.configuration.options;return this._rulers=t.get(116),this._typicalHalfwidthCharacterWidth=t.get(59).typicalHalfwidthCharacterWidth,!0}onScrollChanged(e){return e.scrollHeightChanged}prepareRender(e){}_ensureRulersCount(){let e=this._renderedRulers.length,t=this._rulers.length;if(e===t)return;if(e0;){let s=wt(document.createElement("div"));s.setClassName("view-ruler"),s.setWidth("1ch"),this.domNode.appendChild(s),this._renderedRulers.push(s),n--}return}let i=e-t;for(;i>0;){let n=this._renderedRulers.pop();this.domNode.removeChild(n),i--}}render(e){this._ensureRulersCount();for(let t=0,i=this._rulers.length;t{});var q5,NCe=x(()=>{DCe();Go();Dr();q5=class extends xn{constructor(e){super(e),this._scrollTop=0,this._width=0,this._updateWidth(),this._shouldShow=!1;let i=this._context.configuration.options.get(117);this._useShadows=i.useShadows,this._domNode=wt(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true")}_updateShouldShow(){let e=this._useShadows&&this._scrollTop>0;return this._shouldShow!==e?(this._shouldShow=e,!0):!1}getDomNode(){return this._domNode}_updateWidth(){let t=this._context.configuration.options.get(165);t.minimap.renderMinimap===0||t.minimap.minimapWidth>0&&t.minimap.minimapLeft===0?this._width=t.width:this._width=t.width-t.verticalScrollbarWidth}onConfigurationChanged(e){let i=this._context.configuration.options.get(117);return this._useShadows=i.useShadows,this._updateWidth(),this._updateShouldShow(),!0}onScrollChanged(e){return this._scrollTop=e.scrollTop,this._updateShouldShow()}prepareRender(e){}render(e){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")}}});var RCe=x(()=>{});function D5e(o){return new LX(o)}function N5e(o){return new IX(o.lineNumber,o.ranges.map(D5e))}function j5(o){return o<0?-o:o}var LX,IX,K5,ACe=x(()=>{RCe();lp();$t();bi();Zi();xi();qi();Mi();Xi();$i();Vi();Qi();Ji();Kt();LX=class{constructor(e){this.left=e.left,this.width=e.width,this.startStyle=null,this.endStyle=null}},IX=class{constructor(e,t){this.lineNumber=e,this.ranges=t}};K5=class o extends Wa{static{this.SELECTION_CLASS_NAME="selected-text"}static{this.SELECTION_TOP_LEFT="top-left-radius"}static{this.SELECTION_BOTTOM_LEFT="bottom-left-radius"}static{this.SELECTION_TOP_RIGHT="top-right-radius"}static{this.SELECTION_BOTTOM_RIGHT="bottom-right-radius"}static{this.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background"}static{this.ROUNDED_PIECE_WIDTH=10}constructor(e){super(),this._previousFrameVisibleRangesWithStyle=[],this._context=e;let t=this._context.configuration.options;this._roundedSelection=t.get(115),this._typicalHalfwidthCharacterWidth=t.get(59).typicalHalfwidthCharacterWidth,this._selections=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){let t=this._context.configuration.options;return this._roundedSelection=t.get(115),this._typicalHalfwidthCharacterWidth=t.get(59).typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_visibleRangesHaveGaps(e){for(let t=0,i=e.length;t1)return!0;return!1}_enrichVisibleRangesWithStyle(e,t,i){let n=this._typicalHalfwidthCharacterWidth/4,s=null,r=null;if(i&&i.length>0&&t.length>0){let a=t[0].lineNumber;if(a===e.startLineNumber)for(let c=0;!s&&c=0;c--)i[c].lineNumber===l&&(r=i[c].ranges[0]);s&&!s.startStyle&&(s=null),r&&!r.startStyle&&(r=null)}for(let a=0,l=t.length;a0){let g=t[a-1].ranges[0].left,p=t[a-1].ranges[0].left+t[a-1].ranges[0].width;j5(d-g)g&&(u.top=1),j5(h-p)'}_actualRenderOneSelection(e,t,i,n){if(n.length===0)return;let s=!!n[0].ranges[0].startStyle,r=n[0].lineNumber,a=n[n.length-1].lineNumber;for(let l=0,c=n.length;l1,c)}this._previousFrameVisibleRangesWithStyle=s,this._renderResult=t.map(([r,a])=>r+a)}render(e,t){if(!this._renderResult)return"";let i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}};Ro((o,e)=>{let t=o.getColor(abe);t&&!t.isTransparent()&&e.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${t}; }`)})});var MCe=x(()=>{});var G5,Xf,IT,OCe=x(()=>{re();Go();He();dc();Uo();Pe();ue();x5();G5=class{constructor(e,t,i,n,s,r,a){this.top=e,this.left=t,this.paddingLeft=i,this.width=n,this.height=s,this.textContent=r,this.textContentClassName=a}};(function(o){o[o.Single=0]="Single",o[o.MultiPrimary=1]="MultiPrimary",o[o.MultiSecondary=2]="MultiSecondary"})(Xf||(Xf={}));IT=class{constructor(e,t){this._context=e;let i=this._context.configuration.options,n=i.get(59);this._cursorStyle=i.get(161),this._typicalHalfwidthCharacterWidth=n.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(i.get(37),this._typicalHalfwidthCharacterWidth),this._lineCursorHeight=i.get(38),this._isVisible=!0,this._domNode=wt(document.createElement("div")),this._domNode.setClassName(`cursor ${hp}`),this._domNode.setHeight(this._context.viewLayout.getLineHeightForLineNumber(1)),this._domNode.setTop(0),this._domNode.setLeft(0),wn(this._domNode,n),this._domNode.setDisplay("none"),this._position=new M(1,1),this._pluralityClass="",this.setPlurality(t),this._lastRenderedContent="",this._renderData=null}getDomNode(){return this._domNode}getPosition(){return this._position}setPlurality(e){switch(e){default:case Xf.Single:this._pluralityClass="";break;case Xf.MultiPrimary:this._pluralityClass="cursor-primary";break;case Xf.MultiSecondary:this._pluralityClass="cursor-secondary";break}}show(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0)}hide(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1)}onConfigurationChanged(e){let t=this._context.configuration.options,i=t.get(59);return this._cursorStyle=t.get(161),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(37),this._typicalHalfwidthCharacterWidth),this._lineCursorHeight=t.get(38),wn(this._domNode,i),!0}onCursorPositionChanged(e,t){return t?this._domNode.domNode.style.transitionProperty="none":this._domNode.domNode.style.transitionProperty="",this._position=e,!0}_getGraphemeAwarePosition(){let{lineNumber:e,column:t}=this._position,i=this._context.viewModel.getLineContent(e),[n,s]=xge(i,t-1);return[new M(e,n+1),i.substring(n,s)]}_prepareRender(e){let t="",i="",[n,s]=this._getGraphemeAwarePosition(),r=this._context.viewLayout.getLineHeightForLineNumber(n.lineNumber),a=this._lineCursorHeight===0?r:Math.min(r,this._lineCursorHeight),l=(r-a)/2;if(this._cursorStyle===rs.Line||this._cursorStyle===rs.LineThin){let p=e.visibleRangeForPosition(n);if(!p||p.outsideRenderedLine)return null;let _=we(this._domNode.domNode),b;this._cursorStyle===rs.Line?(b=jK(_,this._lineCursorWidth>0?this._lineCursorWidth:2),b>2&&(t=s,i=this._getTokenClassName(n))):b=jK(_,1);let v=p.left,w=0;b>=2&&v>=1&&(w=1,v-=w);let C=e.getVerticalOffsetForLineNumber(n.lineNumber)-e.bigNumbersDelta+l;return new G5(C,v,w,b,a,t,i)}let c=e.linesVisibleRangesForRange(new S(n.lineNumber,n.column,n.lineNumber,n.column+s.length),!1);if(!c||c.length===0)return null;let d=c[0];if(d.outsideRenderedLine||d.ranges.length===0)return null;let h=d.ranges[0],u=s===" "?this._typicalHalfwidthCharacterWidth:h.width<1?this._typicalHalfwidthCharacterWidth:h.width;this._cursorStyle===rs.Block&&(t=s,i=this._getTokenClassName(n));let f=e.getVerticalOffsetForLineNumber(n.lineNumber)-e.bigNumbersDelta,g=r;return(this._cursorStyle===rs.Underline||this._cursorStyle===rs.UnderlineThin)&&(f+=r-2,g=2),new G5(f,h.left,0,u,g,t,i)}_getTokenClassName(e){let t=this._context.viewModel.getViewLineData(e.lineNumber),i=t.tokens.findTokenIndexAtOffset(e.column-1);return t.tokens.getClassName(i)}prepareRender(e){this._renderData=this._prepareRender(e)}render(e){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName(`cursor ${this._pluralityClass} ${hp} ${this._renderData.textContentClassName}`),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),this._domNode.setPaddingLeft(this._renderData.paddingLeft),this._domNode.setWidth(this._renderData.width),this._domNode.setLineHeight(this._renderData.height),this._domNode.setHeight(this._renderData.height),{domNode:this._domNode.domNode,position:this._position,contentLeft:this._renderData.left,height:this._renderData.height,width:2}):(this._domNode.setDisplay("none"),null)}}});var Y5,PCe=x(()=>{MCe();Go();Ze();Dr();OCe();Uo();Wl();Kt();Kc();re();Y5=class o extends xn{static{this.BLINK_INTERVAL=500}constructor(e){super(e);let t=this._context.configuration.options;this._readOnly=t.get(104),this._cursorBlinking=t.get(32),this._cursorStyle=t.get(161),this._cursorSmoothCaretAnimation=t.get(33),this._editContextEnabled=t.get(170),this._selectionIsEmpty=!0,this._isComposingInput=!1,this._isVisible=!1,this._primaryCursor=new IT(this._context,Xf.Single),this._secondaryCursors=[],this._renderData=[],this._domNode=wt(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._updateDomClassName(),this._domNode.appendChild(this._primaryCursor.getDomNode()),this._startCursorBlinkAnimation=new ro,this._cursorFlatBlinkInterval=new B_,this._blinkingEnabled=!1,this._editorHasFocus=!1,this._updateBlinking()}dispose(){super.dispose(),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()}getDomNode(){return this._domNode}onCompositionStart(e){return this._isComposingInput=!0,this._updateBlinking(),!0}onCompositionEnd(e){return this._isComposingInput=!1,this._updateBlinking(),!0}onConfigurationChanged(e){let t=this._context.configuration.options;this._readOnly=t.get(104),this._cursorBlinking=t.get(32),this._cursorStyle=t.get(161),this._cursorSmoothCaretAnimation=t.get(33),this._editContextEnabled=t.get(170),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(e);for(let i=0,n=this._secondaryCursors.length;it.length){let s=this._secondaryCursors.length-t.length;for(let r=0;r{for(let n=0,s=e.ranges.length;n{this._isVisible?this._hide():this._show()},o.BLINK_INTERVAL,we(this._domNode.domNode)):this._startCursorBlinkAnimation.setIfNotSet(()=>{this._blinkingEnabled=!0,this._updateDomClassName()},o.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let e="cursors-layer";switch(this._selectionIsEmpty||(e+=" has-selection"),this._cursorStyle){case rs.Line:e+=" cursor-line-style";break;case rs.Block:e+=" cursor-block-style";break;case rs.Underline:e+=" cursor-underline-style";break;case rs.LineThin:e+=" cursor-line-thin-style";break;case rs.BlockOutline:e+=" cursor-block-outline-style";break;case rs.UnderlineThin:e+=" cursor-underline-thin-style";break;default:e+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case 1:e+=" cursor-blink";break;case 2:e+=" cursor-smooth";break;case 3:e+=" cursor-phase";break;case 4:e+=" cursor-expand";break;case 5:e+=" cursor-solid";break;default:e+=" cursor-solid"}else e+=" cursor-solid";return(this._cursorSmoothCaretAnimation==="on"||this._cursorSmoothCaretAnimation==="explicit")&&(e+=" cursor-smooth-caret-animation"),e}_show(){this._primaryCursor.show();for(let e=0,t=this._secondaryCursors.length;e{let t=[{class:".cursor",foreground:P1,background:i5},{class:".cursor-primary",foreground:n5,background:fwe},{class:".cursor-secondary",foreground:o5,background:gwe}];for(let i of t){let n=o.getColor(i.foreground);if(n){let s=o.getColor(i.background);s||(s=n.opposite()),e.addRule(`.monaco-editor .cursors-layer ${i.class} { background-color: ${n}; border-color: ${n}; color: ${s}; }`),ga(o.type)&&e.addRule(`.monaco-editor .cursors-layer.has-selection ${i.class} { border-left: 1px solid ${s}; border-right: 1px solid ${s}; }`)}}})});function R5e(o,e){try{return o(e)}catch(t){De(t);return}}var EX,Z5,FCe=x(()=>{Go();Ae();Dr();Pe();EX=()=>{throw new Error("Invalid change accessor")},Z5=class extends xn{constructor(e){super(e);let t=this._context.configuration.options,i=t.get(165);this._lineHeight=t.get(75),this._contentWidth=i.contentWidth,this._contentLeft=i.contentLeft,this.domNode=wt(document.createElement("div")),this.domNode.setClassName("view-zones"),this.domNode.setPosition("absolute"),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.marginDomNode=wt(document.createElement("div")),this.marginDomNode.setClassName("margin-view-zones"),this.marginDomNode.setPosition("absolute"),this.marginDomNode.setAttribute("role","presentation"),this.marginDomNode.setAttribute("aria-hidden","true"),this._zones={}}dispose(){super.dispose(),this._zones={}}_recomputeWhitespacesProps(){let e=this._context.viewLayout.getWhitespaces(),t=new Map;for(let n of e)t.set(n.id,n);let i=!1;return this._context.viewModel.changeWhitespace(n=>{let s=Object.keys(this._zones);for(let r=0,a=s.length;r{let n={addZone:s=>(t=!0,this._addZone(i,s)),removeZone:s=>{s&&(t=this._removeZone(i,s)||t)},layoutZone:s=>{s&&(t=this._layoutZone(i,s)||t)}};R5e(e,n),n.addZone=EX,n.removeZone=EX,n.layoutZone=EX}),t}_addZone(e,t){let i=this._computeWhitespaceProps(t),s={whitespaceId:e.insertWhitespace(i.afterViewLineNumber,this._getZoneOrdinal(t),i.heightInPx,i.minWidthInPx),delegate:t,isInHiddenArea:i.isInHiddenArea,isVisible:!1,domNode:wt(t.domNode),marginDomNode:t.marginDomNode?wt(t.marginDomNode):null};return this._safeCallOnComputedHeight(s.delegate,i.heightInPx),s.domNode.setPosition("absolute"),s.domNode.domNode.style.width="100%",s.domNode.setDisplay("none"),s.domNode.setAttribute("monaco-view-zone",s.whitespaceId),this.domNode.appendChild(s.domNode),s.marginDomNode&&(s.marginDomNode.setPosition("absolute"),s.marginDomNode.domNode.style.width="100%",s.marginDomNode.setDisplay("none"),s.marginDomNode.setAttribute("monaco-view-zone",s.whitespaceId),this.marginDomNode.appendChild(s.marginDomNode)),this._zones[s.whitespaceId]=s,this.setShouldRender(),s.whitespaceId}_removeZone(e,t){if(this._zones.hasOwnProperty(t)){let i=this._zones[t];return delete this._zones[t],e.removeWhitespace(i.whitespaceId),i.domNode.removeAttribute("monaco-visible-view-zone"),i.domNode.removeAttribute("monaco-view-zone"),i.domNode.domNode.remove(),i.marginDomNode&&(i.marginDomNode.removeAttribute("monaco-visible-view-zone"),i.marginDomNode.removeAttribute("monaco-view-zone"),i.marginDomNode.domNode.remove()),this.setShouldRender(),!0}return!1}_layoutZone(e,t){if(this._zones.hasOwnProperty(t)){let i=this._zones[t],n=this._computeWhitespaceProps(i.delegate);return i.isInHiddenArea=n.isInHiddenArea,e.changeOneWhitespace(i.whitespaceId,n.afterViewLineNumber,n.heightInPx),this._safeCallOnComputedHeight(i.delegate,n.heightInPx),this.setShouldRender(),!0}return!1}shouldSuppressMouseDownOnViewZone(e){return this._zones.hasOwnProperty(e)?!!this._zones[e].delegate.suppressMouseDown:!1}_heightInPixels(e){return typeof e.heightInPx=="number"?e.heightInPx:typeof e.heightInLines=="number"?this._lineHeight*e.heightInLines:this._lineHeight}_minWidthInPixels(e){return typeof e.minWidthInPx=="number"?e.minWidthInPx:0}_safeCallOnComputedHeight(e,t){if(typeof e.onComputedHeight=="function")try{e.onComputedHeight(t)}catch(i){De(i)}}_safeCallOnDomNodeTop(e,t){if(typeof e.onDomNodeTop=="function")try{e.onDomNodeTop(t)}catch(i){De(i)}}prepareRender(e){}render(e){let t=e.viewportData.whitespaceViewportData,i={},n=!1;for(let r of t)this._zones[r.id].isInHiddenArea||(i[r.id]=r,n=!0);let s=Object.keys(this._zones);for(let r=0,a=s.length;r{});var X5,Q5,WCe=x(()=>{BCe();lp();He();Pe();Wl();Hi();X5=class extends Wa{constructor(e){super(),this._context=e,this._options=new Q5(this._context.configuration),this._selection=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){let t=new Q5(this._context.configuration);return this._options.equals(t)?e.hasChanged(165):(this._options=t,!0)}onCursorStateChanged(e){return this._selection=e.selections,this._options.renderWhitespace==="selection"}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}prepareRender(e){if(this._options.renderWhitespace==="none"){this._renderResult=null;return}this._renderResult=[];for(let t=e.viewportData.startLineNumber;t<=e.viewportData.endLineNumber;t++){let i=t-e.viewportData.startLineNumber,n=this._context.viewModel.getViewLineRenderingData(t),s=null;if(this._options.renderWhitespace==="selection"){let r=this._selection;for(let a of r){if(a.endLineNumbert)continue;let l=a.startLineNumber===t?a.startColumn:n.minColumn,c=a.endLineNumber===t?a.endColumn:n.maxColumn;l=I&&H<=E&&z===32){let Z=H-1>=0?a.charCodeAt(H-1):0,te=H+1=0?a.charCodeAt(H-1):0;if(z===32&&Z!==32&&Z!==9)continue}if(i&&!(O&&O.start<=H&&H`):z===9?y+=`
${C?"\uFFEB":"\u2192"}
`:y+=`
${String.fromCharCode(w)}
`)}return r?(P=Math.round(P+_),``+y+""):y}_renderArrow(e,t,i){let n=t/7,s=t,r=e/2,a=i,l={x:0,y:n/2},c={x:100/125*s,y:l.y},d={x:c.x-.2*c.x,y:c.y+.2*c.x},h={x:d.x+.1*c.x,y:d.y+.1*c.x},u={x:h.x+.35*c.x,y:h.y-.35*c.x},f={x:u.x,y:-u.y},g={x:h.x,y:-h.y},p={x:d.x,y:-d.y},_={x:c.x,y:-c.y},b={x:l.x,y:-l.y};return``}render(e,t){if(!this._renderResult)return"";let i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}},Q5=class{constructor(e){let t=e.options,i=t.get(59),n=t.get(47);n==="off"?(this.renderWhitespace="none",this.renderWithSVG=!1):n==="svg"?(this.renderWhitespace=t.get(113),this.renderWithSVG=!0):(this.renderWhitespace=t.get(113),this.renderWithSVG=!1),this.spaceWidth=i.spaceWidth,this.middotWidth=i.middotWidth,this.wsmiddotWidth=i.wsmiddotWidth,this.canUseHalfwidthRightwardsArrow=i.canUseHalfwidthRightwardsArrow,this.lineHeight=t.get(75),this.stopRenderingLineAfter=t.get(133)}equals(e){return this.renderWhitespace===e.renderWhitespace&&this.renderWithSVG===e.renderWithSVG&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter}}});var J5,HCe=x(()=>{ue();J5=class{constructor(e,t,i,n){this.selections=e,this.startLineNumber=t.startLineNumber|0,this.endLineNumber=t.endLineNumber|0,this.relativeVerticalOffset=t.relativeVerticalOffset,this.bigNumbersDelta=t.bigNumbersDelta|0,this.lineHeight=t.lineHeight|0,this.whitespaceViewportData=i,this._model=n,this.visibleRange=new S(t.startLineNumber,this._model.getLineMinColumn(t.startLineNumber),t.endLineNumber,this._model.getLineMaxColumn(t.endLineNumber))}getViewLineRenderingData(e){return this._model.getViewportViewLineRenderingData(this.visibleRange,e)}getDecorationsInViewport(){return this._model.getDecorationsInViewport(this.visibleRange)}}});var e3,VCe=x(()=>{e3=class{get type(){return this._theme.type}get value(){return this._theme}constructor(e){this._theme=e}update(e){this._theme=e}getColor(e){return this._theme.getColor(e)}}});var t3,zCe=x(()=>{VCe();t3=class{constructor(e,t,i){this.configuration=e,this.theme=new e3(t),this.viewModel=i,this.viewLayout=i.viewLayout}addEventHandler(e){this.viewModel.addViewEventHandler(e)}removeEventHandler(e){this.viewModel.removeViewEventHandler(e)}}});function Hh(o){if(!o)throw new Error(`Value "${o}" cannot be null`);return o}function i3(o,e,t){let i=new e.ResizeObserver(n=>{let s=n.find(l=>l.target===o);if(!s)return;if(!("devicePixelContentBoxSize"in s)){i?.disconnect(),i=void 0;return}let r=s.devicePixelContentBoxSize[0].inlineSize,a=s.devicePixelContentBoxSize[0].blockSize;r>0&&a>0&&t(r,a)});try{i.observe(o,{box:["device-pixel-content-box"]})}catch{throw i.disconnect(),i=void 0,new xe("Could not observe device pixel dimensions")}return ne(()=>i?.disconnect())}var Vu,Qf=x(()=>{Ae();W();Vu=new Float32Array([1,0,1,1,0,1,0,0,0,1,1,0])});var A5e,M5e,Jf,n3=x(()=>{np();W();rt();Iu();rC();Qf();A5e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},M5e=0,Jf=class extends T{get cacheKey(){return`${this.fontFamily}_${this.fontSize}px`}constructor(e,t,i,n){super(),this.fontSize=e,this.fontFamily=t,this.devicePixelRatio=i,this._decorationStyleCache=n,this.id=M5e++,this._workGlyph={source:null,boundingBox:{left:0,bottom:0,right:0,top:0},originOffset:{x:0,y:0},fontBoundingBoxAscent:0,fontBoundingBoxDescent:0},this._workGlyphConfig={chars:void 0,tokenMetadata:0,decorationStyleSetId:0},this._antiAliasing=Ye?"greyscale":"subpixel";let s=Math.ceil(this.fontSize*i);this._canvas=new OffscreenCanvas(s*3,s*3),this._ctx=Hh(this._canvas.getContext("2d",{willReadFrequently:!0,alpha:this._antiAliasing==="greyscale"})),this._ctx.textBaseline="top",this._ctx.fillStyle="#FFFFFF",this._ctx.font=`${s}px ${this.fontFamily}`,this._textMetrics=this._ctx.measureText("A")}rasterizeGlyph(e,t,i,n){return e===""?{source:this._canvas,boundingBox:{top:0,left:0,bottom:-1,right:-1},originOffset:{x:0,y:0},fontBoundingBoxAscent:0,fontBoundingBoxDescent:0}:this._workGlyphConfig.chars===e&&this._workGlyphConfig.tokenMetadata===t&&this._workGlyphConfig.decorationStyleSetId===i?this._workGlyph:(this._workGlyphConfig.chars=e,this._workGlyphConfig.tokenMetadata=t,this._workGlyphConfig.decorationStyleSetId=i,this._rasterizeGlyph(e,t,i,n))}_rasterizeGlyph(e,t,i,n){let s=Math.ceil(this.fontSize*this.devicePixelRatio),r=s*3;this._canvas.width!==r&&(this._canvas.width=r,this._canvas.height=r),this._ctx.save();let a=(t&15)/10,l=Wo.getBackground(t),c=n[l]??n[2],d=this._decorationStyleCache.getStyleSet(i);this._antiAliasing==="subpixel"?(this._ctx.fillStyle=c,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height)):this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height);let h=new Aa(200),u=Wo.getFontStyle(t);u&1&&h.appendString("italic "),d?.bold!==void 0?d.bold&&h.appendString("bold "):u&2&&h.appendString("bold "),h.appendString(`${s}px ${this.fontFamily}`),this._ctx.font=h.build();let f=s,g=s;if(d?.color!==void 0?this._ctx.fillStyle=`#${d.color.toString(16).padStart(8,"0")}`:this._ctx.fillStyle=n[Wo.getForeground(t)],d?.opacity!==void 0&&(this._ctx.globalAlpha=d.opacity),this._ctx.textBaseline="top",this._ctx.fillText(e,f+a,g),d?.strikethrough){let _=Math.round(g-this._textMetrics.alphabeticBaseline*.65),b=d?.strikethroughThickness!==void 0?Math.round(d.strikethroughThickness*this.devicePixelRatio):Math.max(1,Math.floor(s/10));d?.strikethroughColor!==void 0&&(this._ctx.fillStyle=`#${d.strikethroughColor.toString(16).padStart(8,"0")}`),this._ctx.fillRect(f,_-Math.floor(b/2),Math.ceil(this._textMetrics.width),b)}this._ctx.restore();let p=this._ctx.getImageData(0,0,this._canvas.width,this._canvas.height);if(this._antiAliasing==="subpixel"){let _=parseInt(c.substring(1,3),16),b=parseInt(c.substring(3,5),16),v=parseInt(c.substring(5,7),16);this._clearColor(p,_,b,v),this._ctx.putImageData(p,0,0)}return this._findGlyphBoundingBox(p,this._workGlyph.boundingBox),this._workGlyph.source=this._canvas,this._workGlyph.originOffset.x=this._workGlyph.boundingBox.left-f,this._workGlyph.originOffset.y=this._workGlyph.boundingBox.top-g,this._workGlyph.fontBoundingBoxAscent=this._textMetrics.fontBoundingBoxAscent,this._workGlyph.fontBoundingBoxDescent=this._textMetrics.fontBoundingBoxDescent,this._workGlyph}_clearColor(e,t,i,n){for(let s=0;s=t.left;r--){for(let a=0;a=0;r--){for(let a=0;a{re();W();So();O5e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},P5e=function(o,e){return function(t,i){e(t,i,o)}},o3=class extends T{constructor(e){super(),this._logService=e,this._tasks=[],this._i=0,this._register(ne(()=>this.clear()))}enqueue(e){this._tasks.push(e),this._start()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(e){this._idleCallback=void 0;let t=0,i=0,n=e.timeRemaining(),s=0;for(;this._is){n-t<-20&&this._logService.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(n-t))}ms`),this._start();return}n=s}this.clear()}};o3=O5e([P5e(0,Ot)],o3);TX=class extends o3{_requestCallback(e){return It().setTimeout(()=>e(this._createDeadline(16)))}_cancelCallback(e){It().clearTimeout(e)}_createDeadline(e){let t=Date.now()+e;return{timeRemaining:()=>Math.max(0,t-Date.now())}}},DX=class extends o3{_requestCallback(e){return It().requestIdleCallback(e)}_cancelCallback(e){It().cancelIdleCallback(e)}},UCe="requestIdleCallback"in It()?DX:TX});var s3,qCe=x(()=>{Ae();Qf();s3=class{constructor(e,t){this._canvas=e,this._textureIndex=t,this._currentRow={x:0,y:0,h:0},this._allocatedGlyphs=new Set,this._nextIndex=0,this._ctx=Hh(this._canvas.getContext("2d",{willReadFrequently:!0}))}allocate(e){let t=e.boundingBox.right-e.boundingBox.left+1,i=e.boundingBox.bottom-e.boundingBox.top+1;if(t>this._canvas.width||i>this._canvas.height)throw new xe("Glyph is too large for the atlas page");if(e.boundingBox.right-e.boundingBox.left+1>this._canvas.width-this._currentRow.x&&(this._currentRow.x=0,this._currentRow.y+=this._currentRow.h,this._currentRow.h=1),this._currentRow.y+e.boundingBox.bottom-e.boundingBox.top+1>this._canvas.height)return;this._ctx.drawImage(e.source,e.boundingBox.left,e.boundingBox.top,t,i,this._currentRow.x,this._currentRow.y,t,i);let n={pageIndex:this._textureIndex,glyphIndex:this._nextIndex++,x:this._currentRow.x,y:this._currentRow.y,w:t,h:i,originOffsetX:e.originOffset.x,originOffsetY:e.originOffset.y,fontBoundingBoxAscent:e.fontBoundingBoxAscent,fontBoundingBoxDescent:e.fontBoundingBoxDescent};return this._currentRow.x+=t,this._currentRow.h=Math.max(this._currentRow.h,i),this._allocatedGlyphs.add(n),n}getUsagePreview(){let e=this._canvas.width,t=this._canvas.height,i=new OffscreenCanvas(e,t),n=Hh(i.getContext("2d"));n.fillStyle="#808080",n.fillRect(0,0,e,t);let s=new Map,r=new Map;for(let a of this._allocatedGlyphs)s.set(a.y,Math.max(s.get(a.y)??0,a.h)),r.set(a.y,Math.max(r.get(a.y)??0,a.x+a.w));for(let a of this._allocatedGlyphs)n.fillStyle="#4040FF",n.fillRect(a.x,a.y,a.w,a.h),n.fillStyle="#FF0000",n.fillRect(a.x,a.y+a.h,a.w,s.get(a.y)-a.h);for(let[a,l]of r.entries())a!==this._currentRow.y&&(n.fillStyle="#FF0000",n.fillRect(l,a,e-l,s.get(a)));return i.convertToBlob()}getStats(){let e=this._canvas.width,t=this._canvas.height,i=0,n=0,s=e*t,r=new Map,a=new Map;for(let l of this._allocatedGlyphs)r.set(l.y,Math.max(r.get(l.y)??0,l.h)),a.set(l.y,Math.max(a.get(l.y)??0,l.x+l.w));for(let l of this._allocatedGlyphs)i+=l.w*l.h,n+=l.w*(r.get(l.y)-l.h);for(let[l,c]of a.entries())l!==this._currentRow.y&&(n+=(e-c)*r.get(l));return[`page${this._textureIndex}:`,` Total: ${s} (${e}x${t})`,` Used: ${i} (${(i/s*100).toPrecision(2)}%)`,` Wasted: ${n} (${(n/s*100).toPrecision(2)}%)`,`Efficiency: ${(i/(i+n)*100).toPrecision(2)}%`].join(` +`)}}});function jCe(o,e,t){let i=o.get(e);i||(i=[],o.set(e,i)),i.push(t)}var r3,KCe=x(()=>{re();Ae();yo();Qf();r3=class{constructor(e,t,i){this._canvas=e,this._textureIndex=t,this._slabs=[],this._activeSlabsByDims=new If,this._unusedRects=[],this._openRegionsByHeight=new Map,this._openRegionsByWidth=new Map,this._allocatedGlyphs=new Set,this._nextIndex=0,this._ctx=Hh(this._canvas.getContext("2d",{willReadFrequently:!0})),this._slabW=Math.min(i?.slabW??64<this._canvas.width||i>this._canvas.height)throw new xe("Glyph is too large for the atlas page");if(t>this._slabW||i>this._slabH){if(this._allocatedGlyphs.size>0)return;let c=this._canvas.width;for(;t=c&&(s=void 0)}let r,a;if(!s)if(t=0;d--){let h=c[d];if(h.w>=t&&h.h>=i){r=h.x,a=h.y,t=0;d--){let h=c[d];if(h.w>=t&&h.h>=i){r=h.x,a=h.y,i=this._slabsPerRow*this._slabsPerColumn)return;s={x:Math.floor(this._slabs.length%this._slabsPerRow)*this._slabW,y:Math.floor(this._slabs.length/this._slabsPerRow)*this._slabH,entryW:n.w,entryH:n.h,count:0};let d=this._slabW%s.entryW,h=this._slabH%s.entryH;d&&jCe(this._openRegionsByWidth,d,{x:s.x+this._slabW-d,w:d,y:s.y,h:this._slabH-(h??0)}),h&&jCe(this._openRegionsByHeight,h,{x:s.x,w:this._slabW,y:s.y+this._slabH-h,h}),this._slabs.push(s),this._activeSlabsByDims.set(s,n.w,n.h)}let c=Math.floor(this._slabW/s.entryW);r=s.x+Math.floor(s.count%c)*s.entryW,a=s.y+Math.floor(s.count/c)*s.entryH,s.count++}this._ctx.drawImage(e.source,e.boundingBox.left,e.boundingBox.top,t,i,r,a,t,i);let l={pageIndex:this._textureIndex,glyphIndex:this._nextIndex++,x:r,y:a,w:t,h:i,originOffsetX:e.originOffset.x,originOffsetY:e.originOffset.y,fontBoundingBoxAscent:e.fontBoundingBoxAscent,fontBoundingBoxDescent:e.fontBoundingBoxDescent};return this._allocatedGlyphs.add(l),l}getUsagePreview(){let e=this._canvas.width,t=this._canvas.height,i=new OffscreenCanvas(e,t),n=Hh(i.getContext("2d"));n.fillStyle="#808080",n.fillRect(0,0,e,t);let s=0,r=0,a=0,l=64<l&&(u=0,f+=h.entryH),n.fillStyle="#FF0000",n.fillRect(h.x+u,h.y+f,h.entryW,h.entryH),s+=h.entryW*h.entryH,u+=h.entryW;let g=Math.floor(l/h.entryW),p=Math.floor(c/h.entryH);h.entryW*g*h.entryH*p}for(let h of this._allocatedGlyphs)r+=h.w*h.h,n.fillStyle="#4040FF",n.fillRect(h.x,h.y,h.w,h.h);let d=Array.from(this._openRegionsByWidth.values()).flat().concat(Array.from(this._openRegionsByHeight.values()).flat());for(let h of d)n.fillStyle="#FF000088",n.fillRect(h.x,h.y,h.w,h.h),a+=h.w*h.h;return n.globalAlpha=.5,n.drawImage(this._canvas,0,0),n.globalAlpha=1,i.convertToBlob()}getStats(){let e=this._canvas.width,t=this._canvas.height,i=0,n=0,s=0,r=0,a=0,l=e*t,c=64<c&&(p=0,_+=g.entryH),i+=g.entryW*g.entryH,p+=g.entryW;let b=Math.floor(c/g.entryW),v=Math.floor(d/g.entryH),w=g.entryW*b*g.entryH*v;s+=c*d-w}for(let g of this._allocatedGlyphs)n+=g.w*g.h;let h=Array.from(this._openRegionsByWidth.values()).flat().concat(Array.from(this._openRegionsByHeight.values()).flat());for(let g of h)a+=g.w*g.h;let u=s-a;r=i-(n-u);let f=n/(n+r+a);return[`page[${this._textureIndex}]:`,` Total: ${l}px (${e}x${t})`,` Used: ${n}px (${(n/l*100).toFixed(2)}%)`,` Wasted: ${r}px (${(r/l*100).toFixed(2)}%)`,`Restricted: ${a}px (${(a/l*100).toFixed(2)}%) (hard to allocate)`,`Efficiency: ${f===1?"100":(f*100).toFixed(2)}%`,` Slabs: ${this._slabs.length} of ${Math.floor(this._canvas.width/c)*Math.floor(this._canvas.height/d)}`].join(` +`)}}});var F5e,GCe,NX,Zc,a3=x(()=>{W();yo();So();Kt();qCe();KCe();F5e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},GCe=function(o,e){return function(t,i){e(t,i,o)}},Zc=class extends T{static{NX=this}get version(){return this._version}static{this.maximumGlyphCount=5e3}get usedArea(){return this._usedArea}get source(){return this._canvas}get glyphs(){return this._glyphInOrderSet.values()}constructor(e,t,i,n,s){switch(super(),this._logService=n,this._version=0,this._usedArea={left:0,top:0,right:0,bottom:0},this._glyphMap=new If,this._glyphInOrderSet=new Set,this._canvas=new OffscreenCanvas(t,t),this._colorMap=s.getColorTheme().tokenColorMap,i){case"shelf":this._allocator=new s3(this._canvas,e);break;case"slab":this._allocator=new r3(this._canvas,e);break;default:this._allocator=i(this._canvas,e);break}this._register(ne(()=>{this._canvas.width=1,this._canvas.height=1}))}getGlyph(e,t,i,n){return this._glyphMap.get(t,i,n,e.cacheKey)??this._createGlyph(e,t,i,n)}_createGlyph(e,t,i,n){if(this._glyphInOrderSet.size>=NX.maximumGlyphCount)return;let s=e.rasterizeGlyph(t,i,n,this._colorMap),r=this._allocator.allocate(s);if(r!==void 0)return this._glyphMap.set(r,t,i,n,e.cacheKey),this._glyphInOrderSet.add(r),this._version++,this._usedArea.right=Math.max(this._usedArea.right,r.x+r.w-1),this._usedArea.bottom=Math.max(this._usedArea.bottom,r.y+r.h-1),this._logService.getLevel()===Ps.Trace&&this._logService.trace("New glyph",{chars:t,tokenMetadata:i,decorationStyleSetId:n,rasterizedGlyph:s,glyph:r}),r}getUsagePreview(){return this._allocator.getUsagePreview()}getStats(){return this._allocator.getStats()}};Zc=NX=F5e([GCe(3,Ot),GCe(4,yt)],Zc)});var B5e,YCe,l3,zu,c3=x(()=>{re();Ae();ae();W();yo();Ie();Kt();n3();$Ce();a3();B5e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},YCe=function(o,e){return function(t,i){e(t,i,o)}},zu=class extends T{static{l3=this}static{this.maximumPageCount=16}get pages(){return this._pages}constructor(e,t,i,n,s){super(),this._maxTextureSize=e,this._decorationStyleCache=i,this._themeService=n,this._instantiationService=s,this._warmUpTask=this._register(new Qe),this._warmedUpRasterizers=new Set,this._pages=[],this._glyphPageIndex=new If,this._onDidDeleteGlyphs=this._register(new N),this.onDidDeleteGlyphs=this._onDidDeleteGlyphs.event,this._allocatorType=t?.allocatorType??"slab",this._register(Q.runAndSubscribe(this._themeService.onDidColorThemeChange,()=>{this._colorMap&&this.clear(),this._colorMap=this._themeService.getColorTheme().tokenColorMap}));let r=Math.max(1,Math.floor(It().devicePixelRatio));this.pageSize=Math.min(1024*r,this._maxTextureSize),this._initFirstPage(),this._register(ne(()=>Ct(this._pages)))}_initFirstPage(){let e=this._instantiationService.createInstance(Zc,0,this.pageSize,this._allocatorType);this._pages.push(e);let t=new Jf(1,"",1,this._decorationStyleCache);e.getGlyph(t,"",0,0),t.dispose()}clear(){for(let e of this._pages)e.dispose();this._pages.length=0,this._glyphPageIndex.clear(),this._warmedUpRasterizers.clear(),this._warmUpTask.clear(),this._initFirstPage(),this._onDidDeleteGlyphs.fire()}getGlyph(e,t,i,n,s){return i&=-2048,i|=Math.floor(s%1*10),this._warmedUpRasterizers.has(e.id)||(this._warmUpAtlas(e),this._warmedUpRasterizers.add(e.id)),this._tryGetGlyph(this._glyphPageIndex.get(t,i,n,e.cacheKey)??0,e,t,i,n)}_tryGetGlyph(e,t,i,n,s){return this._glyphPageIndex.set(e,i,n,s,t.cacheKey),this._pages[e].getGlyph(t,i,n,s)??(e+1=l3.maximumPageCount)throw new Error(`Attempt to create a texture atlas page past the limit ${l3.maximumPageCount}`);return this._pages.push(this._instantiationService.createInstance(Zc,this._pages.length,this.pageSize,this._allocatorType)),this._glyphPageIndex.set(this._pages.length-1,t,i,n,e.cacheKey),this._pages[this._pages.length-1].getGlyph(e,t,i,n)}getStats(){return this._pages.map(e=>e.getStats())}_warmUpAtlas(e){let t=this._colorMap;if(!t)throw new xe("Cannot warm atlas without color map");this._warmUpTask.value?.clear();let i=this._warmUpTask.value=this._instantiationService.createInstance(UCe);for(let n=65;n<=90;n++)for(let s of t.keys())i.enqueue(()=>{for(let r=0;r<1;r+=.1)this.getGlyph(e,String.fromCharCode(n),s<<15&16744448,0,r)});for(let n=97;n<=122;n++)for(let s of t.keys())i.enqueue(()=>{for(let r=0;r<1;r+=.1)this.getGlyph(e,String.fromCharCode(n),s<<15&16744448,0,r)});for(let n=33;n<=126;n++)for(let s of t.keys())i.enqueue(()=>{for(let r=0;r<1;r+=.1)this.getGlyph(e,String.fromCharCode(n),s<<15&16744448,0,r)})}};zu=l3=B5e([YCe(3,yt),YCe(4,ie)],zu)});var ET,rn,fp=x(()=>{He();(function(o){o[o.Ignore=0]="Ignore",o[o.Info=1]="Info",o[o.Warning=2]="Warning",o[o.Error=3]="Error"})(ET||(ET={}));(function(o){let e="error",t="warning",i="warn",n="info",s="ignore";function r(l){return l?Sh(e,l)?o.Error:Sh(t,l)||Sh(i,l)?o.Warning:Sh(n,l)?o.Info:o.Ignore:o.Ignore}o.fromValue=r;function a(l){switch(l){case o.Error:return e;case o.Warning:return t;case o.Info:return n;default:return s}}o.toString=a})(ET||(ET={}));rn=ET});var Vh,si,d3,Hs=x(()=>{fp();Ie();Vh=rn,si=Ne("notificationService"),d3=class{}});function RX(o){return{object:o,dispose:()=>o.destroy()}}var Nr,q1=x(()=>{Rt();(function(o){async function e(n){try{if(!navigator.gpu)throw new Error("This browser does not support WebGPU");let s=await navigator.gpu.requestAdapter();if(!s)throw new Error("This browser supports WebGPU but it appears to be disabled");return RX(await s.requestDevice())}catch(s){throw n&&n(s.message),s}}o.requestDevice=e;function t(n,s,r){let a=n.createBuffer(s);return r&&n.queue.writeBuffer(a,0,bh(r)?r():r),RX(a)}o.createBuffer=t;function i(n,s){return RX(n.createTexture(s))}o.createTexture=i})(Nr||(Nr={}))});var h3,ZCe=x(()=>{h3=class{get dataOffset(){return this._startIndex}get dirtySize(){if(!(this._startIndex===void 0||this._endIndex===void 0))return this._endIndex-this._startIndex+1}get isDirty(){return this._startIndex!==void 0}flag(e,t=1){return this._flag(e),t>1&&this._flag(e+t-1),e}_flag(e){(this._startIndex===void 0||ethis._endIndex)&&(this._endIndex=e)}clear(){this._startIndex=void 0,this._endIndex=void 0}}});function XCe(o,e){return new AX(o,e)}var AX,MX,QCe=x(()=>{ae();W();tc();ZCe();AX=class extends T{get entryCount(){return this._entries.size}get dirtyTracker(){return this._dirtyTracker}constructor(e,t){super(),this.propertySpecs=e,this.capacity=t,this._dirtyTracker=new h3,this._propertySpecsMap=new Map,this._entries=new In,this._onDidChange=this._register(new N),this._onDidChangeBuffer=this._register(new N),this.onDidChangeBuffer=this._onDidChangeBuffer.event,this.view=new Float32Array(t*e.length),this.buffer=this.view.buffer,this._entrySize=e.length;for(let i=0;iCt(this._entries)))}createEntry(e){this._entries.size===this.capacity&&(this._expandBuffer(),this._onDidChangeBuffer.fire());let t=new MX(this.view,this._propertySpecsMap,this._dirtyTracker,this._entries.size,e),i=this._entries.push(t),n=[];return n.push(Q.forward(t.onDidChange,this._onDidChange)),n.push(t.onWillDispose(()=>{let s=t.i;i(),this.view.set(this.view.subarray(s*this._entrySize+2,this._entries.size*this._entrySize+2),s*this._entrySize);for(let r of this._entries)r.i>s&&r.i--;this._dirtyTracker.flag(s,(this._entries.size-s)*this._entrySize),Ct(n)})),t}_expandBuffer(){this.capacity*=2;let e=new Float32Array(this.capacity*this._entrySize);e.set(this.view),this.view=e,this.buffer=this.view.buffer}},MX=class extends T{constructor(e,t,i,n,s){super(),this._view=e,this._propertySpecsMap=t,this._dirtyTracker=i,this.i=n,this._onDidChange=this._register(new N),this.onDidChange=this._onDidChange.event,this._onWillDispose=this._register(new N),this.onWillDispose=this._onWillDispose.event;for(let r of this._propertySpecsMap.values())this._view[this.i*this._propertySpecsMap.size+r.offset]=s[r.name];this._dirtyTracker.flag(this.i*this._propertySpecsMap.size,this._propertySpecsMap.size)}dispose(){this._onWillDispose.fire(),super.dispose()}setRaw(e){if(e.length!==this._propertySpecsMap.size)throw new Error(`Data length ${e.length} does not match the number of properties in the collection (${this._propertySpecsMap.size})`);this._view.set(e,this.i*this._propertySpecsMap.size),this._dirtyTracker.flag(this.i*this._propertySpecsMap.size,this._propertySpecsMap.size)}}});var JCe,eye=x(()=>{JCe=` + +struct Vertex { + @location(0) position: vec2f, +}; + +struct LayoutInfo { + canvasDims: vec2f, + viewportOffset: vec2f, + viewportDims: vec2f, +} + +struct ScrollOffset { + offset: vec2f, +} + +struct Shape { + position: vec2f, + size: vec2f, + color: vec4f, +}; + +struct VSOutput { + @builtin(position) position: vec4f, + @location(1) color: vec4f, +}; + +// Uniforms +@group(0) @binding(1) var layoutInfo: LayoutInfo; + +// Storage buffers +@group(0) @binding(0) var shapes: array; +@group(0) @binding(2) var scrollOffset: ScrollOffset; + +@vertex fn vs( + vert: Vertex, + @builtin(instance_index) instanceIndex: u32, + @builtin(vertex_index) vertexIndex : u32 +) -> VSOutput { + let shape = shapes[instanceIndex]; + + var vsOut: VSOutput; + vsOut.position = vec4f( + ( + // Top left corner + vec2f(-1, 1) + + // Convert pixel position to clipspace + vec2f( 2, -2) / layoutInfo.canvasDims * + // Shape position and size + (layoutInfo.viewportOffset - scrollOffset.offset + shape.position + vert.position * shape.size) + ), + 0.0, + 1.0 + ); + vsOut.color = shape.color; + return vsOut; +} + +@fragment fn fs(vsOut: VSOutput) -> @location(0) vec4f { + return vsOut.color; +} +`});var u3,tye=x(()=>{re();ae();W();Lb();q1();Qf();QCe();eye();u3=class extends Pl{constructor(e,t,i,n,s,r){super(),this._context=e,this._contentLeft=t,this._devicePixelRatio=i,this._canvas=n,this._ctx=s,this._shapeBindBuffer=this._register(new Qe),this._initialized=!1,this._shapeCollection=this._register(XCe([{name:"x"},{name:"y"},{name:"width"},{name:"height"},{name:"red"},{name:"green"},{name:"blue"},{name:"alpha"}],32)),this._context.addEventHandler(this),this._initWebgpu(r)}async _initWebgpu(e){if(this._device=await e,this._store.isDisposed)return;let t=navigator.gpu.getPreferredCanvasFormat();this._ctx.configure({device:this._device,format:t,alphaMode:"premultiplied"}),this._renderPassColorAttachment={view:null,loadOp:"load",storeOp:"store"},this._renderPassDescriptor={label:"Monaco rectangle renderer render pass",colorAttachments:[this._renderPassColorAttachment]};let i;{let a=new Float32Array(6),l=(c=this._canvas.width,d=this._canvas.height)=>(a[0]=c,a[1]=d,a[2]=Math.ceil(this._context.configuration.options.get(165).contentLeft*It().devicePixelRatio),a[3]=0,a[4]=a[0]-a[2],a[5]=a[1]-a[3],a);i=this._register(Nr.createBuffer(this._device,{label:"Monaco rectangle renderer uniform buffer",size:24,usage:GPUBufferUsage.UNIFORM|GPUBufferUsage.COPY_DST},()=>l())).object,this._register(i3(this._canvas,It(),(c,d)=>{this._device.queue.writeBuffer(i,0,l(c,d))}))}let n=2;this._scrollOffsetBindBuffer=this._register(Nr.createBuffer(this._device,{label:"Monaco rectangle renderer scroll offset buffer",size:n*Float32Array.BYTES_PER_ELEMENT,usage:GPUBufferUsage.UNIFORM|GPUBufferUsage.COPY_DST})).object,this._scrollOffsetValueBuffer=new Float32Array(n);let s=()=>Nr.createBuffer(this._device,{label:"Monaco rectangle renderer shape buffer",size:this._shapeCollection.buffer.byteLength,usage:GPUBufferUsage.STORAGE|GPUBufferUsage.COPY_DST});this._shapeBindBuffer.value=s(),this._register(Q.runAndSubscribe(this._shapeCollection.onDidChangeBuffer,()=>{this._shapeBindBuffer.value=s(),this._pipeline&&this._updateBindGroup(this._pipeline,i)})),this._vertexBuffer=this._register(Nr.createBuffer(this._device,{label:"Monaco rectangle renderer vertex buffer",size:Vu.byteLength,usage:GPUBufferUsage.VERTEX|GPUBufferUsage.COPY_DST},Vu)).object;let r=this._device.createShaderModule({label:"Monaco rectangle renderer shader module",code:JCe});this._pipeline=this._device.createRenderPipeline({label:"Monaco rectangle renderer render pipeline",layout:"auto",vertex:{module:r,buffers:[{arrayStride:2*Float32Array.BYTES_PER_ELEMENT,attributes:[{shaderLocation:0,offset:0,format:"float32x2"}]}]},fragment:{module:r,targets:[{format:t,blend:{color:{srcFactor:"src-alpha",dstFactor:"one-minus-src-alpha"},alpha:{srcFactor:"src-alpha",dstFactor:"one-minus-src-alpha"}}}]}}),this._updateBindGroup(this._pipeline,i),this._initialized=!0}_updateBindGroup(e,t){this._bindGroup=this._device.createBindGroup({label:"Monaco rectangle renderer bind group",layout:e.getBindGroupLayout(0),entries:[{binding:0,resource:{buffer:this._shapeBindBuffer.value.object}},{binding:1,resource:{buffer:t}},{binding:2,resource:{buffer:this._scrollOffsetBindBuffer}}]})}register(e,t,i,n,s,r,a,l){return this._shapeCollection.createEntry({x:e,y:t,width:i,height:n,red:s,green:r,blue:a,alpha:l})}onScrollChanged(e){if(this._device){let t=It().devicePixelRatio;this._scrollOffsetValueBuffer[0]=this._context.viewLayout.getCurrentScrollLeft()*t,this._scrollOffsetValueBuffer[1]=this._context.viewLayout.getCurrentScrollTop()*t,this._device.queue.writeBuffer(this._scrollOffsetBindBuffer,0,this._scrollOffsetValueBuffer)}return!0}_update(){if(!this._device)return;let e=this._shapeCollection;e.dirtyTracker.isDirty&&(this._device.queue.writeBuffer(this._shapeBindBuffer.value.object,0,e.buffer,e.dirtyTracker.dataOffset,e.dirtyTracker.dirtySize*e.view.BYTES_PER_ELEMENT),e.dirtyTracker.clear())}draw(e){if(!this._initialized)return;this._update();let t=this._device.createCommandEncoder({label:"Monaco rectangle renderer command encoder"});this._renderPassColorAttachment.view=this._ctx.getCurrentTexture().createView();let i=t.beginRenderPass(this._renderPassDescriptor);i.setPipeline(this._pipeline),i.setVertexBuffer(0,this._vertexBuffer),i.setBindGroup(0,this._bindGroup);let n=Math.ceil(this._contentLeft.get()*this._devicePixelRatio.get());i.setScissorRect(n,0,this._canvas.width-n,this._canvas.height),i.draw(Vu.length/2,this._shapeCollection.entryCount),i.end();let s=t.finish();this._device.queue.submit([s])}}});var iye=x(()=>{});var f3,nye=x(()=>{re();W();iye();f3=class extends T{constructor(){super(),this._ruleCache=new Map,this._cssVariableCache=new Map,this._container=j("div.monaco-decoration-css-rule-extractor"),this._dummyElement=j("span"),this._container.appendChild(this._dummyElement),this._register(ne(()=>this._container.remove()))}getStyleRules(e,t){let i=this._ruleCache.get(t);if(i)return i;this._dummyElement.className=t,e.appendChild(this._container);let n=this._getStyleRules(t);return this._ruleCache.set(t,n),e.removeChild(this._container),n}_getStyleRules(e){let t=[],n=[...H_().styleSheets],s=e.split(" ").filter(r=>r.length>0);for(let r=0;r{yo();g3=class{constructor(){this._nextId=1,this._cacheById=new Map,this._cacheByStyle=new If}getOrCreateEntry(e,t,i,n,s,r){if(e===void 0&&t===void 0&&i===void 0&&n===void 0&&s===void 0&&r===void 0)return 0;let a=this._cacheByStyle.get(e??0,t?1:0,i===void 0?"":i.toFixed(2),n?1:0,s===void 0?"":s.toFixed(2),r??0);if(a)return a.id;let l=this._nextId++,c={id:l,color:e,bold:t,opacity:i,strikethrough:n,strikethroughThickness:s,strikethroughColor:r};return this._cacheById.set(l,c),this._cacheByStyle.set(c,e??0,t?1:0,i===void 0?"":i.toFixed(2),n?1:0,s===void 0?"":s.toFixed(2),r??0),l}getStyleSet(e){if(e!==0)return this._cacheById.get(e)}}});function pa(o,e){let t,i=!0;return Kge({changeTracker:{createChangeSummary:()=>({deltas:[],didChange:!1}),handleChange:(n,s)=>{if(n.didChange(o)){let r=n.change;r!==void 0&&s.deltas.push(r),s.didChange=!0}return!0}}},(n,s)=>{let r=o.read(n),a=t;s.didChange&&(t=r,e(r,a,s.deltas)),i&&(i=!1,t=r)})}function OX(o,e){let t=new F,i=pa(o,(n,s,r)=>{t.clear(),e(n,s,r,t)});return{dispose(){i.dispose(),t.dispose()}}}function sye(o,e){return OX(o,(t,i,n,s)=>{e(t,i,n,$I(s))})}var Pb=x(()=>{Vt();Rs();ae();W();Jt()});function rye(o,e){if(!H5e.includes(o))return!1;switch(o){case"text-decoration":case"text-decoration-line":return e.getPropertyValue(o)==="line-through";case"text-decoration-color":{let t=e.getPropertyValue(o);return/^var\(--[^,]+,\s*(?:initial|inherit)\)$/.test(t)?!0:K.Format.CSS.parse(t)!==null}case"text-decoration-style":return e.getPropertyValue(o)==="initial";case"text-decoration-thickness":{let t=e.getPropertyValue(o);return t==="initial"||/^\d+(\.\d+)?px$/.test(t)}default:return!0}}var W5e,m3,_a,gs,H5e,j1=x(()=>{le();re();Go();Yi();Ae();W();et();Ie();c3();oi();Hs();Kt();q1();Qf();tye();nye();ae();oye();ei();Pb();W5e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},m3=function(o,e){return function(t,i){e(t,i,o)}},gs=class extends T{static{_a=this}static{this._decorationCssRuleExtractor=new f3}static get decorationCssRuleExtractor(){return _a._decorationCssRuleExtractor}static{this._decorationStyleCache=new g3}static get decorationStyleCache(){return _a._decorationStyleCache}static get atlas(){if(!_a._atlas)throw new xe("Cannot call ViewGpuContext.textureAtlas before device is resolved");return _a._atlas}get atlas(){return _a.atlas}constructor(e,t,i,n,s){super(),this._instantiationService=t,this._notificationService=i,this.configurationService=n,this._themeService=s,this.maxGpuCols=2e3,this.canvas=wt(document.createElement("canvas")),this.canvas.setClassName("editorCanvas"),this._register(Q.runAndSubscribe(n.onDidChangeConfiguration,c=>{if(!c||c.affectsConfiguration("editor.scrollbar.verticalScrollbarSize")){let d=n.getValue("editor").scrollbar?.verticalScrollbarSize??14;this.canvas.domNode.style.boxSizing="border-box",this.canvas.domNode.style.paddingRight=`${d}px`}})),this.ctx=Hh(this.canvas.domNode.getContext("webgpu")),_a.device||(_a.device=Nr.requestDevice(c=>{let d=[{label:m(82,"Use DOM-based rendering"),run:()=>this.configurationService.updateValue("editor.experimentalGpuAcceleration","off")}];this._notificationService.prompt(Vh.Warning,c,d)}).then(c=>(_a.deviceSync=c.object,_a._atlas||(_a._atlas=this._instantiationService.createInstance(zu,c.object.limits.maxTextureDimension2D,void 0,_a.decorationStyleCache)),c.object)));let r=_e(this,It().devicePixelRatio);this._register(B(It(),"resize",()=>{r.set(It().devicePixelRatio,void 0)})),this.devicePixelRatio=r,this._register(pa(this.devicePixelRatio,()=>_a.atlas?.clear())),this._register(this._themeService.onDidColorThemeChange(()=>{_a.decorationCssRuleExtractor.clear(),_a.atlas?.clear()}));let a=_e(this,{width:this.canvas.domNode.width,height:this.canvas.domNode.height});this._register(i3(this.canvas.domNode,It(),(c,d)=>{this.canvas.domNode.width=c,this.canvas.domNode.height=d,a.set({width:c,height:d},void 0)})),this.canvasDevicePixelDimensions=a;let l=_e(this,0);this._register(this.configurationService.onDidChangeConfiguration(c=>{l.set(e.configuration.options.get(165).contentLeft,void 0)})),this.contentLeft=l,this.rectangleRenderer=this._register(this._instantiationService.createInstance(u3,e,this.contentLeft,this.devicePixelRatio,this.canvas.domNode,this.ctx,_a.device))}canRender(e,t,i){let n=t.getViewLineRenderingData(i);if(n.containsRTL||n.maxColumn>this.maxGpuCols)return!1;if(n.inlineDecorations.length>0){let s=!0;for(let r of n.inlineDecorations){if(r.type!==0){s=!1;break}let a=_a._decorationCssRuleExtractor.getStyleRules(this.canvas.domNode,r.inlineClassName);if(s&&=a.every(l=>{if(l.selectorText.includes(":"))return!1;for(let c of l.style)if(!rye(c,l.style))return!1;return!0}),!s)break}return s}return!0}canRenderDetailed(e,t,i){let n=t.getViewLineRenderingData(i),s=[];if(n.containsRTL&&s.push("containsRTL"),n.maxColumn>this.maxGpuCols&&s.push("maxColumn > maxGpuCols"),n.inlineDecorations.length>0){let r=!0,a=[],l=[],c=[];for(let d of n.inlineDecorations){if(d.type!==0){a.push(d.type),r=!1;continue}let h=_a._decorationCssRuleExtractor.getStyleRules(this.canvas.domNode,d.inlineClassName);r&&=h.every(u=>{if(u.selectorText.includes(":"))return l.push(u.selectorText),!1;for(let f of u.style)if(!rye(f,u.style))return c.push(`${f}: ${u.style[f]}`),!1;return!0})}a.length>0&&s.push(`inlineDecorations with unsupported types (${a.map(d=>`\`${d}\``).join(", ")})`),c.length>0&&s.push(`inlineDecorations with unsupported CSS rules (${c.map(d=>`\`${d}\``).join(", ")})`),l.length>0&&s.push(`inlineDecorations with unsupported CSS selectors (${l.map(d=>`\`${d}\``).join(", ")})`)}return s}};gs=_a=W5e([m3(1,ie),m3(2,si),m3(3,Me),m3(4,yt)],gs);H5e=["color","font-weight","opacity","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-decoration-thickness"]});function Fb(o,e){return o.isBasicASCII&&e.useMonospaceOptimizations?new PX(o):new FX(o)}var PX,FX,p3=x(()=>{Ox();PX=class{constructor(e){this._content=e.content}getSegmentAtIndex(e){return this._content[e]}},FX=class{constructor(e){this._segments=[];let t=e.content,i=Mh.Segmenter(void 0,{granularity:"grapheme"}).value,n=Array.from(i.segment(t)),s=0;for(let r=0;r{Lb();K1=class extends Pl{get glyphRasterizer(){return this._glyphRasterizer.value}constructor(e,t,i,n){super(),this._context=e,this._viewGpuContext=t,this._device=i,this._glyphRasterizer=n,this._context.addEventHandler(this)}}});var _3,WX=x(()=>{c3();a3();_3=` +struct GlyphInfo { + position: vec2f, + size: vec2f, + origin: vec2f, +}; + +struct Vertex { + @location(0) position: vec2f, +}; + +struct Cell { + position: vec2f, + unused1: vec2f, + glyphIndex: f32, + textureIndex: f32 +}; + +struct LayoutInfo { + canvasDims: vec2f, + viewportOffset: vec2f, + viewportDims: vec2f, +} + +struct ScrollOffset { + offset: vec2f +} + +struct VSOutput { + @builtin(position) position: vec4f, + @location(1) layerIndex: f32, + @location(0) texcoord: vec2f, +}; + +// Uniforms +@group(0) @binding(4) var layoutInfo: LayoutInfo; +@group(0) @binding(5) var atlasDims: vec2f; +@group(0) @binding(6) var scrollOffset: ScrollOffset; + +// Storage buffers +@group(0) @binding(0) var glyphInfo: array, ${zu.maximumPageCount}>; +@group(0) @binding(1) var cells: array; + +@vertex fn vs( + vert: Vertex, + @builtin(instance_index) instanceIndex: u32, + @builtin(vertex_index) vertexIndex : u32 +) -> VSOutput { + let cell = cells[instanceIndex]; + var glyph = glyphInfo[u32(cell.textureIndex)][u32(cell.glyphIndex)]; + + var vsOut: VSOutput; + // Multiple vert.position by 2,-2 to get it into clipspace which ranged from -1 to 1 + vsOut.position = vec4f( + // Make everything relative to top left instead of center + vec2f(-1, 1) + + ((vert.position * vec2f(2, -2)) / layoutInfo.canvasDims) * glyph.size + + ((cell.position * vec2f(2, -2)) / layoutInfo.canvasDims) + + ((glyph.origin * vec2f(2, -2)) / layoutInfo.canvasDims) + + (((layoutInfo.viewportOffset - scrollOffset.offset * vec2(1, -1)) * 2) / layoutInfo.canvasDims), + 0.0, + 1.0 + ); + + vsOut.layerIndex = cell.textureIndex; + // Textures are flipped from natural direction on the y-axis, so flip it back + vsOut.texcoord = vert.position; + vsOut.texcoord = ( + // Glyph offset (0-1) + (glyph.position / atlasDims) + + // Glyph coordinate (0-1) + (vsOut.texcoord * (glyph.size / atlasDims)) + ); + + return vsOut; +} + +@group(0) @binding(2) var ourSampler: sampler; +@group(0) @binding(3) var ourTexture: texture_2d_array; + +@fragment fn fs(vsOut: VSOutput) -> @location(0) vec4f { + return textureSample(ourTexture, ourSampler, vsOut.texcoord, u32(vsOut.layerIndex)); +} +`});function V5e(o){switch(o){case"lighter":case"normal":return 400;case"bolder":case"bold":return 700}return parseInt(o)}function z5e(o){return o.endsWith("%")?parseFloat(o.substring(0,o.length-1))/100:o.match(/^\d+(?:\.\d*)/)?parseFloat(o):1}var b3,aye=x(()=>{re();Yi();Ae();ae();Fl();p3();q1();Qf();j1();BX();WX();b3=class o extends K1{static{this.maxSupportedColumns=2e3}get bindGroupEntries(){return[{binding:1,resource:{buffer:this._cellBindBuffer}},{binding:6,resource:{buffer:this._scrollOffsetBindBuffer}}]}constructor(e,t,i,n){super(e,t,i,n),this.type="viewport",this.wgsl=_3,this._cellBindBufferLineCapacity=63,this._activeDoubleBufferIndex=0,this._visibleObjectCount=0,this._lastViewportLineCount=0,this._scrollInitialized=!1,this._onDidChangeBindGroupEntries=this._register(new N),this.onDidChangeBindGroupEntries=this._onDidChangeBindGroupEntries.event,this._rebuildCellBuffer(this._cellBindBufferLineCapacity);let s=2;this._scrollOffsetBindBuffer=this._register(Nr.createBuffer(this._device,{label:"Monaco scroll offset buffer",size:s*Float32Array.BYTES_PER_ELEMENT,usage:GPUBufferUsage.UNIFORM|GPUBufferUsage.COPY_DST})).object,this._scrollOffsetValueBuffer=new Float32Array(s)}_rebuildCellBuffer(e){this._cellBindBuffer?.destroy();let t=(Math.floor(e/32)+1)*32,i=t*o.maxSupportedColumns*6*Float32Array.BYTES_PER_ELEMENT;this._cellBindBuffer=this._register(Nr.createBuffer(this._device,{label:"Monaco full file cell buffer",size:i,usage:GPUBufferUsage.STORAGE|GPUBufferUsage.COPY_DST})).object,this._cellValueBuffers=[new ArrayBuffer(i),new ArrayBuffer(i)],this._cellBindBufferLineCapacity=t,this._lastViewportLineCount=0,this._onDidChangeBindGroupEntries.fire()}onConfigurationChanged(e){return!0}onDecorationsChanged(e){return!0}onTokensChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onLinesChanged(e){return!0}onScrollChanged(e){if(this._store.isDisposed)return!1;let t=It().devicePixelRatio;return this._scrollOffsetValueBuffer[0]=(e?.scrollLeft??this._context.viewLayout.getCurrentScrollLeft())*t,this._scrollOffsetValueBuffer[1]=(e?.scrollTop??this._context.viewLayout.getCurrentScrollTop())*t,this._device.queue.writeBuffer(this._scrollOffsetBindBuffer,0,this._scrollOffsetValueBuffer),!0}onThemeChanged(e){return!0}onLineMappingChanged(e){return!0}onZonesChanged(e){return!0}reset(){for(let e of[0,1]){let t=new Float32Array(this._cellValueBuffers[e]);t.fill(0,0,t.length),this._device.queue.writeBuffer(this._cellBindBuffer,0,t.buffer,0,t.byteLength)}this._lastViewportLineCount=0}update(e,t){let i="",n,s=0,r=0,a=0,l=0,c=0,d=0,h,u=0,f=0,g=0,p=0,_,b,v,w,C,y,k,I,E=0,D=0,O,P=It().devicePixelRatio,H;this._scrollInitialized||(this.onScrollChanged(),this._scrollInitialized=!0),this._cellBindBufferLineCapacityo.maxSupportedColumns);a++){if(n=H.getSegmentAtIndex(a),n===void 0)continue;i=n,k.isBasicASCII&&t.useMonospaceOptimizations||(s=this.glyphRasterizer.getTextMetrics(i).width),b=void 0,_=void 0,v=void 0,w=void 0,C=void 0,y=void 0;for(I of k.inlineDecorations){if(rI.range.endLineNumber||r===I.range.startLineNumber&&a=I.range.endColumn-1)continue;let Be=gs.decorationCssRuleExtractor.getStyleRules(this._viewGpuContext.canvas.domNode,I.inlineClassName);for(let Ge of Be)for(let tt of Ge.style){let Nt=Ge.styleMap.get(tt)?.toString()??"";switch(tt){case"color":{let mt=K.Format.CSS.parse(Nt);if(!mt)throw new xe("Invalid color format "+Nt);b=mt.toNumber32Bit();break}case"font-weight":{V5e(Nt)>=400?_=!0:_=!1;break}case"opacity":{v=z5e(Nt);break}case"text-decoration":case"text-decoration-line":{Nt==="line-through"&&(w=!0);break}case"text-decoration-thickness":{let mt=Nt.match(/^(\d+(?:\.\d+)?)px$/);mt&&(C=parseFloat(mt[1]));break}case"text-decoration-color":{let mt=Nt,Pt=Nt.match(/^var\((--[^,]+),\s*(?:initial|inherit)\)$/);Pt&&(mt=gs.decorationCssRuleExtractor.resolveCssVariable(this._viewGpuContext.canvas.domNode,Pt[1]));let ct=K.Format.CSS.parse(mt);ct&&(y=ct.toNumber32Bit());break}case"text-decoration-style":break;default:throw new xe("Unexpected inline decoration style")}}}if(i===" "||i===" "){if(u=((r-1)*o.maxSupportedColumns+a)*6,z.fill(0,u,u+6),i===" "){let Be=a+d;d=mi.nextRenderTabStop(a+d,k.tabSize),l+=s*(d-Be),d-=a+1}else l+=s;continue}let ce=gs.decorationStyleCache.getOrCreateEntry(b,_,v,w,C,y);h=this._viewGpuContext.atlas.getGlyph(this.glyphRasterizer,i,p,ce,l),c=Math.round(e.relativeVerticalOffset[r-e.startLineNumber]*P+Math.floor((e.lineHeight*P-(h.fontBoundingBoxAscent+h.fontBoundingBoxDescent))/2)+h.fontBoundingBoxAscent),u=((r-e.startLineNumber)*o.maxSupportedColumns+a)*6,z[u+0]=Math.floor(l),z[u+1]=c,z[u+4]=h.glyphIndex,z[u+5]=h.pageIndex,l+=s}f=g}E=((r-e.startLineNumber)*o.maxSupportedColumns+g)*6,D=(r-e.startLineNumber)*o.maxSupportedColumns*6,z.fill(0,E,D)}let Z=(e.endLineNumber-e.startLineNumber+1)*Y,te=e.endLineNumber-e.startLineNumber+1;if(this._device.queue.writeBuffer(this._cellBindBuffer,0,z.buffer,0,Z*Float32Array.BYTES_PER_ELEMENT),te{re();Yi();Ae();Fl();p3();WX();q1();Qf();j1();BX();Bb=class o extends K1{static{this.maxSupportedLines=3e3}static{this.maxSupportedColumns=200}get bindGroupEntries(){return[{binding:1,resource:{buffer:this._cellBindBuffer}},{binding:6,resource:{buffer:this._scrollOffsetBindBuffer}}]}constructor(e,t,i,n){super(e,t,i,n),this.type="fullfile",this.wgsl=_3,this._activeDoubleBufferIndex=0,this._upToDateLines=[new Set,new Set],this._visibleObjectCount=0,this._finalRenderedLine=0,this._scrollInitialized=!1,this._queuedBufferUpdates=[[],[]];let s=o.maxSupportedLines*o.maxSupportedColumns*6*Float32Array.BYTES_PER_ELEMENT;this._cellBindBuffer=this._register(Nr.createBuffer(this._device,{label:"Monaco full file cell buffer",size:s,usage:GPUBufferUsage.STORAGE|GPUBufferUsage.COPY_DST})).object,this._cellValueBuffers=[new ArrayBuffer(s),new ArrayBuffer(s)];let r=2;this._scrollOffsetBindBuffer=this._register(Nr.createBuffer(this._device,{label:"Monaco scroll offset buffer",size:r*Float32Array.BYTES_PER_ELEMENT,usage:GPUBufferUsage.UNIFORM|GPUBufferUsage.COPY_DST})).object,this._scrollOffsetValueBuffer=new Float32Array(r)}onConfigurationChanged(e){return this._invalidateAllLines(),this._queueBufferUpdate(e),!0}onDecorationsChanged(e){return this._invalidateAllLines(),!0}onTokensChanged(e){for(let t of e.ranges)this._invalidateLineRange(t.fromLineNumber,t.toLineNumber);return!0}onLinesDeleted(e){return this._invalidateLinesFrom(e.fromLineNumber),this._queueBufferUpdate(e),!0}onLinesInserted(e){return this._invalidateLinesFrom(e.fromLineNumber),!0}onLinesChanged(e){return this._invalidateLineRange(e.fromLineNumber,e.fromLineNumber+e.count),!0}onScrollChanged(e){if(this._store.isDisposed)return!1;let t=It().devicePixelRatio;return this._scrollOffsetValueBuffer[0]=(e?.scrollLeft??this._context.viewLayout.getCurrentScrollLeft())*t,this._scrollOffsetValueBuffer[1]=(e?.scrollTop??this._context.viewLayout.getCurrentScrollTop())*t,this._device.queue.writeBuffer(this._scrollOffsetBindBuffer,0,this._scrollOffsetValueBuffer),!0}onThemeChanged(e){return this._invalidateAllLines(),!0}onLineMappingChanged(e){return this._invalidateAllLines(),this._queueBufferUpdate(e),!0}onZonesChanged(e){return this._invalidateAllLines(),this._queueBufferUpdate(e),!0}_invalidateAllLines(){this._upToDateLines[0].clear(),this._upToDateLines[1].clear()}_invalidateLinesFrom(e){for(let t of[0,1]){let i=this._upToDateLines[t];for(let n of i)n>=e&&i.delete(n)}}_invalidateLineRange(e,t){for(let i=e;i<=t;i++)this._upToDateLines[0].delete(i),this._upToDateLines[1].delete(i)}reset(){this._invalidateAllLines();for(let e of[0,1]){let t=new Float32Array(this._cellValueBuffers[e]);t.fill(0,0,t.length),this._device.queue.writeBuffer(this._cellBindBuffer,0,t.buffer,0,t.byteLength)}this._finalRenderedLine=0}update(e,t){let i="",n,s=0,r=0,a=0,l=0,c=0,d=0,h,u=0,f=0,g=0,p=0,_,b,v,w,C,y,k,I,E=0,D=0,O,P=It().devicePixelRatio,H;this._scrollInitialized||(this.onScrollChanged(),this._scrollInitialized=!0);let z=new Float32Array(this._cellValueBuffers[this._activeDoubleBufferIndex]),Y=o.maxSupportedColumns*6,Z=this._upToDateLines[this._activeDoubleBufferIndex],te=3e3,se=0,he=this._queuedBufferUpdates[this._activeDoubleBufferIndex];for(;he.length;){let Be=he.shift();switch(Be.type){case 2:case 8:case 17:{z.fill(0),te=1,se=Math.max(se,this._finalRenderedLine),this._finalRenderedLine=0;break}case 10:{let Ge=(Be.fromLineNumber-1)*o.maxSupportedColumns*6,tt=Be.toLineNumber*o.maxSupportedColumns*6,Nt=(this._finalRenderedLine-(Be.toLineNumber-Be.fromLineNumber+1))*o.maxSupportedColumns*6;z.set(z.subarray(tt),Ge),z.fill(0,Nt),te=Math.min(te,Be.fromLineNumber),se=Math.max(se,this._finalRenderedLine),this._finalRenderedLine-=Be.toLineNumber-Be.fromLineNumber+1;break}}}for(r=e.startLineNumber;r<=e.endLineNumber;r++){if(!this._viewGpuContext.canRender(t,e,r)){E=(r-1)*o.maxSupportedColumns*6,D=r*o.maxSupportedColumns*6,z.fill(0,E,D),te=Math.min(te,r),se=Math.max(se,r);continue}if(!Z.has(r)){te=Math.min(te,r),se=Math.max(se,r),k=e.getViewLineRenderingData(r),d=0,H=Fb(k,t),s=t.spaceWidth*P,l=(k.minColumn-1)*s,O=k.tokens,f=k.minColumn-1,g=0;for(let Be=0,Ge=O.getCount();Beo.maxSupportedColumns);a++){if(n=H.getSegmentAtIndex(a),n===void 0)continue;i=n,k.isBasicASCII&&t.useMonospaceOptimizations||(s=this.glyphRasterizer.getTextMetrics(i).width),b=void 0,_=void 0,v=void 0,w=void 0,C=void 0,y=void 0;for(I of k.inlineDecorations){if(rI.range.endLineNumber||r===I.range.startLineNumber&&a=I.range.endColumn-1)continue;let Nt=gs.decorationCssRuleExtractor.getStyleRules(this._viewGpuContext.canvas.domNode,I.inlineClassName);for(let mt of Nt)for(let Pt of mt.style){let ct=mt.styleMap.get(Pt)?.toString()??"";switch(Pt){case"color":{let Fn=K.Format.CSS.parse(ct);if(!Fn)throw new xe("Invalid color format "+ct);b=Fn.toNumber32Bit();break}case"font-weight":{U5e(ct)>=400?_=!0:_=!1;break}case"opacity":{v=$5e(ct);break}case"text-decoration":case"text-decoration-line":{ct==="line-through"&&(w=!0);break}case"text-decoration-thickness":{let Fn=ct.match(/^(\d+(?:\.\d+)?)px$/);Fn&&(C=parseFloat(Fn[1]));break}case"text-decoration-color":{let Fn=ct,di=ct.match(/^var\((--[^,]+),\s*(?:initial|inherit)\)$/);di&&(Fn=gs.decorationCssRuleExtractor.resolveCssVariable(this._viewGpuContext.canvas.domNode,di[1]));let ia=K.Format.CSS.parse(Fn);ia&&(y=ia.toNumber32Bit());break}case"text-decoration-style":break;default:throw new xe("Unexpected inline decoration style")}}}if(i===" "||i===" "){if(u=((r-1)*o.maxSupportedColumns+a)*6,z.fill(0,u,u+6),i===" "){let Nt=a+d;d=mi.nextRenderTabStop(a+d,k.tabSize),l+=s*(d-Nt),d-=a+1}else l+=s;continue}let tt=gs.decorationStyleCache.getOrCreateEntry(b,_,v,w,C,y);h=this._viewGpuContext.atlas.getGlyph(this.glyphRasterizer,i,p,tt,l),c=Math.round(e.relativeVerticalOffset[r-e.startLineNumber]*P+Math.floor((e.lineHeight*P-(h.fontBoundingBoxAscent+h.fontBoundingBoxDescent))/2)+h.fontBoundingBoxAscent),u=((r-1)*o.maxSupportedColumns+a)*6,z[u+0]=Math.floor(l),z[u+1]=c,z[u+4]=h.glyphIndex,z[u+5]=h.pageIndex,l+=s}f=g}E=((r-1)*o.maxSupportedColumns+g)*6,D=r*o.maxSupportedColumns*6,z.fill(0,E,D),Z.add(r)}}let ce=(e.endLineNumber-e.startLineNumber+1)*Y;return te=Math.min(te,o.maxSupportedLines),se=Math.min(se,o.maxSupportedLines),te<=se&&this._device.queue.writeBuffer(this._cellBindBuffer,(te-1)*Y*Float32Array.BYTES_PER_ELEMENT,z.buffer,(te-1)*Y*Float32Array.BYTES_PER_ELEMENT,(se-te+1)*Y*Float32Array.BYTES_PER_ELEMENT),this._finalRenderedLine=Math.max(this._finalRenderedLine,se),this._activeDoubleBufferIndex=this._activeDoubleBufferIndex?0:1,this._visibleObjectCount=ce,ce}draw(e,t){if(this._visibleObjectCount<=0)throw new xe("Attempt to draw 0 objects");e.draw(Vu.length/2,this._visibleObjectCount,void 0,(t.startLineNumber-1)*o.maxSupportedColumns)}_queueBufferUpdate(e){this._queuedBufferUpdates[0].push(e),this._queuedBufferUpdates[1].push(e)}}});var q5e,cye,v3,dye=x(()=>{re();Ae();et();Ie();So();Pe();ue();a3();q1();Qf();j1();SC();Dr();k5();Fl();c3();p3();aye();lye();W();n3();Jt();Pb();q5e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},cye=function(o,e){return function(t,i){e(t,i,o)}},v3=class extends xn{constructor(e,t,i,n){super(e),this._viewGpuContext=t,this._instantiationService=i,this._logService=n,this._maxLineWidth=0,this._atlasGpuTextureVersions=[],this._initialized=!1,this._glyphRasterizer=this._register(new Qe),this._renderStrategy=this._register(new Qe),this.canvas=this._viewGpuContext.canvas.domNode,this._register(Se(s=>{this._viewGpuContext.canvasDevicePixelDimensions.read(s);let r=this._lastViewportData;r&&setTimeout(()=>{r===this._lastViewportData&&this.renderText(r)})})),this.initWebgpu()}async initWebgpu(){if(this._device=gs.deviceSync||await gs.device,this._store.isDisposed)return;let e=gs.atlas;this._register(e.onDidDeleteGlyphs(()=>{this._atlasGpuTextureVersions.length=0,this._atlasGpuTextureVersions[0]=0,this._atlasGpuTextureVersions[1]=0,this._renderStrategy.value.reset()}));let t=navigator.gpu.getPreferredCanvasFormat();this._viewGpuContext.ctx.configure({device:this._device,format:t,alphaMode:"premultiplied"}),this._renderPassColorAttachment={view:null,loadOp:"load",storeOp:"store"},this._renderPassDescriptor={label:"Monaco render pass",colorAttachments:[this._renderPassColorAttachment]};let i;{let l=new Float32Array(6),c=(d=this.canvas.width,h=this.canvas.height)=>(l[0]=d,l[1]=h,l[2]=Math.ceil(this._context.configuration.options.get(165).contentLeft*It().devicePixelRatio),l[3]=0,l[4]=l[0]-l[2],l[5]=l[1]-l[3],l);i=this._register(Nr.createBuffer(this._device,{label:"Monaco uniform buffer",size:24,usage:GPUBufferUsage.UNIFORM|GPUBufferUsage.COPY_DST},()=>c())).object,this._register(pa(this._viewGpuContext.canvasDevicePixelDimensions,({width:d,height:h})=>{this._device.queue.writeBuffer(i,0,c(d,h))})),this._register(pa(this._viewGpuContext.contentLeft,()=>{this._device.queue.writeBuffer(i,0,c())}))}let n;n=this._register(Nr.createBuffer(this._device,{label:"Monaco atlas info uniform buffer",size:8,usage:GPUBufferUsage.UNIFORM|GPUBufferUsage.COPY_DST},()=>{let l=new Float32Array(2);return l[0]=e.pageSize,l[1]=e.pageSize,l})).object;let s=this._context.configuration.options.get(58),r=this._context.configuration.options.get(61);this._glyphRasterizer.value=this._register(new Jf(r,s,this._viewGpuContext.devicePixelRatio.get(),gs.decorationStyleCache)),this._register(pa(this._viewGpuContext.devicePixelRatio,()=>{this._refreshGlyphRasterizer()})),this._renderStrategy.value=this._instantiationService.createInstance(Bb,this._context,this._viewGpuContext,this._device,this._glyphRasterizer),this._glyphStorageBuffer=this._register(Nr.createBuffer(this._device,{label:"Monaco glyph storage buffer",size:zu.maximumPageCount*(Zc.maximumGlyphCount*24),usage:GPUBufferUsage.STORAGE|GPUBufferUsage.COPY_DST})).object,this._atlasGpuTextureVersions[0]=0,this._atlasGpuTextureVersions[1]=0,this._atlasGpuTexture=this._register(Nr.createTexture(this._device,{label:"Monaco atlas texture",format:"rgba8unorm",size:{width:e.pageSize,height:e.pageSize,depthOrArrayLayers:zu.maximumPageCount},dimension:"2d",usage:GPUTextureUsage.TEXTURE_BINDING|GPUTextureUsage.COPY_DST|GPUTextureUsage.RENDER_ATTACHMENT})).object,this._updateAtlasStorageBufferAndTexture(),this._vertexBuffer=this._register(Nr.createBuffer(this._device,{label:"Monaco vertex buffer",size:Vu.byteLength,usage:GPUBufferUsage.VERTEX|GPUBufferUsage.COPY_DST},Vu)).object;let a=this._device.createShaderModule({label:"Monaco shader module",code:this._renderStrategy.value.wgsl});if(this._pipeline=this._device.createRenderPipeline({label:"Monaco render pipeline",layout:"auto",vertex:{module:a,buffers:[{arrayStride:2*Float32Array.BYTES_PER_ELEMENT,attributes:[{shaderLocation:0,offset:0,format:"float32x2"}]}]},fragment:{module:a,targets:[{format:t,blend:{color:{srcFactor:"src-alpha",dstFactor:"one-minus-src-alpha"},alpha:{srcFactor:"src-alpha",dstFactor:"one-minus-src-alpha"}}}]}}),this._rebuildBindGroup=()=>{this._bindGroup=this._device.createBindGroup({label:"Monaco bind group",layout:this._pipeline.getBindGroupLayout(0),entries:[{binding:0,resource:{buffer:this._glyphStorageBuffer}},{binding:2,resource:this._device.createSampler({label:"Monaco atlas sampler",magFilter:"nearest",minFilter:"nearest"})},{binding:3,resource:this._atlasGpuTexture.createView()},{binding:4,resource:{buffer:i}},{binding:5,resource:{buffer:n}},...this._renderStrategy.value.bindGroupEntries]})},this._rebuildBindGroup(),this._initialized=!0,this._initViewportData){for(let l of this._initViewportData)this.renderText(l);this._initViewportData=void 0}}_refreshRenderStrategy(e){if(this._renderStrategy.value?.type==="viewport"||e.endLineNumberthis._rebuildBindGroup?.())),this._rebuildBindGroup?.()}_viewportMaxColumn(e){let t=0,i;for(let n=e.startLineNumber;n<=e.endLineNumber;n++)i=e.getViewLineRenderingData(n),t=Math.max(t,i.maxColumn);return t}_updateAtlasStorageBufferAndTexture(){for(let[e,t]of gs.atlas.pages.entries()){if(e>=zu.maximumPageCount){console.log(`Attempt to upload atlas page [${e}], only ${zu.maximumPageCount} are supported currently`);continue}if(t.version===this._atlasGpuTextureVersions[e])continue;this._logService.trace("Updating atlas page[",e,"] from version ",this._atlasGpuTextureVersions[e]," to version ",t.version);let i=6*Zc.maximumGlyphCount,n=new Float32Array(i),s=0;for(let r of t.glyphs)n[s+0]=r.x,n[s+0+1]=r.y,n[s+2]=r.w,n[s+2+1]=r.h,n[s+4]=r.originOffsetX,n[s+4+1]=r.originOffsetY,s+=6;if(s/6>Zc.maximumGlyphCount)throw new Error(`Attempting to write more glyphs (${s/6}) than the GPUBuffer can hold (${Zc.maximumGlyphCount})`);this._device.queue.writeBuffer(this._glyphStorageBuffer,e*6*Zc.maximumGlyphCount*Float32Array.BYTES_PER_ELEMENT,n,0,6*Zc.maximumGlyphCount),t.usedArea.right-t.usedArea.left>0&&t.usedArea.bottom-t.usedArea.top>0&&this._device.queue.copyExternalImageToTexture({source:t.source},{texture:this._atlasGpuTexture,origin:{x:t.usedArea.left,y:t.usedArea.top,z:e}},{width:t.usedArea.right-t.usedArea.left+1,height:t.usedArea.bottom-t.usedArea.top+1}),this._atlasGpuTextureVersions[e]=t.version}}prepareRender(e){throw new xe("Should not be called")}render(e){throw new xe("Should not be called")}onConfigurationChanged(e){return this._refreshGlyphRasterizer(),this._maxLineWidth=0,!0}onCursorStateChanged(e){return!0}onDecorationsChanged(e){return!0}onFlushed(e){return this._maxLineWidth=0,!0}onLinesChanged(e){return!0}onLinesDeleted(e){return this._maxLineWidth=0,!0}onLinesInserted(e){return!0}onLineMappingChanged(e){return!0}onRevealRangeRequest(e){return!0}onScrollChanged(e){return!0}onThemeChanged(e){return!0}onZonesChanged(e){return!0}_refreshGlyphRasterizer(){let e=this._glyphRasterizer.value;if(!e)return;let t=this._context.configuration.options.get(58),i=this._context.configuration.options.get(61),n=this._viewGpuContext.devicePixelRatio.get();(e.fontFamily!==t||e.fontSize!==i||e.devicePixelRatio!==n)&&(this._glyphRasterizer.value=new Jf(i,t,n,gs.decorationStyleCache))}renderText(e){if(this._initialized)return this._refreshRenderStrategy(e),this._renderText(e);this._initViewportData=this._initViewportData??[],this._initViewportData.push(e)}_renderText(e){this._viewGpuContext.rectangleRenderer.draw(e);let t=new up(this._context.configuration,this._context.theme.type);this._renderStrategy.value.update(e,t),this._updateAtlasStorageBufferAndTexture();let i=this._device.createCommandEncoder({label:"Monaco command encoder"});this._renderPassColorAttachment.view=this._viewGpuContext.ctx.getCurrentTexture().createView({label:"Monaco canvas texture view"});let n=i.beginRenderPass(this._renderPassDescriptor);n.setPipeline(this._pipeline),n.setVertexBuffer(0,this._vertexBuffer);let s=Math.ceil(this._viewGpuContext.contentLeft.get()*this._viewGpuContext.devicePixelRatio.get());n.setScissorRect(s,0,this.canvas.width-s,this.canvas.height),n.setBindGroup(0,this._bindGroup),this._renderStrategy.value.draw(n,e),n.end();let r=i.finish();this._device.queue.submit([r]),this._lastViewportData=e,this._lastViewLineOptions=t,this._updateMaxLineWidth(e,t)}_updateMaxLineWidth(e,t){let i=It().devicePixelRatio,n=0;for(let r=e.startLineNumber;r<=e.endLineNumber;r++){if(!this._viewGpuContext.canRender(t,e,r))continue;let a=e.getViewLineRenderingData(r),l=this._computeLineWidth(a,t,i);n=Math.max(n,l)}let s=Math.ceil(n);s>this._maxLineWidth&&(this._maxLineWidth=s,this._context.viewModel.viewLayout.setMaxLineWidth(this._maxLineWidth))}_computeLineWidth(e,t,i){let n=e.content,s;e.isBasicASCII&&t.useMonospaceOptimizations||(s=Fb(e,t));let r=0,a=0;for(let l=0;lr)continue;let u=h===n.startLineNumber?n.startColumn:1,f=h!==i,g=f?this._context.viewModel.getLineMaxColumn(h):n.endColumn,p=this._visibleRangesForLineRange(h,u,g);if(p){if(t&&hn.endLineNumber)return null;let r=n.getViewLineRenderingData(e),a=r.content,l;r.isBasicASCII&&s.useMonospaceOptimizations||(l=Fb(r,s));let c="",d=0,h=0;for(let p=0;p{});var HX,bc,G1=x(()=>{ae();HX=class{constructor(){this._onDidChange=new N,this.onDidChange=this._onDidChange.event,this._enabled=!0}get enabled(){return this._enabled}enable(){this._enabled=!0,this._onDidChange.fire()}disable(){this._enabled=!1,this._onDidChange.fire()}},bc=new HX});var $e,Oi=x(()=>{Ie();$e=Ne("keybindingService")});var Y1,VX=x(()=>{ae();Dr();Y1=class extends xn{constructor(){super(...arguments),this._onWillCopy=this._register(new N),this.onWillCopy=this._onWillCopy.event,this._onWillCut=this._register(new N),this.onWillCut=this._onWillCut.event,this._onWillPaste=this._register(new N),this.onWillPaste=this._onWillPaste.event}}});function TT(o,e){if(o.get(2)===1){let i=e.lookupKeybinding("editor.action.toggleScreenReaderAccessibilityMode")?.getAriaLabel(),n=e.lookupKeybinding("workbench.action.showCommands")?.getAriaLabel(),s=e.lookupKeybinding("workbench.action.openGlobalKeybindings")?.getAriaLabel(),r=m(65,"The editor is not accessible at this time.");return i?m(66,"{0} To enable screen reader optimized mode, use {1}",r,i):n?m(67,"{0} To enable screen reader optimized mode, open the quick pick with {1} and run the command Toggle Screen Reader Accessibility Mode, which is currently not triggerable via keyboard.",r,n):s?m(68,"{0} Please assign a keybinding for the command Toggle Screen Reader Accessibility Mode by accessing the keybindings editor with {1} and run it.",r,s):r}return o.get(8)}function zX(o){let e=0,t=-1;do{if(t=o.indexOf(` +`,t+1),t===-1)break;e++}while(!0);return e}var Z1,w3=x(()=>{ue();le();Z1=class{_getPageOfLine(e,t){return Math.floor((e-1)/t)}_getRangeForPage(e,t){let i=e*t,n=i+1,s=i+t;return new S(n,1,s+1,1)}fromEditorSelection(e,t,i,n){let r=this._getPageOfLine(t.startLineNumber,i),a=this._getRangeForPage(r,i),l=this._getPageOfLine(t.endLineNumber,i),c=this._getRangeForPage(l,i),d=a.intersectRanges(new S(1,1,t.startLineNumber,t.startColumn));if(n&&e.getValueLengthInRange(d,1)>500){let w=e.modifyPosition(d.getEndPosition(),-500);d=S.fromPositions(w,d.getEndPosition())}let h=e.getValueInRange(d,1),u=e.getLineCount(),f=e.getLineMaxColumn(u),g=c.intersectRanges(new S(t.endLineNumber,t.endColumn,u,f));if(n&&e.getValueLengthInRange(g,1)>500){let w=e.modifyPosition(g.getStartPosition(),500);g=S.fromPositions(g.getStartPosition(),w)}let p=e.getValueInRange(g,1),_;if(r===l||r+1===l)_=e.getValueInRange(t,1);else{let w=a.intersectRanges(t),C=c.intersectRanges(t);_=e.getValueInRange(w,1)+"\u2026"+e.getValueInRange(C,1)}n&&_.length>2*500&&(_=_.substring(0,500)+"\u2026"+_.substring(_.length-500,_.length));let b,v;return t.getDirection()===0?(b=h.length,v=h.length+_.length):(v=h.length,b=h.length+_.length),{value:h+_+p,selection:t,selectionStart:b,selectionEnd:v,startPositionWithinEditor:d.getStartPosition(),newlineCountBeforeSelection:d.endLineNumber-d.startLineNumber}}}});var UX,uye,fye=x(()=>{UX=class{constructor(){this._textAreaEditContextMapping=new Map}register(e,t){return this._textAreaEditContextMapping.set(e,t),{dispose:()=>{this._textAreaEditContextMapping.delete(e)}}}},uye=new UX});function K5e(o,e,t,i){if(e.length===0)return 0;let n=o.createElement("div");n.style.position="absolute",n.style.top="-50000px",n.style.width="50000px";let s=o.createElement("span");wn(s,t),s.style.whiteSpace="pre",s.style.tabSize=`${i*t.spaceWidth}px`,s.append(e),n.appendChild(s),o.body.appendChild(n);let r=s.offsetWidth;return n.remove(),r}var j5e,gye,qX,$X,C3,mye=x(()=>{hye();le();Ns();Go();rt();He();dc();Dr();uX();pX();Uo();Pe();ue();gi();x5();Ci();Yi();G1();Oi();Ie();VX();WZ();w3();FZ();Px();fye();j5e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},gye=function(o,e){return function(t,i){e(t,i,o)}},qX=class{constructor(e,t,i,n,s){this._context=e,this.modelLineNumber=t,this.distanceToModelLineStart=i,this.widthOfHiddenLineTextBefore=n,this.distanceToModelLineEnd=s,this._visibleTextAreaBrand=void 0,this.startPosition=null,this.endPosition=null,this.visibleTextareaStart=null,this.visibleTextareaEnd=null,this._previousPresentation=null}prepareRender(e){let t=new M(this.modelLineNumber,this.distanceToModelLineStart+1),i=new M(this.modelLineNumber,this._context.viewModel.model.getLineMaxColumn(this.modelLineNumber)-this.distanceToModelLineEnd);this.startPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(t),this.endPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(i),this.startPosition.lineNumber===this.endPosition.lineNumber?(this.visibleTextareaStart=e.visibleRangeForPosition(this.startPosition),this.visibleTextareaEnd=e.visibleRangeForPosition(this.endPosition)):(this.visibleTextareaStart=null,this.visibleTextareaEnd=null)}definePresentation(e){return this._previousPresentation||(e?this._previousPresentation=e:this._previousPresentation={foreground:1,italic:!1,bold:!1,underline:!1,strikethrough:!1}),this._previousPresentation}},$X=bo,C3=class extends Y1{constructor(e,t,i,n,s,r,a){super(t),this._keybindingService=r,this._instantiationService=a,this._primaryCursorPosition=new M(1,1),this._primaryCursorVisibleRange=null,this._viewController=n,this._visibleRangeProvider=s,this._scrollLeft=0,this._scrollTop=0;let l=this._context.configuration.options,c=l.get(165);this._setAccessibilityOptions(l),this._contentLeft=c.contentLeft,this._contentWidth=c.contentWidth,this._contentHeight=c.height,this._fontInfo=l.get(59),this._emptySelectionClipboard=l.get(45),this._visibleTextArea=null,this._selections=[new me(1,1,1,1)],this._modelSelections=[new me(1,1,1,1)],this._lastRenderPosition=null,this.textArea=wt(document.createElement("textarea")),Tr.write(this.textArea,7),this.textArea.setClassName(`inputarea ${hp}`),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");let{tabSize:d}=this._context.viewModel.model.getOptions();this.textArea.domNode.style.tabSize=`${d*this._fontInfo.spaceWidth}px`,this.textArea.setAttribute("autocorrect","off"),this.textArea.setAttribute("autocapitalize","off"),this.textArea.setAttribute("autocomplete","off"),this.textArea.setAttribute("spellcheck","false"),this.textArea.setAttribute("aria-label",TT(l,this._keybindingService)),this.textArea.setAttribute("aria-required",l.get(9)?"true":"false"),this.textArea.setAttribute("tabindex",String(l.get(140))),this.textArea.setAttribute("role","textbox"),this.textArea.setAttribute("aria-roledescription",m(69,"editor")),this.textArea.setAttribute("aria-multiline","true"),this.textArea.setAttribute("aria-autocomplete",l.get(104)?"none":"both"),this._ensureReadOnlyAttribute(),this.textAreaCover=wt(document.createElement("div")),this.textAreaCover.setPosition("absolute"),i.appendChild(this.textArea),i.appendChild(this.textAreaCover);let h=new Z1,u={context:this._context,getScreenReaderContent:()=>{if(this._accessibilitySupport===1){let p=this._selections[0];if(Ye&&p.isEmpty()){let b=p.getStartPosition(),v=this._getWordBeforePosition(b);if(v.length===0&&(v=this._getCharacterBeforePosition(b)),v.length>0)return new $r(v,v.length,v.length,S.fromPositions(b),0)}if(Ye&&!p.isEmpty()&&this._context.viewModel.getValueLengthInRange(p,0)<500){let b=this._context.viewModel.getValueInRange(p,0);return new $r(b,0,b.length,p,0)}if(kh&&!p.isEmpty()){let b="vscode-placeholder";return new $r(b,0,b.length,null,void 0)}return $r.EMPTY}if(cK){let p=this._selections[0];if(p.isEmpty()){let _=p.getStartPosition(),[b,v]=this._getAndroidWordAtPosition(_);if(b.length>0)return new $r(b,v,v,S.fromPositions(_),0)}return $r.EMPTY}let g=h.fromEditorSelection(this._context.viewModel,this._selections[0],this._accessibilityPageSize,this._accessibilitySupport===0);return $r.fromScreenReaderContentState(g)},deduceModelPosition:(g,p,_)=>this._context.viewModel.deduceModelPositionRelativeToViewPosition(g,p,_)},f=this._register(new f4(this.textArea.domNode));this._textAreaInput=this._register(this._instantiationService.createInstance(u4,u,f,Po,{isAndroid:cK,isChrome:N_,isFirefox:bo,isSafari:kh})),this._register(this._textAreaInput.onWillCopy(g=>this._onWillCopy.fire(g))),this._register(this._textAreaInput.onWillCut(g=>this._onWillCut.fire(g))),this._register(this._textAreaInput.onWillPaste(g=>this._onWillPaste.fire(g))),this._register(this._textAreaInput.onKeyDown(g=>{this._viewController.emitKeyDown(g)})),this._register(this._textAreaInput.onKeyUp(g=>{this._viewController.emitKeyUp(g)})),this._register(this._textAreaInput.onPaste(g=>{let p=!1,_=null,b=null;g.metadata&&(p=this._emptySelectionClipboard&&!!g.metadata.isFromEmptySelection,_=typeof g.metadata.multicursorText<"u"?g.metadata.multicursorText:null,b=g.metadata.mode),this._viewController.paste(g.text,p,_,b)})),this._register(this._textAreaInput.onCut(()=>{this._viewController.cut()})),this._register(this._textAreaInput.onType(g=>{g.replacePrevCharCnt||g.replaceNextCharCnt||g.positionDelta?this._viewController.compositionType(g.text,g.replacePrevCharCnt,g.replaceNextCharCnt,g.positionDelta):this._viewController.type(g.text)})),this._register(this._textAreaInput.onSelectionChangeRequest(g=>{this._viewController.setSelection(g)})),this._register(this._textAreaInput.onCompositionStart(g=>{let p=this.textArea.domNode,_=this._modelSelections[0],{distanceToModelLineStart:b,widthOfHiddenTextBefore:v}=(()=>{let C=p.value.substring(0,Math.min(p.selectionStart,p.selectionEnd)),y=C.lastIndexOf(` +`),k=C.substring(y+1),I=k.lastIndexOf(" "),E=k.length-I-1,D=_.getStartPosition(),O=Math.min(D.column-1,E),P=D.column-1-O,H=k.substring(0,k.length-O),{tabSize:z}=this._context.viewModel.model.getOptions(),Y=K5e(this.textArea.domNode.ownerDocument,H,this._fontInfo,z);return{distanceToModelLineStart:P,widthOfHiddenTextBefore:Y}})(),{distanceToModelLineEnd:w}=(()=>{let C=p.value.substring(Math.max(p.selectionStart,p.selectionEnd)),y=C.indexOf(` +`),k=y===-1?C:C.substring(0,y),I=k.indexOf(" "),E=I===-1?k.length:k.length-I-1,D=_.getEndPosition(),O=Math.min(this._context.viewModel.model.getLineMaxColumn(D.lineNumber)-D.column,E);return{distanceToModelLineEnd:this._context.viewModel.model.getLineMaxColumn(D.lineNumber)-D.column-O}})();this._context.viewModel.revealRange("keyboard",!0,S.fromPositions(this._selections[0].getStartPosition()),0,1),this._visibleTextArea=new qX(this._context,_.startLineNumber,b,v,w),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render(),this.textArea.setClassName(`inputarea ${hp} ime-input`),this._viewController.compositionStart(),this._context.viewModel.onCompositionStart()})),this._register(this._textAreaInput.onCompositionUpdate(g=>{this._visibleTextArea&&(this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render())})),this._register(this._textAreaInput.onCompositionEnd(()=>{this._visibleTextArea=null,this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._render(),this.textArea.setClassName(`inputarea ${hp}`),this._viewController.compositionEnd(),this._context.viewModel.onCompositionEnd()})),this._register(this._textAreaInput.onFocus(()=>{this._context.viewModel.setHasFocus(!0)})),this._register(this._textAreaInput.onBlur(()=>{this._context.viewModel.setHasFocus(!1)})),this._register(bc.onDidChange(()=>{this._ensureReadOnlyAttribute()})),this._register(uye.register(e,this))}get domNode(){return this.textArea}writeScreenReaderContent(e){this._textAreaInput.writeNativeTextAreaContent(e)}dispose(){super.dispose(),this.textArea.domNode.remove(),this.textAreaCover.domNode.remove()}_getAndroidWordAtPosition(e){let t='`~!@#$%^&*()-=+[{]}\\|;:",.<>/?',i=this._context.viewModel.getLineContent(e.lineNumber),n=Ma(t,[]),s=!0,r=e.column,a=!0,l=e.column,c=0;for(;c<50&&(s||a);){if(s&&r<=1&&(s=!1),s){let d=i.charCodeAt(r-2);n.get(d)!==0?s=!1:r--}if(a&&l>i.length&&(a=!1),a){let d=i.charCodeAt(l-1);n.get(d)!==0?a=!1:l++}c++}return[i.substring(r-1,l-1),e.column-r]}_getWordBeforePosition(e){let t=this._context.viewModel.getLineContent(e.lineNumber),i=Ma(this._context.configuration.options.get(148),[]),n=e.column,s=0;for(;n>1;){let r=t.charCodeAt(n-2);if(i.get(r)!==0||s>50)return t.substring(n-1,e.column-1);s++,n--}return t.substring(0,e.column-1)}_getCharacterBeforePosition(e){if(e.column>1){let i=this._context.viewModel.getLineContent(e.lineNumber).charAt(e.column-2);if(!Dn(i.charCodeAt(0)))return i}return""}_setAccessibilityOptions(e){this._accessibilitySupport=e.get(2);let t=e.get(3);this._accessibilitySupport===2&&t===bs.accessibilityPageSize.defaultValue?this._accessibilityPageSize=500:this._accessibilityPageSize=t;let n=e.get(165).wrappingColumn;if(n!==-1&&this._accessibilitySupport!==1){let s=e.get(59);this._textAreaWrapping=!0,this._textAreaWidth=Math.round(n*s.typicalHalfwidthCharacterWidth)}else this._textAreaWrapping=!1,this._textAreaWidth=$X?0:1}onConfigurationChanged(e){let t=this._context.configuration.options,i=t.get(165);this._setAccessibilityOptions(t),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._contentHeight=i.height,this._fontInfo=t.get(59),this._emptySelectionClipboard=t.get(45),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");let{tabSize:n}=this._context.viewModel.model.getOptions();return this.textArea.domNode.style.tabSize=`${n*this._fontInfo.spaceWidth}px`,this.textArea.setAttribute("aria-label",TT(t,this._keybindingService)),this.textArea.setAttribute("aria-required",t.get(9)?"true":"false"),this.textArea.setAttribute("tabindex",String(t.get(140))),(e.hasChanged(41)||e.hasChanged(104))&&this._ensureReadOnlyAttribute(),e.hasChanged(2)&&this._textAreaInput.writeNativeTextAreaContent("strategy changed"),!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),this._modelSelections=e.modelSelections.slice(0),this._textAreaInput.writeNativeTextAreaContent("selection changed"),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return this._scrollLeft=e.scrollLeft,this._scrollTop=e.scrollTop,!0}onZonesChanged(e){return!0}isFocused(){return this._textAreaInput.isFocused()}focus(){this._textAreaInput.focusTextArea()}refreshFocusState(){this._textAreaInput.refreshFocusState()}getLastRenderData(){return this._lastRenderPosition}setAriaOptions(e){e.activeDescendant?(this.textArea.setAttribute("aria-haspopup","true"),this.textArea.setAttribute("aria-autocomplete","list"),this.textArea.setAttribute("aria-activedescendant",e.activeDescendant)):(this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),this.textArea.removeAttribute("aria-activedescendant")),e.role&&this.textArea.setAttribute("role",e.role)}_ensureReadOnlyAttribute(){let e=this._context.configuration.options;!bc.enabled||e.get(41)&&e.get(104)?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")}prepareRender(e){this._primaryCursorPosition=new M(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=e.visibleRangeForPosition(this._primaryCursorPosition),this._visibleTextArea?.prepareRender(e)}render(e){this._textAreaInput.writeNativeTextAreaContent("render"),this._render()}_render(){if(this._visibleTextArea){let i=this._visibleTextArea.visibleTextareaStart,n=this._visibleTextArea.visibleTextareaEnd,s=this._visibleTextArea.startPosition,r=this._visibleTextArea.endPosition;if(s&&r&&i&&n&&n.left>=this._scrollLeft&&i.left<=this._scrollLeft+this._contentWidth){let a=this._context.viewLayout.getVerticalOffsetForLineNumber(this._primaryCursorPosition.lineNumber)-this._scrollTop,l=zX(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart)),c=this._visibleTextArea.widthOfHiddenLineTextBefore,d=this._contentLeft+i.left-this._scrollLeft,h=n.left-i.left+1;if(dthis._contentWidth&&(h=this._contentWidth);let u=this._context.viewLayout.getLineHeightForLineNumber(s.lineNumber),f=this._context.viewModel.getFontSizeAtPosition(this._primaryCursorPosition),g=this._context.viewModel.getViewLineData(s.lineNumber),p=g.tokens.findTokenIndexAtOffset(s.column-1),_=g.tokens.findTokenIndexAtOffset(r.column-1),b=p===_,v=this._visibleTextArea.definePresentation(b?g.tokens.getPresentation(p):null);this.textArea.domNode.scrollTop=l*u,this.textArea.domNode.scrollLeft=c,this._doRender({lastRenderPosition:null,top:a,left:d,width:h,height:u,useCover:!1,color:(Ti.getColorMap()||[])[v.foreground],italic:v.italic,bold:v.bold,underline:v.underline,strikethrough:v.strikethrough,fontSize:f})}return}if(!this._primaryCursorVisibleRange){this._renderAtTopLeft();return}let e=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(ethis._contentLeft+this._contentWidth){this._renderAtTopLeft();return}let t=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;if(t<0||t>this._contentHeight){this._renderAtTopLeft();return}if(Ye||this._accessibilitySupport===2){let i=this._primaryCursorPosition.lineNumber,n=this._context.viewLayout.getLineHeightForLineNumber(i);this._doRender({lastRenderPosition:this._primaryCursorPosition,top:t,left:this._textAreaWrapping?this._contentLeft:e,width:this._textAreaWidth,height:n,useCover:!1}),this.textArea.domNode.scrollLeft=this._primaryCursorVisibleRange.left;let s=this._textAreaInput.textAreaState.newlineCountBeforeSelection??zX(this.textArea.domNode.value.substring(0,this.textArea.domNode.selectionStart));this.textArea.domNode.scrollTop=s*n;return}this._doRender({lastRenderPosition:this._primaryCursorPosition,top:t,left:this._textAreaWrapping?this._contentLeft:e,width:this._textAreaWidth,height:$X?0:1,useCover:!1})}_renderAtTopLeft(){this._doRender({lastRenderPosition:null,top:0,left:0,width:this._textAreaWidth,height:$X?0:1,useCover:!0})}_doRender(e){this._lastRenderPosition=e.lastRenderPosition;let t=this.textArea,i=this.textAreaCover;wn(t,this._fontInfo),t.setTop(e.top),t.setLeft(e.left),t.setWidth(e.width),t.setHeight(e.height),t.setLineHeight(e.height),t.setFontSize(e.fontSize??this._fontInfo.fontSize),t.setColor(e.color?K.Format.CSS.formatHex(e.color):""),t.setFontStyle(e.italic?"italic":""),e.bold&&t.setFontWeight("bold"),t.setTextDecoration(`${e.underline?" underline":""}${e.strikethrough?" line-through":""}`),i.setTop(e.useCover?e.top:0),i.setLeft(e.useCover?e.left:0),i.setWidth(e.useCover?e.width:0),i.setHeight(e.useCover?e.height:0);let n=this._context.configuration.options;n.get(66)?i.setClassName("monaco-editor-background textAreaCover "+z1.OUTER_CLASS_NAME):n.get(76).renderType!==0?i.setClassName("monaco-editor-background textAreaCover "+H1.CLASS_NAME):i.setClassName("monaco-editor-background textAreaCover")}};C3=j5e([gye(5,$e),gye(6,ie)],C3)});var pye=x(()=>{});function X1(o,e,t,i){return o.addEventListener(e,t,i),{dispose(){o.removeEventListener(e,t)}}}var G5e,Y5e,y3,_ye=x(()=>{re();W();So();G5e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Y5e=function(o,e){return function(t,i){e(t,i,o)}},y3=class extends T{constructor(e,t,i){super(),this._domNode=t,this._onFocusChange=i,this._isFocused=!1,this._isPaused=!1,this._register(B(this._domNode,"focus",()=>{e.trace("NativeEditContext.focus"),!this._isPaused&&this.refreshFocusState()})),this._register(B(this._domNode,"blur",()=>{e.trace("NativeEditContext.blur"),!this._isPaused&&this._handleFocusedChanged(!1)}))}pause(){this._isPaused=!0}resume(){this._isPaused=!1,this.refreshFocusState()}_handleFocusedChanged(e){this._isFocused!==e&&(this._isFocused=e,this._onFocusChange(this._isFocused))}focus(){this._domNode.focus(),this.refreshFocusState()}refreshFocusState(){let e=Wd(this._domNode),t=e?e.activeElement:Ui(),i=this._domNode===t;this._handleFocusedChanged(i)}get isFocused(){return this._isFocused}};y3=G5e([Y5e(0,Ot)],y3)});var Z5e,X5e,Q5e,jX,S3,KX,GX,DT,YX,bye=x(()=>{re();Nu();us();Uo();ue();gi();Iu();mb();pb();W();G1();_1();Z5e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},X5e=function(o,e){return function(t,i){e(t,i,o)}},Q5e=Ur("richScreenReaderContent",{createHTML:o=>o}),jX="data-line-number",S3=class extends T{constructor(e,t,i,n){super(),this._domNode=e,this._context=t,this._viewController=i,this._accessibilityService=n,this._selectionChangeListener=this._register(new Qe),this._accessibilityPageSize=1,this._ignoreSelectionChangeTime=0,this._state=DT.NULL,this._strategy=new YX,this._renderedLines=new Map,this._renderedSelection=new me(1,1,1,1),this.onConfigurationChanged(this._context.configuration.options)}updateScreenReaderContent(e){let t=It().document.activeElement;if(!t||t!==this._domNode.domNode)return;if(this._accessibilityService.isScreenReaderOptimized()){let n=this._getScreenReaderContentLineIntervals(e);this._state.equals(n)||(this._state=n,this._renderedLines=this._renderScreenReaderContent(n)),this._renderedSelection.equalsSelection(e)||(this._renderedSelection=e,this._setSelectionOnScreenReaderContent(this._context,this._renderedLines,e))}else this._state=DT.NULL,this._setIgnoreSelectionChangeTime("setValue"),this._domNode.domNode.textContent=""}updateScrollTop(e){let t=this._state.intervals;if(!t.length)return;let i=this._context.viewModel.viewLayout,n=t[0].startLine,s=i.getVerticalOffsetForLineNumber(n),r=i.getVerticalOffsetForLineNumber(e.positionLineNumber);this._domNode.domNode.scrollTop=r-s}onFocusChange(e){e?this._selectionChangeListener.value=this._setSelectionChangeListener():this._selectionChangeListener.value=void 0}onConfigurationChanged(e){this._accessibilityPageSize=e.get(3)}onWillCut(){this._setIgnoreSelectionChangeTime("onCut")}onWillPaste(){this._setIgnoreSelectionChangeTime("onWillPaste")}_setIgnoreSelectionChangeTime(e){this._ignoreSelectionChangeTime=Date.now()}_setSelectionChangeListener(){let e=0;return B(this._domNode.domNode.ownerDocument,"selectionchange",()=>{if(!(It().document.activeElement===this._domNode.domNode)||!this._accessibilityService.isScreenReaderOptimized()||!bc.enabled)return;let s=Date.now(),r=s-e;if(e=s,r<5)return;let a=s-this._ignoreSelectionChangeTime;if(this._ignoreSelectionChangeTime=0,a<100)return;let l=this._getEditorSelectionFromDomRange();l&&this._viewController.setSelection(l)})}_renderScreenReaderContent(e){let t=[],i=new Map;for(let n of e.intervals)for(let s=n.startLine;s<=n.endLine;s++){let r=this._renderLine(s);i.set(s,r),t.push(r.domNode)}return this._setIgnoreSelectionChangeTime("setValue"),this._domNode.domNode.replaceChildren(...t),i}_renderLine(e){let t=this._context.viewModel,i=t.getViewLineRenderingData(e),n=this._context.configuration.options,s=n.get(59),r=n.get(133),a=n.get(108),l=n.get(60),c=n.get(40),d=Bs.filter(i.inlineDecorations,e,i.minColumn,i.maxColumn),h=s.isMonospace&&!c,u=l!==nc.OFF,f;n.get(47)==="off"?f=n.get(113):f="none";let p=new Fa(h,s.canUseHalfwidthRightwardsArrow,i.content,i.continuesWithWrappedLine,i.isBasicASCII,i.containsRTL,i.minColumn-1,i.tokens,d,i.tabSize,i.startVisibleColumn,s.spaceWidth,s.middotWidth,s.wsmiddotWidth,r,f,a,u,null,null,0,!0),_=new Aa(1e4),b=Au(p,_),v=_.build(),w=Q5e?.createHTML(v)??v,C=t.viewLayout.getLineHeightForLineNumber(e)+"px",y=document.createElement("div");return y.innerHTML=w,y.style.lineHeight=C,y.style.height=C,y.setAttribute(jX,e.toString()),new KX(y,b.characterMapping)}_setSelectionOnScreenReaderContent(e,t,i){let s=It().document.getSelection();if(!s)return;let r=i.startLineNumber,a=i.endLineNumber,l=t.get(r),c=t.get(a);if(!l||!c)return;let d=e.viewModel,h=d.model,u=d.coordinatesConverter,f=new S(r,1,r,i.selectionStartColumn),g=u.convertViewRangeToModelRange(f),p=h.getCharacterCountInRange(g),_=new S(a,1,a,i.positionColumn),b=u.convertViewRangeToModelRange(_),v=h.getCharacterCountInRange(b),w=l.characterMapping.getDomPosition(p),C=c.characterMapping.getDomPosition(v),y=l.domNode.firstChild,k=c.domNode.firstChild,I=y.childNodes,E=k.childNodes,D=I.item(w.partIndex),O=E.item(C.partIndex);!D.firstChild||!O.firstChild||(this._setIgnoreSelectionChangeTime("setRange"),s.setBaseAndExtent(D.firstChild,i.startColumn===1?0:w.charIndex+1,O.firstChild,i.endColumn===1?0:C.charIndex+1))}_getScreenReaderContentLineIntervals(e){return this._strategy.fromEditorSelection(this._context.viewModel,e,this._accessibilityPageSize)}_getEditorSelectionFromDomRange(){if(!this._renderedLines)return;let e=It().document.getSelection();if(!e||e.rangeCount===0)return;let i=e.getRangeAt(0),n=i.startContainer,s=i.endContainer,r=n.parentElement,a=s.parentElement;if(!r||!xt(r)||!a||!xt(a))return;let l=r.parentElement?.parentElement,c=a.parentElement?.parentElement;if(!l||!c)return;let d=l.getAttribute(jX),h=c.getAttribute(jX);if(!d||!h)return;let u=parseInt(d),f=parseInt(h),g=this._renderedLines.get(u)?.characterMapping,p=this._renderedLines.get(f)?.characterMapping;if(!g||!p)return;let _=ip(g,r,i.startOffset),b=ip(p,a,i.endOffset);return e.direction==="forward"?new me(u,_,f,b):new me(f,b,u,_)}};S3=Z5e([X5e(3,Ri)],S3);KX=class{constructor(e,t){this.domNode=e,this.characterMapping=t}},GX=class{constructor(e,t){this.startLine=e,this.endLine=t}},DT=class o{constructor(e,t){this.intervals=t;let i="";for(let n of t)for(let s=n.startLine;s<=n.endLine;s++)i+=e.getLineContent(s)+` +`;this.value=i}equals(e){return this.value===e.value}static get NULL(){let e={getLineContent:()=>"",getLineCount:()=>1,getLineMaxColumn:()=>1,getValueInRange:()=>"",getValueLengthInRange:()=>0,modifyPosition:(t,i)=>t};return new o(e,[])}},YX=class{constructor(){}_getPageOfLine(e,t){return Math.floor((e-1)/t)}_getRangeForPage(e,t,i){let n=t*i,s=n+1,r=Math.min(n+i,e.getLineCount());return new GX(s,r)}fromEditorSelection(e,t,i){let n=this._getPageOfLine(t.startLineNumber,i),s=this._getRangeForPage(e,n,i),r=this._getPageOfLine(t.endLineNumber,i),a=this._getRangeForPage(e,r,i),l=[{startLine:s.startLine,endLine:s.endLine}];return n+1{re();us();gi();w3();BE();W();G1();ab();J5e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},e3e=function(o,e){return function(t,i){e(t,i,o)}},x3=class extends T{constructor(e,t,i,n){super(),this._domNode=e,this._context=t,this._viewController=i,this._accessibilityService=n,this._selectionChangeListener=this._register(new Qe),this._accessibilityPageSize=1,this._ignoreSelectionChangeTime=0,this._strategy=new Z1,this.onConfigurationChanged(this._context.configuration.options)}updateScreenReaderContent(e){let t=this._domNode.domNode,i=It().document.activeElement;if(!i||i!==t)return;if(this._accessibilityService.isScreenReaderOptimized()){this._state=this._getScreenReaderContentState(e),t.textContent!==this._state.value&&(this._setIgnoreSelectionChangeTime("setValue"),t.textContent=this._state.value);let s=It().document.getSelection();if(!s)return;let r=this._getScreenReaderRange(this._state.selectionStart,this._state.selectionEnd);if(!r)return;this._setIgnoreSelectionChangeTime("setRange"),s.setBaseAndExtent(r.anchorNode,r.anchorOffset,r.focusNode,r.focusOffset)}else this._state=void 0,this._setIgnoreSelectionChangeTime("setValue"),this._domNode.domNode.textContent=""}updateScrollTop(e){if(!this._state)return;let t=this._context.viewModel.viewLayout,i=this._state.startPositionWithinEditor.lineNumber,n=t.getVerticalOffsetForLineNumber(i),s=t.getVerticalOffsetForLineNumber(e.positionLineNumber);this._domNode.domNode.scrollTop=s-n}onFocusChange(e){e?this._selectionChangeListener.value=this._setSelectionChangeListener():this._selectionChangeListener.value=void 0}onConfigurationChanged(e){this._accessibilityPageSize=e.get(3)}onWillCut(){this._setIgnoreSelectionChangeTime("onCut")}onWillPaste(){this._setIgnoreSelectionChangeTime("onWillPaste")}_setIgnoreSelectionChangeTime(e){this._ignoreSelectionChangeTime=Date.now()}_setSelectionChangeListener(){let e=0;return B(this._domNode.domNode.ownerDocument,"selectionchange",()=>{let t=this._accessibilityService.isScreenReaderOptimized();if(!this._state||!t||!bc.enabled||!(It().document.activeElement===this._domNode.domNode))return;let s=It().document.getSelection();if(!s||s.rangeCount===0)return;let a=s.getRangeAt(0),l=Date.now(),c=l-e;if(e=l,c<5)return;let d=l-this._ignoreSelectionChangeTime;this._ignoreSelectionChangeTime=0,!(d<100)&&this._viewController.setSelection(this._getEditorSelectionFromDomRange(this._context,this._state,s.direction,a))})}_getScreenReaderContentState(e){let t=this._strategy.fromEditorSelection(this._context.viewModel,e,this._accessibilityPageSize,this._accessibilityService.getAccessibilitySupport()===0),i=this._context.viewModel.model.getPositionAt(1/0),n=t.value;return i.column===1&&e.getEndPosition().equals(i)&&(n+=` +`),t.value=n,t}_getScreenReaderRange(e,t){let i=this._domNode.domNode.firstChild;if(!i)return;let n=new globalThis.Range;return n.setStart(i,e),n.setEnd(i,t),{anchorNode:i,anchorOffset:e,focusNode:i,focusOffset:t}}_getEditorSelectionFromDomRange(e,t,i,n){let s=e.viewModel,r=s.model,l=s.coordinatesConverter.convertViewPositionToModelPosition(t.startPositionWithinEditor),c=r.getOffsetAt(l),d=n.startOffset+c,h=n.endOffset+c;if(r.getEndOfLineSequence()===1){let b=t.value,v=new Mf(b),w=v.getPosition(n.startOffset),C=v.getPosition(n.endOffset);d+=w.lineNumber-1,h+=C.lineNumber-1}let f=r.getPositionAt(d),g=r.getPositionAt(h),p=i==="forward"?f:g,_=i==="forward"?g:f;return me.fromPositions(p,_)}};x3=J5e([e3e(3,Ri)],x3)});var t3e,wye,k3,Cye=x(()=>{W();le();us();Oi();gi();dc();w3();bye();vye();t3e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},wye=function(o,e){return function(t,i){e(t,i,o)}},k3=class extends T{constructor(e,t,i,n,s){super(),this._domNode=e,this._context=t,this._viewController=i,this._keybindingService=n,this._accessibilityService=s,this._contentLeft=1,this._contentWidth=1,this._contentHeight=1,this._divWidth=1,this._primarySelection=new me(1,1,1,1),this._primaryCursorVisibleRange=null,this._state=this._register(new Qe),this._instantiateScreenReaderContent(),this._updateConfigurationSettings(),this._updateDomAttributes()}onWillPaste(){this._state.value?.onWillPaste()}onWillCut(){this._state.value?.onWillCut()}handleFocusChange(e){this._state.value?.onFocusChange(e),this.writeScreenReaderContent()}onConfigurationChanged(e){this._instantiateScreenReaderContent(),this._updateConfigurationSettings(),this._updateDomAttributes(),e.hasChanged(2)&&this.writeScreenReaderContent()}_instantiateScreenReaderContent(){let e=this._context.configuration.options.get(107);this._renderRichContent!==e&&(this._renderRichContent=e,this._state.value=this._createScreenReaderContent(e))}_createScreenReaderContent(e){return e?new S3(this._domNode,this._context,this._viewController,this._accessibilityService):new x3(this._domNode,this._context,this._viewController,this._accessibilityService)}_updateConfigurationSettings(){let e=this._context.configuration.options,t=e.get(165),i=t.wrappingColumn;this._contentLeft=t.contentLeft,this._contentWidth=t.contentWidth,this._contentHeight=t.height,this._fontInfo=e.get(59),this._divWidth=Math.round(i*this._fontInfo.typicalHalfwidthCharacterWidth),this._state.value?.onConfigurationChanged(e)}_updateDomAttributes(){let e=this._context.configuration.options;this._domNode.domNode.setAttribute("role","textbox"),this._domNode.domNode.setAttribute("aria-required",e.get(9)?"true":"false"),this._domNode.domNode.setAttribute("aria-multiline","true"),this._domNode.domNode.setAttribute("aria-autocomplete",e.get(104)?"none":"both"),this._domNode.domNode.setAttribute("aria-roledescription",m(64,"editor")),this._domNode.domNode.setAttribute("aria-label",TT(e,this._keybindingService));let t=this._context.viewModel.model.getOptions().tabSize,i=e.get(59).spaceWidth;this._domNode.domNode.style.tabSize=`${t*i}px`;let n=e.get(154),s=n==="inherit"?e.get(153):n,r=s==="inherit"?e.get(149):s;this._domNode.domNode.style.textWrap=r==="off"?"nowrap":"wrap"}onCursorStateChanged(e){this._primarySelection=e.selections[0]??new me(1,1,1,1)}prepareRender(e){this.writeScreenReaderContent(),this._primaryCursorVisibleRange=e.visibleRangeForPosition(this._primarySelection.getPosition())}render(e){if(!this._primaryCursorVisibleRange){this._renderAtTopLeft();return}let t=this._context.viewLayout.getCurrentScrollLeft(),i=this._contentLeft+this._primaryCursorVisibleRange.left-t;if(ithis._contentLeft+this._contentWidth){this._renderAtTopLeft();return}let n=this._context.viewLayout.getCurrentScrollTop(),s=this._primarySelection.positionLineNumber,r=this._context.viewLayout.getVerticalOffsetForLineNumber(s)-n;if(r<0||r>this._contentHeight){this._renderAtTopLeft();return}let a=this._context.viewLayout.getLineHeightForLineNumber(s);this._doRender(r,this._contentLeft,this._divWidth,a),this._state.value?.updateScrollTop(this._primarySelection)}_renderAtTopLeft(){this._doRender(0,0,this._contentWidth,1)}_doRender(e,t,i,n){wn(this._domNode,this._fontInfo),this._domNode.setTop(e),this._domNode.setLeft(t),this._domNode.setWidth(i),this._domNode.setHeight(n),this._domNode.setLineHeight(n)}setAriaOptions(e){e.activeDescendant?(this._domNode.setAttribute("aria-haspopup","true"),this._domNode.setAttribute("aria-autocomplete","list"),this._domNode.setAttribute("aria-activedescendant",e.activeDescendant)):(this._domNode.setAttribute("aria-haspopup","false"),this._domNode.setAttribute("aria-autocomplete","both"),this._domNode.removeAttribute("aria-activedescendant")),e.role&&this._domNode.setAttribute("role",e.role)}writeScreenReaderContent(){this._state.value?.updateScreenReaderContent(this._primarySelection)}};k3=t3e([wye(3,$e),wye(4,Ri)],k3)});var L3,yye=x(()=>{(function(o){function e(t,i){return new t.EditContext(i)}o.create=e})(L3||(L3={}))});var ZX,NT,XX=x(()=>{ZX=class{constructor(){this._nativeEditContextMapping=new Map}register(e,t){return this._nativeEditContextMapping.set(e,t),{dispose:()=>{this._nativeEditContextMapping.delete(e)}}}get(e){return this._nativeEditContextMapping.get(e)}},NT=new ZX});var i3e,Sye,RT,AT,xye=x(()=>{pye();Ns();re();Go();wr();Ie();h4();VX();_ye();Cye();ue();gi();Pe();BE();yye();XX();He();G1();Hi();So();bF();ab();i3e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Sye=function(o,e){return function(t,i){e(t,i,o)}};(function(o){o.NONE="edit-context-composition-none",o.SECONDARY="edit-context-composition-secondary",o.PRIMARY="edit-context-composition-primary"})(RT||(RT={}));AT=class extends Y1{constructor(e,t,i,n,s,r,a){super(t),this._viewController=n,this._visibleRangeProvider=s,this.logService=a,this._previousEditContextSelection=new ke(0,0),this._previousEditContextText="",this._editContextPrimarySelection=new me(1,1,1,1),this._parentBounds=null,this._decorations=[],this._primarySelection=new me(1,1,1,1),this._targetWindowId=-1,this._scrollTop=0,this._scrollLeft=0,this._linesVisibleRanges=null,this.domNode=new $_(document.createElement("div")),this.domNode.setClassName("native-edit-context"),this._imeTextArea=new $_(document.createElement("textarea")),this._imeTextArea.setClassName("ime-text-area"),this._imeTextArea.setAttribute("readonly","true"),this._imeTextArea.setAttribute("tabindex","-1"),this._imeTextArea.setAttribute("aria-hidden","true"),this.domNode.setAttribute("autocorrect","off"),this.domNode.setAttribute("autocapitalize","off"),this.domNode.setAttribute("autocomplete","off"),this.domNode.setAttribute("spellcheck","false"),this._updateDomAttributes(),i.appendChild(this.domNode),i.appendChild(this._imeTextArea),this._parent=i.domNode,this._focusTracker=this._register(new y3(a,this.domNode.domNode,h=>{a.trace("NativeEditContext#handleFocusChange : ",h),this._screenReaderSupport.handleFocusChange(h),this._context.viewModel.setHasFocus(h)}));let l=we(this.domNode.domNode);this._editContext=L3.create(l),this.setEditContextOnDomNode(),this._screenReaderSupport=this._register(r.createInstance(k3,this.domNode,t,this._viewController)),this._register(B(this.domNode.domNode,"copy",h=>{this.logService.trace("NativeEditContext#copy"),Zf.electronBugWorkaroundCopyEventHasFired=!0;let u=k1(h,!1,this._context,this.logService,bo);this._onWillCopy.fire(u),!u.isHandled&&u.ensureClipboardGetsEditorData()})),this._register(B(this.domNode.domNode,"cut",h=>{this.logService.trace("NativeEditContext#cut");let u=k1(h,!0,this._context,this.logService,bo);this._onWillCut.fire(u),!u.isHandled&&(this._screenReaderSupport.onWillCut(),u.ensureClipboardGetsEditorData(),this.logService.trace("NativeEditContext#cut (before viewController.cut)"),this._viewController.cut())})),this._register(B(this.domNode.domNode,"selectionchange",()=>{Ml.onSelectionChange()})),this._register(B(this.domNode.domNode,"keyup",h=>this._onKeyUp(h))),this._register(B(this.domNode.domNode,"keydown",async h=>this._onKeyDown(h))),this._register(B(this._imeTextArea.domNode,"keyup",h=>this._onKeyUp(h))),this._register(B(this._imeTextArea.domNode,"keydown",async h=>this._onKeyDown(h))),this._register(B(this.domNode.domNode,"beforeinput",async h=>{Ml.onBeforeInput(),(h.inputType==="insertParagraph"||h.inputType==="insertLineBreak")&&this._onType(this._viewController,{text:` +`,replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0})})),this._register(B(this.domNode.domNode,"paste",h=>{this.logService.trace("NativeEditContext#paste");let u=d4(h);if(this._onWillPaste.fire(u),u.isHandled){h.preventDefault();return}if(h.preventDefault(),!h.clipboardData||(this.logService.trace("NativeEditContext#paste with id : ",u.metadata?.id," with text.length: ",u.text.length),!u.text))return;let f=!1,g=null,p=null;u.metadata&&(f=this._context.configuration.options.get(45)&&!!u.metadata.isFromEmptySelection,g=typeof u.metadata.multicursorText<"u"?u.metadata.multicursorText:null,p=u.metadata.mode),this.logService.trace("NativeEditContext#paste (before viewController.paste)"),this._viewController.paste(u.text,f,g,p)})),this._register(X1(this._editContext,"textformatupdate",h=>this._handleTextFormatUpdate(h))),this._register(X1(this._editContext,"characterboundsupdate",h=>this._updateCharacterBounds(h)));let c;this._register(X1(this._editContext,"textupdate",h=>{Ml.onInput();let u=h.text;if(u.length===1){let f=u.charCodeAt(0);if(Dn(f)){c=u;return}if(xh(f)&&c){let g={text:c+u,selectionEnd:h.selectionEnd,selectionStart:h.selectionStart,updateRangeStart:h.updateRangeStart-1,updateRangeEnd:h.updateRangeEnd-1};c=void 0,this._emitTypeEvent(this._viewController,g);return}}this._emitTypeEvent(this._viewController,h)})),this._register(X1(this._editContext,"compositionstart",h=>{this._updateEditContext(),this._viewController.compositionStart(),this._context.viewModel.onCompositionStart()})),this._register(X1(this._editContext,"compositionend",h=>{this._updateEditContext(),this._viewController.compositionEnd(),this._context.viewModel.onCompositionEnd()}));let d=!1;this._register(bc.onDidChange(()=>{bc.enabled&&d&&(this._focusTracker.resume(),this.domNode.focus(),d=!1),!bc.enabled&&this.isFocused()&&(this._focusTracker.pause(),this._imeTextArea.focus(),d=!0)})),this._register(NT.register(e,this)),this._register(t.viewModel.model.onDidChangeContent(h=>{let u=!1;for(let f of h.changes)if(f.range.startLineNumber<=this._editContextPrimarySelection.endLineNumber&&f.range.endLineNumber>=this._editContextPrimarySelection.startLineNumber){u=!0;break}u&&this._updateEditContext()}))}dispose(){this.domNode.domNode.editContext=void 0,this.domNode.domNode.blur(),this.domNode.domNode.remove(),this._imeTextArea.domNode.remove(),super.dispose()}setAriaOptions(e){this._screenReaderSupport.setAriaOptions(e)}getLastRenderData(){return this._primarySelection.getPosition()}onBeforeRender(e){this._parentBounds=this._parent.getBoundingClientRect()}prepareRender(e){this._screenReaderSupport.prepareRender(e),this._updateSelectionAndControlBoundsData(e)}render(e){this._screenReaderSupport.render(e),this._updateSelectionAndControlBounds()}onCursorStateChanged(e){return this._primarySelection=e.modelSelections[0]??new me(1,1,1,1),this._screenReaderSupport.onCursorStateChanged(e),this._updateEditContext(),!0}onConfigurationChanged(e){return this._screenReaderSupport.onConfigurationChanged(e),this._updateDomAttributes(),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return this._scrollLeft=e.scrollLeft,this._scrollTop=e.scrollTop,!0}onZonesChanged(e){return!0}handleWillPaste(){this.logService.trace("NativeEditContext#handleWillPaste"),this._prepareScreenReaderForPaste()}_prepareScreenReaderForPaste(){this._screenReaderSupport.onWillPaste()}handleWillCopy(){this.logService.trace("NativeEditContext#handleWillCopy"),this.logService.trace("NativeEditContext#isFocused : ",this.domNode.domNode===Ui())}writeScreenReaderContent(){this._screenReaderSupport.writeScreenReaderContent()}isFocused(){return this._focusTracker.isFocused}focus(){this._focusTracker.focus(),this.refreshFocusState()}refreshFocusState(){this._focusTracker.refreshFocusState()}setEditContextOnDomNode(){let e=we(this.domNode.domNode),t=F_(e);this._targetWindowId!==t&&(this.domNode.domNode.editContext=this._editContext,this._targetWindowId=t)}_onKeyUp(e){Ml.onKeyUp(),this._viewController.emitKeyUp(new Mt(e))}_onKeyDown(e){Ml.onKeyDown();let t=new Mt(e);t.keyCode===114&&t.stopPropagation(),this._viewController.emitKeyDown(t)}_updateDomAttributes(){let e=this._context.configuration.options;this.domNode.domNode.setAttribute("tabindex",String(e.get(140)))}_updateEditContext(){let e=this._getNewEditContextState();if(!e)return;let t=e.text??" ";t!==this._previousEditContextText&&(this._editContext.updateText(0,this._previousEditContextText.length,t),this._previousEditContextText=t),(e.selectionStartOffset!==this._previousEditContextSelection.start||e.selectionEndOffset!==this._previousEditContextSelection.endExclusive)&&this._editContext.updateSelection(e.selectionStartOffset,e.selectionEndOffset),this._editContextPrimarySelection=e.editContextPrimarySelection,this._previousEditContextSelection=new ke(e.selectionStartOffset,e.selectionEndOffset)}_emitTypeEvent(e,t){if(!this._editContext)return;let i=this._previousEditContextSelection.endExclusive,n=this._previousEditContextSelection.start;this._previousEditContextSelection=new ke(t.selectionStart,t.selectionEnd);let s=0,r=0;t.updateRangeEnd>i&&(s=t.updateRangeEnd-i),t.updateRangeStartt.updateRangeEnd&&(a+=this._editContext.text.substring(t.updateRangeEnd,i));let l=0;t.selectionStart===t.selectionEnd&&n===i&&(l=t.selectionStart-(t.updateRangeStart+t.text.length));let c={text:a,replacePrevCharCnt:r,replaceNextCharCnt:s,positionDelta:l};this._onType(e,c)}_onType(e,t){t.replacePrevCharCnt||t.replaceNextCharCnt||t.positionDelta?e.compositionType(t.text,t.replacePrevCharCnt,t.replaceNextCharCnt,t.positionDelta):e.type(t.text)}_getNewEditContextState(){let e=this._primarySelection,t=this._context.viewModel.model;if(!t.isValidRange(e))return;let i=e.startLineNumber,n=e.endLineNumber,s=t.getLineMaxColumn(n),r=new S(i,1,n,s),a=t.getValueInRange(r,0),l=e.startColumn-1,c=a.length+e.endColumn-s;return{text:a,selectionStartOffset:l,selectionEndOffset:c,editContextPrimarySelection:e}}_editContextStartPosition(){return new M(this._editContextPrimarySelection.startLineNumber,1)}_handleTextFormatUpdate(e){if(!this._editContext)return;let t=e.getTextFormats(),i=this._editContextStartPosition(),n=[];t.forEach(s=>{let r=this._context.viewModel.model,a=r.getOffsetAt(i),l=r.getPositionAt(a+s.rangeStart),c=r.getPositionAt(a+s.rangeEnd),d=S.fromPositions(l,c),h=s.underlineThickness.toLowerCase(),u=RT.NONE;switch(h){case"thin":u=RT.SECONDARY;break;case"thick":u=RT.PRIMARY;break}n.push({range:d,options:{description:"textFormatDecoration",inlineClassName:u}})}),this._decorations=this._context.viewModel.model.deltaDecorations(this._decorations,n)}_updateSelectionAndControlBoundsData(e){let t=this._context.viewModel.coordinatesConverter.convertModelRangeToViewRange(this._primarySelection);if(this._primarySelection.isEmpty()){let i=e.visibleRangeForPosition(t.getStartPosition());this._linesVisibleRanges=i}else this._linesVisibleRanges=null}_updateSelectionAndControlBounds(){let t=this._context.configuration.options.get(165).contentLeft,i=this._context.viewModel.coordinatesConverter.convertModelRangeToViewRange(this._primarySelection),n=this._context.viewLayout.getVerticalOffsetForLineNumber(i.startLineNumber),s=this._context.viewLayout.getVerticalOffsetAfterLineNumber(i.endLineNumber),r=this._parentBounds,a=r.top+n-this._scrollTop,l=s-n,c=r.left+t-this._scrollLeft,d;this._primarySelection.isEmpty()?(this._linesVisibleRanges&&(c+=this._linesVisibleRanges.left),d=0):d=r.width-t;let h=new DOMRect(c,a,d,l);this._editContext.updateSelectionBounds(h),this._editContext.updateControlBounds(h)}_updateCharacterBounds(e){let t=this._context.configuration.options,i=t.get(59).typicalHalfwidthCharacterWidth,n=t.get(165).contentLeft,s=this._parentBounds,r=[],a=new Mf(this._editContext.text);for(let l=e.rangeStart;l0)for(let k of p[0].ranges){w=k.left,C=k.width;break}let y=this._context.viewLayout.getLineHeightForLineNumber(_);r.push(new DOMRect(s.left+n+w-this._scrollLeft,v,C,y))}this._editContext.updateCharacterBounds(e.rangeStart,r)}};AT=i3e([Sye(5,ie),Sye(6,Ot)],AT)});var I3,kye=x(()=>{Dr();Yi();Wl();et();Jt();I3=class extends xn{constructor(e,t){super(e),this._viewGpuContext=t,this._gpuShapes=[],this._register(Se(i=>this._updateEntries(i)))}onConfigurationChanged(e){return this._updateEntries(void 0),!0}prepareRender(e){}render(e){}_updateEntries(e){let t=this._context.configuration.options,i=t.get(116),n=t.get(59).typicalHalfwidthCharacterWidth,s=this._viewGpuContext.devicePixelRatio.read(e);for(let r=0,a=i.length;ri.length;)this._gpuShapes.splice(-1,1)[0].dispose()}}});var Lye=x(()=>{});var E3,Iye=x(()=>{lp();k5();Lye();E3=class o extends Wa{static{this.CLASS_NAME="gpu-mark"}constructor(e,t){super(),this._viewGpuContext=t,this._context=e,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return!0}onCursorStateChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}onDecorationsChanged(e){return!0}prepareRender(e){let t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,n=e.viewportData,s=new up(this._context.configuration,this._context.theme.type),r=[];for(let a=t;a<=i;a++){let l=a-t,c=this._viewGpuContext.canRenderDetailed(s,n,a);r[l]=c.length?`
`:""}this._renderResult=r}render(e,t){if(!this._renderResult)return"";let i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}});var ba,eg=x(()=>{Ie();ba=Ne("userInteractionService")});function Wb(o){try{return o()}catch(e){return De(e),null}}var n3e,Eye,T3,QX,JX,Tye=x(()=>{re();Go();bF();Ae();W();KF();Zve();SC();swe();rwe();Dr();JZ();lwe();cwe();Ywe();Xwe();Qwe();v5();tCe();uX();rCe();lCe();pX();hCe();SCe();kCe();LCe();ICe();TCe();NCe();ACe();PCe();FCe();WCe();Pe();ue();gi();ho();Lb();HCe();zCe();Ie();Kt();j1();dye();mye();xye();kye();Iye();ae();eg();n3e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Eye=function(o,e){return function(t,i){e(t,i,o)}},T3=class extends Pl{constructor(e,t,i,n,s,r,a,l,c,d){super(),this._instantiationService=c,this._userInteractionService=d,this._editContextClipboardListeners=new F,this._onWillCopy=this._register(new N),this.onWillCopy=this._onWillCopy.event,this._onWillCut=this._register(new N),this.onWillCut=this._onWillCut.event,this._onWillPaste=this._register(new N),this.onWillPaste=this._onWillPaste.event,this._shouldRecomputeGlyphMarginLanes=!1,this._ownerID=t,this._widgetFocusTracker=this._register(new JX(e,l,this._userInteractionService)),this._register(this._widgetFocusTracker.onChange(()=>{this._context.viewModel.setHasWidgetFocus(this._widgetFocusTracker.hasFocus())})),this._selections=[new me(1,1,1,1)],this._renderAnimationFrame=null,this._overflowGuardContainer=wt(document.createElement("div")),Tr.write(this._overflowGuardContainer,3),this._overflowGuardContainer.setClassName("overflow-guard"),this._viewController=new j4(n,r,a,i),this._context=new t3(n,s,r),this._context.addEventHandler(this),this._viewParts=[],this._editContextEnabled=this._context.configuration.options.get(170),this._accessibilitySupport=this._context.configuration.options.get(2),this._editContext=this._instantiateEditContext(),this._connectEditContextClipboardEvents(),this._viewParts.push(this._editContext),this._linesContent=wt(document.createElement("div")),this._linesContent.setClassName("lines-content monaco-editor-background"),this._linesContent.setPosition("absolute"),this.domNode=wt(document.createElement("div")),this.domNode.setClassName(this._getEditorClassName()),this.domNode.setAttribute("role","code"),this._context.configuration.options.get(46)==="on"&&(this._viewGpuContext=this._instantiationService.createInstance(gs,this._context)),this._scrollbar=new _5(this._context,this._linesContent,this.domNode,this._overflowGuardContainer),this._viewParts.push(this._scrollbar),this._viewLines=new L5(this._context,this._viewGpuContext,this._linesContent),this._viewGpuContext&&(this._viewLinesGpu=this._instantiationService.createInstance(v3,this._context,this._viewGpuContext)),this._viewZones=new Z5(this._context),this._viewParts.push(this._viewZones);let h=new H5(this._context);this._viewParts.push(h);let u=new q5(this._context);this._viewParts.push(u);let f=new Y4(this._context);this._viewParts.push(f),f.addDynamicOverlay(new g5(this._context)),f.addDynamicOverlay(new K5(this._context)),f.addDynamicOverlay(new S5(this._context)),f.addDynamicOverlay(new p5(this._context)),f.addDynamicOverlay(new X5(this._context));let g=new Z4(this._context);this._viewParts.push(g),g.addDynamicOverlay(new m5(this._context)),g.addDynamicOverlay(new E5(this._context)),g.addDynamicOverlay(new I5(this._context)),g.addDynamicOverlay(new H1(this._context)),this._viewGpuContext&&g.addDynamicOverlay(new E3(this._context,this._viewGpuContext)),this._glyphMarginWidgets=new b5(this._context),this._viewParts.push(this._glyphMarginWidgets);let p=new z1(this._context);p.getDomNode().appendChild(this._viewZones.marginDomNode),p.getDomNode().appendChild(g.getDomNode()),p.getDomNode().appendChild(this._glyphMarginWidgets.domNode),this._viewParts.push(p),this._contentWidgets=new Q4(this._context,this.domNode),this._viewParts.push(this._contentWidgets),this._viewCursors=new Y5(this._context),this._viewParts.push(this._viewCursors),this._overlayWidgets=new W5(this._context,this.domNode),this._viewParts.push(this._overlayWidgets);let _=this._viewGpuContext?new I3(this._context,this._viewGpuContext):new $5(this._context);this._viewParts.push(_);let b=new X4(this._context);this._viewParts.push(b);let v=new F5(this._context);if(this._viewParts.push(v),h){let w=this._scrollbar.getOverviewRulerLayoutInfo();w.parent.insertBefore(h.getDomNode(),w.insertBefore)}this._linesContent.appendChild(f.getDomNode()),"domNode"in _&&this._linesContent.appendChild(_.domNode),this._linesContent.appendChild(this._viewZones.domNode),this._linesContent.appendChild(this._viewLines.getDomNode()),this._linesContent.appendChild(this._contentWidgets.domNode),this._linesContent.appendChild(this._viewCursors.getDomNode()),this._overflowGuardContainer.appendChild(p.getDomNode()),this._overflowGuardContainer.appendChild(this._scrollbar.getDomNode()),this._viewGpuContext&&this._overflowGuardContainer.appendChild(this._viewGpuContext.canvas),this._overflowGuardContainer.appendChild(u.getDomNode()),this._overflowGuardContainer.appendChild(this._overlayWidgets.getDomNode()),this._overflowGuardContainer.appendChild(v.getDomNode()),this._overflowGuardContainer.appendChild(b.domNode),this.domNode.appendChild(this._overflowGuardContainer),l?(l.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode.domNode),l.appendChild(this._overlayWidgets.overflowingOverlayWidgetsDomNode.domNode)):(this.domNode.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode),this.domNode.appendChild(this._overlayWidgets.overflowingOverlayWidgetsDomNode)),this._applyLayout(),this._pointerHandler=this._register(new g4(this._context,this._viewController,this._createPointerHandlerHelper()))}_instantiateEditContext(){return this._context.configuration.options.get(170)?this._instantiationService.createInstance(AT,this._ownerID,this._context,this._overflowGuardContainer,this._viewController,this._createTextAreaHandlerHelper()):this._instantiationService.createInstance(C3,this._ownerID,this._context,this._overflowGuardContainer,this._viewController,this._createTextAreaHandlerHelper())}_updateEditContext(){let e=this._context.configuration.options.get(170),t=this._context.configuration.options.get(2);if(this._editContextEnabled===e&&this._accessibilitySupport===t)return;this._editContextEnabled=e,this._accessibilitySupport=t;let i=this._editContext.isFocused(),n=this._viewParts.indexOf(this._editContext);this._editContext.dispose(),this._editContext=this._instantiateEditContext(),this._connectEditContextClipboardEvents(),i&&this._editContext.focus(),n!==-1&&this._viewParts.splice(n,1,this._editContext)}_connectEditContextClipboardEvents(){this._editContextClipboardListeners.clear(),this._editContextClipboardListeners.add(this._editContext.onWillCopy(e=>this._onWillCopy.fire(e))),this._editContextClipboardListeners.add(this._editContext.onWillCut(e=>this._onWillCut.fire(e))),this._editContextClipboardListeners.add(this._editContext.onWillPaste(e=>this._onWillPaste.fire(e)))}_computeGlyphMarginLanes(){let e=this._context.viewModel.model,t=this._context.viewModel.glyphLanes,i=[],n=0;i=i.concat(e.getAllMarginDecorations().map(s=>{let r=s.options.glyphMargin?.position??Oa.Center;return n=Math.max(n,s.range.endLineNumber),{range:s.range,lane:r,persist:s.options.glyphMargin?.persistLane}})),i=i.concat(this._glyphMarginWidgets.getWidgets().map(s=>{let r=e.validateRange(s.preference.range);return n=Math.max(n,r.endLineNumber),{range:r,lane:s.preference.lane}})),i.sort((s,r)=>S.compareRangesUsingStarts(s.range,r.range)),t.reset(n);for(let s of i)t.push(s.lane,s.range,s.persist);return t}_createPointerHandlerHelper(){return{viewDomNode:this.domNode.domNode,linesContentDomNode:this._linesContent.domNode,viewLinesDomNode:this._viewLines.getDomNode().domNode,viewLinesGpu:this._viewLinesGpu,focusTextArea:()=>{this.focus()},dispatchTextAreaEvent:e=>{this._editContext.domNode.domNode.dispatchEvent(e)},getLastRenderData:()=>{let e=this._viewCursors.getLastRenderData()||[],t=this._editContext.getLastRenderData();return new jF(e,t)},renderNow:()=>{this.render(!0,!1)},shouldSuppressMouseDownOnViewZone:e=>this._viewZones.shouldSuppressMouseDownOnViewZone(e),shouldSuppressMouseDownOnWidget:e=>this._contentWidgets.shouldSuppressMouseDownOnWidget(e),getPositionFromDOMInfo:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getPositionFromDOMInfo(e,t)),visibleRangeForPosition:(e,t)=>{this._flushAccumulatedAndRenderNow();let i=new M(e,t);return this._viewLines.visibleRangeForPosition(i)??this._viewLinesGpu?.visibleRangeForPosition(i)??null},getLineWidth:e=>{if(this._flushAccumulatedAndRenderNow(),this._viewLinesGpu){let t=this._viewLinesGpu.getLineWidth(e);if(t!==void 0)return t}return this._viewLines.getLineWidth(e)}}}_createTextAreaHandlerHelper(){return{visibleRangeForPosition:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(e)),linesVisibleRangesForRange:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.linesVisibleRangesForRange(e,t))}}_applyLayout(){let t=this._context.configuration.options.get(165);this.domNode.setWidth(t.width),this.domNode.setHeight(t.height),this._overflowGuardContainer.setWidth(t.width),this._overflowGuardContainer.setHeight(t.height),this._linesContent.setWidth(16777216),this._linesContent.setHeight(16777216)}_getEditorClassName(){let e=this._editContext.isFocused()?" focused":"";return this._context.configuration.options.get(162)+" "+yT(this._context.theme.type)+e}handleEvents(e){super.handleEvents(e),this._scheduleRender()}onConfigurationChanged(e){return this.domNode.setClassName(this._getEditorClassName()),this._updateEditContext(),this._applyLayout(),!1}onCursorStateChanged(e){return this._selections=e.selections,!1}onDecorationsChanged(e){return e.affectsGlyphMargin&&(this._shouldRecomputeGlyphMarginLanes=!0),!1}onFocusChanged(e){return this.domNode.setClassName(this._getEditorClassName()),!1}onThemeChanged(e){return this._context.theme.update(e.theme),this.domNode.setClassName(this._getEditorClassName()),!1}dispose(){this._renderAnimationFrame!==null&&(this._renderAnimationFrame.dispose(),this._renderAnimationFrame=null),this._editContextClipboardListeners.dispose(),this._contentWidgets.overflowingContentWidgetsDomNode.domNode.remove(),this._overlayWidgets.overflowingOverlayWidgetsDomNode.domNode.remove(),this._context.removeEventHandler(this),this._viewGpuContext?.dispose(),this._viewLines.dispose(),this._viewLinesGpu?.dispose();for(let e of this._viewParts)e.dispose();super.dispose()}_scheduleRender(){if(this._store.isDisposed)throw new xe;if(this._renderAnimationFrame===null){this._editContext instanceof AT&&this._editContext.setEditContextOnDomNode();let e=this._createCoordinatedRendering();this._renderAnimationFrame=QX.INSTANCE.scheduleCoordinatedRendering({window:we(this.domNode?.domNode),prepareRenderText:()=>{if(this._store.isDisposed)throw new xe;try{return e.prepareRenderText()}finally{this._renderAnimationFrame=null}},renderText:t=>{if(this._store.isDisposed)throw new xe;return e.renderText(t)},prepareRender:(t,i)=>{if(this._store.isDisposed)throw new xe;return e.prepareRender(t,i)},render:(t,i)=>{if(this._store.isDisposed)throw new xe;return e.render(t,i)}})}}_flushAccumulatedAndRenderNow(){let e=this._createCoordinatedRendering(),t=Wb(()=>e.prepareRenderText());if(!t)return;let i=Wb(()=>e.renderText(t));if(!i)return;let[n,s]=i;Wb(()=>e.prepareRender(n,s)),Wb(()=>e.render(n,s))}_getViewPartsToRender(){let e=[],t=0;for(let i of this._viewParts)i.shouldRender()&&(e[t++]=i);return e}_createCoordinatedRendering(){return{prepareRenderText:()=>{if(this._shouldRecomputeGlyphMarginLanes){this._shouldRecomputeGlyphMarginLanes=!1;let s=this._computeGlyphMarginLanes();this._context.configuration.setGlyphMarginDecorationLaneCount(s.requiredLanes)}if(Ml.onRenderStart(),!this.domNode.domNode.isConnected)return null;let e=this._getViewPartsToRender();if(!this._viewLines.shouldRender()&&e.length===0)return null;let i=this._context.viewLayout.getLinesViewportData();this._context.viewModel.setViewport(i.startLineNumber,i.endLineNumber,i.centeredLineNumber);let n=new J5(this._selections,i,this._context.viewLayout.getWhitespaceViewportData(),this._context.viewModel);for(let s of this._viewParts)s.shouldRender()&&s.onBeforeRender(n);return n},renderText:e=>(this._viewLines.shouldRender()&&(this._viewLines.renderText(e),this._viewLines.onDidRender()),this._viewLinesGpu?.shouldRender()&&(this._viewLinesGpu.renderText(e),this._viewLinesGpu.onDidRender()),[this._getViewPartsToRender(),new UF(this._context.viewLayout,e,this._viewLines,this._viewLinesGpu)]),prepareRender:(e,t)=>{for(let i of e)i.prepareRender(t)},render:(e,t)=>{for(let i of e)i.render(t),i.onDidRender()}}}delegateVerticalScrollbarPointerDown(e){this._scrollbar.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){this._scrollbar.delegateScrollFromMouseWheelEvent(e)}restoreState(e){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft},1),this._context.viewModel.visibleLinesStabilized()}getOffsetForColumn(e,t){let i=this._context.viewModel.model.validatePosition({lineNumber:e,column:t}),n=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(i);this._flushAccumulatedAndRenderNow();let s=this._viewLines.visibleRangeForPosition(new M(n.lineNumber,n.column));return s?s.left:-1}getLineWidth(e){let t=this._context.viewModel.model,i=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(new M(e,t.getLineMaxColumn(e))).lineNumber;return this._flushAccumulatedAndRenderNow(),this._viewLines.getLineWidth(i)}resetLineWidthCaches(){this._viewLines.resetLineWidthCaches()}getTargetAtClientPoint(e,t){let i=this._pointerHandler.getTargetAtClientPoint(e,t);return i?O1.convertViewToModelMouseTarget(i,this._context.viewModel.coordinatesConverter):null}createOverviewRuler(e){return new U5(this._context,e)}change(e){this._viewZones.changeViewZones(e),this._scheduleRender()}render(e,t){if(t){this._viewLines.forceShouldRender();for(let i of this._viewParts)i.forceShouldRender()}e?this._flushAccumulatedAndRenderNow():this._scheduleRender()}writeScreenReaderContent(e){this._editContext.writeScreenReaderContent(e)}focus(){this._editContext.focus()}isFocused(){return this._editContext.isFocused()}isWidgetFocused(){return this._widgetFocusTracker.hasFocus()}setAriaOptions(e){this._editContext.setAriaOptions(e)}addContentWidget(e){this._contentWidgets.addWidget(e.widget),this.layoutContentWidget(e),this._scheduleRender()}layoutContentWidget(e){this._contentWidgets.setWidgetPosition(e.widget,e.position?.position??null,e.position?.secondaryPosition??null,e.position?.preference??null,e.position?.positionAffinity??null),this._contentWidgets.shouldRender()&&this._scheduleRender()}removeContentWidget(e){this._contentWidgets.removeWidget(e.widget),this._scheduleRender()}addOverlayWidget(e){this._overlayWidgets.addWidget(e.widget),this.layoutOverlayWidget(e),this._scheduleRender()}layoutOverlayWidget(e){this._overlayWidgets.setWidgetPosition(e.widget,e.position)&&this._scheduleRender()}removeOverlayWidget(e){this._overlayWidgets.removeWidget(e.widget),this._scheduleRender()}addGlyphMarginWidget(e){this._glyphMarginWidgets.addWidget(e.widget),this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender()}layoutGlyphMarginWidget(e){let t=e.position;this._glyphMarginWidgets.setWidgetPosition(e.widget,t)&&(this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender())}removeGlyphMarginWidget(e){this._glyphMarginWidgets.removeWidget(e.widget),this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender()}};T3=n3e([Eye(8,ie),Eye(9,ba)],T3);QX=class o{static{this.INSTANCE=new o}constructor(){this._coordinatedRenderings=[],this._animationFrameRunners=new Map}scheduleCoordinatedRendering(e){return this._coordinatedRenderings.push(e),this._scheduleRender(e.window),{dispose:()=>{let t=this._coordinatedRenderings.indexOf(e);if(t!==-1&&(this._coordinatedRenderings.splice(t,1),this._coordinatedRenderings.length===0)){for(let[i,n]of this._animationFrameRunners)n.dispose();this._animationFrameRunners.clear()}}}}_scheduleRender(e){if(!this._animationFrameRunners.has(e)){let t=()=>{this._animationFrameRunners.delete(e),this._onRenderScheduled()};this._animationFrameRunners.set(e,Ix(e,t,100))}}_onRenderScheduled(){let e=this._coordinatedRenderings.slice(0);this._coordinatedRenderings=[];let t=[];for(let n=0,s=e.length;nr.prepareRenderText())}let i=[];for(let n=0,s=e.length;nr.renderText(a))}for(let n=0,s=e.length;nr.prepareRender(l,c))}for(let n=0,s=e.length;nr.render(l,c))}}},JX=class extends T{constructor(e,t,i){super(),this._onChange=this._register(new N),this.onChange=this._onChange.event,this._hadFocus=void 0,this._hasDomElementFocus=!1,this._domFocusTracker=this._register(i.createDomFocusTracker(e)),this._overflowWidgetsDomNodeHasFocus=!1,this._register(this._domFocusTracker.onDidFocus(()=>{this._hasDomElementFocus=!0,this._update()})),this._register(this._domFocusTracker.onDidBlur(()=>{this._hasDomElementFocus=!1,this._update()})),t&&(this._overflowWidgetsDomNode=this._register(i.createDomFocusTracker(t)),this._register(this._overflowWidgetsDomNode.onDidFocus(()=>{this._overflowWidgetsDomNodeHasFocus=!0,this._update()})),this._register(this._overflowWidgetsDomNode.onDidBlur(()=>{this._overflowWidgetsDomNodeHasFocus=!1,this._update()})))}_update(){let e=this._hasDomElementFocus||this._overflowWidgetsDomNodeHasFocus;this._hadFocus!==e&&(this._hadFocus=e,this._onChange.fire(void 0))}hasFocus(){return this._hadFocus??!1}}});function Dye(o){return o==null?!0:o===Qa.Right||o===Qa.Both}function Nye(o){return o==null?!0:o===Qa.Left||o===Qa.Both}var gp,Q1,eQ=x(()=>{Fr();Pe();ho();gp=class{constructor(e,t,i,n,s){this.injectionOffsets=e,this.injectionOptions=t,this.breakOffsets=i,this.breakOffsetsVisibleColumn=n,this.wrappedTextIndentLength=s}getOutputLineCount(){return this.breakOffsets.length}getMinOutputOffset(e){return e>0?this.wrappedTextIndentLength:0}getLineLength(e){let t=e>0?this.breakOffsets[e-1]:0,n=this.breakOffsets[e]-t;return e>0&&(n+=this.wrappedTextIndentLength),n}getMaxOutputOffset(e){return this.getLineLength(e)}translateToInputOffset(e,t){e>0&&(t=Math.max(0,t-this.wrappedTextIndentLength));let n=e===0?t:this.breakOffsets[e-1]+t;if(this.injectionOffsets!==null)for(let s=0;sthis.injectionOffsets[s];s++)n0?this.breakOffsets[s-1]:0,t===0)if(e<=r)n=s-1;else if(e>l)i=s+1;else break;else if(e=l)i=s+1;else break}let a=e-r;return s>0&&(a+=this.wrappedTextIndentLength),new Q1(s,a)}normalizeOutputPosition(e,t,i){if(this.injectionOffsets!==null){let n=this.outputPositionToOffsetInInputWithInjections(e,t),s=this.normalizeOffsetInInputWithInjectionsAroundInjections(n,i);if(s!==n)return this.offsetInInputWithInjectionsToOutputPosition(s,i)}if(i===0){if(e>0&&t===this.getMinOutputOffset(e))return new Q1(e-1,this.getMaxOutputOffset(e-1))}else if(i===1){let n=this.getOutputLineCount()-1;if(e0&&(t=Math.max(0,t-this.wrappedTextIndentLength)),(e>0?this.breakOffsets[e-1]:0)+t}normalizeOffsetInInputWithInjectionsAroundInjections(e,t){let i=this.getInjectedTextAtOffset(e);if(!i)return e;if(t===2){if(e===i.offsetInInputWithInjections+i.length&&Dye(this.injectionOptions[i.injectedTextIndex].cursorStops))return i.offsetInInputWithInjections+i.length;{let n=i.offsetInInputWithInjections;if(Nye(this.injectionOptions[i.injectedTextIndex].cursorStops))return n;let s=i.injectedTextIndex-1;for(;s>=0&&this.injectionOffsets[s]===this.injectionOffsets[i.injectedTextIndex]&&!(Dye(this.injectionOptions[s].cursorStops)||(n-=this.injectionOptions[s].content.length,Nye(this.injectionOptions[s].cursorStops)));)s--;return n}}else if(t===1||t===4){let n=i.offsetInInputWithInjections+i.length,s=i.injectedTextIndex;for(;s+1=0&&this.injectionOffsets[s-1]===this.injectionOffsets[s];)n-=this.injectionOptions[s-1].content.length,s--;return n}ph()}getInjectedText(e,t){let i=this.outputPositionToOffsetInInputWithInjections(e,t),n=this.getInjectedTextAtOffset(i);return n?{options:this.injectionOptions[n.injectedTextIndex]}:null}getInjectedTextAtOffset(e){let t=this.injectionOffsets,i=this.injectionOptions;if(t!==null){let n=0;for(let s=0;se)break;if(e<=l)return{injectedTextIndex:s,offsetInInputWithInjections:a,length:r};n+=r}}}};Q1=class{constructor(e,t){this.outputLineIndex=e,this.outputOffset=t}toString(){return`${this.outputLineIndex}:${this.outputOffset}`}toPosition(e){return new M(e+this.outputLineIndex,this.outputOffset+1)}}});var D3,zh,MT,N3,R3,A3,M3,O3,jC,J1,e0,t0,Hb,KC=x(()=>{D3=class{constructor(){this.changeType=1}},zh=class o{static applyInjectedText(e,t){if(!t||t.length===0)return e;let i="",n=0;for(let s of t)i+=e.substring(n,s.column-1),n=s.column-1,i+=s.options.content;return i+=e.substring(n),i}static fromDecorations(e){let t=[];for(let i of e)i.options.before&&i.options.before.content.length>0&&t.push(new o(i.ownerId,i.range.startLineNumber,i.range.startColumn,i.options.before,0)),i.options.after&&i.options.after.content.length>0&&t.push(new o(i.ownerId,i.range.endLineNumber,i.range.endColumn,i.options.after,1));return t.sort((i,n)=>i.lineNumber===n.lineNumber?i.column===n.column?i.order-n.order:i.column-n.column:i.lineNumber-n.lineNumber),t}constructor(e,t,i,n,s){this.ownerId=e,this.lineNumber=t,this.column=i,this.options=n,this.order=s}},MT=class{constructor(e,t){this.changeType=2,this.lineNumber=e,this.lineNumberPostEdit=t}},N3=class{constructor(e,t,i,n){this.ownerId=e,this.decorationId=t,this.lineNumber=i,this.lineHeightMultiplier=n}},R3=class{constructor(e,t){this.ownerId=e,this.lineNumber=t}},A3=class{constructor(e,t,i){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=t,this.lastUntouchedLinePostEdit=i}},M3=class{get toLineNumber(){return this.fromLineNumber+this.count-1}get toLineNumberPostEdit(){return this.fromLineNumberPostEdit+this.count-1}constructor(e,t,i){this.changeType=4,this.fromLineNumber=e,this.fromLineNumberPostEdit=t,this.count=i}},O3=class{constructor(){this.changeType=5}},jC=class o{constructor(e,t,i,n){this.changes=e,this.versionId=t,this.isUndoing=i,this.isRedoing=n,this.resultingSelection=null}containsEvent(e){for(let t=0,i=this.changes.length;tZ.options),Y=O.map(Z=>Z.column-1);return new gp(Y,z,[H.length],[],0)}else return null}if(s===-1){let D=[];for(let O=0,P=t.length;Oc?(H=0,z=0):Y=c-se}let Z=P.substr(H),te=r3e(Z,z,n,Y,g,u);p[D]=H,_[D]=z,b[D]=Z,v[D]=te[0],w[D]=te[1]}let C=g.build(),y=o3e?.createHTML(C)??C;f.innerHTML=y,f.style.position="absolute",f.style.top="10000px",a==="keepAll"?(f.style.wordBreak="keep-all",f.style.overflowWrap="anywhere"):(f.style.wordBreak="inherit",f.style.overflowWrap="break-word"),o.document.body.appendChild(f);let k=document.createRange(),I=Array.prototype.slice.call(f.children,0),E=[];for(let D=0;DBe.options),he=ce.map(Be=>Be.column-1)):(se=null,he=null),E[D]=new gp(he,se,H,te,Y)}return f.remove(),E}function r3e(o,e,t,i,n,s){if(s!==0){let u=String(s);n.appendString('
');let r=o.length,a=e,l=0,c=[],d=[],h=0");for(let u=0;u"),c[u]=l,d[u]=a;let f=h;h=u+1"),c[o.length]=l,d[o.length]=a,n.appendString("
"),[c,d]}function a3e(o,e,t,i){if(t.length<=1)return null;let n=Array.prototype.slice.call(e.children,0),s=[];try{iQ(o,n,i,0,null,t.length-1,null,s)}catch(r){return console.error(r),null}return s.length===0?null:(s.push(t.length),s)}function iQ(o,e,t,i,n,s,r,a){if(i===s||(n=n||tQ(o,e,t[i],t[i+1]),r=r||tQ(o,e,t[s],t[s+1]),Math.abs(n[0].top-r[0].top)<=.1))return;if(i+1===s){a.push(s);return}let l=i+(s-i)/2|0,c=tQ(o,e,t[l],t[l+1]);iQ(o,e,t,i,n,l,c,a),iQ(o,e,t,l,c,s,r,a)}function tQ(o,e,t,i){return o.setStart(e[t/16384|0].firstChild,t%16384),o.setEnd(e[i/16384|0].firstChild,i%16384),o.getClientRects()}var o3e,P3,Rye=x(()=>{Nu();He();Rt();dc();Iu();eQ();KC();o3e=Ur("domLineBreaksComputer",{createHTML:o=>o}),P3=class o{static create(e){return new o(new WeakRef(e))}constructor(e){this.targetWindow=e}createLineBreaksComputer(e,t,i,n,s,r,a){let l=[];return{addRequest:(c,d)=>{l.push(c)},finalize:()=>s3e(_h(this.targetWindow.deref()),e,l,t,i,n,s,r)}}}});var F3,Aye=x(()=>{re();Ae();W();F3=class extends T{constructor(){super(),this._editor=null,this._instantiationService=null,this._instances=this._register(new vh),this._pending=new Map,this._finishedInstantiation=[],this._finishedInstantiation[0]=!1,this._finishedInstantiation[1]=!1,this._finishedInstantiation[2]=!1,this._finishedInstantiation[3]=!1}initialize(e,t,i){this._editor=e,this._instantiationService=i;for(let n of t){if(this._pending.has(n.id)){De(new Error(`Cannot have two contributions with the same id ${n.id}`));continue}this._pending.set(n.id,n)}this._instantiateSome(0),this._register(Ww(we(this._editor.getDomNode()),()=>{this._instantiateSome(1)})),this._register(Ww(we(this._editor.getDomNode()),()=>{this._instantiateSome(2)})),this._register(Ww(we(this._editor.getDomNode()),()=>{this._instantiateSome(3)},5e3))}saveViewState(){let e={};for(let[t,i]of this._instances)typeof i.saveViewState=="function"&&(e[t]=i.saveViewState());return e}restoreViewState(e){for(let[t,i]of this._instances)typeof i.restoreViewState=="function"&&i.restoreViewState(e[t])}get(e){return this._instantiateById(e),this._instances.get(e)||null}onBeforeInteractionEvent(){this._instantiateSome(2)}onAfterModelAttached(){return Ww(we(this._editor?.getDomNode()),()=>{this._instantiateSome(1)},50)}_instantiateSome(e){if(this._finishedInstantiation[e])return;this._finishedInstantiation[e]=!0;let t=this._findPendingContributionsByInstantiation(e);for(let i of t)this._instantiateById(i.id)}_findPendingContributionsByInstantiation(e){let t=[];for(let[,i]of this._pending)i.instantiation===e&&t.push(i);return t}_instantiateById(e){let t=this._pending.get(e);if(t){if(this._pending.delete(e),!this._instantiationService||!this._editor)throw new Error("Cannot instantiate contributions before being initialized!");try{let i=this._instantiationService.createInstance(t.ctor,this._editor);this._instances.set(t.id,i),typeof i.restoreViewState=="function"&&t.instantiation!==0&&console.warn(`Editor contribution '${t.id}' should be eager instantiated because it uses saveViewState / restoreViewState.`)}catch(i){De(i)}}}}});var i0,nQ=x(()=>{i0=class{constructor(e,t,i,n,s,r,a){this.id=e,this.label=t,this.alias=i,this.metadata=n,this._precondition=s,this._run=r,this._contextKeyService=a}isSupported(){return this._contextKeyService.contextMatchesRules(this._precondition)}run(e){return this.isSupported()?this._run(e):Promise.resolve(void 0)}}});function Oye(o,e){let t=new Map;for(let i of o){let n=e(i),s=t.get(n);s||(s=[],t.set(n,s)),s.push(i)}return t}function Pye(o,e){let t=[],i=[];for(let n of o)e.has(n)||t.push(n);for(let n of e)o.has(n)||i.push(n);return{removed:t,added:i}}function B3(o,e){let t=new Set;for(let i of e)o.has(i)&&t.add(i);return t}var Mye,OT,n0=x(()=>{OT=class{static{Mye=Symbol.toStringTag}constructor(e,t){this.toKey=t,this._map=new Map,this[Mye]="SetWithKey";for(let i of e)this.add(i)}get size(){return this._map.size}add(e){let t=this.toKey(e);return this._map.set(t,e),this}delete(e){return this._map.delete(this.toKey(e))}has(e){return this._map.has(this.toKey(e))}*entries(){for(let e of this._map.values())yield[e,e]}keys(){return this.values()}*values(){for(let e of this._map.values())yield e}clear(){this._map.clear()}forEach(e,t){this._map.forEach(i=>e.call(t,i,i,this))}[Symbol.iterator](){return this.values()}}});var o0,PT,W3,Vb,H3=x(()=>{Ie();o0=Ne("undoRedoService"),PT=class{constructor(e,t){this.resource=e,this.elements=t}},W3=class o{static{this._ID=0}constructor(){this.id=o._ID++,this.order=1}nextOrder(){return this.id===0?0:this.order++}static{this.None=new o}},Vb=class o{static{this._ID=0}constructor(){this.id=o._ID++,this.order=1}nextOrder(){return this.id===0?0:this.order++}static{this.None=new o}}});function vc(o){let e=0,t=0,i=0,n=0;for(let s=0,r=o.length;s{});function Hl(o){return new FT(o,l3e)}function V3(o){return o?{$extensionId:o.extensionId,$extensionVersion:o.extensionVersion,$providerId:o.providerId}:{}}function Fye(o){if(o!==void 0)return o.replaceAll("/","|")}var l3e,FT,fo,s0,Bye,Xd=x(()=>{Db();fc();l3e=Symbol("TextModelEditSource"),FT=class{constructor(e,t){this.metadata=e}toString(){return`${this.metadata.source}`}getType(){let e=this.metadata;switch(e.source){case"cursor":return e.kind;case"inlineCompletionAccept":return e.source+(e.$nes?":nes":"");case"unknown":return e.name||"unknown";default:return e.source}}toKey(e,t={}){let i=this.metadata;return Object.entries(i).filter(([s,r])=>{let a=t[s];return a!==void 0?a:(s.match(/\$/g)||[]).length<=e&&r!==void 0&&r!==null&&r!==""}).map(([s,r])=>`${s}:${r}`).join("-")}};fo={unknown(o){return Hl({source:"unknown",name:o.name})},rename:(o,e)=>Hl({source:"rename",$$$oldName:o,$$$newName:e}),chatApplyEdits(o){return Hl({source:"Chat.applyEdits",$modelId:Fye(o.modelId),$extensionId:o.extensionId?.extensionId,$extensionVersion:o.extensionId?.version,$$languageId:o.languageId,$$sessionId:o.sessionId,$$requestId:o.requestId,$$mode:o.mode,$$codeBlockSuggestionId:o.codeBlockSuggestionId})},chatUndoEdits:()=>Hl({source:"Chat.undoEdits"}),chatReset:()=>Hl({source:"Chat.reset"}),inlineCompletionAccept(o){return Hl({source:"inlineCompletionAccept",$nes:o.nes,...V3(o.providerId),$$correlationId:o.correlationId,$$requestUuid:o.requestUuid,$$languageId:o.languageId})},inlineCompletionPartialAccept(o){return Hl({source:"inlineCompletionPartialAccept",type:o.type,$nes:o.nes,...V3(o.providerId),$$correlationId:o.correlationId,$$requestUuid:o.requestUuid,$$languageId:o.languageId})},inlineChatApplyEdit(o){return Hl({source:"inlineChat.applyEdits",$modelId:Fye(o.modelId),$extensionId:o.extensionId?.extensionId,$extensionVersion:o.extensionId?.version,$$sessionId:o.sessionId,$$requestId:o.requestId,$$languageId:o.languageId})},reloadFromDisk:()=>Hl({source:"reloadFromDisk"}),cursor(o){return Hl({source:"cursor",kind:o.kind,detailedSource:o.detailedSource})},setValue:()=>Hl({source:"setValue"}),eolChange:()=>Hl({source:"eolChange"}),applyEdits:()=>Hl({source:"applyEdits"}),snippet:()=>Hl({source:"snippet"}),suggest:o=>Hl({source:"suggest",...V3(o.providerId)}),codeAction:o=>Hl({source:"codeAction",$kind:o.kind,...V3(o.providerId)})};s0=class o{static fromText(e){let t=fn.ofText(e).lineCount,i=e.length;return new o(t,0,i,0)}static tryCreate(e,t,i,n){if(!(e===void 0||t===void 0||i===void 0||n===void 0))return new o(e,t,i,n)}constructor(e,t,i,n){this.linesAdded=e,this.linesRemoved=t,this.charsAdded=i,this.charsRemoved=n}};(function(o){function e(t){let i=t?t("sgt"):r4("sgt");return i}o.newId=e})(Bye||(Bye={}))});var BT,oQ,z3,Wye=x(()=>{BT=class{constructor(e,t,i,n){this.range=e,this.nestingLevel=t,this.nestingLevelOfEqualBracketType=i,this.isInvalid=n}},oQ=class{constructor(e,t,i,n,s,r){this.range=e,this.openingBracketRange=t,this.closingBracketRange=i,this.nestingLevel=n,this.nestingLevelOfEqualBracketType=s,this.bracketPairNode=r}get openingBracketInfo(){return this.bracketPairNode.openingBracket.bracketInfo}},z3=class extends oQ{constructor(e,t,i,n,s,r,a){super(e,t,i,n,s,r),this.minVisibleColumnIndentation=a}}});function Hye(o,e,t,i){return o!==t?go(t-o,i):go(0,i-e)}function r0(o){return o===0}function go(o,e){return o*Xc+e}function tl(o){let e=o,t=Math.floor(e/Xc),i=e-t*Xc;return new fn(t,i)}function Vye(o){return Math.floor(o/Xc)}function bn(o,e){let t=o+e;return e>=Xc&&(t=t-o%Xc),t}function zye(o,e){return o.reduce((t,i)=>bn(t,e(i)),Vs)}function sQ(o,e){return o===e}function GC(o,e){let t=o,i=e;if(i-t<=0)return Vs;let s=Math.floor(t/Xc),r=Math.floor(i/Xc),a=i-r*Xc;if(s===r){let l=t-s*Xc;return go(0,a-l)}else return go(r-s,a)}function mp(o,e){return o=e}function $b(o){return go(o.lineNumber-1,o.column-1)}function qb(o,e){let t=o,i=Math.floor(t/Xc),n=t-i*Xc,s=e,r=Math.floor(s/Xc),a=s-r*Xc;return new S(i+1,n+1,r+1,a+1)}function Uye(o){let e=Eo(o);return go(e.length-1,e[e.length-1].length)}var Vs,Xc,tg=x(()=>{He();ue();fc();Vs=0;Xc=2**26});var Uh,U3,rQ,WT=x(()=>{ue();tg();Uh=class o{static fromModelContentChanges(e){return e.map(i=>{let n=S.lift(i.range);return new o($b(n.getStartPosition()),$b(n.getEndPosition()),Uye(i.text))}).reverse()}constructor(e,t,i){this.startOffset=e,this.endOffset=t,this.newLength=i}toString(){return`[${tl(this.startOffset)}...${tl(this.endOffset)}) -> ${tl(this.newLength)}`}},U3=class{constructor(e){this.nextEditIdx=0,this.deltaOldToNewLineCount=0,this.deltaOldToNewColumnCount=0,this.deltaLineIdxInOld=-1,this.edits=e.map(t=>rQ.from(t))}getOffsetBeforeChange(e){return this.adjustNextEdit(e),this.translateCurToOld(e)}getDistanceToNextChange(e){this.adjustNextEdit(e);let t=this.edits[this.nextEditIdx],i=t?this.translateOldToCur(t.offsetObj):null;return i===null?null:GC(e,i)}translateOldToCur(e){return e.lineCount===this.deltaLineIdxInOld?go(e.lineCount+this.deltaOldToNewLineCount,e.columnCount+this.deltaOldToNewColumnCount):go(e.lineCount+this.deltaOldToNewLineCount,e.columnCount)}translateCurToOld(e){let t=tl(e);return t.lineCount-this.deltaOldToNewLineCount===this.deltaLineIdxInOld?go(t.lineCount-this.deltaOldToNewLineCount,t.columnCount-this.deltaOldToNewColumnCount):go(t.lineCount-this.deltaOldToNewLineCount,t.columnCount)}adjustNextEdit(e){for(;this.nextEditIdx{$3=[],va=class o{static{this.cache=new Array(129)}static create(e,t){if(e<=128&&t.length===0){let i=o.cache[e];return i||(i=new o(e,t),o.cache[e]=i),i}return new o(e,t)}static{this.empty=o.create(0,$3)}static getEmpty(){return this.empty}constructor(e,t){this.items=e,this.additionalItems=t}add(e,t){let i=t.getKey(e),n=i>>5;if(n===0){let r=1<{Ae();Fl();tg();YC();HT=class{get length(){return this._length}constructor(e){this._length=e}},VT=class o extends HT{static create(e,t,i){let n=e.length;return t&&(n=bn(n,t.length)),i&&(n=bn(n,i.length)),new o(n,e,t,i,t?t.missingOpeningBracketIds:va.getEmpty())}get kind(){return 2}get listHeight(){return 0}get childrenLength(){return 3}getChild(e){switch(e){case 0:return this.openingBracket;case 1:return this.child;case 2:return this.closingBracket}throw new Error("Invalid child index")}get children(){let e=[];return e.push(this.openingBracket),this.child&&e.push(this.child),this.closingBracket&&e.push(this.closingBracket),e}constructor(e,t,i,n,s){super(e),this.openingBracket=t,this.child=i,this.closingBracket=n,this.missingOpeningBracketIds=s}canBeReused(e){return!(this.closingBracket===null||e.intersects(this.missingOpeningBracketIds))}deepClone(){return new o(this.length,this.openingBracket.deepClone(),this.child&&this.child.deepClone(),this.closingBracket&&this.closingBracket.deepClone(),this.missingOpeningBracketIds)}computeMinIndentation(e,t){return this.child?this.child.computeMinIndentation(bn(e,this.openingBracket.length),t):Number.MAX_SAFE_INTEGER}},Qc=class extends HT{static create23(e,t,i,n=!1){let s=e.length,r=e.missingOpeningBracketIds;if(e.listHeight!==t.listHeight)throw new Error("Invalid list heights");if(s=bn(s,t.length),r=r.merge(t.missingOpeningBracketIds),i){if(e.listHeight!==i.listHeight)throw new Error("Invalid list heights");s=bn(s,i.length),r=r.merge(i.missingOpeningBracketIds)}return n?new lQ(s,e.listHeight+1,e,t,i,r):new zT(s,e.listHeight+1,e,t,i,r)}static getEmpty(){return new cQ(Vs,0,[],va.getEmpty())}get kind(){return 4}get missingOpeningBracketIds(){return this._missingOpeningBracketIds}constructor(e,t,i){super(e),this.listHeight=t,this._missingOpeningBracketIds=i,this.cachedMinIndentation=-1}throwIfImmutable(){}makeLastElementMutable(){this.throwIfImmutable();let e=this.childrenLength;if(e===0)return;let t=this.getChild(e-1),i=t.kind===4?t.toMutable():t;return t!==i&&this.setChild(e-1,i),i}makeFirstElementMutable(){if(this.throwIfImmutable(),this.childrenLength===0)return;let t=this.getChild(0),i=t.kind===4?t.toMutable():t;return t!==i&&this.setChild(0,i),i}canBeReused(e){if(e.intersects(this.missingOpeningBracketIds)||this.childrenLength===0)return!1;let t=this;for(;t.kind===4;){let i=t.childrenLength;if(i===0)throw new xe;t=t.getChild(i-1)}return t.canBeReused(e)}handleChildrenChanged(){this.throwIfImmutable();let e=this.childrenLength,t=this.getChild(0).length,i=this.getChild(0).missingOpeningBracketIds;for(let n=1;n{Ae();rC();qT();tg();YC();$u=class{constructor(e,t,i,n,s){this.length=e,this.kind=t,this.bracketId=i,this.bracketIds=n,this.astNode=s}},c0=class{constructor(e,t){this.textModel=e,this.bracketTokens=t,this.reader=new dQ(this.textModel,this.bracketTokens),this._offset=Vs,this.didPeek=!1,this.peeked=null,this.textBufferLineCount=e.getLineCount(),this.textBufferLastLineLength=e.getLineLength(this.textBufferLineCount)}get offset(){return this._offset}get length(){return go(this.textBufferLineCount-1,this.textBufferLastLineLength)}skip(e){this.didPeek=!1,this._offset=bn(this._offset,e);let t=tl(this._offset);this.reader.setPosition(t.lineCount,t.columnCount)}read(){let e;return this.peeked?(this.didPeek=!1,e=this.peeked):e=this.reader.read(),e&&(this._offset=bn(this._offset,e.length)),e}peek(){return this.didPeek||(this.peeked=this.reader.read(),this.didPeek=!0),this.peeked}},dQ=class{constructor(e,t){this.textModel=e,this.bracketTokens=t,this.lineIdx=0,this.line=null,this.lineCharOffset=0,this.lineTokens=null,this.lineTokenOffset=0,this.peekedToken=null,this.textBufferLineCount=e.getLineCount(),this.textBufferLastLineLength=e.getLineLength(this.textBufferLineCount)}setPosition(e,t){e===this.lineIdx?(this.lineCharOffset=t,this.line!==null&&(this.lineTokenOffset=this.lineCharOffset===0?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset))):(this.lineIdx=e,this.lineCharOffset=t,this.line=null),this.peekedToken=null}read(){if(this.peekedToken){let s=this.peekedToken;return this.peekedToken=null,this.lineCharOffset+=s.length,s}if(this.lineIdx>this.textBufferLineCount-1||this.lineIdx===this.textBufferLineCount-1&&this.lineCharOffset>=this.textBufferLastLineLength)return null;this.line===null&&(this.lineTokens=this.textModel.tokenization.getLineTokens(this.lineIdx+1),this.line=this.lineTokens.getLineContent(),this.lineTokenOffset=this.lineCharOffset===0?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset));let e=this.lineIdx,t=this.lineCharOffset,i=0;for(;;){let s=this.lineTokens,r=s.getCount(),a=null;if(this.lineTokenOffset1e3))break;if(i>1500)break}let n=Hye(e,t,this.lineIdx,this.lineCharOffset);return new $u(n,0,-1,va.getEmpty(),new Uu(n))}},K3=class{constructor(e,t){this.text=e,this._offset=Vs,this.idx=0;let i=t.getRegExpStr(),n=i?new RegExp(i+`| +`,"gi"):null,s=[],r,a=0,l=0,c=0,d=0,h=[];for(let g=0;g<60;g++)h.push(new $u(go(0,g),0,-1,va.getEmpty(),new Uu(go(0,g))));let u=[];for(let g=0;g<60;g++)u.push(new $u(go(1,g),0,-1,va.getEmpty(),new Uu(go(1,g))));if(n)for(n.lastIndex=0;(r=n.exec(e))!==null;){let g=r.index,p=r[0];if(p===` +`)a++,l=g+1;else{if(c!==g){let _;if(d===a){let b=g-c;if(b{He();qT();tg();YC();G3();hQ=class o{static createFromLanguage(e,t){function i(s){return t.getKey(`${s.languageId}:::${s.bracketText}`)}let n=new Map;for(let s of e.bracketsNew.openingBrackets){let r=go(0,s.bracketText.length),a=i(s),l=va.getEmpty().add(a,aQ);n.set(s.bracketText,new $u(r,1,a,l,$T.create(r,s,l)))}for(let s of e.bracketsNew.closingBrackets){let r=go(0,s.bracketText.length),a=va.getEmpty(),l=s.getOpeningBrackets();for(let c of l)a=a.add(i(c),aQ);n.set(s.bracketText,new $u(r,2,i(l[0]),a,$T.create(r,s,a)))}return new o(n)}constructor(e){this.map=e,this.hasRegExp=!1,this._regExpGlobal=null}getRegExpStr(){if(this.isEmpty)return null;{let e=[...this.map.keys()];return e.sort(),e.reverse(),e.map(t=>h3e(t)).join("|")}}get regExpGlobal(){if(!this.hasRegExp){let e=this.getRegExpStr();this._regExpGlobal=e?new RegExp(e,"gi"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(e){return this.map.get(e.toLowerCase())}findClosingTokenText(e){for(let[t,i]of this.map)if(i.kind===2&&i.bracketIds.intersects(e))return t}get isEmpty(){return this.map.size===0}};d0=class{constructor(e,t){this.denseKeyProvider=e,this.getLanguageConfiguration=t,this.languageIdToBracketTokens=new Map}didLanguageChange(e){return this.languageIdToBracketTokens.has(e)}getSingleLanguageBracketTokens(e){let t=this.languageIdToBracketTokens.get(e);return t||(t=hQ.createFromLanguage(this.getLanguageConfiguration(e),this.denseKeyProvider),this.languageIdToBracketTokens.set(e,t)),t}}});function qye(o){if(o.length===0)return null;if(o.length===1)return o[0];let e=0;function t(){if(e>=o.length)return null;let r=e,a=o[r].listHeight;for(e++;e=2?gQ(r===0&&e===o.length?o:o.slice(r,e),!1):o[r]}let i=t(),n=t();if(!n)return i;for(let r=t();r;r=t())$ye(i,n)<=$ye(n,r)?(i=fQ(i,n),n=r):n=fQ(n,r);return fQ(i,n)}function gQ(o,e=!1){if(o.length===0)return null;if(o.length===1)return o[0];let t=o.length;for(;t>3;){let i=t>>1;for(let n=0;n=3?o[2]:null,e)}function $ye(o,e){return Math.abs(o.listHeight-e.listHeight)}function fQ(o,e){return o.listHeight===e.listHeight?Qc.create23(o,e,null,!1):o.listHeight>e.listHeight?u3e(o,e):f3e(e,o)}function u3e(o,e){o=o.toMutable();let t=o,i=[],n;for(;;){if(e.listHeight===t.listHeight){n=e;break}if(t.kind!==4)throw new Error("unexpected");i.push(t),t=t.makeLastElementMutable()}for(let s=i.length-1;s>=0;s--){let r=i[s];n?r.childrenLength>=3?n=Qc.create23(r.unappendChild(),n,null,!1):(r.appendChildOfSameHeight(n),n=void 0):r.handleChildrenChanged()}return n?Qc.create23(o,n,null,!1):o}function f3e(o,e){o=o.toMutable();let t=o,i=[];for(;e.listHeight!==t.listHeight;){if(t.kind!==4)throw new Error("unexpected");i.push(t),t=t.makeFirstElementMutable()}let n=e;for(let s=i.length-1;s>=0;s--){let r=i[s];n?r.childrenLength>=3?n=Qc.create23(n,r.unprependChild(),null,!1):(r.prependChildOfSameHeight(n),n=void 0):r.handleChildrenChanged()}return n?Qc.create23(n,o,null,!1):o}var jye=x(()=>{qT()});function mQ(o,e=-1){for(;;){if(e++,e>=o.childrenLength)return-1;if(o.getChild(e))return e}}function jT(o){return o.length>0?o[o.length-1]:void 0}var Y3,Kye=x(()=>{tg();Y3=class{constructor(e){this.lastOffset=Vs,this.nextNodes=[e],this.offsets=[Vs],this.idxs=[]}readLongestNodeAt(e,t){if(mp(e,this.lastOffset))throw new Error("Invalid offset");for(this.lastOffset=e;;){let i=jT(this.nextNodes);if(!i)return;let n=jT(this.offsets);if(mp(e,n))return;if(mp(n,e))if(bn(n,i.length)<=e)this.nextNodeAfterCurrent();else{let s=mQ(i);s!==-1?(this.nextNodes.push(i.getChild(s)),this.offsets.push(n),this.idxs.push(s)):this.nextNodeAfterCurrent()}else{if(t(i))return this.nextNodeAfterCurrent(),i;{let s=mQ(i);if(s===-1){this.nextNodeAfterCurrent();return}else this.nextNodes.push(i.getChild(s)),this.offsets.push(n),this.idxs.push(s)}}}}nextNodeAfterCurrent(){for(;;){let e=jT(this.offsets),t=jT(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),this.idxs.length===0)break;let i=jT(this.nextNodes),n=mQ(i,this.idxs[this.idxs.length-1]);if(n!==-1){this.nextNodes.push(i.getChild(n)),this.offsets.push(bn(e,t.length)),this.idxs[this.idxs.length-1]=n;break}else this.idxs.pop()}}}});function KT(o,e,t,i){return new pQ(o,e,t,i).parseDocument()}var pQ,_Q=x(()=>{qT();WT();YC();tg();jye();Kye();pQ=class{constructor(e,t,i,n){if(this.tokenizer=e,this.createImmutableLists=n,this._itemsConstructed=0,this._itemsFromCache=0,i&&n)throw new Error("Not supported");this.oldNodeReader=i?new Y3(i):void 0,this.positionMapper=new U3(t)}parseDocument(){this._itemsConstructed=0,this._itemsFromCache=0;let e=this.parseList(va.getEmpty(),0);return e||(e=Qc.getEmpty()),e}parseList(e,t){let i=[];for(;;){let s=this.tryReadChildFromCache(e);if(!s){let r=this.tokenizer.peek();if(!r||r.kind===2&&r.bracketIds.intersects(e))break;s=this.parseChild(e,t+1)}s.kind===4&&s.childrenLength===0||i.push(s)}return this.oldNodeReader?qye(i):gQ(i,this.createImmutableLists)}tryReadChildFromCache(e){if(this.oldNodeReader){let t=this.positionMapper.getDistanceToNextChange(this.tokenizer.offset);if(t===null||!r0(t)){let i=this.oldNodeReader.readLongestNodeAt(this.positionMapper.getOffsetBeforeChange(this.tokenizer.offset),n=>t!==null&&!mp(n.length,t)?!1:n.canBeReused(e));if(i)return this._itemsFromCache++,this.tokenizer.skip(i.length),i}}}parseChild(e,t){this._itemsConstructed++;let i=this.tokenizer.read();switch(i.kind){case 2:return new j3(i.bracketIds,i.length);case 0:return i.astNode;case 1:{if(t>300)return new Uu(i.length);let n=e.merge(i.bracketIds),s=this.parseList(n,t+1),r=this.tokenizer.peek();return r&&r.kind===2&&(r.bracketId===i.bracketId||r.bracketIds.intersects(i.bracketIds))?(this.tokenizer.read(),VT.create(i.astNode,s,r.astNode)):VT.create(i.astNode,s,null)}default:throw new Error("unexpected")}}}});function h0(o,e){if(o.length===0)return e;if(e.length===0)return o;let t=new Ld(Gye(o)),i=Gye(e);i.push({modified:!1,lengthBefore:void 0,lengthAfter:void 0});let n=t.dequeue();function s(c){if(c===void 0){let h=t.takeWhile(u=>!0)||[];return n&&h.unshift(n),h}let d=[];for(;n&&!r0(c);){let[h,u]=n.splitAt(c);d.push(h),c=GC(h.lengthAfter,c),n=u??t.dequeue()}return r0(c)||d.push(new GT(!1,c,c)),d}let r=[];function a(c,d,h){if(r.length>0&&sQ(r[r.length-1].endOffset,c)){let u=r[r.length-1];r[r.length-1]=new Uh(u.startOffset,d,bn(u.newLength,h))}else r.push({startOffset:c,endOffset:d,newLength:h})}let l=Vs;for(let c of i){let d=s(c.lengthBefore);if(c.modified){let h=zye(d,f=>f.lengthBefore),u=bn(l,h);a(l,u,c.lengthAfter),l=u}else for(let h of d){let u=l;l=bn(l,h.lengthBefore),h.modified&&a(u,l,h.lengthAfter)}}return r}function Gye(o){let e=[],t=Vs;for(let i of o){let n=GC(t,i.startOffset);r0(n)||e.push(new GT(!1,n,n));let s=GC(i.startOffset,i.endOffset);e.push(new GT(!0,s,i.newLength)),t=i.endOffset}return e}var GT,bQ=x(()=>{qe();WT();tg();GT=class o{constructor(e,t,i){this.modified=e,this.lengthBefore=t,this.lengthAfter=i}splitAt(e){let t=GC(e,this.lengthAfter);return sQ(t,Vs)?[this,void 0]:this.modified?[new o(this.modified,this.lengthBefore,e),new o(this.modified,Vs,t)]:[new o(this.modified,e,e),new o(this.modified,t,t)]}toString(){return`${this.modified?"M":"U"}:${tl(this.lengthBefore)} -> ${tl(this.lengthAfter)}`}}});function Yye(o,e,t,i){if(o.kind===4||o.kind===2){let n=[];for(let s of o.children)t=bn(e,s.length),n.push({nodeOffsetStart:e,nodeOffsetEnd:t}),e=t;for(let s=n.length-1;s>=0;s--){let{nodeOffsetStart:r,nodeOffsetEnd:a}=n[s];if(mp(r,i)){let l=Yye(o.children[s],r,a,i);if(l)return l}}return null}else{if(o.kind===3)return null;if(o.kind===1){let n=qb(e,t);return{bracketInfo:o.bracketInfo,range:n}}}return null}function Zye(o,e,t,i){if(o.kind===4||o.kind===2){for(let n of o.children){if(t=bn(e,n.length),mp(i,t)){let s=Zye(n,e,t,i);if(s)return s}e=t}return null}else{if(o.kind===3)return null;if(o.kind===1){let n=qb(e,t);return{bracketInfo:o.bracketInfo,range:n}}}return null}function vQ(o,e,t,i,n,s,r,a,l,c,d=!1){if(r>200)return!0;e:for(;;)switch(o.kind){case 4:{let h=o.childrenLength;for(let u=0;u200)return!0;let l=!0;if(o.kind===2){let c=0;if(a){let u=a.get(o.openingBracket.text);u===void 0&&(u=0),c=u,u++,a.set(o.openingBracket.text,u)}let d=bn(e,o.openingBracket.length),h=-1;if(s.includeMinIndentation&&(h=o.computeMinIndentation(e,s.textModel)),l=s.push(new z3(qb(e,t),qb(e,d),o.closingBracket?qb(bn(d,o.child?.length||Vs),t):void 0,r,c,o,h)),e=d,l&&o.child){let u=o.child;if(t=bn(e,u.length),Ub(e,n)&&a0(t,i)&&(l=CQ(u,e,t,i,n,s,r+1,a),!l))return!1}a?.set(o.openingBracket.text,c)}else{let c=e;for(let d of o.children){let h=c;if(c=bn(c,d.length),Ub(h,n)&&Ub(i,c)&&(l=CQ(d,h,c,i,n,s,r,a),!l))return!1}}return l}var Z3,wQ,Xye=x(()=>{ae();W();Wye();WT();uQ();tg();_Q();YC();G3();qe();bQ();Z3=class extends T{didLanguageChange(e){return this.brackets.didLanguageChange(e)}constructor(e,t){if(super(),this.textModel=e,this.getLanguageConfiguration=t,this.didChangeEmitter=this._register(new N),this.denseKeyProvider=new l0,this.brackets=new d0(this.denseKeyProvider,this.getLanguageConfiguration),this.onDidChange=this.didChangeEmitter.event,this.queuedTextEditsForInitialAstWithoutTokens=[],this.queuedTextEdits=[],e.tokenization.hasTokens)e.tokenization.backgroundTokenizationState===2?(this.initialAstWithoutTokens=void 0,this.astWithTokens=this.parseDocumentFromTextBuffer([],void 0,!1)):(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer([],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens);else{let i=this.brackets.getSingleLanguageBracketTokens(this.textModel.getLanguageId()),n=new K3(this.textModel.getValue(),i);this.initialAstWithoutTokens=KT(n,[],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens}}handleDidChangeBackgroundTokenizationState(){if(this.textModel.tokenization.backgroundTokenizationState===2){let e=this.initialAstWithoutTokens===void 0;this.initialAstWithoutTokens=void 0,e||this.didChangeEmitter.fire()}}handleDidChangeTokens({ranges:e}){let t=e.map(i=>new Uh(go(i.fromLineNumber-1,0),go(i.toLineNumber,0),go(i.toLineNumber-i.fromLineNumber+1,0)));this.handleEdits(t,!0),this.initialAstWithoutTokens||this.didChangeEmitter.fire()}handleContentChanged(e){let t=Uh.fromModelContentChanges(e.changes);this.handleEdits(t,!1)}handleEdits(e,t){let i=h0(this.queuedTextEdits,e);this.queuedTextEdits=i,this.initialAstWithoutTokens&&!t&&(this.queuedTextEditsForInitialAstWithoutTokens=h0(this.queuedTextEditsForInitialAstWithoutTokens,e))}flushQueue(){this.queuedTextEdits.length>0&&(this.astWithTokens=this.parseDocumentFromTextBuffer(this.queuedTextEdits,this.astWithTokens,!1),this.queuedTextEdits=[]),this.queuedTextEditsForInitialAstWithoutTokens.length>0&&(this.initialAstWithoutTokens&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer(this.queuedTextEditsForInitialAstWithoutTokens,this.initialAstWithoutTokens,!1)),this.queuedTextEditsForInitialAstWithoutTokens=[])}parseDocumentFromTextBuffer(e,t,i){let n=t,s=new c0(this.textModel,this.brackets);return KT(s,e,n,i)}getBracketsInRange(e,t){this.flushQueue();let i=go(e.startLineNumber-1,e.startColumn-1),n=go(e.endLineNumber-1,e.endColumn-1);return new gm(s=>{let r=this.initialAstWithoutTokens||this.astWithTokens;vQ(r,Vs,r.length,i,n,s,0,0,new Map,t)})}getBracketPairsInRange(e,t){this.flushQueue();let i=$b(e.getStartPosition()),n=$b(e.getEndPosition());return new gm(s=>{let r=this.initialAstWithoutTokens||this.astWithTokens,a=new wQ(s,t,this.textModel);CQ(r,Vs,r.length,i,n,a,0,new Map)})}getFirstBracketAfter(e){this.flushQueue();let t=this.initialAstWithoutTokens||this.astWithTokens;return Zye(t,Vs,t.length,$b(e))}getFirstBracketBefore(e){this.flushQueue();let t=this.initialAstWithoutTokens||this.astWithTokens;return Yye(t,Vs,t.length,$b(e))}};wQ=class{constructor(e,t,i){this.push=e,this.includeMinIndentation=t,this.textModel=i}}});function g3e(o,e){return{object:o,dispose:()=>e?.dispose()}}function yQ(o){if(typeof o>"u")return()=>!0;{let e=Date.now();return()=>Date.now()-e<=o}}function X3(o){return o instanceof pp?null:o}var Q3,pp,Qye=x(()=>{qe();ae();W();ue();Nx();kE();Xye();Q3=class extends T{get canBuildAST(){return this.textModel.getValueLength()<=5e6}constructor(e,t){super(),this.textModel=e,this.languageConfigurationService=t,this.bracketPairsTree=this._register(new Qe),this.onDidChangeEmitter=this._register(new N),this.onDidChange=this.onDidChangeEmitter.event,this.bracketsRequested=!1}handleLanguageConfigurationServiceChange(e){(!e.languageId||this.bracketPairsTree.value?.object.didLanguageChange(e.languageId))&&(this.bracketPairsTree.clear(),this.updateBracketPairsTree())}handleDidChangeOptions(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeLanguage(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeContent(e){this.bracketPairsTree.value?.object.handleContentChanged(e)}handleDidChangeBackgroundTokenizationState(){this.bracketPairsTree.value?.object.handleDidChangeBackgroundTokenizationState()}handleDidChangeTokens(e){this.bracketPairsTree.value?.object.handleDidChangeTokens(e)}updateBracketPairsTree(){if(this.bracketsRequested&&this.canBuildAST){if(!this.bracketPairsTree.value){let e=new F;this.bracketPairsTree.value=g3e(e.add(new Z3(this.textModel,t=>this.languageConfigurationService.getLanguageConfiguration(t))),e),e.add(this.bracketPairsTree.value.object.onDidChange(t=>this.onDidChangeEmitter.fire(t))),this.onDidChangeEmitter.fire()}}else this.bracketPairsTree.value&&(this.bracketPairsTree.clear(),this.onDidChangeEmitter.fire())}getBracketPairsInRange(e){return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getBracketPairsInRange(e,!1)||gm.empty}getBracketPairsInRangeWithMinIndentation(e){return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getBracketPairsInRange(e,!0)||gm.empty}getBracketsInRange(e,t=!1){return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getBracketsInRange(e,t)||gm.empty}findMatchingBracketUp(e,t,i){let n=this.textModel.validatePosition(t),s=this.textModel.getLanguageIdAtPosition(n.lineNumber,n.column);if(this.canBuildAST){let r=this.languageConfigurationService.getLanguageConfiguration(s).bracketsNew.getClosingBracketInfo(e);if(!r)return null;let a=this.getBracketPairsInRange(S.fromPositions(t,t)).findLast(l=>r.closes(l.openingBracketInfo));return a?a.openingBracketRange:null}else{let r=e.toLowerCase(),a=this.languageConfigurationService.getLanguageConfiguration(s).brackets;if(!a)return null;let l=a.textIsBracket[r];return l?X3(this._findMatchingBracketUp(l,n,yQ(i))):null}}matchBracket(e,t){if(this.canBuildAST){let i=this.getBracketPairsInRange(S.fromPositions(e,e)).filter(n=>n.closingBracketRange!==void 0&&(n.openingBracketRange.containsPosition(e)||n.closingBracketRange.containsPosition(e))).findLastMaxBy(Un(n=>n.openingBracketRange.containsPosition(e)?n.openingBracketRange:n.closingBracketRange,S.compareRangesUsingStarts));return i?[i.openingBracketRange,i.closingBracketRange]:null}else{let i=yQ(t);return this._matchBracket(this.textModel.validatePosition(e),i)}}_establishBracketSearchOffsets(e,t,i,n){let s=t.getCount(),r=t.getLanguageId(n),a=Math.max(0,e.column-1-i.maxBracketLength);for(let c=n-1;c>=0;c--){let d=t.getEndOffset(c);if(d<=a)break;if(Ah(t.getStandardTokenType(c))||t.getLanguageId(c)!==r){a=d;break}}let l=Math.min(t.getLineContent().length,e.column-1+i.maxBracketLength);for(let c=n+1;c=l)break;if(Ah(t.getStandardTokenType(c))||t.getLanguageId(c)!==r){l=d;break}}return{searchStartOffset:a,searchEndOffset:l}}_matchBracket(e,t){let i=e.lineNumber,n=this.textModel.tokenization.getLineTokens(i),s=this.textModel.getLineContent(i),r=n.findTokenIndexAtOffset(e.column-1);if(r<0)return null;let a=this.languageConfigurationService.getLanguageConfiguration(n.getLanguageId(r)).brackets;if(a&&!Ah(n.getStandardTokenType(r))){let{searchStartOffset:l,searchEndOffset:c}=this._establishBracketSearchOffsets(e,n,a,r),d=null;for(;;){let h=Rl.findNextBracketInRange(a.forwardRegex,i,s,l,c);if(!h)break;if(h.startColumn<=e.column&&e.column<=h.endColumn){let u=s.substring(h.startColumn-1,h.endColumn-1).toLowerCase(),f=this._matchFoundBracket(h,a.textIsBracket[u],a.textIsOpenBracket[u],t);if(f){if(f instanceof pp)return null;d=f}}l=h.endColumn-1}if(d)return d}if(r>0&&n.getStartOffset(r)===e.column-1){let l=r-1,c=this.languageConfigurationService.getLanguageConfiguration(n.getLanguageId(l)).brackets;if(c&&!Ah(n.getStandardTokenType(l))){let{searchStartOffset:d,searchEndOffset:h}=this._establishBracketSearchOffsets(e,n,c,l),u=Rl.findPrevBracketInRange(c.reversedRegex,i,s,d,h);if(u&&u.startColumn<=e.column&&e.column<=u.endColumn){let f=s.substring(u.startColumn-1,u.endColumn-1).toLowerCase(),g=this._matchFoundBracket(u,c.textIsBracket[f],c.textIsOpenBracket[f],t);if(g)return g instanceof pp?null:g}}}return null}_matchFoundBracket(e,t,i,n){if(!t)return null;let s=i?this._findMatchingBracketDown(t,e.getEndPosition(),n):this._findMatchingBracketUp(t,e.getStartPosition(),n);return s?s instanceof pp?s:[e,s]:null}_findMatchingBracketUp(e,t,i){let n=e.languageId,s=e.reversedRegex,r=-1,a=0,l=(c,d,h,u)=>{for(;;){if(i&&++a%100===0&&!i())return pp.INSTANCE;let f=Rl.findPrevBracketInRange(s,c,d,h,u);if(!f)break;let g=d.substring(f.startColumn-1,f.endColumn-1).toLowerCase();if(e.isOpen(g)?r++:e.isClose(g)&&r--,r===0)return f;u=f.startColumn-1}return null};for(let c=t.lineNumber;c>=1;c--){let d=this.textModel.tokenization.getLineTokens(c),h=d.getCount(),u=this.textModel.getLineContent(c),f=h-1,g=u.length,p=u.length;c===t.lineNumber&&(f=d.findTokenIndexAtOffset(t.column-1),g=t.column-1,p=t.column-1);let _=!0;for(;f>=0;f--){let b=d.getLanguageId(f)===n&&!Ah(d.getStandardTokenType(f));if(b)_?g=d.getStartOffset(f):(g=d.getStartOffset(f),p=d.getEndOffset(f));else if(_&&g!==p){let v=l(c,u,g,p);if(v)return v}_=b}if(_&&g!==p){let b=l(c,u,g,p);if(b)return b}}return null}_findMatchingBracketDown(e,t,i){let n=e.languageId,s=e.forwardRegex,r=1,a=0,l=(d,h,u,f)=>{for(;;){if(i&&++a%100===0&&!i())return pp.INSTANCE;let g=Rl.findNextBracketInRange(s,d,h,u,f);if(!g)break;let p=h.substring(g.startColumn-1,g.endColumn-1).toLowerCase();if(e.isOpen(p)?r++:e.isClose(p)&&r--,r===0)return g;u=g.endColumn-1}return null},c=this.textModel.getLineCount();for(let d=t.lineNumber;d<=c;d++){let h=this.textModel.tokenization.getLineTokens(d),u=h.getCount(),f=this.textModel.getLineContent(d),g=0,p=0,_=0;d===t.lineNumber&&(g=h.findTokenIndexAtOffset(t.column-1),p=t.column-1,_=t.column-1);let b=!0;for(;g=1;r--){let a=this.textModel.tokenization.getLineTokens(r),l=a.getCount(),c=this.textModel.getLineContent(r),d=l-1,h=c.length,u=c.length;if(r===t.lineNumber){d=a.findTokenIndexAtOffset(t.column-1),h=t.column-1,u=t.column-1;let g=a.getLanguageId(d);i!==g&&(i=g,n=this.languageConfigurationService.getLanguageConfiguration(i).brackets,s=this.languageConfigurationService.getLanguageConfiguration(i).bracketsNew)}let f=!0;for(;d>=0;d--){let g=a.getLanguageId(d);if(i!==g){if(n&&s&&f&&h!==u){let _=Rl.findPrevBracketInRange(n.reversedRegex,r,c,h,u);if(_)return this._toFoundBracket(s,_);f=!1}i=g,n=this.languageConfigurationService.getLanguageConfiguration(i).brackets,s=this.languageConfigurationService.getLanguageConfiguration(i).bracketsNew}let p=!!n&&!Ah(a.getStandardTokenType(d));if(p)f?h=a.getStartOffset(d):(h=a.getStartOffset(d),u=a.getEndOffset(d));else if(s&&n&&f&&h!==u){let _=Rl.findPrevBracketInRange(n.reversedRegex,r,c,h,u);if(_)return this._toFoundBracket(s,_)}f=p}if(s&&n&&f&&h!==u){let g=Rl.findPrevBracketInRange(n.reversedRegex,r,c,h,u);if(g)return this._toFoundBracket(s,g)}}return null}findNextBracket(e){let t=this.textModel.validatePosition(e);if(this.canBuildAST)return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getFirstBracketAfter(t)||null;let i=this.textModel.getLineCount(),n=null,s=null,r=null;for(let a=t.lineNumber;a<=i;a++){let l=this.textModel.tokenization.getLineTokens(a),c=l.getCount(),d=this.textModel.getLineContent(a),h=0,u=0,f=0;if(a===t.lineNumber){h=l.findTokenIndexAtOffset(t.column-1),u=t.column-1,f=t.column-1;let p=l.getLanguageId(h);n!==p&&(n=p,s=this.languageConfigurationService.getLanguageConfiguration(n).brackets,r=this.languageConfigurationService.getLanguageConfiguration(n).bracketsNew)}let g=!0;for(;hp.closingBracketRange!==void 0&&p.range.strictContainsRange(f));return g?[g.openingBracketRange,g.closingBracketRange]:null}let n=yQ(t),s=this.textModel.getLineCount(),r=new Map,a=[],l=(f,g)=>{if(!r.has(f)){let p=[];for(let _=0,b=g?g.brackets.length:0;_{for(;;){if(n&&++c%100===0&&!n())return pp.INSTANCE;let v=Rl.findNextBracketInRange(f.forwardRegex,g,p,_,b);if(!v)break;let w=p.substring(v.startColumn-1,v.endColumn-1).toLowerCase(),C=f.textIsBracket[w];if(C&&(C.isOpen(w)?a[C.index]++:C.isClose(w)&&a[C.index]--,a[C.index]===-1))return this._matchFoundBracket(v,C,!1,n);_=v.endColumn-1}return null},h=null,u=null;for(let f=i.lineNumber;f<=s;f++){let g=this.textModel.tokenization.getLineTokens(f),p=g.getCount(),_=this.textModel.getLineContent(f),b=0,v=0,w=0;if(f===i.lineNumber){b=g.findTokenIndexAtOffset(i.column-1),v=i.column-1,w=i.column-1;let y=g.getLanguageId(b);h!==y&&(h=y,u=this.languageConfigurationService.getLanguageConfiguration(h).brackets,l(h,u))}let C=!0;for(;b{ae();W();ue();Wl();Kt();J3=class extends T{constructor(e){super(),this.textModel=e,this.colorProvider=new eB,this.onDidChangeEmitter=this._register(new N),this.onDidChange=this.onDidChangeEmitter.event,this.colorizationOptions=e.getOptions().bracketPairColorizationOptions,this._register(e.bracketPairs.onDidChange(t=>{this.onDidChangeEmitter.fire()}))}handleDidChangeOptions(e){this.colorizationOptions=this.textModel.getOptions().bracketPairColorizationOptions}getDecorationsInRange(e,t,i,n,s){return s?[]:t===void 0?[]:this.colorizationOptions.enabled?this.textModel.bracketPairs.getBracketsInRange(e,!0).map(a=>({id:`bracket${a.range.toString()}-${a.nestingLevel}`,options:{description:"BracketPairColorization",inlineClassName:this.colorProvider.getInlineClassName(a,this.colorizationOptions.independentColorPoolPerBracketType)},ownerId:0,range:a.range})).toArray():[]}getAllDecorations(e,t,i){return e===void 0?[]:this.colorizationOptions.enabled?this.getDecorationsInRange(new S(1,1,this.textModel.getLineCount(),1),e,t,i):[]}},eB=class{constructor(){this.unexpectedClosingBracketClassName="unexpected-closing-bracket"}getInlineClassName(e,t){return e.isInvalid?this.unexpectedClosingBracketClassName:this.getInlineClassNameOfLevel(t?e.nestingLevelOfEqualBracketType:e.nestingLevel)}getInlineClassNameOfLevel(e){return`bracket-highlighting-${e%30}`}};Ro((o,e)=>{let t=[a5,l5,c5,d5,h5,u5],i=new eB;e.addRule(`.monaco-editor .${i.unexpectedClosingBracketClassName} { color: ${o.getColor(Pwe)}; }`);let n=t.map(s=>o.getColor(s)).filter(s=>!!s).filter(s=>!s.isTransparent());for(let s=0;s<30;s++){let r=n[s%n.length];e.addRule(`.monaco-editor .${i.getInlineClassNameOfLevel(s)} { color: ${r}; }`)}})});function tB(o){return o.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}function eSe(o,e){return o===null||o.length===0?e:new SQ(o,e).compress()}var Jc,SQ,xQ=x(()=>{O_();Iu();Jc=class o{get oldLength(){return this.oldText.length}get oldEnd(){return this.oldPosition+this.oldText.length}get newLength(){return this.newText.length}get newEnd(){return this.newPosition+this.newText.length}constructor(e,t,i,n){this.oldPosition=e,this.oldText=t,this.newPosition=i,this.newText=n}toString(){return this.oldText.length===0?`(insert@${this.oldPosition} "${tB(this.newText)}")`:this.newText.length===0?`(delete@${this.oldPosition} "${tB(this.oldText)}")`:`(replace@${this.oldPosition} "${tB(this.oldText)}" with "${tB(this.newText)}")`}static _writeStringSize(e){return 4+2*e.length}static _writeString(e,t,i){let n=t.length;Fd(e,n,i),i+=4;for(let s=0;s{le();Ae();gi();ai();xQ();O_();Xo();Xd();wc=class o{static create(e,t){let i=e.getAlternativeVersionId(),n=LQ(e);return new o(i,i,n,n,t,t,[])}constructor(e,t,i,n,s,r,a){this.beforeVersionId=e,this.afterVersionId=t,this.beforeEOL=i,this.afterEOL=n,this.beforeCursorState=s,this.afterCursorState=r,this.changes=a}append(e,t,i,n,s){t.length>0&&(this.changes=eSe(this.changes,t)),this.afterEOL=i,this.afterVersionId=n,this.afterCursorState=s}static _writeSelectionsSize(e){return 4+16*(e?e.length:0)}static _writeSelections(e,t,i){if(Fd(e,t?t.length:0,i),i+=4,t)for(let n of t)Fd(e,n.selectionStartLineNumber,i),i+=4,Fd(e,n.selectionStartColumn,i),i+=4,Fd(e,n.positionLineNumber,i),i+=4,Fd(e,n.positionColumn,i),i+=4;return i}static _readSelections(e,t,i){let n=Pd(e,t);t+=4;for(let s=0;st.toString()).join(", ")}matchesResource(e){return(Le.isUri(this.model)?this.model:this.model.uri).toString()===e.toString()}setModel(e){this.model=e}canAppend(e){return this.model===e&&this._data instanceof wc}append(e,t,i,n,s){this._data instanceof wc&&this._data.append(e,t,i,n,s)}close(){this._data instanceof wc&&(this._data=this._data.serialize())}open(){this._data instanceof wc||(this._data=wc.deserialize(this._data))}undo(){if(Le.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof wc&&(this._data=this._data.serialize());let e=wc.deserialize(this._data);this.model._applyUndo(e.changes,e.beforeEOL,e.beforeVersionId,e.beforeCursorState)}redo(){if(Le.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof wc&&(this._data=this._data.serialize());let e=wc.deserialize(this._data);this.model._applyRedo(e.changes,e.afterEOL,e.afterVersionId,e.afterCursorState)}heapSize(){return this._data instanceof wc&&(this._data=this._data.serialize()),this._data.byteLength+168}},kQ=class{get resources(){return this._editStackElementsArr.map(e=>e.resource)}constructor(e,t,i){this.label=e,this.code=t,this.type=1,this._isOpen=!0,this._editStackElementsArr=i.slice(0),this._editStackElementsMap=new Map;for(let n of this._editStackElementsArr){let s=u0(n.resource);this._editStackElementsMap.set(s,n)}this._delegate=null}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(e){let t=u0(e);return this._editStackElementsMap.has(t)}setModel(e){let t=u0(Le.isUri(e)?e:e.uri);this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).setModel(e)}canAppend(e){if(!this._isOpen)return!1;let t=u0(e.uri);return this._editStackElementsMap.has(t)?this._editStackElementsMap.get(t).canAppend(e):!1}append(e,t,i,n,s){let r=u0(e.uri);this._editStackElementsMap.get(r).append(e,t,i,n,s)}close(){this._isOpen=!1}open(){}undo(){this._isOpen=!1;for(let e of this._editStackElementsArr)e.undo()}redo(){for(let e of this._editStackElementsArr)e.redo()}heapSize(e){let t=u0(e);return this._editStackElementsMap.has(t)?this._editStackElementsMap.get(t).heapSize():0}split(){return this._editStackElementsArr}toString(){let e=[];for(let t of this._editStackElementsArr)e.push(`${Os(t.resource)}: ${t}`);return`{${e.join(", ")}}`}};nB=class o{constructor(e,t){this._model=e,this._undoRedoService=t}pushStackElement(){let e=this._undoRedoService.getLastElement(this._model.uri);ig(e)&&e.close()}popStackElement(){let e=this._undoRedoService.getLastElement(this._model.uri);ig(e)&&e.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(e,t){let i=this._undoRedoService.getLastElement(this._model.uri);if(ig(i)&&i.canAppend(this._model))return i;let n=new iB(m(820,"Typing"),"undoredo.textBufferEdit",this._model,e);return this._undoRedoService.pushElement(n,t),n}pushEOL(e){let t=this._getOrCreateEditStackElement(null,void 0);this._model.setEOL(e),t.append(this._model,[],LQ(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(e,t,i,n,s=fo.unknown({name:"pushEditOperation"})){let r=this._getOrCreateEditStackElement(e,n),a=this._model.applyEdits(t,!0,s),l=o._computeCursorState(i,a),c=a.map((d,h)=>({index:h,textChange:d.textChange}));return c.sort((d,h)=>d.textChange.oldPosition===h.textChange.oldPosition?d.index-h.index:d.textChange.oldPosition-h.textChange.oldPosition),r.append(this._model,c.map(d=>d.textChange),LQ(this._model),this._model.getAlternativeVersionId(),l),l}static _computeCursorState(e,t){try{return e?e(t):null}catch(i){return De(i),null}}}});function m3e(o,e,t,i,n){n.spacesDiff=0,n.looksLikeAlignment=!1;let s;for(s=0;s0&&a>0||l>0&&c>0)return;let d=Math.abs(a-c),h=Math.abs(r-l);if(d===0){n.spacesDiff=h,h>0&&0<=l-1&&l-10?n++:C>1&&s++,m3e(r,a,_,w,h),h.looksLikeAlignment&&!(t&&e===h.spacesDiff)))continue;let k=h.spacesDiff;k<=c&&d[k]++,r=_,a=w}let u=t;n!==s&&(u=n{let _=d[p];_>g&&(g=_,f=p)}),f===4&&d[4]>0&&d[2]>0&&d[2]>=d[4]*2/3&&(f=2)}return{insertSpaces:u,tabSize:f}}var EQ,tSe=x(()=>{EQ=class{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}}});function Vl(o){return(o.metadata&1)>>>0}function Vn(o,e){o.metadata=o.metadata&254|e<<0}function jr(o){return(o.metadata&2)>>>1===1}function An(o,e){o.metadata=o.metadata&253|(e?1:0)<<1}function cSe(o){return(o.metadata&4)>>>2===1}function iSe(o,e){o.metadata=o.metadata&251|(e?1:0)<<2}function dSe(o){return(o.metadata&64)>>>6===1}function nSe(o,e){o.metadata=o.metadata&191|(e?1:0)<<6}function hSe(o){return(o.metadata&128)>>>7===1}function oSe(o,e){o.metadata=o.metadata&127|(e?1:0)<<7}function p3e(o){return(o.metadata&24)>>>3}function sSe(o,e){o.metadata=o.metadata&231|e<<3}function _3e(o){return(o.metadata&32)>>>5===1}function rSe(o,e){o.metadata=o.metadata&223|(e?1:0)<<5}function b3e(o){let e=o.root,t=0;for(;e!==qt;){if(e.left!==qt&&!jr(e.left)){e=e.left;continue}if(e.right!==qt&&!jr(e.right)){t+=e.delta,e=e.right;continue}e.start=t+e.start,e.end=t+e.end,e.delta=0,_p(e),An(e,!0),An(e.left,!1),An(e.right,!1),e===e.parent.right&&(t-=e.parent.delta),e=e.parent}An(o.root,!1)}function f0(o,e,t,i){return ot||i===1?!1:i===2?!0:e}function v3e(o,e,t,i,n){let s=p3e(o),r=s===0||s===2,a=s===1||s===2,l=t-e,c=i,d=Math.min(l,c),h=o.start,u=!1,f=o.end,g=!1;e<=h&&f<=t&&_3e(o)&&(o.start=e,u=!0,o.end=e,g=!0);{let _=n?1:l>0?2:0;!u&&f0(h,r,e,_)&&(u=!0),!g&&f0(f,a,e,_)&&(g=!0)}if(d>0&&!n){let _=l>c?2:0;!u&&f0(h,r,e+d,_)&&(u=!0),!g&&f0(f,a,e+d,_)&&(g=!0)}{let _=n?1:0;!u&&f0(h,r,t,_)&&(o.start=e+c,u=!0),!g&&f0(f,a,t,_)&&(o.end=e+c,g=!0)}let p=c-l;u||(o.start=Math.max(0,h+p)),g||(o.end=Math.max(0,f+p)),o.start>o.end&&(o.end=o.start)}function w3e(o,e,t){let i=o.root,n=0,s=0,r=0,a=0,l=[],c=0;for(;i!==qt;){if(jr(i)){An(i.left,!1),An(i.right,!1),i===i.parent.right&&(n-=i.parent.delta),i=i.parent;continue}if(!jr(i.left)){if(s=n+i.maxEnd,st){An(i,!0);continue}if(a=n+i.end,a>=e&&(i.setCachedOffsets(r,a,0),l[c++]=i),An(i,!0),i.right!==qt&&!jr(i.right)){n+=i.delta,i=i.right;continue}}return An(o.root,!1),l}function C3e(o,e,t,i){let n=o.root,s=0,r=0,a=0,l=i-(t-e);for(;n!==qt;){if(jr(n)){An(n.left,!1),An(n.right,!1),n===n.parent.right&&(s-=n.parent.delta),_p(n),n=n.parent;continue}if(!jr(n.left)){if(r=s+n.maxEnd,rt){n.start+=l,n.end+=l,n.delta+=l,(n.delta<-1073741824||n.delta>1073741824)&&(o.requestNormalizeDelta=!0),An(n,!0);continue}if(An(n,!0),n.right!==qt&&!jr(n.right)){s+=n.delta,n=n.right;continue}}An(o.root,!1)}function y3e(o,e){let t=o.root,i=[],n=0;for(;t!==qt;){if(jr(t)){An(t.left,!1),An(t.right,!1),t=t.parent;continue}if(t.left!==qt&&!jr(t.left)){t=t.left;continue}if(t.ownerId===e&&(i[n++]=t),An(t,!0),t.right!==qt&&!jr(t.right)){t=t.right;continue}}return An(o.root,!1),i}function S3e(o){let e=o.root,t=[],i=0;for(;e!==qt;){if(jr(e)){An(e.left,!1),An(e.right,!1),e=e.parent;continue}if(e.left!==qt&&!jr(e.left)){e=e.left;continue}if(e.right!==qt&&!jr(e.right)){e=e.right;continue}t[i++]=e,An(e,!0)}return An(o.root,!1),t}function x3e(o,e,t,i,n,s){let r=o.root,a=0,l=0,c=0,d=[],h=0;for(;r!==qt;){if(jr(r)){An(r.left,!1),An(r.right,!1),r===r.parent.right&&(a-=r.parent.delta),r=r.parent;continue}if(r.left!==qt&&!jr(r.left)){r=r.left;continue}l=a+r.start,c=a+r.end,r.setCachedOffsets(l,c,n);let u=!0;if(e&&r.ownerId&&r.ownerId!==e&&(u=!1),t&&cSe(r)&&(u=!1),i&&hSe(r)&&(u=!1),s&&!dSe(r)&&(u=!1),u&&(d[h++]=r),An(r,!0),r.right!==qt&&!jr(r.right)){a+=r.delta,r=r.right;continue}}return An(o.root,!1),d}function k3e(o,e,t,i,n,s,r,a){let l=o.root,c=0,d=0,h=0,u=0,f=[],g=0;for(;l!==qt;){if(jr(l)){An(l.left,!1),An(l.right,!1),l===l.parent.right&&(c-=l.parent.delta),l=l.parent;continue}if(!jr(l.left)){if(d=c+l.maxEnd,dt){An(l,!0);continue}if(u=c+l.end,u>=e){l.setCachedOffsets(h,u,r);let p=!0;i&&l.ownerId&&l.ownerId!==i&&(p=!1),n&&cSe(l)&&(p=!1),s&&hSe(l)&&(p=!1),a&&!dSe(l)&&(p=!1),p&&(f[g++]=l)}if(An(l,!0),l.right!==qt&&!jr(l.right)){c+=l.delta,l=l.right;continue}}return An(o.root,!1),f}function aSe(o,e){if(o.root===qt)return e.parent=qt,e.left=qt,e.right=qt,Vn(e,0),o.root=e,o.root;L3e(o,e),jb(e.parent);let t=e;for(;t!==o.root&&Vl(t.parent)===1;)if(t.parent===t.parent.parent.left){let i=t.parent.parent.right;Vl(i)===1?(Vn(t.parent,0),Vn(i,0),Vn(t.parent.parent,1),t=t.parent.parent):(t===t.parent.right&&(t=t.parent,YT(o,t)),Vn(t.parent,0),Vn(t.parent.parent,1),ZT(o,t.parent.parent))}else{let i=t.parent.parent.left;Vl(i)===1?(Vn(t.parent,0),Vn(i,0),Vn(t.parent.parent,1),t=t.parent.parent):(t===t.parent.left&&(t=t.parent,ZT(o,t)),Vn(t.parent,0),Vn(t.parent.parent,1),YT(o,t.parent.parent))}return Vn(o.root,0),e}function L3e(o,e){let t=0,i=o.root,n=e.start,s=e.end;for(;;)if(E3e(n,s,i.start+t,i.end+t)<0)if(i.left===qt){e.start-=t,e.end-=t,e.maxEnd-=t,i.left=e;break}else i=i.left;else if(i.right===qt){e.start-=t+i.delta,e.end-=t+i.delta,e.maxEnd-=t+i.delta,i.right=e;break}else t+=i.delta,i=i.right;e.parent=i,e.left=qt,e.right=qt,Vn(e,1)}function lSe(o,e){let t,i;if(e.left===qt?(t=e.right,i=e,t.delta+=e.delta,(t.delta<-1073741824||t.delta>1073741824)&&(o.requestNormalizeDelta=!0),t.start+=e.delta,t.end+=e.delta):e.right===qt?(t=e.left,i=e):(i=I3e(e.right),t=i.right,t.start+=i.delta,t.end+=i.delta,t.delta+=i.delta,(t.delta<-1073741824||t.delta>1073741824)&&(o.requestNormalizeDelta=!0),i.start+=e.delta,i.end+=e.delta,i.delta=e.delta,(i.delta<-1073741824||i.delta>1073741824)&&(o.requestNormalizeDelta=!0)),i===o.root){o.root=t,Vn(t,0),e.detach(),DQ(),_p(t),o.root.parent=qt;return}let n=Vl(i)===1;if(i===i.parent.left?i.parent.left=t:i.parent.right=t,i===e?t.parent=i.parent:(i.parent===e?t.parent=i:t.parent=i.parent,i.left=e.left,i.right=e.right,i.parent=e.parent,Vn(i,Vl(e)),e===o.root?o.root=i:e===e.parent.left?e.parent.left=i:e.parent.right=i,i.left!==qt&&(i.left.parent=i),i.right!==qt&&(i.right.parent=i)),e.detach(),n){jb(t.parent),i!==e&&(jb(i),jb(i.parent)),DQ();return}jb(t),jb(t.parent),i!==e&&(jb(i),jb(i.parent));let s;for(;t!==o.root&&Vl(t)===0;)t===t.parent.left?(s=t.parent.right,Vl(s)===1&&(Vn(s,0),Vn(t.parent,1),YT(o,t.parent),s=t.parent.right),Vl(s.left)===0&&Vl(s.right)===0?(Vn(s,1),t=t.parent):(Vl(s.right)===0&&(Vn(s.left,0),Vn(s,1),ZT(o,s),s=t.parent.right),Vn(s,Vl(t.parent)),Vn(t.parent,0),Vn(s.right,0),YT(o,t.parent),t=o.root)):(s=t.parent.left,Vl(s)===1&&(Vn(s,0),Vn(t.parent,1),ZT(o,t.parent),s=t.parent.left),Vl(s.left)===0&&Vl(s.right)===0?(Vn(s,1),t=t.parent):(Vl(s.left)===0&&(Vn(s.right,0),Vn(s,1),YT(o,s),s=t.parent.left),Vn(s,Vl(t.parent)),Vn(t.parent,0),Vn(s.left,0),ZT(o,t.parent),t=o.root));Vn(t,0),DQ()}function I3e(o){for(;o.left!==qt;)o=o.left;return o}function DQ(){qt.parent=qt,qt.delta=0,qt.start=0,qt.end=0}function YT(o,e){let t=e.right;t.delta+=e.delta,(t.delta<-1073741824||t.delta>1073741824)&&(o.requestNormalizeDelta=!0),t.start+=e.delta,t.end+=e.delta,e.right=t.left,t.left!==qt&&(t.left.parent=e),t.parent=e.parent,e.parent===qt?o.root=t:e===e.parent.left?e.parent.left=t:e.parent.right=t,t.left=e,e.parent=t,_p(e),_p(t)}function ZT(o,e){let t=e.left;e.delta-=t.delta,(e.delta<-1073741824||e.delta>1073741824)&&(o.requestNormalizeDelta=!0),e.start-=t.delta,e.end-=t.delta,e.left=t.right,t.right!==qt&&(t.right.parent=e),t.parent=e.parent,e.parent===qt?o.root=t:e===e.parent.right?e.parent.right=t:e.parent.left=t,t.right=e,e.parent=t,_p(e),_p(t)}function uSe(o){let e=o.end;if(o.left!==qt){let t=o.left.maxEnd;t>e&&(e=t)}if(o.right!==qt){let t=o.right.maxEnd+o.delta;t>e&&(e=t)}return e}function _p(o){o.maxEnd=uSe(o)}function jb(o){for(;o!==qt;){let e=uSe(o);if(o.maxEnd===e)return;o.maxEnd=e,o=o.parent}}function E3e(o,e,t,i){return o===t?e-i:o-t}var XT,qt,g0,fSe=x(()=>{XT=class{constructor(e,t,i){this.metadata=0,this.parent=this,this.left=this,this.right=this,Vn(this,1),this.start=t,this.end=i,this.delta=0,this.maxEnd=i,this.id=e,this.ownerId=0,this.options=null,iSe(this,!1),nSe(this,!1),sSe(this,1),rSe(this,!1),oSe(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=null,An(this,!1)}reset(e,t,i,n){this.start=t,this.end=i,this.maxEnd=i,this.cachedVersionId=e,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=n}setOptions(e){this.options=e;let t=this.options.className;iSe(this,t==="squiggly-error"||t==="squiggly-warning"||t==="squiggly-info"),nSe(this,this.options.glyphMarginClassName!==null),sSe(this,this.options.stickiness),rSe(this,this.options.collapseOnReplaceEdit),oSe(this,this.options.affectsFont??!1)}setCachedOffsets(e,t,i){this.cachedVersionId!==i&&(this.range=null),this.cachedVersionId=i,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=t}detach(){this.parent=null,this.left=null,this.right=null}},qt=new XT(null,0,0);qt.parent=qt;qt.left=qt;qt.right=qt;Vn(qt,0);g0=class{constructor(){this.root=qt,this.requestNormalizeDelta=!1}intervalSearch(e,t,i,n,s,r,a){return this.root===qt?[]:k3e(this,e,t,i,n,s,r,a)}search(e,t,i,n,s){return this.root===qt?[]:x3e(this,e,t,i,n,s)}collectNodesFromOwner(e){return y3e(this,e)}collectNodesPostOrder(){return S3e(this)}insert(e){aSe(this,e),this._normalizeDeltaIfNecessary()}delete(e){lSe(this,e),this._normalizeDeltaIfNecessary()}resolveNode(e,t){let i=e,n=0;for(;e!==this.root;)e===e.parent.right&&(n+=e.parent.delta),e=e.parent;let s=i.start+n,r=i.end+n;i.setCachedOffsets(s,r,t)}acceptReplace(e,t,i,n){let s=w3e(this,e,e+t);for(let r=0,a=s.length;r{m0=class{constructor(e,t){this.piece=e,this.color=t,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}next(){if(this.right!==St)return oB(this.right);let e=this;for(;e.parent!==St&&e.parent.left!==e;)e=e.parent;return e.parent===St?St:e.parent}prev(){if(this.left!==St)return RQ(this.left);let e=this;for(;e.parent!==St&&e.parent.right!==e;)e=e.parent;return e.parent===St?St:e.parent}detach(){this.parent=null,this.left=null,this.right=null}},St=new m0(null,0);St.parent=St;St.left=St;St.right=St;St.color=0});function mSe(o){let e;return o[o.length-1]<65536?e=new Uint16Array(o.length):e=new Uint32Array(o.length),e.set(o,0),e}function og(o,e=!0){let t=[0],i=1;for(let n=0,s=o.length;n126)&&(r=!1)}let a=new PQ(mSe(o),i,n,s,r);return o.length=0,a}var bp,PQ,il,sg,FQ,BQ,sB,WQ=x(()=>{Pe();ue();ho();gSe();Bx();bp=65535;PQ=class{constructor(e,t,i,n,s){this.lineStarts=e,this.cr=t,this.lf=i,this.crlf=n,this.isBasicASCII=s}};il=class{constructor(e,t,i,n,s){this.bufferIndex=e,this.start=t,this.end=i,this.lineFeedCnt=n,this.length=s}},sg=class{constructor(e,t){this.buffer=e,this.lineStarts=t}},FQ=class{constructor(e,t){this._pieces=[],this._tree=e,this._BOM=t,this._index=0,e.root!==St&&e.iterate(e.root,i=>(i!==St&&this._pieces.push(i.piece),!0))}read(){return this._pieces.length===0?this._index===0?(this._index++,this._BOM):null:this._index>this._pieces.length-1?null:this._index===0?this._BOM+this._tree.getPieceContent(this._pieces[this._index++]):this._tree.getPieceContent(this._pieces[this._index++])}},BQ=class{constructor(e){this._limit=e,this._cache=[]}get(e){for(let t=this._cache.length-1;t>=0;t--){let i=this._cache[t];if(i.nodeStartOffset<=e&&i.nodeStartOffset+i.node.piece.length>=e)return i}return null}get2(e){for(let t=this._cache.length-1;t>=0;t--){let i=this._cache[t];if(i.nodeStartLineNumber&&i.nodeStartLineNumber=e)return i}return null}set(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)}validate(e){let t=!1,i=this._cache;for(let n=0;n=e){i[n]=null,t=!0;continue}}if(t){let n=[];for(let s of i)s!==null&&n.push(s);this._cache=n}}},sB=class{constructor(e,t,i){this.create(e,t,i)}create(e,t,i){this._buffers=[new sg("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=St,this._lineCnt=1,this._length=0,this._EOL=t,this._EOLLength=t.length,this._EOLNormalized=i;let n=null;for(let s=0,r=e.length;s0){e[s].lineStarts||(e[s].lineStarts=og(e[s].buffer));let a=new il(s+1,{line:0,column:0},{line:e[s].lineStarts.length-1,column:e[s].buffer.length-e[s].lineStarts[e[s].lineStarts.length-1]},e[s].lineStarts.length-1,e[s].buffer.length);this._buffers.push(e[s]),n=this.rbInsertRight(n,a)}this._searchCache=new BQ(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(e){let t=bp,i=t-Math.floor(t/3),n=i*2,s="",r=0,a=[];if(this.iterate(this.root,l=>{let c=this.getNodeContent(l),d=c.length;if(r<=i||r+d0){let l=s.replace(/\r\n|\r|\n/g,e);a.push(new sg(l,og(l)))}this.create(a,e,!0)}getEOL(){return this._EOL}setEOL(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)}createSnapshot(e){return new FQ(this,e)}getOffsetAt(e,t){let i=0,n=this.root;for(;n!==St;)if(n.left!==St&&n.lf_left+1>=e)n=n.left;else if(n.lf_left+n.piece.lineFeedCnt+1>=e){i+=n.size_left;let s=this.getAccumulatedValue(n,e-n.lf_left-2);return i+=s+t-1}else e-=n.lf_left+n.piece.lineFeedCnt,i+=n.size_left+n.piece.length,n=n.right;return i}getPositionAt(e){e=Math.floor(e),e=Math.max(0,e);let t=this.root,i=0,n=e;for(;t!==St;)if(t.size_left!==0&&t.size_left>=e)t=t.left;else if(t.size_left+t.piece.length>=e){let s=this.getIndexOf(t,e-t.size_left);if(i+=t.lf_left+s.index,s.index===0){let r=this.getOffsetAt(i+1,1),a=n-r;return new M(i+1,a+1)}return new M(i+1,s.remainder+1)}else if(e-=t.size_left+t.piece.length,i+=t.lf_left+t.piece.lineFeedCnt,t.right===St){let s=this.getOffsetAt(i+1,1),r=n-e-s;return new M(i+1,r+1)}else t=t.right;return new M(1,1)}getValueInRange(e,t){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";let i=this.nodeAt2(e.startLineNumber,e.startColumn),n=this.nodeAt2(e.endLineNumber,e.endColumn),s=this.getValueInRange2(i,n);return t?t!==this._EOL||!this._EOLNormalized?s.replace(/\r\n|\r|\n/g,t):t===this.getEOL()&&this._EOLNormalized?s:s.replace(/\r\n|\r|\n/g,t):s}getValueInRange2(e,t){if(e.node===t.node){let a=e.node,l=this._buffers[a.piece.bufferIndex].buffer,c=this.offsetInBuffer(a.piece.bufferIndex,a.piece.start);return l.substring(c+e.remainder,c+t.remainder)}let i=e.node,n=this._buffers[i.piece.bufferIndex].buffer,s=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start),r=n.substring(s+e.remainder,s+i.piece.length);for(i=i.next();i!==St;){let a=this._buffers[i.piece.bufferIndex].buffer,l=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);if(i===t.node){r+=a.substring(l,l+t.remainder);break}else r+=a.substr(l,i.piece.length);i=i.next()}return r}getLinesContent(){let e=[],t=0,i="",n=!1;return this.iterate(this.root,s=>{if(s===St)return!0;let r=s.piece,a=r.length;if(a===0)return!0;let l=this._buffers[r.bufferIndex].buffer,c=this._buffers[r.bufferIndex].lineStarts,d=r.start.line,h=r.end.line,u=c[d]+r.start.column;if(n&&(l.charCodeAt(u)===10&&(u++,a--),e[t++]=i,i="",n=!1,a===0))return!0;if(d===h)return!this._EOLNormalized&&l.charCodeAt(u+a-1)===13?(n=!0,i+=l.substr(u,a-1)):i+=l.substr(u,a),!0;i+=this._EOLNormalized?l.substring(u,Math.max(u,c[d+1]-this._EOLLength)):l.substring(u,c[d+1]).replace(/(\r\n|\r|\n)$/,""),e[t++]=i;for(let f=d+1;fC+g,t.reset(0)):(v=u.buffer,w=C=>C,t.reset(g));do if(_=t.next(v),_){if(w(_.index)>=p)return d;this.positionInBuffer(e,w(_.index)-f,b);let C=this.getLineFeedCnt(e.piece.bufferIndex,s,b),y=b.line===s.line?b.column-s.column+n:b.column+1,k=y+_[0].length;if(h[d++]=ob(new S(i+C,y,i+C,k),_,l),w(_.index)+_[0].length>=p||d>=c)return d}while(_);return d}findMatchesLineByLine(e,t,i,n){let s=[],r=0,a=new Rf(t.wordSeparators,t.regex),l=this.nodeAt2(e.startLineNumber,e.startColumn);if(l===null)return[];let c=this.nodeAt2(e.endLineNumber,e.endColumn);if(c===null)return[];let d=this.positionInBuffer(l.node,l.remainder),h=this.positionInBuffer(c.node,c.remainder);if(l.node===c.node)return this.findMatchesInNode(l.node,a,e.startLineNumber,e.startColumn,d,h,t,i,n,r,s),s;let u=e.startLineNumber,f=l.node;for(;f!==c.node;){let p=this.getLineFeedCnt(f.piece.bufferIndex,d,f.piece.end);if(p>=1){let b=this._buffers[f.piece.bufferIndex].lineStarts,v=this.offsetInBuffer(f.piece.bufferIndex,f.piece.start),w=b[d.line+p],C=u===e.startLineNumber?e.startColumn:1;if(r=this.findMatchesInNode(f,a,u,C,d,this.positionInBuffer(f,w-v),t,i,n,r,s),r>=n)return s;u+=p}let _=u===e.startLineNumber?e.startColumn-1:0;if(u===e.endLineNumber){let b=this.getLineContent(u).substring(_,e.endColumn-1);return r=this._findMatchesInLine(t,a,b,e.endLineNumber,_,r,s,i,n),s}if(r=this._findMatchesInLine(t,a,this.getLineContent(u).substr(_),u,_,r,s,i,n),r>=n)return s;u++,l=this.nodeAt2(u,1),f=l.node,d=this.positionInBuffer(l.node,l.remainder)}if(u===e.endLineNumber){let p=u===e.startLineNumber?e.startColumn-1:0,_=this.getLineContent(u).substring(p,e.endColumn-1);return r=this._findMatchesInLine(t,a,_,e.endLineNumber,p,r,s,i,n),s}let g=u===e.startLineNumber?e.startColumn:1;return r=this.findMatchesInNode(c.node,a,u,g,d,h,t,i,n,r,s),s}_findMatchesInLine(e,t,i,n,s,r,a,l,c){let d=e.wordSeparators;if(!l&&e.simpleSearch){let u=e.simpleSearch,f=u.length,g=i.length,p=-f;for(;(p=i.indexOf(u,p+f))!==-1;)if((!d||HP(d,i,g,p,f))&&(a[r++]=new Nf(new S(n,p+1+s,n,p+1+f+s),null),r>=c))return r;return r}let h;t.reset(0);do if(h=t.next(i),h&&(a[r++]=ob(new S(n,h.index+1+s,n,h.index+1+h[0].length+s),h,l),r>=c))return r;while(h);return r}insert(e,t,i=!1){if(this._EOLNormalized=this._EOLNormalized&&i,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==St){let{node:n,remainder:s,nodeStartOffset:r}=this.nodeAt(e),a=n.piece,l=a.bufferIndex,c=this.positionInBuffer(n,s);if(n.piece.bufferIndex===0&&a.end.line===this._lastChangeBufferPos.line&&a.end.column===this._lastChangeBufferPos.column&&r+a.length===e&&t.lengthe){let d=[],h=new il(a.bufferIndex,c,a.end,this.getLineFeedCnt(a.bufferIndex,c,a.end),this.offsetInBuffer(l,a.end)-this.offsetInBuffer(l,c));if(this.shouldCheckCRLF()&&this.endWithCR(t)&&this.nodeCharCodeAt(n,s)===10){let p={line:h.start.line+1,column:0};h=new il(h.bufferIndex,p,h.end,this.getLineFeedCnt(h.bufferIndex,p,h.end),h.length-1),t+=` +`}if(this.shouldCheckCRLF()&&this.startWithLF(t))if(this.nodeCharCodeAt(n,s-1)===13){let p=this.positionInBuffer(n,s-1);this.deleteNodeTail(n,p),t="\r"+t,n.piece.length===0&&d.push(n)}else this.deleteNodeTail(n,c);else this.deleteNodeTail(n,c);let u=this.createNewPieces(t);h.length>0&&this.rbInsertRight(n,h);let f=n;for(let g=0;g=0;r--)s=this.rbInsertLeft(s,n[r]);this.validateCRLFWithPrevNode(s),this.deleteNodes(i)}insertContentToNodeRight(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+=` +`);let i=this.createNewPieces(e),n=this.rbInsertRight(t,i[0]),s=n;for(let r=1;r=u)c=h+1;else break;return i?(i.line=h,i.column=l-f,null):{line:h,column:l-f}}getLineFeedCnt(e,t,i){if(i.column===0)return i.line-t.line;let n=this._buffers[e].lineStarts;if(i.line===n.length-1)return i.line-t.line;let s=n[i.line+1],r=n[i.line]+i.column;if(s>r+1)return i.line-t.line;let a=r-1;return this._buffers[e].buffer.charCodeAt(a)===13?i.line-t.line+1:i.line-t.line}offsetInBuffer(e,t){return this._buffers[e].lineStarts[t.line]+t.column}deleteNodes(e){for(let t=0;tbp){let d=[];for(;e.length>bp;){let u=e.charCodeAt(bp-1),f;u===13||u>=55296&&u<=56319?(f=e.substring(0,bp-1),e=e.substring(bp-1)):(f=e.substring(0,bp),e=e.substring(bp));let g=og(f);d.push(new il(this._buffers.length,{line:0,column:0},{line:g.length-1,column:f.length-g[g.length-1]},g.length-1,f.length)),this._buffers.push(new sg(f,g))}let h=og(e);return d.push(new il(this._buffers.length,{line:0,column:0},{line:h.length-1,column:e.length-h[h.length-1]},h.length-1,e.length)),this._buffers.push(new sg(e,h)),d}let t=this._buffers[0].buffer.length,i=og(e,!1),n=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===t&&t!==0&&this.startWithLF(e)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},n=this._lastChangeBufferPos;for(let d=0;d=e-1)i=i.left;else if(i.lf_left+i.piece.lineFeedCnt>e-1){let l=this.getAccumulatedValue(i,e-i.lf_left-2),c=this.getAccumulatedValue(i,e-i.lf_left-1),d=this._buffers[i.piece.bufferIndex].buffer,h=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return r+=i.size_left,this._searchCache.set({node:i,nodeStartOffset:r,nodeStartLineNumber:a-(e-1-i.lf_left)}),d.substring(h+l,h+c-t)}else if(i.lf_left+i.piece.lineFeedCnt===e-1){let l=this.getAccumulatedValue(i,e-i.lf_left-2),c=this._buffers[i.piece.bufferIndex].buffer,d=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n=c.substring(d+l,d+i.piece.length);break}else e-=i.lf_left+i.piece.lineFeedCnt,r+=i.size_left+i.piece.length,i=i.right}for(i=i.next();i!==St;){let r=this._buffers[i.piece.bufferIndex].buffer;if(i.piece.lineFeedCnt>0){let a=this.getAccumulatedValue(i,0),l=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return n+=r.substring(l,l+a-t),n}else{let a=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n+=r.substr(a,i.piece.length)}i=i.next()}return n}computeBufferMetadata(){let e=this.root,t=1,i=0;for(;e!==St;)t+=e.lf_left+e.piece.lineFeedCnt,i+=e.size_left+e.piece.length,e=e.right;this._lineCnt=t,this._length=i,this._searchCache.validate(this._length)}getIndexOf(e,t){let i=e.piece,n=this.positionInBuffer(e,t),s=n.line-i.start.line;if(this.offsetInBuffer(i.bufferIndex,i.end)-this.offsetInBuffer(i.bufferIndex,i.start)===t){let r=this.getLineFeedCnt(e.piece.bufferIndex,i.start,n);if(r!==s)return{index:r,remainder:0}}return{index:s,remainder:n.column}}getAccumulatedValue(e,t){if(t<0)return 0;let i=e.piece,n=this._buffers[i.bufferIndex].lineStarts,s=i.start.line+t+1;return s>i.end.line?n[i.end.line]+i.end.column-n[i.start.line]-i.start.column:n[s]-n[i.start.line]-i.start.column}deleteNodeTail(e,t){let i=e.piece,n=i.lineFeedCnt,s=this.offsetInBuffer(i.bufferIndex,i.end),r=t,a=this.offsetInBuffer(i.bufferIndex,r),l=this.getLineFeedCnt(i.bufferIndex,i.start,r),c=l-n,d=a-s,h=i.length+d;e.piece=new il(i.bufferIndex,i.start,r,l,h),ng(this,e,d,c)}deleteNodeHead(e,t){let i=e.piece,n=i.lineFeedCnt,s=this.offsetInBuffer(i.bufferIndex,i.start),r=t,a=this.getLineFeedCnt(i.bufferIndex,r,i.end),l=this.offsetInBuffer(i.bufferIndex,r),c=a-n,d=s-l,h=i.length+d;e.piece=new il(i.bufferIndex,r,i.end,a,h),ng(this,e,d,c)}shrinkNode(e,t,i){let n=e.piece,s=n.start,r=n.end,a=n.length,l=n.lineFeedCnt,c=t,d=this.getLineFeedCnt(n.bufferIndex,n.start,c),h=this.offsetInBuffer(n.bufferIndex,t)-this.offsetInBuffer(n.bufferIndex,s);e.piece=new il(n.bufferIndex,n.start,c,d,h),ng(this,e,h-a,d-l);let u=new il(n.bufferIndex,i,r,this.getLineFeedCnt(n.bufferIndex,i,r),this.offsetInBuffer(n.bufferIndex,r)-this.offsetInBuffer(n.bufferIndex,i)),f=this.rbInsertRight(e,u);this.validateCRLFWithPrevNode(f)}appendToNode(e,t){this.adjustCarriageReturnFromNext(t,e)&&(t+=` +`);let i=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),n=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;let s=og(t,!1);for(let f=0;fe)t=t.left;else if(t.size_left+t.piece.length>=e){n+=t.size_left;let s={node:t,remainder:e-t.size_left,nodeStartOffset:n};return this._searchCache.set(s),s}else e-=t.size_left+t.piece.length,n+=t.size_left+t.piece.length,t=t.right;return null}nodeAt2(e,t){let i=this.root,n=0;for(;i!==St;)if(i.left!==St&&i.lf_left>=e-1)i=i.left;else if(i.lf_left+i.piece.lineFeedCnt>e-1){let s=this.getAccumulatedValue(i,e-i.lf_left-2),r=this.getAccumulatedValue(i,e-i.lf_left-1);return n+=i.size_left,{node:i,remainder:Math.min(s+t-1,r),nodeStartOffset:n}}else if(i.lf_left+i.piece.lineFeedCnt===e-1){let s=this.getAccumulatedValue(i,e-i.lf_left-2);if(s+t-1<=i.piece.length)return{node:i,remainder:s+t-1,nodeStartOffset:n};t-=i.piece.length-s;break}else e-=i.lf_left+i.piece.lineFeedCnt,n+=i.size_left+i.piece.length,i=i.right;for(i=i.next();i!==St;){if(i.piece.lineFeedCnt>0){let s=this.getAccumulatedValue(i,0),r=this.offsetOfNode(i);return{node:i,remainder:Math.min(t-1,s),nodeStartOffset:r}}else if(i.piece.length>=t-1){let s=this.offsetOfNode(i);return{node:i,remainder:t-1,nodeStartOffset:s}}else t-=i.piece.length;i=i.next()}return null}nodeCharCodeAt(e,t){if(e.piece.lineFeedCnt<1)return-1;let i=this._buffers[e.piece.bufferIndex],n=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+t;return i.buffer.charCodeAt(n)}offsetOfNode(e){if(!e)return 0;let t=e.size_left;for(;e!==this.root;)e.parent.right===e&&(t+=e.parent.size_left+e.parent.piece.length),e=e.parent;return t}shouldCheckCRLF(){return!(this._EOLNormalized&&this._EOL===` +`)}startWithLF(e){if(typeof e=="string")return e.charCodeAt(0)===10;if(e===St||e.piece.lineFeedCnt===0)return!1;let t=e.piece,i=this._buffers[t.bufferIndex].lineStarts,n=t.start.line,s=i[n]+t.start.column;return n===i.length-1||i[n+1]>s+1?!1:this._buffers[t.bufferIndex].buffer.charCodeAt(s)===10}endWithCR(e){return typeof e=="string"?e.charCodeAt(e.length-1)===13:e===St||e.piece.lineFeedCnt===0?!1:this.nodeCharCodeAt(e,e.piece.length-1)===13}validateCRLFWithPrevNode(e){if(this.shouldCheckCRLF()&&this.startWithLF(e)){let t=e.prev();this.endWithCR(t)&&this.fixCRLF(t,e)}}validateCRLFWithNextNode(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){let t=e.next();this.startWithLF(t)&&this.fixCRLF(e,t)}}fixCRLF(e,t){let i=[],n=this._buffers[e.piece.bufferIndex].lineStarts,s;e.piece.end.column===0?s={line:e.piece.end.line-1,column:n[e.piece.end.line]-n[e.piece.end.line-1]-1}:s={line:e.piece.end.line,column:e.piece.end.column-1};let r=e.piece.length-1,a=e.piece.lineFeedCnt-1;e.piece=new il(e.piece.bufferIndex,e.piece.start,s,a,r),ng(this,e,-1,-1),e.piece.length===0&&i.push(e);let l={line:t.piece.start.line+1,column:0},c=t.piece.length-1,d=this.getLineFeedCnt(t.piece.bufferIndex,l,t.piece.end);t.piece=new il(t.piece.bufferIndex,l,t.piece.end,d,c),ng(this,t,-1,-1),t.piece.length===0&&i.push(t);let h=this.createNewPieces(`\r +`);this.rbInsertRight(e,h[0]);for(let u=0;u{ae();He();ue();ho();WQ();zb();xQ();W();p0=class o extends T{constructor(e,t,i,n,s,r,a){super(),this._onDidChangeContent=this._register(new N),this._BOM=t,this._mightContainNonBasicASCII=!r,this._mightContainRTL=n,this._mightContainUnusualLineTerminators=s,this._pieceTree=new sB(e,i,a)}mightContainRTL(){return this._mightContainRTL}mightContainUnusualLineTerminators(){return this._mightContainUnusualLineTerminators}resetMightContainUnusualLineTerminators(){this._mightContainUnusualLineTerminators=!1}mightContainNonBasicASCII(){return this._mightContainNonBasicASCII}getBOM(){return this._BOM}getEOL(){return this._pieceTree.getEOL()}createSnapshot(e){return this._pieceTree.createSnapshot(e?this._BOM:"")}getOffsetAt(e,t){return this._pieceTree.getOffsetAt(e,t)}getPositionAt(e){return this._pieceTree.getPositionAt(e)}getRangeAt(e,t){let i=e+t,n=this.getPositionAt(e),s=this.getPositionAt(i);return new S(n.lineNumber,n.column,s.lineNumber,s.column)}getValueInRange(e,t=0){if(e.isEmpty())return"";let i=this._getEndOfLine(t);return this._pieceTree.getValueInRange(e,i)}getValueLengthInRange(e,t=0){if(e.isEmpty())return 0;if(e.startLineNumber===e.endLineNumber)return e.endColumn-e.startColumn;let i=this.getOffsetAt(e.startLineNumber,e.startColumn),n=this.getOffsetAt(e.endLineNumber,e.endColumn),s=0,r=this._getEndOfLine(t),a=this.getEOL();if(r.length!==a.length){let l=r.length-a.length,c=e.endLineNumber-e.startLineNumber;s=l*c}return n-i+s}getCharacterCountInRange(e,t=0){if(this._mightContainNonBasicASCII){let i=0,n=e.startLineNumber,s=e.endLineNumber;for(let r=n;r<=s;r++){let a=this.getLineContent(r),l=r===n?e.startColumn-1:0,c=r===s?e.endColumn-1:a.length;for(let d=l;d_.sortIndex-b.sortIndex)}this._mightContainRTL=n,this._mightContainUnusualLineTerminators=s,this._mightContainNonBasicASCII=r;let f=this._doApplyEdits(l),g=null;if(t&&h.length>0){h.sort((p,_)=>_.lineNumber-p.lineNumber),g=[];for(let p=0,_=h.length;p<_;p++){let b=h[p].lineNumber;if(p>0&&h[p-1].lineNumber===b)continue;let v=h[p].oldContent,w=this.getLineContent(b);w.length===0||w===v||Zn(w)!==-1||g.push(b)}}return this._onDidChangeContent.fire(),new FP(u,f,g)}_reduceOperations(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]}_toSingleEditOperation(e){let t=!1,i=e[0].range,n=e[e.length-1].range,s=new S(i.startLineNumber,i.startColumn,n.endLineNumber,n.endColumn),r=i.startLineNumber,a=i.startColumn,l=[];for(let f=0,g=e.length;f0&&l.push(p.text),r=_.endLineNumber,a=_.endColumn}let c=l.join(""),[d,h,u]=vc(c);return{sortIndex:0,identifier:e[0].identifier,range:s,rangeOffset:this.getOffsetAt(s.startLineNumber,s.startColumn),rangeLength:this.getValueLengthInRange(s,0),text:c,eolCount:d,firstLineLength:h,lastLineLength:u,forceMoveMarkers:t,isAutoWhitespaceEdit:!1}}_doApplyEdits(e){e.sort(o._sortOpsDescending);let t=[];for(let i=0;i0){let u=l.eolCount+1;u===1?h=new S(c,d,c,d+l.firstLineLength):h=new S(c,d,c+u-1,l.lastLineLength+1)}else h=new S(c,d,c,d);i=h.endLineNumber,n=h.endColumn,t.push(h),s=l}return t}static _sortOpsAscending(e,t){let i=S.compareRangesUsingEnds(e.range,t.range);return i===0?e.sortIndex-t.sortIndex:i}static _sortOpsDescending(e,t){let i=S.compareRangesUsingEnds(e.range,t.range);return i===0?t.sortIndex-e.sortIndex:-i}}});var VQ,iD,_Se=x(()=>{He();WQ();HQ();VQ=class{constructor(e,t,i,n,s,r,a,l,c){this._chunks=e,this._bom=t,this._cr=i,this._lf=n,this._crlf=s,this._containsRTL=r,this._containsUnusualLineTerminators=a,this._isBasicASCII=l,this._normalizeEOL=c}_getEOL(e){let t=this._cr+this._lf+this._crlf,i=this._cr+this._crlf;return t===0?e===1?` +`:`\r +`:i>t/2?`\r +`:` +`}create(e){let t=this._getEOL(e),i=this._chunks;if(this._normalizeEOL&&(t===`\r +`&&(this._cr>0||this._lf>0)||t===` +`&&(this._cr>0||this._crlf>0)))for(let s=0,r=i.length;s=55296&&t<=56319?(this._acceptChunk1(e.substr(0,e.length-1),!1),this._hasPreviousChar=!0,this._previousChar=t):(this._acceptChunk1(e,!1),this._hasPreviousChar=!1,this._previousChar=t)}_acceptChunk1(e,t){!t&&e.length===0||(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))}_acceptChunk2(e){let t=pSe(this._tmpLineStarts,e);this.chunks.push(new sg(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,t.isBasicASCII||(this.isBasicASCII=!1,this.containsRTL||(this.containsRTL=Md(e)),this.containsUnusualLineTerminators||(this.containsUnusualLineTerminators=lO(e)))}finish(e=!0){return this._finish(),new VQ(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,e)}_finish(){if(this.chunks.length===0&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;let e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);let t=og(e.buffer);e.lineStarts=t,this._previousChar===13&&this.cr++}}}});var rB,bSe=x(()=>{vs();Am();xf();rB=class extends Fc{get debugName(){return this._debugNameData.getDebugName(this)??"LazyObservableValue"}constructor(e,t,i,n){super(n),this._debugNameData=e,this._equalityComparator=i,this._isUpToDate=!0,this._deltas=[],this._updateCounter=0,this._value=t}get(){return this._update(),this._value}_update(){if(!this._isUpToDate)if(this._isUpToDate=!0,this._deltas.length>0){for(let e of this._deltas){Ko()?.handleObservableUpdated(this,{change:e,didChange:!0,oldValue:"(unknown)",newValue:this._value,hadValue:!0});for(let t of this._observers)t.handleChange(this,e)}this._deltas.length=0}else{Ko()?.handleObservableUpdated(this,{change:void 0,didChange:!0,oldValue:"(unknown)",newValue:this._value,hadValue:!0});for(let e of this._observers)e.handleChange(this,void 0)}}_beginUpdate(){if(this._updateCounter++,this._updateCounter===1)for(let e of this._observers)e.beginUpdate(this)}_endUpdate(){if(this._updateCounter--,this._updateCounter===0){this._update();let e=[...this._observers];for(let t of e)t.endUpdate(this)}}addObserver(e){let t=!this._observers.has(e)&&this._updateCounter>0;super.addObserver(e),t&&e.beginUpdate(this)}removeObserver(e){let t=this._observers.has(e)&&this._updateCounter>0;super.removeObserver(e),t&&e.endUpdate(this)}set(e,t,i){if(i===void 0&&this._equalityComparator(this._value,e))return;let n;t||(t=n=new Cu(()=>{},()=>`Setting ${this.debugName}`));try{if(this._isUpToDate=!1,this._setValue(e),i!==void 0&&this._deltas.push(i),t.updateObserver({beginUpdate:()=>this._beginUpdate(),endUpdate:()=>this._endUpdate(),handleChange:(s,r)=>{},handlePossibleChange:s=>{}},this),this._updateCounter>1)for(let s of this._observers)s.handlePossibleChange(this)}finally{n&&n.finish()}}toString(){return`${this.debugName}: ${this._value}`}_setValue(e){this._value=e}}});function Kb(o,e,t=Di.ofCaller()){return o.lazy?new rB(new vo(o.owner,o.debugName,void 0),e,o.equalsFn??Cr,t):new Om(new vo(o.owner,o.debugName,void 0),e,o.equalsFn??Cr,t)}var aB=x(()=>{Ih();Rs();ae();W();ei();bSe();aa()});var lB,zQ,UQ,cB,_0,dB=x(()=>{qe();Ze();ae();W();Qn();et();Rs();Lf();aB();Gt();lB=class{constructor(){this._onDidChangeVisibleRanges=new N,this.onDidChangeVisibleRanges=this._onDidChangeVisibleRanges.event,this._views=new Set,this._viewsChanged=As(this),this.visibleLineRanges=Bn({owner:this,equalsFn:Rm(P_())},e=>(this._viewsChanged.read(e),Re.joinMany([...this._views].map(i=>i.state.read(e)?.visibleLineRanges??[]))))}attachView(){let e=new UQ(t=>{this._onDidChangeVisibleRanges.fire({view:e,state:t})});return this._views.add(e),this._viewsChanged.trigger(void 0),e}detachView(e){this._views.delete(e),this._onDidChangeVisibleRanges.fire({view:e,state:void 0}),this._viewsChanged.trigger(void 0)}dispose(){this._onDidChangeVisibleRanges.dispose()}},zQ=class{constructor(e,t){this.visibleLineRanges=e,this.stabilized=t}equals(e){return this===e?!0:!(!Bt(this.visibleLineRanges,e.visibleLineRanges,(t,i)=>t.equals(i))||this.stabilized!==e.stabilized)}},UQ=class{get state(){return this._state}constructor(e){this.handleStateChange=e,this._state=Kb({owner:this,equalsFn:Sf((t,i)=>t.equals(i))},void 0)}setVisibleLines(e,t){let i=e.map(s=>new Re(s.startLineNumber,s.endLineNumber+1)),n=new zQ(i,t);this._state.set(n,void 0,void 0),this.handleStateChange(n)}},cB=class extends T{get lineRanges(){return this._lineRanges}constructor(e){super(),this._refreshTokens=e,this.runner=this._register(new at(()=>this.update(),50)),this._computedLineRanges=[],this._lineRanges=[]}update(){Bt(this._computedLineRanges,this._lineRanges,(e,t)=>e.equals(t))||(this._computedLineRanges=this._lineRanges,this._refreshTokens())}handleStateChange(e){this._lineRanges=e.visibleLineRanges,e.stabilized?(this.runner.cancel(),this.update()):this.runner.schedule()}},_0=class extends T{get backgroundTokenizationState(){return this._backgroundTokenizationState}constructor(e,t){super(),this._languageIdCodec=e,this._textModel=t,this._onDidChangeTokens=this._register(new N),this.onDidChangeTokens=this._onDidChangeTokens.event,this._onDidChangeFontTokens=this._register(new N),this.onDidChangeFontTokens=this._onDidChangeFontTokens.event}tokenizeIfCheap(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)}}});var vp,wp,$Q=x(()=>{vp=class{static toKey(e){return`${e.ownerId};${e.decorationId};${e.lineNumber}`}constructor(e,t,i,n){this.ownerId=e,this.decorationId=t,this.lineNumber=i,this.lineHeight=n}},wp=class{static toKey(e){return`${e.ownerId};${e.decorationId};${e.lineNumber}`}constructor(e,t,i){this.ownerId=e,this.decorationId=t,this.lineNumber=i}}});function T3e(o){if(!o||!Array.isArray(o))return[];let e=[],t=0;for(let i=0,n=o.length;i{let u=M3e(d.token,h.token);return u!==0?u:d.index-h.index});let t=0,i="000000",n="ffffff";for(;o.length>=1&&o[0].token==="";){let d=o.shift();d.fontStyle!==-1&&(t=d.fontStyle),d.foreground!==null&&(i=d.foreground),d.background!==null&&(n=d.background)}let s=new jQ;for(let d of e)s.getId(d);let r=s.getId(i),a=s.getId(n),l=new KQ(t,r,a),c=new GQ(l);for(let d=0,h=o.length;de?1:0}function vSe(o){let e=[];for(let t=1,i=o.length;t{Yi();qQ=class{constructor(e,t,i,n,s){this._parsedThemeRuleBrand=void 0,this.token=e,this.index=t,this.fontStyle=i,this.foreground=n,this.background=s}};N3e=/^#?([0-9A-Fa-f]{6})([0-9A-Fa-f]{2})?$/,jQ=class{constructor(){this._lastColorId=0,this._id2color=[],this._color2id=new Map}getId(e){if(e===null)return 0;let t=e.match(N3e);if(!t)throw new Error("Illegal value for token color: "+e);e=t[1].toUpperCase();let i=this._color2id.get(e);return i||(i=++this._lastColorId,this._color2id.set(e,i),this._id2color[i]=K.fromHex("#"+e),i)}getColorMap(){return this._id2color.slice(0)}},nD=class{static createFromRawTokenTheme(e,t){return this.createFromParsedTokenTheme(T3e(e),t)}static createFromParsedTokenTheme(e,t){return D3e(e,t)}constructor(e,t){this._colorMap=e,this._root=t,this._cache=new Map}getColorMap(){return this._colorMap.getColorMap()}_match(e){return this._root.match(e)}match(e,t){let i=this._cache.get(t);if(typeof i>"u"){let n=this._match(t),s=A3e(t);i=(n.metadata|s<<8)>>>0,this._cache.set(t,i)}return(i|e<<0)>>>0}},R3e=/\b(comment|string|regex|regexp)\b/;KQ=class o{constructor(e,t,i){this._themeTrieElementRuleBrand=void 0,this._fontStyle=e,this._foreground=t,this._background=i,this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}clone(){return new o(this._fontStyle,this._foreground,this._background)}acceptOverwrite(e,t,i){e!==-1&&(this._fontStyle=e),t!==0&&(this._foreground=t),i!==0&&(this._background=i),this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}},GQ=class o{constructor(e){this._themeTrieElementBrand=void 0,this._mainRule=e,this._children=new Map}match(e){if(e==="")return this._mainRule;let t=e.indexOf("."),i,n;t===-1?(i=e,n=""):(i=e.substring(0,t),n=e.substring(t+1));let s=this._children.get(i);return typeof s<"u"?s.match(n):this._mainRule}insert(e,t,i,n){if(e===""){this._mainRule.acceptOverwrite(t,i,n);return}let s=e.indexOf("."),r,a;s===-1?(r=e,a=""):(r=e.substring(0,s),a=e.substring(s+1));let l=this._children.get(r);typeof l>"u"&&(l=new o(this._mainRule.clone()),this._children.set(r,l)),l.insert(a,t,i,n)}}});var hB,uB,ySe=x(()=>{qe();hB=class{constructor(e=[]){this._annotations=[],this._annotations=e}setAnnotations(e){for(let t of e.annotations){let i=this._getStartIndexOfIntersectingAnnotation(t.range.start),n=this._getEndIndexOfIntersectingAnnotation(t.range.endExclusive);t.annotation!==void 0?this._annotations.splice(i,n-i,{range:t.range,annotation:t.annotation}):this._annotations.splice(i,n-i)}}getAnnotationsIntersecting(e){let t=this._getStartIndexOfIntersectingAnnotation(e.start),i=this._getEndIndexOfIntersectingAnnotation(e.endExclusive);return this._annotations.slice(t,i)}_getStartIndexOfIntersectingAnnotation(e){let t=__(this._annotations.length,n=>this._annotations[n].range.start-e),i;if(t>=0){i=t;let n=this._annotations[i]?.range;n&&n.endExclusive===e&&i--}else{let n=this._annotations[-(t+2)]?.range;n&&e>=n.start&&ethis._annotations[n].range.endExclusive-e),i;if(t>=0){i=t+1;let n=this._annotations[i]?.range;n&&n.start===e&&i++}else{let n=this._annotations[-(t+1)]?.range;n&&e>=n.start&&e<=n.endExclusive?i=-t:i=-(t+1)}return i}applyEdit(e){let t=this._annotations.slice(),i=[],n=[],s=0;for(let r of e.replacements){for(;;){let l=t[0];if(!l)break;let c=l.range;if(c.endExclusive>=r.replaceRange.start)break;t.shift();let d={range:c.delta(s),annotation:l.annotation};d.range.isEmpty?n.push(d):i.push(d)}let a=[];for(;;){let l=t[0];if(!l||!l.range.intersectsOrTouches(r.replaceRange))break;t.shift(),a.push(l)}for(let l=a.length-1;l>=0;l--){let c=a[l],d=c.range,h=l===0&&r.replaceRange.endExclusive>d.start&&r.replaceRange.start0&&(d=d.delta(-f)),!h&&f>=0&&(d=d.delta(r.newText.length)),d=d.delta(-(r.newText.length-r.replaceRange.length)),t.unshift({annotation:c.annotation,range:d})}s+=r.newText.length-r.replaceRange.length}for(;;){let r=t[0];if(!r)break;t.shift();let a={annotation:r.annotation,range:r.range.delta(s)};a.range.isEmpty?n.push(a):i.push(a)}return this._annotations=i,n}},uB=class o{static create(e){return new o(e)}constructor(e){this._annotations=e}get annotations(){return this._annotations}}});function fB(o){let e=o.map(i=>new Bo(ke.ofStartAndLength(i.rangeOffset,i.rangeLength),i.text));return e.reverse(),new zr(e)}var ZQ=x(()=>{Ff();Hi()});var gB,SSe=x(()=>{W();ue();$Q();ae();YQ();Pe();ySe();Hi();ZQ();gB=class o extends T{static{this.DECORATION_COUNT=0}constructor(e,t){super(),this.textModel=e,this.tokenizationTextModelPart=t,this._onDidChangeLineHeight=this._register(new N),this.onDidChangeLineHeight=this._onDidChangeLineHeight.event,this._onDidChangeFont=this._register(new N),this.onDidChangeFont=this._onDidChangeFont.event,this._fontAnnotatedString=new hB,this._register(this.tokenizationTextModelPart.onDidChangeFontTokens(i=>{let n=new Set,s=[],r=new Set,a=new Set;for(let l of i.changes.annotations){let d=this.textModel.getPositionAt(l.range.start).lineNumber,h;if(l.annotation===void 0)h={range:l.range,annotation:void 0};else{let u=`tokenization-font-decoration-${o.DECORATION_COUNT}`,f={fontToken:l.annotation,decorationId:u};h={range:l.range,annotation:f},o.DECORATION_COUNT++,l.annotation.lineHeightMultiplier&&r.add(new vp(0,u,d,l.annotation.lineHeightMultiplier)),a.add(new wp(0,u,d))}if(s.push(h),!n.has(d)){let u=this.textModel.getOffsetAt(new M(d,1)),f=this.textModel.getOffsetAt(new M(d,this.textModel.getLineMaxColumn(d))),g=new ke(u,f),p=this._fontAnnotatedString.getAnnotationsIntersecting(g);for(let _ of p){let b=_.annotation.decorationId;r.add(new vp(0,b,d,null)),a.add(new wp(0,b,d))}n.add(d)}}this._fontAnnotatedString.setAnnotations(uB.create(s)),this._onDidChangeLineHeight.fire(r),this._onDidChangeFont.fire(a)}))}handleDidChangeContent(e){let t=fB(e.changes),i=this._fontAnnotatedString.applyEdit(t);if(i.length===0)return;let n=new Set,s=new Set;for(let r of i){let l=this.textModel.getPositionAt(r.range.start).lineNumber,c=r.annotation.decorationId;n.add(new vp(0,c,l,null)),s.add(new wp(0,c,l))}this._onDidChangeLineHeight.fire(n),this._onDidChangeFont.fire(s)}getDecorationsInRange(e,t,i,n,s){let r=this.textModel.getOffsetAt(e.getStartPosition()),a=this.textModel.getOffsetAt(e.getEndPosition()),l=this._fontAnnotatedString.getAnnotationsIntersecting(new ke(r,a)),c=[];for(let d of l){let h=d.annotation,u=!!(h.fontToken.fontFamily||h.fontToken.fontSizeMultiplier);if(!(u&&n)){let f=this.textModel.getPositionAt(d.range.start),g=this.textModel.getPositionAt(d.range.endExclusive),p=S.fromPositions(f,g),_=d.annotation,b=wSe(_.fontToken.fontFamily??"",_.fontToken.fontSizeMultiplier??0),v=_.decorationId;c.push({id:v,options:{description:"FontOptionDecoration",inlineClassName:b,lineHeight:_.fontToken.lineHeightMultiplier,affectsFont:u},ownerId:0,range:p})}}return c}getAllDecorations(e,t){return this.getDecorationsInRange(new S(1,1,this.textModel.getLineCount(),this.textModel.getLineMaxColumn(this.textModel.getLineCount())),e,t)}}});function P3e(o,e){let t=o.gotoNextSibling(),i=e.gotoNextSibling();if(t!==i)throw new Error("Trees are out of sync");return t&&i}function XQ(o,e){let t=o.gotoParent(),i=e.gotoParent();if(t!==i)throw new Error("Trees are out of sync");return t&&i}function xSe(o,e,t){let i=o.gotoFirstChild(),n=e.gotoFirstChild();if(i!==n)throw new Error("Trees are out of sync");if(t===0)return i&&n;for(let s=1;s<=t;s++){let r=o.gotoNextSibling(),a=e.gotoNextSibling();if(r!==a)throw new Error("Trees are out of sync");if(!r||!a)return!1}return i&&n}function QQ(o,e){do{if(o.currentNode.nextSibling)return P3e(o,e);o.currentNode.parent&&XQ(o,e)}while(o.currentNode.nextSibling||o.currentNode.parent);return!1}function kSe(o,e){let t=e.walk();t.resetTo(o);let i=o.currentNode;do if(t.currentNode.previousSibling&&t.currentNode.endIndex-t.currentNode.startIndex!==0)t.gotoPreviousSibling();else{for(;!t.currentNode.previousSibling&&t.currentNode.parent;)t.gotoParent();t.gotoPreviousSibling()}while(t.currentNode.endIndex>i.startIndex&&(t.currentNode.parent||t.currentNode.previousSibling)&&t.currentNode.id!==i.id);if(t.currentNode.id!==i.id&&t.currentNode.endIndex<=i.startIndex)return t.currentNode}var LSe=x(()=>{});function B3e(){let o=performance.now();return function(t){let i=performance.now();return i-o>50?(o=i,!0):!1}}function W3e(o,e){return o.startPosition.row===e.startPosition.row&&o.startPosition.column===e.startPosition.column&&o.endPosition.row===e.endPosition.row&&o.endPosition.column===e.endPosition.column&&o.startIndex===e.startIndex&&o.endIndex===e.endIndex}function ESe(o,e){return o.startIndex<=e.startIndex&&o.endIndex>=e.startIndex||e.startIndex<=o.startIndex&&e.endIndex>=o.startIndex}var F3e,ISe,mB,TSe=x(()=>{Ze();W();et();rt();So();Dl();fc();LSe();ue();vs();ei();F3e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},ISe=function(o,e){return function(t,i){e(t,i,o)}},mB=class extends T{constructor(e,t,i,n,s,r,a){super(),this.languageId=e,this._ranges=t,this._parser=i,this._parserClass=n,this.textModel=s,this._logService=r,this._telemetryService=a,this._tree=_e(this,void 0),this.tree=this._tree,this._treeLastParsedVersion=_e(this,-1),this.treeLastParsedVersion=this._treeLastParsedVersion,this._onDidChangeContentQueue=new bO,this._tree=_e(this,void 0),this.tree=this._tree,this._register(ne(()=>{this._tree.get()?.delete(),this._lastFullyParsed?.delete(),this._lastFullyParsedWithEdits?.delete(),this._parser.delete()})),this.handleContentChange(void 0,this._ranges)}handleContentChange(e,t){let i=this.textModel.getVersionId(),n=[];t&&(n=this._setRanges(t)),e&&this._applyEdits(e.changes),this._onDidChangeContentQueue.clearPending(),this._onDidChangeContentQueue.schedule(async()=>{if(this._store.isDisposed)return;let s=this._lastFullyParsed,r;this._lastFullyParsedWithEdits&&this._lastFullyParsed&&(r=this._findChangedNodes(this._lastFullyParsedWithEdits,this._lastFullyParsed));let a=await this._parseAndUpdateTree(i);if(a){let l;r?s&&r&&(l=this._findTreeChanges(a,r,n)):this._ranges&&(l=this._ranges.map(d=>({newRange:new S(d.startPosition.row+1,d.startPosition.column+1,d.endPosition.row+1,d.endPosition.column+1),oldRangeLength:d.endIndex-d.startIndex,newRangeStartOffset:d.startIndex,newRangeEndOffset:d.endIndex}))),l||(l=[{newRange:this.textModel.getFullModelRange(),newRangeStartOffset:0,newRangeEndOffset:this.textModel.getValueLength()}]);let c=this._tree.get();Yt(d=>{this._tree.set(a,d,{ranges:l,versionId:i}),this._treeLastParsedVersion.set(i,d)}),c?.delete()}})}_applyEdits(e){for(let t of e){let i=fn.ofRange(S.lift(t.range)),n=fn.ofText(t.text),s=t.text.length===0?n:i.add(n),r={startIndex:t.rangeOffset,oldEndIndex:t.rangeOffset+t.rangeLength,newEndIndex:t.rangeOffset+t.text.length,startPosition:{row:t.range.startLineNumber-1,column:t.range.startColumn-1},oldEndPosition:{row:t.range.endLineNumber-1,column:t.range.endColumn-1},newEndPosition:{row:t.range.startLineNumber+s.lineCount-1,column:s.lineCount?s.columnCount:t.range.endColumn+s.columnCount}};this._tree.get()?.edit(r),this._lastFullyParsedWithEdits?.edit(r)}}_findChangedNodes(e,t){if(this._ranges&&this._ranges.every(a=>a.startPosition.row!==e.rootNode.startPosition.row)||e.rootNode.startPosition.row!==0)return[];let i=e.walk(),n=t.walk(),s=[],r=!0;do if(i.currentNode.hasChanges){let a=i.currentNode.children,l=[],c=a.filter((d,h)=>d?.hasChanges||n.currentNode.children.length<=h?(l.push(h),!0):!1);if(c.length===0||i.currentNode.hasError!==n.currentNode.hasError){for(;i.currentNode.parent&&r&&!i.currentNode.isNamed;)r=XQ(i,n);let d=i.currentNode,h=kSe(i,e)??d;s.push({startIndex:h.startIndex,endIndex:d.endIndex,startPosition:h.startPosition,endPosition:d.endPosition}),r=QQ(i,n)}else c.length>=1&&(r=xSe(i,n,l[0]))}else r=QQ(i,n);while(r);return i.delete(),n.delete(),s}_findTreeChanges(e,t,i){let n=0,s=[];for(let r=0;r0&&a.startIndex>=s[s.length-1].newRangeStartOffset&&a.endIndex<=s[s.length-1].newRangeEndOffset)continue;let l=e.walk(),c=()=>l.startIndexa.endIndex;for(;c();){let p=l.gotoFirstChild(),_=!1;for(;p;)if(c()&&l.currentNode.isNamed){_=!0;break}else p=l.gotoNextSibling();if(!_){l.gotoParent();break}if(l.currentNode.childCount===0)break}let d=l.currentNode.startPosition,h=l.currentNode.endPosition,u=l.currentNode.startIndex,f=l.currentNode.endIndex,g={newRange:new S(d.row+1,d.column+1,h.row+1,h.column+1),newRangeStartOffset:u,newRangeEndOffset:f};ng.newRangeEndOffset&&(g.newRange=g.newRange.setEndPosition(i[n].endPosition.row+1,i[n].endPosition.column+1),g.newRangeEndOffset=i[n].endIndex),n++):n0&&s[s.length-1].newRangeEndOffset>=g.newRangeStartOffset?(s[s.length-1].newRange=S.fromPositions(s[s.length-1].newRange.getStartPosition(),g.newRange.getEndPosition()),s[s.length-1].newRangeEndOffset=g.newRangeEndOffset):s.push(g)}return this._constrainRanges(s)}_constrainRanges(e){if(!this._ranges)return e;let t=[],i=0,n=0;for(;ir.endIndex)n++;else{let a=Math.max(s.newRangeStartOffset,r.startIndex),l=Math.min(s.newRangeEndOffset,r.endIndex),c=s.newRange.intersectRanges(new S(r.startPosition.row+1,r.startPosition.column+1,r.endPosition.row+1,r.endPosition.column+1));t.push({newRange:c,newRangeEndOffset:l,newRangeStartOffset:a}),lthis._parseCallback(l),this._tree.get(),{progressCallback:r,includedRanges:this._ranges}),t+=performance.now()-a,i++,await new Promise(l=>Mc(l))}while(!this._store.isDisposed&&!s&&n===this.textModel.getVersionId());return this._sendParseTimeTelemetry(e,t,i),s&&n===this.textModel.getVersionId()?s:void 0}_parseCallback(e){try{return this.textModel.getTextBuffer().getNearestChunk(e)}catch(t){this._logService.debug("Error getting chunk for tree-sitter parsing",t)}}_setRanges(e){let t=[];if(this._ranges)for(let i of e){let n=!1;for(let s=0;s{qe();pB=class{constructor(e){this._default=e,this._store=[]}get(e){return e=this._store.length;)this._store[this._store.length]=this._default;this._store[e]=t}replace(e,t,i){if(e>=this._store.length)return;if(t===0){this.insert(e,i);return}else if(i===0){this.delete(e,t);return}let n=this._store.slice(0,e),s=this._store.slice(e+t),r=H3e(i,this._default);this._store=n.concat(r,s)}delete(e,t){t===0||e>=this._store.length||this._store.splice(e,t)}insert(e,t){if(t===0||e>=this._store.length)return;let i=[];for(let n=0;n{_B=class{get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._startLineNumber+this._tokens.length-1}constructor(e,t){this._startLineNumber=e,this._tokens=t}getLineTokens(e){return this._tokens[e-this._startLineNumber]}appendLineTokens(e){this._tokens.push(e)}}});var ZC,JQ=x(()=>{NSe();ZC=class{constructor(){this._tokens=[]}add(e,t){if(this._tokens.length>0){let i=this._tokens[this._tokens.length-1];if(i.endLineNumber+1===e){i.appendLineTokens(t);return}}this._tokens.push(new _B(e,[t]))}finalize(){return this._tokens}}});function nJ(o,e,t){let i=o.getLineFirstNonWhitespaceColumn(e),n=[],s=null;for(let r=e-1;i>1&&r>=1;r--){let a=o.getLineFirstNonWhitespaceColumn(r);if(a!==0&&a{Ze();Ae();rt();qa();zb();Qn();Hi();Kx();DSe();JQ();ua();eJ=class{constructor(e,t){this.tokenizationSupport=t,this.initialState=this.tokenizationSupport.getInitialState(),this.store=new b0(e)}getStartState(e){return this.store.getStartState(e,this.initialState)}getFirstInvalidLine(){return this.store.getFirstInvalidLine(this.initialState)}},bB=class extends eJ{constructor(e,t,i,n){super(e,t),this._textModel=i,this._languageIdCodec=n}updateTokensUntilLine(e,t){let i=this._textModel.getLanguageId();for(;;){let n=this.getFirstInvalidLine();if(!n||n.lineNumber>t)break;let s=this._textModel.getLineContent(n.lineNumber),r=oD(this._languageIdCodec,i,this.tokenizationSupport,s,!0,n.startState);e.add(n.lineNumber,r.tokens),this.store.setEndState(n.lineNumber,r.endState)}}getTokenTypeIfInsertingCharacter(e,t){let i=this.getStartState(e.lineNumber);if(!i)return 0;let n=this._textModel.getLanguageId(),s=this._textModel.getLineContent(e.lineNumber),r=s.substring(0,e.column-1)+t+s.substring(e.column-1),a=oD(this._languageIdCodec,n,this.tokenizationSupport,r,!0,i),l=new Si(a.tokens,r,this._languageIdCodec);if(l.getCount()===0)return 0;let c=l.findTokenIndexAtOffset(e.column-1);return l.getStandardTokenType(c)}tokenizeLinesAt(e,t){let i=this.getStartState(e);if(!i)return null;let n=this._textModel.getLanguageId(),s=[],r=i;for(let a of t){let l=oD(this._languageIdCodec,n,this.tokenizationSupport,a,!0,r);s.push(new Si(l.tokens,a,this._languageIdCodec)),r=l.endState}return s}hasAccurateTokensForLine(e){let t=this.store.getFirstInvalidEndStateLineNumberOrMax();return e0&&i>0&&(i--,t--),this._lineEndStates.replace(e.startLineNumber,i,t)}},iJ=class{constructor(){this._ranges=[]}get min(){return this._ranges.length===0?null:this._ranges[0].start}delete(e){let t=this._ranges.findIndex(i=>i.contains(e));if(t!==-1){let i=this._ranges[t];i.start===e?i.endExclusive===e+1?this._ranges.splice(t,1):this._ranges[t]=new ke(e+1,i.endExclusive):i.endExclusive===e+1?this._ranges[t]=new ke(i.start,e):this._ranges.splice(t,1,new ke(i.start,e),new ke(e+1,i.endExclusive))}}addRange(e){ke.addRange(e,this._ranges)}addRangeAndResize(e,t){let i=0;for(;!(i>=this._ranges.length||e.start<=this._ranges[i].endExclusive);)i++;let n=i;for(;!(n>=this._ranges.length||e.endExclusivee.toString()).join(" + ")}};vB=class{constructor(e,t){this._tokenizerWithStateStore=e,this._backgroundTokenStore=t,this._isDisposed=!1,this._isScheduled=!1}dispose(){this._isDisposed=!0}handleChanges(){this._beginBackgroundTokenization()}_beginBackgroundTokenization(){this._isScheduled||!this._tokenizerWithStateStore._textModel.isAttachedToEditor()||!this._hasLinesToTokenize()||(this._isScheduled=!0,sE(e=>{this._isScheduled=!1,this._backgroundTokenizeWithDeadline(e)}))}_backgroundTokenizeWithDeadline(e){let t=Date.now()+e.timeRemaining(),i=()=>{this._isDisposed||!this._tokenizerWithStateStore._textModel.isAttachedToEditor()||!this._hasLinesToTokenize()||(this._backgroundTokenizeForAtLeast1ms(),Date.now()1||this._tokenizeOneInvalidLine(t)>=e)break;while(this._hasLinesToTokenize());this._backgroundTokenStore.setTokens(t.finalize()),this.checkFinished()}_hasLinesToTokenize(){return this._tokenizerWithStateStore?!this._tokenizerWithStateStore.store.allStatesValid():!1}_tokenizeOneInvalidLine(e){let t=this._tokenizerWithStateStore?.getFirstInvalidLine();return t?(this._tokenizerWithStateStore.updateTokensUntilLine(e,t.lineNumber),t.lineNumber):this._tokenizerWithStateStore._textModel.getLineCount()+1}checkFinished(){this._isDisposed||this._tokenizerWithStateStore.store.allStatesValid()&&this._backgroundTokenStore.backgroundTokenizationFinished()}requestTokens(e,t){this._tokenizerWithStateStore.store.invalidateEndStateRange(new Re(e,t))}}});function nl(o){return o.token!==void 0}function RSe(o,e){let t=o,i=[],n;for(;;){if(e.height===t.height){n=e;break}if(nl(t))throw new Error("unexpected");i.push(t),t=t.lastChild()}for(let s=i.length-1;s>=0;s--){let r=i[s];n&&(r.children.length>=3?n=XC.create(r.unappendChild(),n):(r.appendChild(n),n=void 0))}if(n){let s=new XC(n.height+1);return s.appendChild(o),s.appendChild(n),s}else return o}function V3e(o,e){let t=o,i=[];for(;e.height!==t.height;){if(nl(t))throw new Error("unexpected");i.push(t),t=t.children[0]}let n=e;for(let s=i.length-1;s>=0;s--){let r=i[s];n&&(r.children.length>=3?n=XC.create(n,r.unprependChild()):(r.prependChild(n),n=void 0))}return n?XC.create(n,o):o}function z3e(o,e){return o.height===e.height?XC.create(o,e):o.height>e.height?RSe(o,e):V3e(e,o)}var XC,Cc,wB,ASe=x(()=>{XC=class o{get children(){return this._children}get length(){return this._length}constructor(e){this.height=e,this._children=[],this._length=0}static create(e,t){let i=new o(e.height+1);return i.appendChild(e),i.appendChild(t),i}canAppendChild(){return this._children.length<3}appendChild(e){if(!this.canAppendChild())throw new Error("Cannot insert more than 3 children in a ListNode");this._children.push(e),this._length+=e.length,this._updateParentLength(e.length),nl(e)||(e.parent=this)}_updateParentLength(e){let t=this.parent;for(;t;)t._length+=e,t=t.parent}unappendChild(){let e=this._children.pop();return this._length-=e.length,this._updateParentLength(-e.length),e}prependChild(e){if(this._children.length>=3)throw new Error("Cannot prepend more than 3 children in a ListNode");this._children.unshift(e),this._length+=e.length,this._updateParentLength(e.length),nl(e)||(e.parent=this)}unprependChild(){let e=this._children.shift();return this._length-=e.length,this._updateParentLength(-e.length),e}lastChild(){return this._children[this._children.length-1]}dispose(){this._children.splice(0,this._children.length)}};(function(o){o[o.None=0]="None",o[o.ViewportGuess=1]="ViewportGuess",o[o.EditGuess=2]="EditGuess",o[o.Accurate=3]="Accurate"})(Cc||(Cc={}));wB=class{constructor(e){this._textModel=e,this._root=this.createEmptyRoot()}createEmptyRoot(){return{length:this._textModel.getValueLength(),token:0,height:0,tokenQuality:Cc.None}}buildStore(e,t){this._root=this.createFromUpdates(e,t)}createFromUpdates(e,t){if(e.length===0)return this.createEmptyRoot();let i={length:e[0].length,token:e[0].token,height:0,tokenQuality:t};for(let n=1;n0;){let h=l.pop(),u=h.offset;if(u=s){nl(h.node)||(h.node.parent=void 0),a.push(h.node);continue}else if(nl(h.node)&&u+h.node.length>s){a.push({length:u+h.node.length-s,token:h.node.token,height:0,tokenQuality:h.node.tokenQuality});continue}if(!nl(h.node)){let f=u+h.node.length;for(let g=h.node.children.length-1;g>=0;g--)f-=h.node.children[g].length,l.push({node:h.node.children[g],offset:f})}}}let c;i.length>0?c=r.concat(this.createFromUpdates(i,n),a):c=r.concat(a);let d=c[0];for(let h=1;h0;){let{node:s,offset:r}=n.pop();if(!(r+s.length<=e||r>=t)){if(i(s,r))return;if(!nl(s)){let l=r+s.length;for(let c=s.children.length-1;c>=0;c--)l-=s.children[c].length,n.push({node:s.children[c],offset:l})}}}}getTokenAt(e){let t;return this.traverseInOrderInRange(e,this._root.length,(i,n)=>nl(i)?(t={token:i.token,startOffsetInclusive:n,length:i.length},!0):!1),t}getTokensInRange(e,t){let i=[];return this.traverseInOrderInRange(e,t,(n,s)=>{if(nl(n)){let r=n.length,a=s;st?(a=e,r=t-e):st&&(r-=s+n.length-t),i.push({token:n.token,startOffsetInclusive:a,length:r})}return!1}),i}markForRefresh(e,t){this.traverseInOrderInRange(e,t,i=>(nl(i)&&(i.tokenQuality=Cc.None),!1))}rangeHasTokens(e,t,i){let n=!0;return this.traverseInOrderInRange(e,t,s=>(nl(s)&&s.tokenQuality(nl(n)&&n.tokenQuality!==Cc.Accurate&&(i=!0),!1)),i}getNeedsRefresh(){let e=[];return this.traverseInOrderInRange(0,this._textModel.getValueLength(),(t,i)=>(nl(t)&&t.tokenQuality!==Cc.Accurate&&(e.length>0&&e[e.length-1].endOffset===i?e[e.length-1].endOffset+=t.length:e.push({startOffset:i,endOffset:i+t.length})),!1)),e}dispose(){let e=[[this._root,!1]];for(;e.length>0;){let[t,i]=e.pop();if(!nl(t))if(i)t.dispose(),t.parent=void 0;else{e.push([t,!0]);for(let n=t.children.length-1;n>=0;n--)e.push([t.children[n],!1])}}this._root=void 0}}});var MSe,OSe=x(()=>{Ie();MSe=Ne("treeSitterThemeService")});function PSe(o){return{createChangeSummary:e=>({changes:[]}),handleChange(e,t){for(let i in o)e.didChange(o[i])&&t.changes.push({key:i,change:e.change});return!0},beforeUpdate(e,t){for(let i in o){if(i==="changes")throw new xe('property name "changes" is reserved for change tracking');t[i]=o[i].read(e)}}}}function FSe(o){let e;return{createChangeSummary:t=>({changes:[]}),handleChange(t,i){e||(e=o());for(let n in e)t.didChange(e[n])&&i.changes.push({key:n,change:t.change});return!0},beforeUpdate(t,i){e||(e=o());for(let n in e){if(n==="changes")throw new xe('property name "changes" is reserved for change tracking');i[n]=e[n].read(t)}}}}var sJ=x(()=>{Ae();Rs();ae();W()});var U3e,$3e,CB,q3e,j3e,BSe=x(()=>{ae();W();rt();qa();oJ();ASe();et();ua();Pe();ue();Rt();OSe();Ae();Pb();Jt();sJ();U3e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},$3e=function(o,e){return function(t,i){e(t,i,o)}},CB=class extends T{get _textModel(){return this._tree.textModel}constructor(e,t,i,n,s){super(),this._tree=e,this._highlightingQueries=t,this._languageIdCodec=i,this._visibleLineRanges=n,this._treeSitterThemeService=s,this._onDidChangeTokens=this._register(new N),this.onDidChangeTokens=this._onDidChangeTokens.event,this._onDidCompleteBackgroundTokenization=this._register(new N),this.onDidChangeBackgroundTokenization=this._onDidCompleteBackgroundTokenization.event,this._encodedLanguageId=this._languageIdCodec.encodeLanguageId(this._tree.languageId),this._register(pa(this._treeSitterThemeService.onChange,()=>{this._updateTheme()})),this._tokenStore=this._register(new wB(this._textModel)),this._accurateVersion=this._textModel.getVersionId(),this._guessVersion=this._textModel.getVersionId(),this._tokenStore.buildStore(this._createEmptyTokens(),Cc.None),this._register(Se(r=>{let a=this._visibleLineRanges.read(r);this._parseAndTokenizeViewPort(a)})),this._register(kf({owner:this,changeTracker:PSe({tree:this._tree.tree})},(r,a)=>{let l=a.changes.at(0)?.change;if(a.changes.length>1)throw new xe("The tree changed twice in one transaction. This is currently not supported and should not happen.");if(!l)a.tree&&this._firstTreeUpdate(this._tree.treeLastParsedVersion.read(r));else{if(this.hasTokens())for(let c of l.ranges)this._markForRefresh(c.newRange);this.hasTokens()?this._handleTreeUpdate(l.ranges,l.versionId):this._firstTreeUpdate(l.versionId)}}))}handleContentChanged(e){this._guessVersion=e.versionId;for(let t of e.changes)if(t.text.length>t.rangeLength){let i=t.rangeOffset>0?t.rangeOffset-1:t.rangeOffset,n=this._tokenStore.getTokenAt(i),s;n?(s={startOffsetInclusive:n.startOffsetInclusive,length:n.length+t.text.length-t.rangeLength,token:n.token},this._tokenStore.markForRefresh(i,t.rangeOffset+(t.text.length>t.rangeLength?t.text.length:t.rangeLength))):s={startOffsetInclusive:i,length:t.text.length,token:0},this._tokenStore.update(n?.length??0,[s],Cc.EditGuess)}else if(t.text.length0?n.newTokens[n.newTokens.length-1]:void 0,r;s&&this._guessVersion>=e?r=s.startOffsetInclusive+s.length-n.newTokens[0].startOffsetInclusive:n.oldRangeLength?r=n.oldRangeLength:r=0,this._tokenStore.update(r,n.newTokens,i)}}_markForRefresh(e){this._tokenStore.markForRefresh(this._textModel.getOffsetAt(e.getStartPosition()),this._textModel.getOffsetAt(e.getEndPosition()))}_getNeedsRefresh(){let e=this._tokenStore.getNeedsRefresh();return e?e.map(t=>({range:S.fromPositions(this._textModel.getPositionAt(t.startOffset),this._textModel.getPositionAt(t.endOffset)),startOffset:t.startOffset,endOffset:t.endOffset})):[]}_parseAndTokenizeViewPort(e){let t=e.map(i=>i.toInclusiveRange()).filter(oo);for(let i of t){let n=this._textModel.getOffsetAt(i.getStartPosition()),s=this._textModel.getOffsetAt(i.getEndPosition()),r=this._textModel.getVersionId();if(this._rangeHasTokens(i,Cc.ViewportGuess))continue;let a=this._textModel.getValueInRange(i),l=this._forceParseAndTokenizeContent(i,n,s,a,!0);if(!l||this._rangeHasTokens(i,Cc.ViewportGuess)||l.length===0)continue;let c=l[l.length-1],d=c.startOffsetInclusive+c.length-l[0].startOffsetInclusive;this._updateTokensInStore(r,[{newTokens:l,oldRangeLength:d}],Cc.ViewportGuess),this._onDidChangeTokens.fire({changes:{semanticTokensApplied:!1,ranges:[{fromLineNumber:i.startLineNumber,toLineNumber:i.endLineNumber}]}})}}_guessTokensForLinesContent(e,t){if(t.length===0)return;let i=t.join(this._textModel.getEOL()),n=new S(1,1,e+t.length,t[t.length-1].length+1),s=this._textModel.getOffsetAt({lineNumber:e,column:1}),r=this._forceParseAndTokenizeContent(n,s,s+i.length,i,!1);if(!r)return;let a=new Array(t.length),l=0,c=0,d=0;for(let h=0;h{let n=i.toInclusiveRange();if(!n)return;let s=this._textModel.getOffsetAt(n.getStartPosition()),r=this._textModel.getOffsetAt(n.getEndPosition());return{newRange:n,newRangeEndOffset:r,newRangeStartOffset:s}}).filter(oo);return this._handleTreeUpdate(t,e)}_handleTreeUpdate(e,t){let i=[];for(let r=0;r1e3){let l=e[r].newRange.endLineNumber,c=e[r].newRange.startLineNumber,d=e[r].newRange.startColumn,h=c+1e3;do{let u=new M(c,d),f=h===e[r].newRange.endLineNumber?e[r].newRange.endColumn:this._textModel.getLineMaxColumn(h),g=new M(h,f),p=S.fromPositions(u,g);i.push({range:p,startOffset:this._textModel.getOffsetAt(p.getStartPosition()),endOffset:this._textModel.getOffsetAt(p.getEndPosition())}),c=h+1,d=1,hl?h=l:h=h+1e3}while(h<=l)}else if(r===0||i[r-1].endOffsetthis._getCaptures(r.range));return this._updateTreeForRanges(i,t,s).then(()=>{!this._textModel.isDisposed()&&this._tree.treeLastParsedVersion.get()===this._textModel.getVersionId()&&this._refreshNeedsRefresh(t)})}async _updateTreeForRanges(e,t,i){let n;for(let s=0;sMc(c))}this._onDidCompleteBackgroundTokenization.fire()}_refreshNeedsRefresh(e){let t=this._getNeedsRefresh();if(t.length===0)return;let i=new Array(t.length);for(let n=0;n({name:i.name,text:i.node.text,node:{startIndex:i.node.startIndex,endIndex:i.node.endIndex,startPosition:{lineNumber:i.node.startPosition.row+1,column:i.node.startPosition.column+1},endPosition:{lineNumber:i.node.endPosition.row+1,column:i.node.endPosition.column+1}},encodedLanguageId:this._encodedLanguageId})):[]}captureAtRangeWithInjections(e){let t=this.captureAtRange(e);for(let i=0;ie.startLineNumber&&se.startLineNumber&&re.endColumn?e.endColumn:l:r>e.endLineNumber?e.endColumn:l,f=new S(c,h,d,u),g=this._getInjectionCaptures(n,f);g&&g.length>0&&(t.splice(i+1,0,...g),i+=g.length)}return t}tokenizeEncoded(e){let t=this._tokenizeEncoded(e);if(!t)return;let i=this._rangeTokensAsUpdates(this._textModel.getOffsetAt({lineNumber:e,column:1}),t.result);t.versionId===this._textModel.getVersionId()&&this._updateTokensInStore(t.versionId,[{newTokens:i,oldRangeLength:this._textModel.getLineLength(e)}],Cc.Accurate)}_getCaptures(e){return this.captureAtRangeWithInjections(e)}_tokenize(e,t,i){let n=this._getCaptures(e),s=this._tokenizeCapturesWithMetadata(n,t,i);if(s)return{...s,versionId:this._tree.treeLastParsedVersion.get()}}_createTokensFromCaptures(e,t,i){let n=this._tree.tree.get(),s=cn.create(),r=i-t,a=this._languageIdCodec.encodeLanguageId(this._tree.languageId),l=q3e[this._tree.languageId]||"source";if(e.length===0)return n?(s.stop(),{endOffsets:[{endOffset:r,scopes:[],encodedLanguageId:a}],captureTime:s.elapsed()}):void 0;let c=Array(e.length);c.fill({endOffset:0,scopes:[l],encodedLanguageId:a});let d=0,h=()=>{c.push({endOffset:0,scopes:[l],encodedLanguageId:a})},u=(p,_)=>p.name.includes("punctuation")&&p.text?Array.from(p.text.matchAll(j3e)).map(b=>_+b.index):void 0,f=(p,_,b,v)=>{if(v!==void 0){let w=c[v].scopes,C=c[v].bracket;if((v>0?c[v-1].endOffset:0)!==_){let k;if(C&&C.length>0){k=[];let I=[];for(let E=0;Eb&&I.push(D)}k.length===0&&(k=void 0),I.length===0?C=void 0:C=I}c.splice(v,0,{endOffset:_,scopes:[...w],bracket:k,encodedLanguageId:p.encodedLanguageId}),v++,h(),d++}c.splice(v,0,{endOffset:b,scopes:[...w,p.name],bracket:u(p,_),encodedLanguageId:p.encodedLanguageId}),c[d].bracket=C}else c[d]={endOffset:b,scopes:[l,p.name],bracket:u(p,_),encodedLanguageId:p.encodedLanguageId};d++};for(let p=0;p0?C=c[d-1].endOffset:C=v-t-1;let k=w-y;if(C>=0&&C=w){let I=d-1,E=c[I].endOffset,D=I>=2?c[I-1].endOffset:0;do{if(D+y===E){if(D===k){c[I].scopes.push(_.name);let O=c[I].bracket;c[I].bracket=O&&O.length>0?O:u(_,k)}}else if(D<=k){f(_,k,w,I);break}I--,D=I>=1?c[I-1].endOffset:0,E=I>=0?c[I].endOffset:0}while(E>k)}else f(_,k,w)}c[d-1].endOffset0&&(h(),c[d]={endOffset:r,scopes:c[d].scopes,encodedLanguageId:this._encodedLanguageId},d++);for(let p=0;p0,void 0)}let a=n.elapsed();return{endOffsetsAndMetadata:r,captureTime:s.captureTime,metadataTime:a}}_tokenizeEncoded(e){let t=this._textModel.getOffsetAt({lineNumber:e,column:1}),i=this._textModel.getLineCount(),n=e+1<=i?this._textModel.getOffsetAt({lineNumber:e+1,column:1}):this._textModel.getValueLength(),s=n-t,r=this._tokenize(new S(e,1,e,s+1),t,n);if(r)return{result:r.endOffsetsAndMetadata,captureTime:r.captureTime,metadataTime:r.metadataTime,versionId:r.versionId}}_endOffsetTokensToUint32Array(e){let t=new Uint32Array(e.length*2);for(let i=0;i\(\)]/g});var v0,yB=x(()=>{Ie();v0=Ne("treeSitterLibraryService")});var SB,xB,WSe=x(()=>{Rs();ae();W();aa();vs();ei();SB=class o{static resolved(e){return new o(Promise.resolve(e))}constructor(e){this._value=_e(this,void 0),this.promiseResult=this._value,this.promise=e.then(t=>(Yt(i=>{this._value.set(new xB(t,void 0),i)}),t),t=>{throw Yt(i=>{this._value.set(new xB(void 0,t),i)}),t})}},xB=class{constructor(e,t){this.data=e,this.error=t}getDataOrThrow(){if(this.error)throw this.error;return this.data}}});var K3e,HSe,kB,VSe=x(()=>{ae();W();ua();dB();et();TSe();Ie();BSe();yB();WSe();Gt();Jt();K3e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},HSe=function(o,e){return function(t,i){e(t,i,o)}},kB=class extends _0{constructor(e,t,i,n,s,r){super(t,i),this._languageIdObs=e,this._treeSitterLibraryService=s,this._instantiationService=r,this._backgroundTokenizationState=1,this._onDidChangeBackgroundTokenizationState=this._register(new N),this.onDidChangeBackgroundTokenizationState=this._onDidChangeBackgroundTokenizationState.event;let a=new SB(this._treeSitterLibraryService.getParserClass()),l=V(this,c=>a.promiseResult?.read(c)?.getDataOrThrow());this._tree=V(this,c=>{let d=l.read(c);if(!d)return;let h=this._languageIdObs.read(c),u=this._treeSitterLibraryService.getLanguage(h,!1,c);if(!u)return;let f=new d;if(c.store.add(ne(()=>{f.delete()})),f.setLanguage(u),this._treeSitterLibraryService.getInjectionQueries(h,c)!==void 0)return c.store.add(this._instantiationService.createInstance(mB,h,void 0,f,d,this._textModel))}),this._tokenizationImpl=V(this,c=>{let d=this._tree.read(c);if(!d)return;let h=this._treeSitterLibraryService.getHighlightingQueries(d.languageId,c);if(h)return c.store.add(this._instantiationService.createInstance(CB,d,h,this._languageIdCodec,n))}),this._register(Se(c=>{let d=this._tokenizationImpl.read(c);d&&(c.store.add(d.onDidChangeTokens(h=>{this._onDidChangeTokens.fire(h.changes)})),c.store.add(d.onDidChangeBackgroundTokenization(h=>{this._backgroundTokenizationState=2,this._onDidChangeBackgroundTokenizationState.fire()})))}))}getLineTokens(e){let t=this._tokenizationImpl.get();if(!t){let i=this._textModel.getLineContent(e);return Si.createEmpty(i,this._languageIdCodec)}return t.getLineTokens(e)}todo_resetTokenization(e=!0){e&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]})}handleDidChangeAttached(){}handleDidChangeContent(e){e.isFlush?this.todo_resetTokenization(!1):this._tokenizationImpl.get()?.handleContentChanged(e),this._tree.get()?.handleContentChange(e)}forceTokenization(e){let t=this._tokenizationImpl.get();t&&(t.hasAccurateTokensForLine(e)||t.tokenizeEncoded(e))}hasAccurateTokensForLine(e){let t=this._tokenizationImpl.get();return t?t.hasAccurateTokensForLine(e):!1}isCheapToTokenize(e){return!0}getTokenTypeIfInsertingCharacter(e,t,i){return 0}tokenizeLinesAt(e,t){let i=this._tokenizationImpl.get();return i?i.tokenizeLinesAt(e,t):null}get hasTokens(){let e=this._tokenizationImpl.get();return e?e.hasTokens():!1}};kB=K3e([HSe(4,v0),HSe(5,ie)],kB)});var LB,zSe=x(()=>{qe();ua();LB=class o{constructor(e){this._pieces=[],this._isComplete=!1,this._languageIdCodec=e}flush(){this._pieces=[],this._isComplete=!1}isEmpty(){return this._pieces.length===0}set(e,t,i=void 0){if(this._pieces=e||[],this._isComplete=t,i)for(let n of this._pieces)n.reportIfInvalid(i)}setPartial(e,t){let i=e;if(t.length>0){let s=t[0].getRange(),r=t[t.length-1].getRange();if(!s||!r)return e;i=e.plusRange(s).plusRange(r)}let n=null;for(let s=0,r=this._pieces.length;si.endLineNumber){n=n||{index:s};break}if(a.removeTokens(i),a.isEmpty()){this._pieces.splice(s,1),s--,r--;continue}if(a.endLineNumberi.endLineNumber){n=n||{index:s};continue}let[l,c]=a.split(i);if(l.isEmpty()){n=n||{index:s};continue}c.isEmpty()||(this._pieces.splice(s,1,l,c),s++,r++,n=n||{index:s})}return n=n||{index:this._pieces.length},t.length>0&&(this._pieces=b_(this._pieces,n.index,t)),i}isComplete(){return this._isComplete}addSparseTokens(e,t){if(t.getTextLength()===0)return t;let i=this._pieces;if(i.length===0)return t;let n=o._findFirstPieceWithLine(i,e),s=i[n].getLineTokens(e);if(!s)return t;let r=t.getCount(),a=s.getCount(),l=0,c=[],d=0,h=0,u=(f,g)=>{f<=h||(h=f,c[d++]=f,c[d++]=g)};for(let f=0;f>>0,v=~b>>>0;for(;lt)n=s-1;else{for(;s>i&&e[s-1].startLineNumber<=t&&t<=e[s-1].endLineNumber;)s--;return s}}return i}acceptEdit(e,t,i,n,s){for(let r=0;r{ua();rg=new Uint32Array(0).buffer,lg=class o{static deleteBeginning(e,t){return e===null||e===rg?e:o.delete(e,0,t)}static deleteEnding(e,t){if(e===null||e===rg)return e;let i=ag(e),n=i[i.length-2];return o.delete(e,t,n)}static delete(e,t,i){if(e===null||e===rg||t===i)return e;let n=ag(e),s=n.length>>>1;if(t===0&&n[n.length-2]===i)return rg;let r=Si.findIndexInTokensArray(n,t),a=r>0?n[r-1<<1]:0,l=n[r<<1];if(id&&(n[c++]=g,n[c++]=n[(f<<1)+1],d=g)}if(c===n.length)return e;let u=new Uint32Array(c);return u.set(n.subarray(0,c),0),u.buffer}static append(e,t){if(t===rg)return e;if(e===rg)return t;if(e===null)return e;if(t===null)return null;let i=ag(e),n=ag(t),s=n.length>>>1,r=new Uint32Array(i.length+n.length);r.set(i,0);let a=i.length,l=i[i.length-2];for(let c=0;c>>1,r=Si.findIndexInTokensArray(n,t);r>0&&n[r-1<<1]===t&&r--;for(let a=r;a>>0}var sD,qSe=x(()=>{qe();Pe();USe();ua();rC();sD=class o{constructor(e){this._lineTokens=[],this._len=0,this._languageIdCodec=e}flush(){this._lineTokens=[],this._len=0}get hasTokens(){return this._lineTokens.length>0}getTokens(e,t,i){let n=null;if(t1&&(s=Wo.getLanguageId(n[1])!==e),!s)return rg}if(!n||n.length===0){let s=new Uint32Array(2);return s[0]=t,s[1]=$Se(e),s.buffer}return n[n.length-2]=t,n.byteOffset===0&&n.byteLength===n.buffer.byteLength?n.buffer:n}_ensureLine(e){for(;e>=this._len;)this._lineTokens[this._len]=null,this._len++}_deleteLines(e,t){t!==0&&(e+t>this._len&&(t=this._len-e),this._lineTokens.splice(e,t),this._len-=t)}_insertLines(e,t){if(t===0)return;let i=[];for(let n=0;n=this._len)return;if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;this._lineTokens[t]=lg.delete(this._lineTokens[t],e.startColumn-1,e.endColumn-1);return}this._lineTokens[t]=lg.deleteEnding(this._lineTokens[t],e.startColumn-1);let i=e.endLineNumber-1,n=null;i=this._len)){if(t===0){this._lineTokens[n]=lg.insert(this._lineTokens[n],e.column-1,i);return}this._lineTokens[n]=lg.deleteEnding(this._lineTokens[n],e.column-1),this._lineTokens[n]=lg.insert(this._lineTokens[n],e.column-1,i),this._insertLines(e.lineNumber,t)}}setMultilineTokens(e,t){if(e.length===0)return{changes:[]};let i=[];for(let n=0,s=e.length;n{Ae();ae();W();zb();Pe();Qn();Ci();JQ();qSe();oJ();dB();IB=class extends _0{constructor(e,t,i,n){super(e,t),this.getLanguageId=i,this._tokenizer=null,this._backgroundTokenizationState=1,this._onDidChangeBackgroundTokenizationState=this._register(new N),this.onDidChangeBackgroundTokenizationState=this._onDidChangeBackgroundTokenizationState.event,this._defaultBackgroundTokenizer=null,this._backgroundTokenizer=this._register(new Qe),this._tokens=new sD(this._languageIdCodec),this._debugBackgroundTokenizer=this._register(new Qe),this._attachedViewStates=this._register(new vh),this._register(Ti.onDidChange(s=>{let r=this.getLanguageId();s.changedLanguages.indexOf(r)!==-1&&this.todo_resetTokenization()})),this.todo_resetTokenization(),this._register(n.onDidChangeVisibleRanges(({view:s,state:r})=>{if(r){let a=this._attachedViewStates.get(s);a||(a=new cB(()=>this.refreshRanges(a.lineRanges)),this._attachedViewStates.set(s,a)),a.handleStateChange(r)}else this._attachedViewStates.deleteAndDispose(s)}))}todo_resetTokenization(e=!0){this._tokens.flush(),this._debugBackgroundTokens?.flush(),this._debugBackgroundStates&&(this._debugBackgroundStates=new b0(this._textModel.getLineCount())),e&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]});let t=()=>{if(this._textModel.isTooLargeForTokenization())return[null,null];let s=Ti.get(this.getLanguageId());if(!s)return[null,null];let r;try{r=s.getInitialState()}catch(a){return De(a),[null,null]}return[s,r]},[i,n]=t();if(i&&n?this._tokenizer=new bB(this._textModel.getLineCount(),i,this._textModel,this._languageIdCodec):this._tokenizer=null,this._backgroundTokenizer.clear(),this._defaultBackgroundTokenizer=null,this._tokenizer){let s={setTokens:r=>{this.setTokens(r)},setFontInfo:r=>{this.setFontInfo(r)},backgroundTokenizationFinished:()=>{if(this._backgroundTokenizationState===2)return;let r=2;this._backgroundTokenizationState=r,this._onDidChangeBackgroundTokenizationState.fire()},setEndState:(r,a)=>{if(!this._tokenizer)return;let l=this._tokenizer.store.getFirstInvalidEndStateLineNumber();l!==null&&r>=l&&this._tokenizer?.store.setEndState(r,a)}};i&&i.createBackgroundTokenizer&&!i.backgroundTokenizerShouldOnlyVerifyTokens&&(this._backgroundTokenizer.value=i.createBackgroundTokenizer(this._textModel,s)),!this._backgroundTokenizer.value&&!this._textModel.isTooLargeForTokenization()&&(this._backgroundTokenizer.value=this._defaultBackgroundTokenizer=new vB(this._tokenizer,s),this._defaultBackgroundTokenizer.handleChanges()),i?.backgroundTokenizerShouldOnlyVerifyTokens&&i.createBackgroundTokenizer?(this._debugBackgroundTokens=new sD(this._languageIdCodec),this._debugBackgroundStates=new b0(this._textModel.getLineCount()),this._debugBackgroundTokenizer.clear(),this._debugBackgroundTokenizer.value=i.createBackgroundTokenizer(this._textModel,{setTokens:r=>{this._debugBackgroundTokens?.setMultilineTokens(r,this._textModel)},setFontInfo:r=>{this.setFontInfo(r)},backgroundTokenizationFinished(){},setEndState:(r,a)=>{this._debugBackgroundStates?.setEndState(r,a)}})):(this._debugBackgroundTokens=void 0,this._debugBackgroundStates=void 0,this._debugBackgroundTokenizer.value=void 0)}this.refreshAllVisibleLineTokens()}handleDidChangeAttached(){this._defaultBackgroundTokenizer?.handleChanges()}handleDidChangeContent(e){if(e.isFlush)this.todo_resetTokenization(!1);else if(!e.isEolChange){for(let t of e.changes){let[i,n]=vc(t.text);this._tokens.acceptEdit(t.range,i,n),this._debugBackgroundTokens?.acceptEdit(t.range,i,n)}this._debugBackgroundStates?.acceptChanges(e.changes),this._tokenizer&&this._tokenizer.store.acceptChanges(e.changes),this._defaultBackgroundTokenizer?.handleChanges()}}setTokens(e){let{changes:t}=this._tokens.setMultilineTokens(e,this._textModel);return t.length>0&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:t}),{changes:t}}setFontInfo(e){this._onDidChangeFontTokens.fire({changes:e})}refreshAllVisibleLineTokens(){let e=Re.joinMany([...this._attachedViewStates].map(([t,i])=>i.lineRanges));this.refreshRanges(e)}refreshRanges(e){for(let t of e)this.refreshRange(t.startLineNumber,t.endLineNumberExclusive-1)}refreshRange(e,t){if(!this._tokenizer)return;e=Math.max(1,Math.min(this._textModel.getLineCount(),e)),t=Math.min(this._textModel.getLineCount(),t);let i=new ZC,{heuristicTokens:n}=this._tokenizer.tokenizeHeuristically(i,e,t),s=this.setTokens(i.finalize());if(n)for(let r of s.changes)this._backgroundTokenizer.value?.requestTokens(r.fromLineNumber,r.toLineNumber+1);this._defaultBackgroundTokenizer?.checkFinished()}forceTokenization(e){let t=new ZC;this._tokenizer?.updateTokensUntilLine(t,e),this.setTokens(t.finalize()),this._defaultBackgroundTokenizer?.checkFinished()}hasAccurateTokensForLine(e){return this._tokenizer?this._tokenizer.hasAccurateTokensForLine(e):!0}isCheapToTokenize(e){return this._tokenizer?this._tokenizer.isCheapToTokenize(e):!0}getLineTokens(e){let t=this._textModel.getLineContent(e),i=this._tokens.getTokens(this._textModel.getLanguageId(),e-1,t);if(this._debugBackgroundTokens&&this._debugBackgroundStates&&this._tokenizer&&this._debugBackgroundStates.getFirstInvalidEndStateLineNumberOrMax()>e&&this._tokenizer.store.getFirstInvalidEndStateLineNumberOrMax()>e){let n=this._debugBackgroundTokens.getTokens(this._textModel.getLanguageId(),e-1,t);!i.equals(n)&&this._debugBackgroundTokenizer.value?.reportMismatchingTokens&&this._debugBackgroundTokenizer.value.reportMismatchingTokens(e)}return i}getTokenTypeIfInsertingCharacter(e,t,i){if(!this._tokenizer)return 0;let n=this._textModel.validatePosition(new M(e,t));return this.forceTokenization(n.lineNumber),this._tokenizer.getTokenTypeIfInsertingCharacter(n,i)}tokenizeLinesAt(e,t){return this._tokenizer?(this.forceTokenization(e),this._tokenizer.tokenizeLinesAt(e,t)):null}get hasTokens(){return this._tokens.hasTokens}}});var G3e,EB,TB,DB,KSe=x(()=>{Ae();ae();zb();Pe();_w();xr();Do();dX();VSe();zSe();Ie();jSe();yB();et();ei();Gt();G3e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},EB=function(o,e){return function(t,i){e(t,i,o)}},DB=TB=class extends B1{constructor(e,t,i,n,s,r,a,l){super(),this._textModel=e,this._bracketPairsTextModelPart=t,this._languageId=i,this._attachedViews=n,this._languageService=s,this._languageConfigurationService=r,this._instantiationService=a,this._treeSitterLibraryService=l,this._onDidChangeFontTokens=this._register(new N),this.onDidChangeFontTokens=this._onDidChangeFontTokens.event,this._languageIdObs=_e(this,this._languageId),this._useTreeSitter=V(this,d=>{let h=this._languageIdObs.read(d);return this._treeSitterLibraryService.supportsLanguage(h,d)}),this.tokens=V(this,d=>{let h;return this._useTreeSitter.read(d)?h=d.store.add(this._instantiationService.createInstance(kB,this._languageIdObs,this._languageService.languageIdCodec,this._textModel,this._attachedViews.visibleLineRanges)):h=d.store.add(new IB(this._languageService.languageIdCodec,this._textModel,()=>this._languageId,this._attachedViews)),d.store.add(h.onDidChangeTokens(u=>{this._emitModelTokensChangedEvent(u)})),d.store.add(h.onDidChangeFontTokens(u=>{this._textModel._isDisposing()||this._onDidChangeFontTokens.fire(u)})),d.store.add(h.onDidChangeBackgroundTokenizationState(u=>{this._bracketPairsTextModelPart.handleDidChangeBackgroundTokenizationState()})),h});let c=!1;this.tokens.recomputeInitiallyAndOnChange(this._store,d=>{c&&d.todo_resetTokenization(),c=!0}),this._semanticTokens=new LB(this._languageService.languageIdCodec),this._onDidChangeLanguage=this._register(new N),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new N),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new N),this.onDidChangeTokens=this._onDidChangeTokens.event,this._onDidChangeFontTokens=this._register(new N),this.onDidChangeFontTokens=this._onDidChangeFontTokens.event}handleLanguageConfigurationServiceChange(e){e.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})}handleDidChangeContent(e){if(e.isFlush)this._semanticTokens.flush();else if(!e.isEolChange)for(let t of e.changes){let[i,n,s]=vc(t.text);this._semanticTokens.acceptEdit(t.range,i,n,s,t.text.length>0?t.text.charCodeAt(0):0)}this.tokens.get().handleDidChangeContent(e)}handleDidChangeAttached(){this.tokens.get().handleDidChangeAttached()}getLineTokens(e){this.validateLineNumber(e);let t=this.tokens.get().getLineTokens(e);return this._semanticTokens.addSparseTokens(e,t)}_emitModelTokensChangedEvent(e){this._textModel._isDisposing()||(this._bracketPairsTextModelPart.handleDidChangeTokens(e),this._onDidChangeTokens.fire(e))}validateLineNumber(e){if(e<1||e>this._textModel.getLineCount())throw new xe("Illegal value for lineNumber")}get hasTokens(){return this.tokens.get().hasTokens}resetTokenization(){this.tokens.get().todo_resetTokenization()}get backgroundTokenizationState(){return this.tokens.get().backgroundTokenizationState}forceTokenization(e){this.validateLineNumber(e),this.tokens.get().forceTokenization(e)}hasAccurateTokensForLine(e){return this.validateLineNumber(e),this.tokens.get().hasAccurateTokensForLine(e)}isCheapToTokenize(e){return this.validateLineNumber(e),this.tokens.get().isCheapToTokenize(e)}tokenizeIfCheap(e){this.validateLineNumber(e),this.tokens.get().tokenizeIfCheap(e)}getTokenTypeIfInsertingCharacter(e,t,i){return this.tokens.get().getTokenTypeIfInsertingCharacter(e,t,i)}tokenizeLinesAt(e,t){return this.tokens.get().tokenizeLinesAt(e,t)}setSemanticTokens(e,t){this._semanticTokens.set(e,t,this._textModel),this._emitModelTokensChangedEvent({semanticTokensApplied:e!==null,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]})}hasCompleteSemanticTokens(){return this._semanticTokens.isComplete()}hasSomeSemanticTokens(){return!this._semanticTokens.isEmpty()}setPartialSemanticTokens(e,t){if(this.hasCompleteSemanticTokens())return;let i=this._textModel.validateRange(this._semanticTokens.setPartial(e,t));this._emitModelTokensChangedEvent({semanticTokensApplied:!0,ranges:[{fromLineNumber:i.startLineNumber,toLineNumber:i.endLineNumber}]})}getWordAtPosition(e){this.assertNotDisposed();let t=this._textModel.validatePosition(e),i=this._textModel.getLineContent(t.lineNumber),n=this.getLineTokens(t.lineNumber),s=n.findTokenIndexAtOffset(t.column-1),[r,a]=TB._findLanguageBoundaries(n,s),l=y_(t.column,this.getLanguageConfiguration(n.getLanguageId(s)).getWordDefinition(),i.substring(r,a),r);if(l&&l.startColumn<=e.column&&e.column<=l.endColumn)return l;if(s>0&&r===t.column-1){let[c,d]=TB._findLanguageBoundaries(n,s-1),h=y_(t.column,this.getLanguageConfiguration(n.getLanguageId(s-1)).getWordDefinition(),i.substring(c,d),c);if(h&&h.startColumn<=e.column&&e.column<=h.endColumn)return h}return null}getLanguageConfiguration(e){return this._languageConfigurationService.getLanguageConfiguration(e)}static _findLanguageBoundaries(e,t){let i=e.getLanguageId(t),n=0;for(let r=t;r>=0&&e.getLanguageId(r)===i;r--)n=e.getStartOffset(r);let s=e.getLineContent().length;for(let r=t,a=e.getCount();r{n.push({offset:r,text:l.substring(e[s].content),tokenMetadata:c.metadata})}):n.push({offset:r,text:e[s].content,tokenMetadata:Si.defaultTokenMetadata})}i=o.withInserted(n)}else i=o;return i}function PB(o){let e=0;for(let t of o)if(t===" "||t===" ")e++;else break;return e}function rJ(o){return!!(o.options.overviewRuler&&o.options.overviewRuler.color)}function tBe(o){return!!o.after||!!o.before}function AB(o){return!!o.options.after||!!o.options.before}function cg(o){return o.replace(/[^a-z0-9\-_]/gi," ")}function ZSe(o){return o instanceof Ve?o:Ve.createDynamic(o)}var Y3e,NB,QC,RB,Q3e,J3e,eBe,aJ,rD,dg,MB,OB,lJ,cJ,dJ,hg,Ve,YSe,hJ,uJ,Kn=x(()=>{qe();n0();Yi();Ae();ae();W();He();ai();Ie();Kc();H3();zb();m4();WI();Pe();ue();gi();xr();Do();ho();Xd();KC();ua();Qye();Jye();IQ();hX();tSe();fSe();HQ();_Se();Bx();dB();SSe();$Q();KSe();Y3e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},NB=function(o,e){return function(t,i){e(t,i,o)}};RB=0,Q3e=999,J3e=1e4,eBe=300,aJ=class{constructor(e){this._source=e,this._eos=!1}read(){if(this._eos)return null;let e=[],t=0,i=0;do{let n=this._source.read();if(n===null)return this._eos=!0,t===0?null:e.join("");if(n.length>0&&(e[t++]=n,i+=n.length),i>=64*1024)return e.join("")}while(!0)}},rD=()=>{throw new Error("Invalid change accessor")},dg=class extends T{static{QC=this}static{this._MODEL_SYNC_LIMIT=50*1024*1024}static{this.LARGE_FILE_SIZE_THRESHOLD=20*1024*1024}static{this.LARGE_FILE_LINE_COUNT_THRESHOLD=300*1e3}static{this.LARGE_FILE_HEAP_OPERATION_THRESHOLD=256*1024*1024}static{this.DEFAULT_CREATION_OPTIONS={isForSimpleWidget:!1,tabSize:_s.tabSize,indentSize:_s.indentSize,insertSpaces:_s.insertSpaces,detectIndentation:!1,defaultEOL:1,trimAutoWhitespace:_s.trimAutoWhitespace,largeFileOptimizations:_s.largeFileOptimizations,bracketPairColorizationOptions:_s.bracketPairColorizationOptions}}static resolveOptions(e,t){if(t.detectIndentation){let i=TQ(e,t.tabSize,t.insertSpaces);return new nb({tabSize:i.tabSize,indentSize:"tabSize",insertSpaces:i.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL,bracketPairColorizationOptions:t.bracketPairColorizationOptions})}return new nb(t)}get onDidChangeLanguage(){return this._tokenizationTextModelPart.onDidChangeLanguage}get onDidChangeLanguageConfiguration(){return this._tokenizationTextModelPart.onDidChangeLanguageConfiguration}get onDidChangeTokens(){return this._tokenizationTextModelPart.onDidChangeTokens}get onDidChangeOptions(){return this._onDidChangeOptions.event}get onDidChangeAttached(){return this._onDidChangeAttached.event}get onDidChangeLineHeight(){return this._onDidChangeLineHeight.event}get onDidChangeFont(){return this._onDidChangeFont.event}onDidChangeContent(e){return this._eventEmitter.event(t=>e(t.contentChangedEvent))}_isDisposing(){return this.__isDisposing}get tokenization(){return this._tokenizationTextModelPart}get bracketPairs(){return this._bracketPairs}get guides(){return this._guidesTextModelPart}constructor(e,t,i,n=null,s,r,a,l){super(),this._undoRedoService=s,this._languageService=r,this._languageConfigurationService=a,this.instantiationService=l,this._onWillDispose=this._register(new N),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new hJ((g,p,_)=>this.handleBeforeFireDecorationsChangedEvent(g,p,_))),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeOptions=this._register(new N),this._onDidChangeAttached=this._register(new N),this._onDidChangeLineHeight=this._register(new N),this._onDidChangeFont=this._register(new N),this._eventEmitter=this._register(new uJ),this._languageSelectionListener=this._register(new Qe),this._deltaDecorationCallCnt=0,this._attachedViews=this._register(new lB),this._viewModels=new Set,RB++,this.id="$model"+RB,this.isForSimpleWidget=i.isForSimpleWidget,typeof n>"u"||n===null?this._associatedResource=Le.parse("inmemory://model/"+RB):this._associatedResource=n,this._attachedEditorCount=0;let{textBuffer:c,disposable:d}=GSe(e,i.defaultEOL);this._buffer=c,this._bufferDisposable=d;let h=this._buffer.getLineCount(),u=this._buffer.getValueLengthInRange(new S(1,1,h,this._buffer.getLineLength(h)+1),0);i.largeFileOptimizations?(this._isTooLargeForTokenization=u>QC.LARGE_FILE_SIZE_THRESHOLD||h>QC.LARGE_FILE_LINE_COUNT_THRESHOLD,this._isTooLargeForHeapOperation=u>QC.LARGE_FILE_HEAP_OPERATION_THRESHOLD):(this._isTooLargeForTokenization=!1,this._isTooLargeForHeapOperation=!1),this._options=QC.resolveOptions(this._buffer,i);let f=typeof t=="string"?t:t.languageId;typeof t!="string"&&(this._languageSelectionListener.value=t.onDidChange(()=>this._setLanguage(t.languageId))),this._bracketPairs=this._register(new Q3(this,this._languageConfigurationService)),this._guidesTextModelPart=this._register(new y5(this,this._languageConfigurationService)),this._decorationProvider=this._register(new J3(this)),this._tokenizationTextModelPart=this.instantiationService.createInstance(DB,this,this._bracketPairs,f,this._attachedViews),this._fontTokenDecorationsProvider=this._register(new gB(this,this._tokenizationTextModelPart)),this._isTooLargeForSyncing=u>QC._MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this.__isDisposing=!1,this._instanceId=cO(RB),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new MB,this._commandManager=new nB(this,this._undoRedoService),this._isUndoing=!1,this._isRedoing=!1,this._trimAutoWhitespaceLines=null,this._register(this._decorationProvider.onDidChange(()=>{this._onDidChangeDecorations.beginDeferredEmit(),this._onDidChangeDecorations.fire(),this._onDidChangeDecorations.endDeferredEmit()})),this._register(this._fontTokenDecorationsProvider.onDidChangeLineHeight(g=>{this._onDidChangeDecorations.beginDeferredEmit(),this._onDidChangeDecorations.fire(),this._fireOnDidChangeLineHeight(g),this._onDidChangeDecorations.endDeferredEmit()})),this._register(this._fontTokenDecorationsProvider.onDidChangeFont(g=>{this._onDidChangeDecorations.beginDeferredEmit(),this._onDidChangeDecorations.fire(),this._fireOnDidChangeFont(g),this._onDidChangeDecorations.endDeferredEmit()})),this._languageService.requestRichLanguageFeatures(f),this._register(this._languageConfigurationService.onDidChange(g=>{this._bracketPairs.handleLanguageConfigurationServiceChange(g),this._tokenizationTextModelPart.handleLanguageConfigurationServiceChange(g)}))}dispose(){this.__isDisposing=!0,this._onWillDispose.fire(),this._tokenizationTextModelPart.dispose(),this._isDisposed=!0,super.dispose(),this._bufferDisposable.dispose(),this.__isDisposing=!1;let e=new p0([],"",` +`,!1,!1,!0,!0);e.dispose(),this._buffer=e,this._bufferDisposable=T.None}_assertNotDisposed(){if(this._isDisposed)throw new xe("Model is disposed!")}registerViewModel(e){this._viewModels.add(e)}unregisterViewModel(e){this._viewModels.delete(e)}getTextBuffer(){return this._assertNotDisposed(),this._buffer}_emitContentChangedEvent(e,t,i=null){if(this.__isDisposing)return;this._tokenizationTextModelPart.handleDidChangeContent(t),this._bracketPairs.handleDidChangeContent(t),this._fontTokenDecorationsProvider.handleDidChangeContent(t);let n=new Hb(e,t);i&&(n.rawContentChangedEvent.resultingSelection=i),this._onDidChangeContentOrInjectedText(n),this._eventEmitter.fire(n)}setValue(e,t=fo.setValue()){if(this._assertNotDisposed(),e==null)throw Xs();let{textBuffer:i,disposable:n}=GSe(e,this._options.defaultEOL);this._setValueFromTextBuffer(i,n,t)}_createContentChanged2(e,t,i,n,s,r,a,l,c,d){return{changes:[{range:e,rangeOffset:t,rangeLength:i,text:s}],eol:this._buffer.getEOL(),isEolChange:c,versionId:this.getVersionId(),isUndoing:r,isRedoing:a,isFlush:l,detailedReasons:[d],detailedReasonsChangeLengths:[1]}}_setValueFromTextBuffer(e,t,i){this._assertNotDisposed();let n=this.getFullModelRange(),s=this.getValueLengthInRange(n),r=this.getLineCount(),a=this.getLineMaxColumn(r);this._buffer=e,this._bufferDisposable.dispose(),this._bufferDisposable=t,this._increaseVersionId(),this._decorations=Object.create(null),this._decorationsTree=new MB,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new jC([new D3],this._versionId,!1,!1),this._createContentChanged2(new S(1,1,r,a),0,s,new M(r,a),this.getValue(),!1,!1,!0,!1,i))}setEOL(e){this._assertNotDisposed();let t=e===1?`\r +`:` +`;if(this._buffer.getEOL()===t)return;let i=this.getFullModelRange(),n=this.getValueLengthInRange(i),s=this.getLineCount(),r=this.getLineMaxColumn(s);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new jC([new O3],this._versionId,!1,!1),this._createContentChanged2(new S(1,1,s,r),0,n,new M(s,r),this.getValue(),!1,!1,!1,!0,fo.eolChange()))}_onBeforeEOLChange(){this._decorationsTree.ensureAllNodesHaveRanges(this)}_onAfterEOLChange(){let e=this.getVersionId(),t=this._decorationsTree.collectNodesPostOrder();for(let i=0,n=t.length;i0}getAttachedEditorCount(){return this._attachedEditorCount}isTooLargeForSyncing(){return this._isTooLargeForSyncing}isTooLargeForTokenization(){return this._isTooLargeForTokenization}isTooLargeForHeapOperation(){return this._isTooLargeForHeapOperation}isDisposed(){return this._isDisposed}isDominatedByLongLines(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;let e=0,t=0,i=this._buffer.getLineCount();for(let n=1;n<=i;n++){let s=this._buffer.getLineLength(n);s>=J3e?t+=s:e+=s}return t>e}get uri(){return this._associatedResource}getOptions(){return this._assertNotDisposed(),this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(e){this._assertNotDisposed();let t=typeof e.tabSize<"u"?e.tabSize:this._options.tabSize,i=typeof e.indentSize<"u"?e.indentSize:this._options.originalIndentSize,n=typeof e.insertSpaces<"u"?e.insertSpaces:this._options.insertSpaces,s=typeof e.trimAutoWhitespace<"u"?e.trimAutoWhitespace:this._options.trimAutoWhitespace,r=typeof e.bracketColorizationOptions<"u"?e.bracketColorizationOptions:this._options.bracketPairColorizationOptions,a=new nb({tabSize:t,indentSize:i,insertSpaces:n,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:s,bracketPairColorizationOptions:r});if(this._options.equals(a))return;let l=this._options.createChangeEvent(a);this._options=a,this._bracketPairs.handleDidChangeOptions(l),this._decorationProvider.handleDidChangeOptions(l),this._onDidChangeOptions.fire(l)}detectIndentation(e,t){this._assertNotDisposed();let i=TQ(this._buffer,t,e);this.updateOptions({insertSpaces:i.insertSpaces,tabSize:i.tabSize,indentSize:i.tabSize})}normalizeIndentation(e){return this._assertNotDisposed(),L1(e,this._options.indentSize,this._options.insertSpaces)}getVersionId(){return this._assertNotDisposed(),this._versionId}mightContainRTL(){return this._buffer.mightContainRTL()}mightContainUnusualLineTerminators(){return this._buffer.mightContainUnusualLineTerminators()}removeUnusualLineTerminators(e=null){let t=this.findMatches(sK.source,!1,!0,!1,null,!1,1073741824);this._buffer.resetMightContainUnusualLineTerminators(),this.pushEditOperations(e,t.map(i=>({range:i.range,text:null})),()=>null)}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){return this._assertNotDisposed(),this._alternativeVersionId}getInitialUndoRedoSnapshot(){return this._assertNotDisposed(),this._initialUndoRedoSnapshot}getOffsetAt(e){this._assertNotDisposed();let t=this._validatePosition(e.lineNumber,e.column,0);return this._buffer.getOffsetAt(t.lineNumber,t.column)}getPositionAt(e){this._assertNotDisposed();let t=Math.min(this._buffer.getLength(),Math.max(0,e));return this._buffer.getPositionAt(t)}_increaseVersionId(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}_overwriteVersionId(e){this._versionId=e}_overwriteAlternativeVersionId(e){this._alternativeVersionId=e}_overwriteInitialUndoRedoSnapshot(e){this._initialUndoRedoSnapshot=e}getValue(e,t=!1){if(this._assertNotDisposed(),this.isTooLargeForHeapOperation())throw new xe("Operation would exceed heap memory limits");let i=this.getFullModelRange(),n=this.getValueInRange(i,e);return t?this._buffer.getBOM()+n:n}createSnapshot(e=!1){return new aJ(this._buffer.createSnapshot(e))}getValueLength(e,t=!1){this._assertNotDisposed();let i=this.getFullModelRange(),n=this.getValueLengthInRange(i,e);return t?this._buffer.getBOM().length+n:n}getValueInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(e),t)}getValueLengthInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(e),t)}getCharacterCountInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(e),t)}getLineCount(){return this._assertNotDisposed(),this._buffer.getLineCount()}getLineContent(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new xe("Illegal value for lineNumber");return this._buffer.getLineContent(e)}getLineLength(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new xe("Illegal value for lineNumber");return this._buffer.getLineLength(e)}getLinesContent(){if(this._assertNotDisposed(),this.isTooLargeForHeapOperation())throw new xe("Operation would exceed heap memory limits");return this._buffer.getLinesContent()}getEOL(){return this._assertNotDisposed(),this._buffer.getEOL()}getEndOfLineSequence(){return this._assertNotDisposed(),this._buffer.getEOL()===` +`?0:1}getLineMinColumn(e){return this._assertNotDisposed(),1}getLineMaxColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new xe("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1}getLineFirstNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new xe("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)}getLineLastNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new xe("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(e)}_validateRangeRelaxedNoAllocations(e){let t=this._buffer.getLineCount(),i=e.startLineNumber,n=e.startColumn,s=Math.floor(typeof i=="number"&&!isNaN(i)?i:1),r=Math.floor(typeof n=="number"&&!isNaN(n)?n:1);if(s<1)s=1,r=1;else if(s>t)s=t,r=this.getLineMaxColumn(s);else if(r<=1)r=1;else{let h=this.getLineMaxColumn(s);r>=h&&(r=h)}let a=e.endLineNumber,l=e.endColumn,c=Math.floor(typeof a=="number"&&!isNaN(a)?a:1),d=Math.floor(typeof l=="number"&&!isNaN(l)?l:1);if(c<1)c=1,d=1;else if(c>t)c=t,d=this.getLineMaxColumn(c);else if(d<=1)d=1;else{let h=this.getLineMaxColumn(c);d>=h&&(d=h)}return i===s&&n===r&&a===c&&l===d&&e instanceof S&&!(e instanceof me)?e:new S(s,r,c,d)}_isValidPosition(e,t,i){if(typeof e!="number"||typeof t!="number"||isNaN(e)||isNaN(t)||e<1||t<1||(e|0)!==e||(t|0)!==t)return!1;let n=this._buffer.getLineCount();if(e>n)return!1;if(t===1)return!0;let s=this.getLineMaxColumn(e);if(t>s)return!1;if(i===1){let r=this._buffer.getLineCharCode(e,t-2);if(Dn(r))return!1}return!0}_validatePosition(e,t,i){let n=Math.floor(typeof e=="number"&&!isNaN(e)?e:1),s=Math.floor(typeof t=="number"&&!isNaN(t)?t:1),r=this._buffer.getLineCount();if(n<1)return new M(1,1);if(n>r)return new M(r,this.getLineMaxColumn(r));if(s<=1)return new M(n,1);let a=this.getLineMaxColumn(n);if(s>=a)return new M(n,a);if(i===1){let l=this._buffer.getLineCharCode(n,s-2);if(Dn(l))return new M(n,s-1)}return new M(n,s)}validatePosition(e){return this._assertNotDisposed(),e instanceof M&&this._isValidPosition(e.lineNumber,e.column,1)?e:this._validatePosition(e.lineNumber,e.column,1)}isValidRange(e){return this._isValidRange(e,1)}_isValidRange(e,t){let i=e.startLineNumber,n=e.startColumn,s=e.endLineNumber,r=e.endColumn;if(!this._isValidPosition(i,n,0)||!this._isValidPosition(s,r,0))return!1;if(t===1){let a=n>1?this._buffer.getLineCharCode(i,n-2):0,l=r>1&&r<=this._buffer.getLineLength(s)?this._buffer.getLineCharCode(s,r-2):0,c=Dn(a),d=Dn(l);return!c&&!d}return!0}validateRange(e){if(this._assertNotDisposed(),e instanceof S&&!(e instanceof me)&&this._isValidRange(e,1))return e;let i=this._validatePosition(e.startLineNumber,e.startColumn,0),n=this._validatePosition(e.endLineNumber,e.endColumn,0),s=i.lineNumber,r=i.column,a=n.lineNumber,l=n.column;{let c=r>1?this._buffer.getLineCharCode(s,r-2):0,d=l>1&&l<=this._buffer.getLineLength(a)?this._buffer.getLineCharCode(a,l-2):0,h=Dn(c),u=Dn(d);return!h&&!u?new S(s,r,a,l):s===a&&r===l?new S(s,r-1,a,l-1):h&&u?new S(s,r-1,a,l+1):h?new S(s,r-1,a,l):new S(s,r,a,l+1)}}modifyPosition(e,t){this._assertNotDisposed();let i=this.getOffsetAt(e)+t;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,i)))}getFullModelRange(){this._assertNotDisposed();let e=this.getLineCount();return new S(1,1,e,this.getLineMaxColumn(e))}findMatchesLineByLine(e,t,i,n){return this._buffer.findMatchesLineByLine(e,t,i,n)}findMatches(e,t,i,n,s,r,a=Q3e){this._assertNotDisposed();let l=null;t!==null&&typeof t!="boolean"&&(Array.isArray(t)||(t=[t]),t.every(h=>S.isIRange(h))&&(l=t.map(h=>this.validateRange(h)))),l===null&&(l=[this.getFullModelRange()]),l=l.sort((h,u)=>h.startLineNumber-u.startLineNumber||h.startColumn-u.startColumn);let c=[];c.push(l.reduce((h,u)=>S.areIntersecting(h,u)?h.plusRange(u):(c.push(h),u)));let d;if(!i&&e.indexOf(` +`)<0){let u=new Du(e,i,n,s).parseSearchRequest();if(!u)return[];d=f=>this.findMatchesLineByLine(f,u,r,a)}else d=h=>Jw.findMatches(this,new Du(e,i,n,s),h,r,a);return c.map(d).reduce((h,u)=>h.concat(u),[])}findNextMatch(e,t,i,n,s,r){this._assertNotDisposed();let a=this.validatePosition(t);if(!i&&e.indexOf(` +`)<0){let c=new Du(e,i,n,s).parseSearchRequest();if(!c)return null;let d=this.getLineCount(),h=new S(a.lineNumber,a.column,d,this.getLineMaxColumn(d)),u=this.findMatchesLineByLine(h,c,r,1);return Jw.findNextMatch(this,new Du(e,i,n,s),a,r),u.length>0||(h=new S(1,1,a.lineNumber,this.getLineMaxColumn(a.lineNumber)),u=this.findMatchesLineByLine(h,c,r,1),u.length>0)?u[0]:null}return Jw.findNextMatch(this,new Du(e,i,n,s),a,r)}findPreviousMatch(e,t,i,n,s,r){this._assertNotDisposed();let a=this.validatePosition(t);return Jw.findPreviousMatch(this,new Du(e,i,n,s),a,r)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(e){if((this.getEOL()===` +`?0:1)!==e)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(e){if(e instanceof Fx)return e;let t=this.validateRange(e.range),i=e.text;if(i){let n=i.length>0&&i.charCodeAt(i.length-1)===13;this.getEOL()===`\r +`&&n&&t.endColumn===this.getLineMaxColumn(t.endLineNumber)&&(i=i.substring(0,i.length-1))}return new Fx(e.identifier||null,t,i,e.forceMoveMarkers||!1,e.isAutoWhitespaceEdit||!1,e._isTracked||!1)}_validateEditOperations(e){let t=[];for(let i=0,n=e.length;i({range:i.range,text:i.text})),null)}pushEditOperations(e,t,i,n,s){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._pushEditOperations(e,this._validateEditOperations(t),i,n,s)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_pushEditOperations(e,t,i,n,s){if(this._options.trimAutoWhitespace&&this._trimAutoWhitespaceLines){let r=t.map(l=>({range:this.validateRange(l.range),text:l.text})),a=!0;if(e)for(let l=0,c=e.length;ld.endLineNumber,_=d.startLineNumber>g.endLineNumber;if(!p&&!_){h=!0;break}}if(!h){a=!1;break}}if(a)for(let l=0,c=this._trimAutoWhitespaceLines.length;lp.endLineNumber)&&!(d===p.startLineNumber&&p.startColumn===h&&p.isEmpty()&&_&&_.length>0&&_.charAt(0)===` +`)&&!(d===p.startLineNumber&&p.startColumn===1&&p.isEmpty()&&_&&_.length>0&&_.charAt(_.length-1)===` +`)){u=!1;break}}if(u){let f=new S(d,1,d,h);t.push(new Fx(null,f,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(e,t,i,n,s)}_applyUndo(e,t,i,n){let s=e.map(r=>{let a=this.getPositionAt(r.newPosition),l=this.getPositionAt(r.newEnd);return{range:new S(a.lineNumber,a.column,l.lineNumber,l.column),text:r.oldText}});this._applyUndoRedoEdits(s,t,!0,!1,i,n)}_applyRedo(e,t,i,n){let s=e.map(r=>{let a=this.getPositionAt(r.oldPosition),l=this.getPositionAt(r.oldEnd);return{range:new S(a.lineNumber,a.column,l.lineNumber,l.column),text:r.newText}});this._applyUndoRedoEdits(s,t,!1,!0,i,n)}_applyUndoRedoEdits(e,t,i,n,s,r){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=i,this._isRedoing=n;let a=this._validateEditOperations(e);this._doApplyEdits(a,!1,fo.applyEdits(),r),this.setEOL(t),this._overwriteAlternativeVersionId(s)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(r),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(e,t,i){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();let n=this._validateEditOperations(e);return this._doApplyEdits(n,t??!1,i??fo.applyEdits())}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(e,t,i,n=null){let s=this._buffer.getLineCount(),r=this._buffer.applyEdits(e,this._options.trimAutoWhitespace,t),a=this._buffer.getLineCount(),l=r.changes;if(this._trimAutoWhitespaceLines=r.trimAutoWhitespaceLineNumbers,l.length!==0){for(let h=0,u=l.length;h=0;k--){let I=p+k,E=y+k;c.push(new MT(I,E))}if(w0){let s=Array.from(e).map(r=>new MT(r,r));this._onDidChangeContentOrInjectedText(new J1(s))}this._fireOnDidChangeLineHeight(t),this._fireOnDidChangeFont(i)}_fireOnDidChangeLineHeight(e){if(e&&e.size>0){let i=Array.from(e).map(n=>new N3(n.ownerId,n.decorationId,n.lineNumber,n.lineHeight));this._onDidChangeLineHeight.fire(new e0(i))}}_fireOnDidChangeFont(e){if(e&&e.size>0){let i=Array.from(e).map(n=>new R3(n.ownerId,n.lineNumber));this._onDidChangeFont.fire(new t0(i))}}_onDidChangeContentOrInjectedText(e){for(let t of this._viewModels)try{t.onDidChangeContentOrInjectedText(e)}catch(i){De(i)}for(let t of this._viewModels)try{t.emitContentChangeEvent(e)}catch(i){De(i)}}changeDecorations(e,t=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(t,e)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(e,t){let i={addDecoration:(s,r)=>this._deltaDecorationsImpl(e,[],[{range:s,options:r}])[0],changeDecoration:(s,r)=>{this._changeDecorationImpl(e,s,r)},changeDecorationOptions:(s,r)=>{this._changeDecorationOptionsImpl(e,s,ZSe(r))},removeDecoration:s=>{this._deltaDecorationsImpl(e,[s],[])},deltaDecorations:(s,r)=>s.length===0&&r.length===0?[]:this._deltaDecorationsImpl(e,s,r)},n=null;try{n=t(i)}catch(s){De(s)}return i.addDecoration=rD,i.changeDecoration=rD,i.changeDecorationOptions=rD,i.removeDecoration=rD,i.deltaDecorations=rD,n}deltaDecorations(e,t,i=0){if(this._assertNotDisposed(),e||(e=[]),e.length===0&&t.length===0)return[];try{return this._deltaDecorationCallCnt++,this._deltaDecorationCallCnt>1&&(console.warn("Invoking deltaDecorations recursively could lead to leaking decorations."),De(new Error("Invoking deltaDecorations recursively could lead to leaking decorations."))),this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(i,e,t)}finally{this._onDidChangeDecorations.endDeferredEmit(),this._deltaDecorationCallCnt--}}_getTrackedRange(e){return this.getDecorationRange(e)}_setTrackedRange(e,t,i){let n=e?this._decorations[e]:null;if(!n)return t?this._deltaDecorationsImpl(0,[],[{range:t,options:YSe[i]}],!0)[0]:null;if(!t)return this._decorationsTree.delete(n),delete this._decorations[n.id],null;let s=this._validateRangeRelaxedNoAllocations(t),r=this._buffer.getOffsetAt(s.startLineNumber,s.startColumn),a=this._buffer.getOffsetAt(s.endLineNumber,s.endColumn);return this._decorationsTree.delete(n),n.reset(this.getVersionId(),r,a,s),n.setOptions(YSe[i]),this._decorationsTree.insert(n),n.id}removeAllDecorationsWithOwnerId(e){if(this._isDisposed)return;let t=this._decorationsTree.collectNodesFromOwner(e);for(let i=0,n=t.length;ithis.getLineCount()?[]:this.getLinesDecorations(e,e,t,i,n)}getLinesDecorations(e,t,i=0,n=!1,s=!1,r=!1){let a=this.getLineCount(),l=Math.min(a,Math.max(1,e)),c=Math.min(a,Math.max(1,t)),d=this.getLineMaxColumn(c),h=new S(l,1,c,d),u=this._getDecorationsInRange(h,i,n,s,r);return mm(u,this._decorationProvider.getDecorationsInRange(h,i,n,s)),mm(u,this._fontTokenDecorationsProvider.getDecorationsInRange(h,i,n,s)),u}getDecorationsInRange(e,t=0,i=!1,n=!1,s=!1,r=!1){let a=this.validateRange(e),l=this._getDecorationsInRange(a,t,i,n,r);return mm(l,this._decorationProvider.getDecorationsInRange(a,t,i,n,s)),mm(l,this._fontTokenDecorationsProvider.getDecorationsInRange(a,t,i,n,s)),l}getOverviewRulerDecorations(e=0,t=!1,i=!1){return this._decorationsTree.getAll(this,e,t,i,!0,!1)}getInjectedTextDecorations(e=0){return this._decorationsTree.getAllInjectedText(this,e)}getCustomLineHeightsDecorations(e=0){let t=this._decorationsTree.getAllCustomLineHeights(this,e);return mm(t,this._fontTokenDecorationsProvider.getAllDecorations(e)),t}getCustomLineHeightsDecorationsInRange(e,t=0){let i=this._decorationsTree.getCustomLineHeightsInInterval(this,this.getOffsetAt(e.getStartPosition()),this.getOffsetAt(e.getEndPosition()),t);return mm(i,this._fontTokenDecorationsProvider.getDecorationsInRange(e,t)),i}getLineInjectedText(e,t=0){let i=this._buffer.getOffsetAt(e,1),n=i+this._buffer.getLineLength(e),s=this._decorationsTree.getInjectedTextInInterval(this,i,n,t);return zh.fromDecorations(s).filter(r=>r.lineNumber===e)}getFontDecorationsInRange(e,t=0){let i=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),n=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn);return this._decorationsTree.getFontDecorationsInInterval(this,i,n,t)}getAllDecorations(e=0,t=!1,i=!1){let n=this._decorationsTree.getAll(this,e,t,i,!1,!1);return n=n.concat(this._decorationProvider.getAllDecorations(e,t)),n=n.concat(this._fontTokenDecorationsProvider.getAllDecorations(e,t)),n}getAllMarginDecorations(e=0){return this._decorationsTree.getAll(this,e,!1,!1,!1,!0)}_getDecorationsInRange(e,t,i,n,s){let r=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),a=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn);return this._decorationsTree.getAllInInterval(this,r,a,t,i,n,s)}getRangeAt(e,t){return this._buffer.getRangeAt(e,t-e)}_changeDecorationImpl(e,t,i){let n=this._decorations[t];if(!n)return;if(n.options.after){let l=this.getDecorationRange(t);this._onDidChangeDecorations.recordLineAffectedByInjectedText(l.endLineNumber)}if(n.options.before){let l=this.getDecorationRange(t);this._onDidChangeDecorations.recordLineAffectedByInjectedText(l.startLineNumber)}if(n.options.lineHeight!==null){let l=this.getDecorationRange(t);this._onDidChangeDecorations.recordLineAffectedByLineHeightChange(e,t,l.startLineNumber,null)}if(n.options.affectsFont){let l=this.getDecorationRange(t);this._onDidChangeDecorations.recordLineAffectedByFontChange(e,n.id,l.startLineNumber)}let s=this._validateRangeRelaxedNoAllocations(i),r=this._buffer.getOffsetAt(s.startLineNumber,s.startColumn),a=this._buffer.getOffsetAt(s.endLineNumber,s.endColumn);this._decorationsTree.delete(n),n.reset(this.getVersionId(),r,a,s),this._decorationsTree.insert(n),this._onDidChangeDecorations.checkAffectedAndFire(n.options),n.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(s.endLineNumber),n.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(s.startLineNumber),n.options.lineHeight!==null&&this._onDidChangeDecorations.recordLineAffectedByLineHeightChange(e,t,s.startLineNumber,n.options.lineHeight),n.options.affectsFont&&this._onDidChangeDecorations.recordLineAffectedByFontChange(e,n.id,s.startLineNumber)}_changeDecorationOptionsImpl(e,t,i){let n=this._decorations[t];if(!n)return;let s=!!(n.options.overviewRuler&&n.options.overviewRuler.color),r=!!(i.overviewRuler&&i.overviewRuler.color);if(this._onDidChangeDecorations.checkAffectedAndFire(n.options),this._onDidChangeDecorations.checkAffectedAndFire(i),n.options.after||i.after){let c=this._decorationsTree.getNodeRange(this,n);this._onDidChangeDecorations.recordLineAffectedByInjectedText(c.endLineNumber)}if(n.options.before||i.before){let c=this._decorationsTree.getNodeRange(this,n);this._onDidChangeDecorations.recordLineAffectedByInjectedText(c.startLineNumber)}if(n.options.lineHeight!==null||i.lineHeight!==null){let c=this._decorationsTree.getNodeRange(this,n);this._onDidChangeDecorations.recordLineAffectedByLineHeightChange(e,t,c.startLineNumber,i.lineHeight)}if(n.options.affectsFont||i.affectsFont){let c=this._decorationsTree.getNodeRange(this,n);this._onDidChangeDecorations.recordLineAffectedByFontChange(e,t,c.startLineNumber)}let a=s!==r,l=tBe(i)!==AB(n);a||l?(this._decorationsTree.delete(n),n.setOptions(i),this._decorationsTree.insert(n)):n.setOptions(i)}_deltaDecorationsImpl(e,t,i,n=!1){let s=this.getVersionId(),r=t.length,a=0,l=i.length,c=0;this._onDidChangeDecorations.beginDeferredEmit();try{let d=new Array(l);for(;athis._setLanguage(e.languageId,t)),this._setLanguage(e.languageId,t))}_setLanguage(e,t){this.tokenization.setLanguageId(e,t),this._languageService.requestRichLanguageFeatures(e)}getLanguageIdAtPosition(e,t){return this.tokenization.getLanguageIdAtPosition(e,t)}getWordAtPosition(e){return this._tokenizationTextModelPart.getWordAtPosition(e)}getWordUntilPosition(e){return this._tokenizationTextModelPart.getWordUntilPosition(e)}normalizePosition(e,t){return e}getLineIndentColumn(e){return PB(this.getLineContent(e))+1}toString(){return`TextModel(${this.uri.toString()})`}};dg=QC=Y3e([NB(4,o0),NB(5,ri),NB(6,zt),NB(7,ie)],dg);MB=class{constructor(){this._decorationsTree0=new g0,this._decorationsTree1=new g0,this._injectedTextDecorationsTree=new g0}ensureAllNodesHaveRanges(e){this.getAll(e,0,!1,!1,!1,!1)}_ensureNodesHaveRanges(e,t){for(let i of t)i.range===null&&(i.range=e.getRangeAt(i.cachedAbsoluteStart,i.cachedAbsoluteEnd));return t}getAllInInterval(e,t,i,n,s,r,a){let l=e.getVersionId(),c=this._intervalSearch(t,i,n,s,r,l,a);return this._ensureNodesHaveRanges(e,c)}_intervalSearch(e,t,i,n,s,r,a){let l=this._decorationsTree0.intervalSearch(e,t,i,n,s,r,a),c=this._decorationsTree1.intervalSearch(e,t,i,n,s,r,a),d=this._injectedTextDecorationsTree.intervalSearch(e,t,i,n,s,r,a);return l.concat(c).concat(d)}getInjectedTextInInterval(e,t,i,n){let s=e.getVersionId(),r=this._injectedTextDecorationsTree.intervalSearch(t,i,n,!1,!1,s,!1);return this._ensureNodesHaveRanges(e,r).filter(a=>a.options.showIfCollapsed||!a.range.isEmpty())}getFontDecorationsInInterval(e,t,i,n){let s=e.getVersionId(),r=this._decorationsTree0.intervalSearch(t,i,n,!1,!1,s,!1);return this._ensureNodesHaveRanges(e,r).filter(a=>a.options.affectsFont)}getAllInjectedText(e,t){let i=e.getVersionId(),n=this._injectedTextDecorationsTree.search(t,!1,!1,i,!1);return this._ensureNodesHaveRanges(e,n).filter(s=>s.options.showIfCollapsed||!s.range.isEmpty())}getAllCustomLineHeights(e,t){let i=e.getVersionId(),n=this._search(t,!1,!1,!1,i,!1);return this._ensureNodesHaveRanges(e,n).filter(s=>typeof s.options.lineHeight=="number")}getCustomLineHeightsInInterval(e,t,i,n){let s=e.getVersionId(),r=this._intervalSearch(t,i,n,!1,!1,s,!1);return this._ensureNodesHaveRanges(e,r).filter(a=>typeof a.options.lineHeight=="number")}getAll(e,t,i,n,s,r){let a=e.getVersionId(),l=this._search(t,i,n,s,a,r);return this._ensureNodesHaveRanges(e,l)}_search(e,t,i,n,s,r){if(n)return this._decorationsTree1.search(e,t,i,s,r);{let a=this._decorationsTree0.search(e,t,i,s,r),l=this._decorationsTree1.search(e,t,i,s,r),c=this._injectedTextDecorationsTree.search(e,t,i,s,r);return a.concat(l).concat(c)}}collectNodesFromOwner(e){let t=this._decorationsTree0.collectNodesFromOwner(e),i=this._decorationsTree1.collectNodesFromOwner(e),n=this._injectedTextDecorationsTree.collectNodesFromOwner(e);return t.concat(i).concat(n)}collectNodesPostOrder(){let e=this._decorationsTree0.collectNodesPostOrder(),t=this._decorationsTree1.collectNodesPostOrder(),i=this._injectedTextDecorationsTree.collectNodesPostOrder();return e.concat(t).concat(i)}insert(e){AB(e)?this._injectedTextDecorationsTree.insert(e):rJ(e)?this._decorationsTree1.insert(e):this._decorationsTree0.insert(e)}delete(e){AB(e)?this._injectedTextDecorationsTree.delete(e):rJ(e)?this._decorationsTree1.delete(e):this._decorationsTree0.delete(e)}getNodeRange(e,t){let i=e.getVersionId();return t.cachedVersionId!==i&&this._resolveNode(t,i),t.range===null&&(t.range=e.getRangeAt(t.cachedAbsoluteStart,t.cachedAbsoluteEnd)),t.range}_resolveNode(e,t){AB(e)?this._injectedTextDecorationsTree.resolveNode(e,t):rJ(e)?this._decorationsTree1.resolveNode(e,t):this._decorationsTree0.resolveNode(e,t)}acceptReplace(e,t,i,n){this._decorationsTree0.acceptReplace(e,t,i,n),this._decorationsTree1.acceptReplace(e,t,i,n),this._injectedTextDecorationsTree.acceptReplace(e,t,i,n)}};OB=class{constructor(e){this.color=e.color||"",this.darkColor=e.darkColor||""}},lJ=class extends OB{constructor(e){super(e),this._resolvedColor=null,this.position=typeof e.position=="number"?e.position:kr.Center}getColor(e){return this._resolvedColor||(_c(e.type)&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=null}_resolveColor(e,t){if(typeof e=="string")return e;let i=e?t.getColor(e.id):null;return i?i.toString():""}},cJ=class{constructor(e){this.position=e?.position??Oa.Center,this.persistLane=e?.persistLane}},dJ=class extends OB{constructor(e){super(e),this.position=e.position,this.sectionHeaderStyle=e.sectionHeaderStyle??null,this.sectionHeaderText=e.sectionHeaderText??null}getColor(e){return this._resolvedColor||(_c(e.type)&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=void 0}_resolveColor(e,t){return typeof e=="string"?K.fromHex(e):t.getColor(e.id)}},hg=class o{static from(e){return e instanceof o?e:new o(e)}constructor(e){this.content=e.content||"",this.tokens=e.tokens??null,this.inlineClassName=e.inlineClassName||null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.attachedData=e.attachedData||null,this.cursorStops=e.cursorStops||null}},Ve=class o{static register(e){return new o(e)}static createDynamic(e){return new o(e)}constructor(e){this.description=e.description,this.blockClassName=e.blockClassName?cg(e.blockClassName):null,this.blockDoesNotCollapse=e.blockDoesNotCollapse??null,this.blockIsAfterEnd=e.blockIsAfterEnd??null,this.blockPadding=e.blockPadding??null,this.stickiness=e.stickiness||0,this.zIndex=e.zIndex||0,this.className=e.className?cg(e.className):null,this.shouldFillLineOnLineBreak=e.shouldFillLineOnLineBreak??null,this.hoverMessage=e.hoverMessage||null,this.glyphMarginHoverMessage=e.glyphMarginHoverMessage||null,this.lineNumberHoverMessage=e.lineNumberHoverMessage||null,this.isWholeLine=e.isWholeLine||!1,this.lineHeight=e.lineHeight?Math.min(e.lineHeight,eBe):null,this.fontSize=e.fontSize||null,this.affectsFont=!!e.fontSize||!!e.fontFamily||!!e.fontWeight||!!e.fontStyle,this.showIfCollapsed=e.showIfCollapsed||!1,this.collapseOnReplaceEdit=e.collapseOnReplaceEdit||!1,this.overviewRuler=e.overviewRuler?new lJ(e.overviewRuler):null,this.minimap=e.minimap?new dJ(e.minimap):null,this.glyphMargin=e.glyphMarginClassName?new cJ(e.glyphMargin):null,this.glyphMarginClassName=e.glyphMarginClassName?cg(e.glyphMarginClassName):null,this.linesDecorationsClassName=e.linesDecorationsClassName?cg(e.linesDecorationsClassName):null,this.lineNumberClassName=e.lineNumberClassName?cg(e.lineNumberClassName):null,this.linesDecorationsTooltip=e.linesDecorationsTooltip?wge(e.linesDecorationsTooltip):null,this.firstLineDecorationClassName=e.firstLineDecorationClassName?cg(e.firstLineDecorationClassName):null,this.marginClassName=e.marginClassName?cg(e.marginClassName):null,this.inlineClassName=e.inlineClassName?cg(e.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=e.beforeContentClassName?cg(e.beforeContentClassName):null,this.afterContentClassName=e.afterContentClassName?cg(e.afterContentClassName):null,this.after=e.after?hg.from(e.after):null,this.before=e.before?hg.from(e.before):null,this.hideInCommentTokens=e.hideInCommentTokens??!1,this.hideInStringTokens=e.hideInStringTokens??!1,this.textDirection=e.textDirection??null}};Ve.EMPTY=Ve.register({description:"empty"});YSe=[Ve.register({description:"tracked-range-always-grows-when-typing-at-edges",stickiness:0}),Ve.register({description:"tracked-range-never-grows-when-typing-at-edges",stickiness:1}),Ve.register({description:"tracked-range-grows-only-when-typing-before",stickiness:2}),Ve.register({description:"tracked-range-grows-only-when-typing-after",stickiness:3})];hJ=class extends T{constructor(e){super(),this.handleBeforeFire=e,this._actual=this._register(new N),this.event=this._actual.event,this._affectedInjectedTextLines=null,this._affectedLineHeights=null,this._affectedFontLines=null,this._deferredCnt=0,this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1,this._affectsLineNumber=!1}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(){this._deferredCnt--,this._deferredCnt===0&&(this._shouldFireDeferred&&this.doFire(),this._affectedInjectedTextLines?.clear(),this._affectedInjectedTextLines=null,this._affectedLineHeights?.clear(),this._affectedLineHeights=null,this._affectedFontLines?.clear(),this._affectedFontLines=null)}recordLineAffectedByInjectedText(e){this._affectedInjectedTextLines||(this._affectedInjectedTextLines=new Set),this._affectedInjectedTextLines.add(e)}recordLineAffectedByLineHeightChange(e,t,i,n){this._affectedLineHeights||(this._affectedLineHeights=new OT([],vp.toKey)),this._affectedLineHeights.add(new vp(e,t,i,n))}recordLineAffectedByFontChange(e,t,i){this._affectedFontLines||(this._affectedFontLines=new OT([],wp.toKey)),this._affectedFontLines.add(new wp(e,t,i))}checkAffectedAndFire(e){this._affectsMinimap||=!!e.minimap?.position,this._affectsOverviewRuler||=!!e.overviewRuler?.color,this._affectsGlyphMargin||=!!e.glyphMarginClassName,this._affectsLineNumber||=!!e.lineNumberClassName,this.tryFire()}fire(){this._affectsMinimap=!0,this._affectsOverviewRuler=!0,this._affectsGlyphMargin=!0,this.tryFire()}tryFire(){this._deferredCnt===0?this.doFire():this._shouldFireDeferred=!0}doFire(){this.handleBeforeFire(this._affectedInjectedTextLines,this._affectedLineHeights,this._affectedFontLines);let e={affectsMinimap:this._affectsMinimap,affectsOverviewRuler:this._affectsOverviewRuler,affectsGlyphMargin:this._affectsGlyphMargin,affectsLineNumber:this._affectsLineNumber};this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1,this._actual.fire(e)}},uJ=class extends T{constructor(){super(),this._emitter=this._register(new N),this.event=this._emitter.event,this._deferredCnt=0,this._deferredEvent=null}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(e=null){if(this._deferredCnt--,this._deferredCnt===0&&this._deferredEvent!==null){this._deferredEvent.rawContentChangedEvent.resultingSelection=e;let t=this._deferredEvent;this._deferredEvent=null,this._emitter.fire(t)}}fire(e){if(this._deferredCnt>0){this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e;return}this._emitter.fire(e)}}});function iBe(o,e,t,i,n,s,r,a){if(n===-1)return null;let l=t.length;if(l<=1)return null;let c=a==="keepAll",d=e.breakOffsets,h=e.breakOffsetsVisibleColumn,u=JSe(t,i,n,s,r),f=n-u,g=gJ,p=mJ,_=0,b=0,v=0,w=n,C=d.length,y=0;if(y>=0){let k=Math.abs(h[y]-w);for(;y+1=k)break;k=I,y++}}for(;yk&&(k=b,I=v);let E=0,D=0,O=0,P=0;if(I<=w){let z=I,Y=k===0?0:t.charCodeAt(k-1),Z=k===0?0:o.get(Y),te=!0;for(let se=k;seb&&pJ(Y,Z,ce,Be,c)&&(E=he,D=z),z+=Ge,z>w){he>b?(O=he,P=z-Ge):(O=se+1,P=z),z-D>f&&(E=0),te=!1;break}Y=ce,Z=Be}if(te){_>0&&(g[_]=d[d.length-1],p[_]=h[d.length-1],_++);break}}if(E===0){let z=I,Y=t.charCodeAt(k),Z=o.get(Y),te=!1;for(let se=k-1;se>=b;se--){let he=se+1,ce=t.charCodeAt(se);if(ce===9){te=!0;break}let Be,Ge;if(xh(ce)?(se--,Be=0,Ge=2):(Be=o.get(ce),Ge=ac(ce)?s:1),z<=w){if(O===0&&(O=he,P=z),z<=w-f)break;if(pJ(ce,Be,Y,Z,c)){E=he,D=z;break}}z-=Ge,Y=ce,Z=Be}if(E!==0){let se=f-(P-D);if(se<=i){let he=t.charCodeAt(O),ce;Dn(he)?ce=2:ce=aD(he,P,i,s),se-ce<0&&(E=0)}}if(te){y--;continue}}if(E===0&&(E=O,D=P),E<=b){let z=t.charCodeAt(b);Dn(z)?(E=b+2,D=v+2):(E=b+1,D=v+aD(z,v,i,s))}for(b=E,g[_]=E,v=D,p[_]=D,_++,w=D+f;y<0||y=H)break;H=z,y++}}return _===0?null:(g.length=_,p.length=_,gJ=e.breakOffsets,mJ=e.breakOffsetsVisibleColumn,e.breakOffsets=g,e.breakOffsetsVisibleColumn=p,e.wrappedTextIndentLength=u,e)}function nBe(o,e,t,i,n,s,r,a,l){let c=zh.applyInjectedText(e,t),d,h;if(t&&t.length>0?(d=t.map(O=>O.options),h=t.map(O=>O.column-1)):(d=null,h=null),n===-1)return d?new gp(h,d,[c.length],[],0):null;let u=c.length;if(u<=1)return d?new gp(h,d,[c.length],[],0):null;let f=a==="keepAll",g=JSe(c,i,n,s,r),p=n-g,_=[],b=[],v=0,w=0,C=0,y=n,k=c.charCodeAt(0),I=o.get(k),E=aD(k,0,i,s),D=1;Dn(k)&&(E+=1,k=c.charCodeAt(1),I=o.get(k),D++);for(let O=D;Oy||Z)&&((w===0||E-C>p)&&(w=P,C=E-Y),_[v]=w,b[v]=C,v++,y=C+p,w=0),k=H,I=z}return v===0&&(!t||t.length===0)?null:(_[v]=u,b[v]=E,new gp(h,d,_,b,g))}function aD(o,e,t,i){return o===9?t-e%t:ac(o)||o<32?i:1}function QSe(o,e){return e-o%e}function oBe(o,e){if(e>=2&&o.charAt(e-1)==="n"){let t=0;for(let i=e-2;i>=0;i--)if(o.charAt(i)==="\\")t++;else return t%2===1}return!1}function pJ(o,e,t,i,n){return t!==32&&(e===2&&i!==2||e!==1&&i===1||!n&&e===3&&i!==2||!n&&i===3&&e!==1)}function JSe(o,e,t,i,n){let s=0;if(n!==0){let r=Zn(o);if(r!==-1){for(let l=0;lt&&(s=0)}}return s}var FB,fJ,gJ,mJ,exe=x(()=>{He();Qw();KC();eQ();FB=class o{static create(e){return new o(e.get(151),e.get(150))}constructor(e,t){this.classifier=new fJ(e,t)}createLineBreaksComputer(e,t,i,n,s,r,a){let l=[],c=[];return{addRequest:(d,h)=>{l.push(d),c.push(h)},finalize:()=>{let d=t.typicalFullwidthCharacterWidth/t.typicalHalfwidthCharacterWidth,h=[];for(let u=0,f=l.length;u=0&&e<256?this._asciiMap[e]:e>=12352&&e<=12543||e>=13312&&e<=19903||e>=19968&&e<=40959?3:this._map.get(e)||this._defaultValue}},gJ=[],mJ=[]});var lD,txe=x(()=>{Yc();Pe();ue();gi();lD=class o{constructor(e){this._selTrackedRange=null,this._trackSelection=!0,this._setState(e,new ks(new S(1,1,1,1),0,0,new M(1,1),0),new ks(new S(1,1,1,1),0,0,new M(1,1),0))}dispose(e){this._removeTrackedRange(e)}startTrackingSelection(e){this._trackSelection=!0,this._updateTrackedRange(e)}stopTrackingSelection(e){this._trackSelection=!1,this._removeTrackedRange(e)}_updateTrackedRange(e){this._trackSelection&&(this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,this.modelState.selection,0))}_removeTrackedRange(e){this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,null,0)}asCursorState(){return new At(this.modelState,this.viewState)}readSelectionFromMarkers(e){let t=e.model._getTrackedRange(this._selTrackedRange);return this.modelState.selection.isEmpty()&&!t.isEmpty()?me.fromRange(t.collapseToEnd(),this.modelState.selection.getDirection()):me.fromRange(t,this.modelState.selection.getDirection())}ensureValidState(e){this._setState(e,this.modelState,this.viewState)}setState(e,t,i){this._setState(e,t,i)}static _validatePositionWithCache(e,t,i,n){return t.equals(i)?n:e.normalizePosition(t,2)}static _validateViewState(e,t){let i=t.position,n=t.selectionStart.getStartPosition(),s=t.selectionStart.getEndPosition(),r=e.normalizePosition(i,2),a=this._validatePositionWithCache(e,n,i,r),l=this._validatePositionWithCache(e,s,n,a);return i.equals(r)&&n.equals(a)&&s.equals(l)?t:new ks(S.fromPositions(a,l),t.selectionStartKind,t.selectionStartLeftoverVisibleColumns+n.column-a.column,r,t.leftoverVisibleColumns+i.column-r.column)}_setState(e,t,i){if(i&&(i=o._validateViewState(e.viewModel,i)),t){let n=e.model.validateRange(t.selectionStart),s=t.selectionStart.equalsRange(n)?t.selectionStartLeftoverVisibleColumns:0,r=e.model.validatePosition(t.position),a=t.position.equals(r)?t.leftoverVisibleColumns:0;t=new ks(n,t.selectionStartKind,s,r,a)}else{if(!i)return;let n=e.model.validateRange(e.coordinatesConverter.convertViewRangeToModelRange(i.selectionStart)),s=e.model.validatePosition(e.coordinatesConverter.convertViewPositionToModelPosition(i.position));t=new ks(n,i.selectionStartKind,i.selectionStartLeftoverVisibleColumns,s,i.leftoverVisibleColumns)}if(i){let n=e.coordinatesConverter.validateViewRange(i.selectionStart,t.selectionStart),s=e.coordinatesConverter.validateViewPosition(i.position,t.position);i=new ks(n,t.selectionStartKind,t.selectionStartLeftoverVisibleColumns,s,t.leftoverVisibleColumns)}else{let n=e.coordinatesConverter.convertModelPositionToViewPosition(new M(t.selectionStart.startLineNumber,t.selectionStart.startColumn)),s=e.coordinatesConverter.convertModelPositionToViewPosition(new M(t.selectionStart.endLineNumber,t.selectionStart.endColumn)),r=new S(n.lineNumber,n.column,s.lineNumber,s.column),a=e.coordinatesConverter.convertModelPositionToViewPosition(t.position);i=new ks(r,t.selectionStartKind,t.selectionStartLeftoverVisibleColumns,a,t.leftoverVisibleColumns)}this.modelState=t,this.viewState=i,this._updateTrackedRange(e)}}});var cD,ixe=x(()=>{qe();ha();Yc();txe();Pe();ue();gi();cD=class{constructor(e){this.context=e,this.cursors=[new lD(e)],this.lastAddedCursorIndex=0}dispose(){for(let e of this.cursors)e.dispose(this.context)}startTrackingSelections(){for(let e of this.cursors)e.startTrackingSelection(this.context)}stopTrackingSelections(){for(let e of this.cursors)e.stopTrackingSelection(this.context)}updateContext(e){this.context=e}ensureValidState(){for(let e of this.cursors)e.ensureValidState(this.context)}readSelectionFromMarkers(){return this.cursors.map(e=>e.readSelectionFromMarkers(this.context))}getAll(){return this.cursors.map(e=>e.asCursorState())}getViewPositions(){return this.cursors.map(e=>e.viewState.position)}getTopMostViewPosition(){return $P(this.cursors,Un(e=>e.viewState.position,M.compare)).viewState.position}getBottomMostViewPosition(){return UP(this.cursors,Un(e=>e.viewState.position,M.compare)).viewState.position}getSelections(){return this.cursors.map(e=>e.modelState.selection)}getViewSelections(){return this.cursors.map(e=>e.viewState.selection)}setSelections(e){this.setStates(At.fromModelSelections(e))}getPrimaryCursor(){return this.cursors[0].asCursorState()}setStates(e){e!==null&&(this.cursors[0].setState(this.context,e[0].modelState,e[0].viewState),this._setSecondaryStates(e.slice(1)))}_setSecondaryStates(e){let t=this.cursors.length-1,i=e.length;if(ti){let n=t-i;for(let s=0;s=e+1&&this.lastAddedCursorIndex--,this.cursors[e+1].dispose(this.context),this.cursors.splice(e+1,1)}normalize(){if(this.cursors.length===1)return;let e=this.cursors.slice(0),t=[];for(let i=0,n=e.length;ii.selection,S.compareRangesUsingStarts));for(let i=0;ih&&p.index--;e.splice(h,1),t.splice(d,1),this._removeSecondaryCursor(h-1),i--}}}}});var dD,nxe=x(()=>{dD=class{constructor(e,t,i,n){this._cursorContextBrand=void 0,this.model=e,this.viewModel=t,this.coordinatesConverter=i,this.cursorConfig=n}}});var BB,WB,HB,VB,ug,JC,zB,UB,ey,hD,w0,C0,Cp,$B,qB,jB,KB,GB,YB=x(()=>{BB=class{constructor(){this.type=0}},WB=class{constructor(){this.type=1}},HB=class{constructor(e){this.type=2,this._source=e}hasChanged(e){return this._source.hasChanged(e)}},VB=class{constructor(e,t,i){this.selections=e,this.modelSelections=t,this.reason=i,this.type=3}},ug=class{constructor(e){this.type=4,e?(this.affectsMinimap=e.affectsMinimap,this.affectsOverviewRuler=e.affectsOverviewRuler,this.affectsGlyphMargin=e.affectsGlyphMargin,this.affectsLineNumber=e.affectsLineNumber):(this.affectsMinimap=!0,this.affectsOverviewRuler=!0,this.affectsGlyphMargin=!0,this.affectsLineNumber=!0)}},JC=class{constructor(){this.type=5}},zB=class{constructor(e){this.type=6,this.isFocused=e}},UB=class{constructor(){this.type=7}},ey=class{constructor(){this.type=8}},hD=class{constructor(e,t){this.fromLineNumber=e,this.count=t,this.type=9}},w0=class{constructor(e,t){this.type=10,this.fromLineNumber=e,this.toLineNumber=t}},C0=class{constructor(e,t){this.type=11,this.fromLineNumber=e,this.toLineNumber=t}},Cp=class{constructor(e,t,i,n,s,r,a){this.source=e,this.minimalReveal=t,this.range=i,this.selections=n,this.verticalType=s,this.revealHorizontal=r,this.scrollType=a,this.type=12}},$B=class{constructor(e){this.type=13,this.scrollWidth=e.scrollWidth,this.scrollLeft=e.scrollLeft,this.scrollHeight=e.scrollHeight,this.scrollTop=e.scrollTop,this.scrollWidthChanged=e.scrollWidthChanged,this.scrollLeftChanged=e.scrollLeftChanged,this.scrollHeightChanged=e.scrollHeightChanged,this.scrollTopChanged=e.scrollTopChanged}},qB=class{constructor(e){this.theme=e,this.type=14}},jB=class{constructor(e){this.type=15,this.ranges=e}},KB=class{constructor(){this.type=16}},GB=class{constructor(){this.type=17}}});var ZB,_J,XB,uD,QB,JB,eW,tW,iW,nW,oW,sW,rW,aW,lW,cW,dW,hW,uW=x(()=>{ae();W();ZB=class extends T{constructor(){super(),this._onEvent=this._register(new N),this.onEvent=this._onEvent.event,this._eventHandlers=[],this._viewEventQueue=null,this._isConsumingViewEventQueue=!1,this._collector=null,this._collectorCnt=0,this._outgoingEvents=[]}emitOutgoingEvent(e){this._addOutgoingEvent(e),this._emitOutgoingEvents()}_addOutgoingEvent(e){for(let t=0,i=this._outgoingEvents.length;t0;){if(this._collector||this._isConsumingViewEventQueue)return;let e=this._outgoingEvents.shift();e.isNoOp()||this._onEvent.fire(e)}}addViewEventHandler(e){for(let t=0,i=this._eventHandlers.length;t0&&this._emitMany(t)}this._emitOutgoingEvents()}emitSingleViewEvent(e){try{this.beginEmitViewEvents().emitViewEvent(e)}finally{this.endEmitViewEvents()}}_emitMany(e){this._viewEventQueue?this._viewEventQueue=this._viewEventQueue.concat(e):this._viewEventQueue=e,this._isConsumingViewEventQueue||this._consumeViewEventQueue()}_consumeViewEventQueue(){try{this._isConsumingViewEventQueue=!0,this._doConsumeQueue()}finally{this._isConsumingViewEventQueue=!1}}_doConsumeQueue(){for(;this._viewEventQueue;){let e=this._viewEventQueue;this._viewEventQueue=null;let t=this._eventHandlers.slice(0);for(let i of t)i.handleEvents(e)}}},_J=class{constructor(){this.viewEvents=[],this.outgoingEvents=[]}emitViewEvent(e){this.viewEvents.push(e)}emitOutgoingEvent(e){this.outgoingEvents.push(e)}},XB=class o{constructor(e,t,i,n){this.kind=0,this._oldContentWidth=e,this._oldContentHeight=t,this.contentWidth=i,this.contentHeight=n,this.contentWidthChanged=this._oldContentWidth!==this.contentWidth,this.contentHeightChanged=this._oldContentHeight!==this.contentHeight}isNoOp(){return!this.contentWidthChanged&&!this.contentHeightChanged}attemptToMerge(e){return e.kind!==this.kind?null:new o(this._oldContentWidth,this._oldContentHeight,e.contentWidth,e.contentHeight)}},uD=class o{constructor(e,t){this.kind=1,this.oldHasFocus=e,this.hasFocus=t}isNoOp(){return this.oldHasFocus===this.hasFocus}attemptToMerge(e){return e.kind!==this.kind?null:new o(this.oldHasFocus,e.hasFocus)}},QB=class{constructor(e,t){this.kind=2,this.oldHasFocus=e,this.hasFocus=t}isNoOp(){return this.oldHasFocus===this.hasFocus}attemptToMerge(e){return e.kind!==this.kind?null:new uD(this.oldHasFocus,e.hasFocus)}},JB=class o{constructor(e,t,i,n,s,r,a,l){this.kind=3,this._oldScrollWidth=e,this._oldScrollLeft=t,this._oldScrollHeight=i,this._oldScrollTop=n,this.scrollWidth=s,this.scrollLeft=r,this.scrollHeight=a,this.scrollTop=l,this.scrollWidthChanged=this._oldScrollWidth!==this.scrollWidth,this.scrollLeftChanged=this._oldScrollLeft!==this.scrollLeft,this.scrollHeightChanged=this._oldScrollHeight!==this.scrollHeight,this.scrollTopChanged=this._oldScrollTop!==this.scrollTop}isNoOp(){return!this.scrollWidthChanged&&!this.scrollLeftChanged&&!this.scrollHeightChanged&&!this.scrollTopChanged}attemptToMerge(e){return e.kind!==this.kind?null:new o(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop)}},eW=class{constructor(){this.kind=4}isNoOp(){return!1}attemptToMerge(e){return e.kind!==this.kind?null:this}},tW=class{constructor(){this.kind=5}isNoOp(){return!1}attemptToMerge(e){return e.kind!==this.kind?null:this}},iW=class o{constructor(e,t,i,n,s,r,a){this.kind=7,this.oldSelections=e,this.selections=t,this.oldModelVersionId=i,this.modelVersionId=n,this.source=s,this.reason=r,this.reachedMaxCursorCount=a}static _selectionsAreEqual(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;let i=e.length,n=t.length;if(i!==n)return!1;for(let s=0;s{Ae();He();ixe();Yc();nxe();v4();$4();bT();ue();gi();KC();YB();W();uW();Xd();fW=class extends T{constructor(e,t,i,n){super(),this._model=e,this._knownModelVersionId=this._model.getVersionId(),this._viewModel=t,this._coordinatesConverter=i,this.context=new dD(this._model,this._viewModel,this._coordinatesConverter,n),this._cursors=new cD(this.context),this._hasFocus=!1,this._isHandling=!1,this._compositionState=null,this._columnSelectData=null,this._autoClosedActions=[],this._prevEditOperationType=0}dispose(){this._cursors.dispose(),this._autoClosedActions=Ct(this._autoClosedActions),super.dispose()}updateConfiguration(e){this.context=new dD(this._model,this._viewModel,this._coordinatesConverter,e),this._cursors.updateContext(this.context)}onLineMappingChanged(e){this._knownModelVersionId===this._model.getVersionId()&&this.setStates(e,"viewModel",0,this.getCursorStates())}setHasFocus(e){this._hasFocus=e}_validateAutoClosedActions(){if(this._autoClosedActions.length>0){let e=this._cursors.getSelections();for(let t=0;tr&&(n=n.slice(0,r),s=!0);let a=fD.from(this._model,this);return this._cursors.setStates(n),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,t,i,a,s)}setCursorColumnSelectData(e){this._columnSelectData=e}revealAll(e,t,i,n,s,r){let a=this._cursors.getViewPositions(),l=null,c=null;a.length>1?c=this._cursors.getViewSelections():l=S.fromPositions(a[0],a[0]),e.emitViewEvent(new Cp(t,i,l,c,n,s,r))}revealPrimary(e,t,i,n,s,r){let l=[this._cursors.getPrimaryCursor().viewState.selection];e.emitViewEvent(new Cp(t,i,null,l,n,s,r))}saveState(){let e=[],t=this._cursors.getSelections();for(let i=0,n=t.length;i0){let s=At.fromModelSelections(i.resultingSelection);this.setStates(e,"modelChange",i.isUndoing?5:i.isRedoing?6:2,s)&&this.revealAll(e,"modelChange",!1,0,!0,0)}else{let s=this._cursors.readSelectionFromMarkers();this.setStates(e,"modelChange",2,At.fromModelSelections(s))}}}getSelection(){return this._cursors.getPrimaryCursor().modelState.selection}getTopMostViewPosition(){return this._cursors.getTopMostViewPosition()}getBottomMostViewPosition(){return this._cursors.getBottomMostViewPosition()}getCursorColumnSelectData(){if(this._columnSelectData)return this._columnSelectData;let e=this._cursors.getPrimaryCursor(),t=e.viewState.selectionStart.getStartPosition(),i=e.viewState.position;return{isReal:!1,fromViewLineNumber:t.lineNumber,fromViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,t),toViewLineNumber:i.lineNumber,toViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,i)}}getSelections(){return this._cursors.getSelections()}setSelections(e,t,i,n){this.setStates(e,t,n,At.fromModelSelections(i))}getPrevEditOperationType(){return this._prevEditOperationType}setPrevEditOperationType(e){this._prevEditOperationType=e}_pushAutoClosedAction(e,t){let i=[],n=[];for(let a=0,l=e.length;a0&&this._pushAutoClosedAction(n,s),this._prevEditOperationType=e.type}e.shouldPushStackElementAfter&&this._model.pushStackElement()}_interpretCommandResult(e){(!e||e.length===0)&&(e=this._cursors.readSelectionFromMarkers()),this._columnSelectData=null,this._cursors.setSelections(e),this._cursors.normalize()}_emitStateChangedIfNecessary(e,t,i,n,s){let r=fD.from(this._model,this);if(r.equals(n))return!1;let a=this._cursors.getSelections(),l=this._cursors.getViewSelections();if(e.emitViewEvent(new VB(l,a,i)),!n||n.cursorState.length!==r.cursorState.length||r.cursorState.some((c,d)=>!c.modelState.equals(n.cursorState[d].modelState))){let c=n?n.cursorState.map(h=>h.modelState.selection):null,d=n?n.modelVersionId:0;e.emitOutgoingEvent(new iW(c,a,d,r.modelVersionId,t||"keyboard",i,s))}return!0}_findAutoClosingPairs(e){if(!e.length)return null;let t=[];for(let i=0,n=e.length;i=0)return null;let r=s.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!r)return null;let a=r[1],l=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(a);if(!l||l.length!==1)return null;let c=l[0].open,d=s.text.length-r[2].length-1,h=s.text.lastIndexOf(c,d-1);if(h===-1)return null;t.push([h,d])}return t}executeEdits(e,t,i,n,s){let r=null;t==="snippet"&&(r=this._findAutoClosingPairs(i)),r&&(i[0]._isTracked=!0);let a=[],l=[],c=this._model.pushEditOperations(this.getSelections(),i,d=>{if(r)for(let u=0,f=r.length;u0&&this._pushAutoClosedAction(a,l)}_executeEdit(e,t,i,n=0){if(this.context.cursorConfig.readOnly)return;let s=fD.from(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),e()}catch(r){De(r)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(t,i,n,s,!1)&&this.revealAll(t,i,!1,0,!0,0)}getAutoClosedCharacters(){return gW.getAllAutoClosedCharacters(this._autoClosedActions)}startComposition(e){this._compositionState=new wJ(this._model,this.getSelections())}endComposition(e,t){let i=fo.cursor({kind:"compositionEnd",detailedSource:t}),n=this._compositionState?this._compositionState.deduceOutcome(this._model,this.getSelections()):null;this._compositionState=null,this._executeEdit(()=>{t==="keyboard"&&this._executeEditOperation(Zd.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,n,this.getSelections(),this.getAutoClosedCharacters()),i)},e,t)}type(e,t,i){let n=fo.cursor({kind:"type",detailedSource:i});this._executeEdit(()=>{if(i==="keyboard"){let s=t.length,r=0;for(;r{let d=c.getPosition();return new me(d.lineNumber,d.column+s,d.lineNumber,d.column+s)});this.setSelections(e,r,l,0)}return}this._executeEdit(()=>{this._executeEditOperation(Zd.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t,i,n,s),a)},e,r)}paste(e,t,i,n,s){let r=fo.cursor({kind:"paste",detailedSource:s});this._executeEdit(()=>{this._executeEditOperation(Zd.paste(this.context.cursorConfig,this._model,this.getSelections(),t,i,n||[]),r)},e,s,4)}cut(e,t){let i=fo.cursor({kind:"cut",detailedSource:t});this._executeEdit(()=>{this._executeEditOperation(sp.cut(this.context.cursorConfig,this._model,this.getSelections()),i)},e,t)}executeCommand(e,t,i){let n=fo.cursor({kind:"executeCommand",detailedSource:i});this._executeEdit(()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new Ws(0,[t],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}),n)},e,i)}executeCommands(e,t,i){let n=fo.cursor({kind:"executeCommands",detailedSource:i});this._executeEdit(()=>{this._executeEditOperation(new Ws(0,t,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}),n)},e,i)}},fD=class o{static from(e,t){return new o(e.getVersionId(),t.getCursorStates())}constructor(e,t){this.modelVersionId=e,this.cursorState=t}equals(e){if(!e||this.modelVersionId!==e.modelVersionId||this.cursorState.length!==e.cursorState.length)return!1;for(let t=0,i=this.cursorState.length;t=t.length||!t[i].strictContainsRange(e[i]))return!1;return!0}},bJ=class{static executeCommands(e,t,i,n=fo.unknown({name:"executeCommands"})){let s={model:e,selectionsBefore:t,trackedRanges:[],trackedRangesDirection:[]},r=this._innerExecuteCommands(s,i,n);for(let a=0,l=s.trackedRanges.length;a0&&(a[0]._isTracked=!0);let l=e.model.pushEditOperations(e.selectionsBefore,a,d=>{let h=[];for(let g=0;gg.identifier.minor-p.identifier.minor,f=[];for(let g=0;g0?(h[g].sort(u),f[g]=t[g].computeCursorState(e.model,{getInverseEditOperations:()=>h[g],getTrackedSelection:p=>{let _=parseInt(p,10),b=e.model._getTrackedRange(e.trackedRanges[_]);return e.trackedRangesDirection[_]===0?new me(b.startLineNumber,b.startColumn,b.endLineNumber,b.endColumn):new me(b.endLineNumber,b.endColumn,b.startLineNumber,b.startColumn)}})):f[g]=e.selectionsBefore[g];return f},void 0,i);l||(l=e.selectionsBefore);let c=[];for(let d in r)r.hasOwnProperty(d)&&c.push(parseInt(d,10));c.sort((d,h)=>h-d);for(let d of c)l.splice(d,1);return l}static _arrayIsEmpty(e){for(let t=0,i=e.length;t{S.isEmpty(h)&&u===""||n.push({identifier:{major:t,minor:s++},range:h,text:u,forceMoveMarkers:f,isAutoWhitespaceEdit:i.insertsAutoWhitespace})},a=!1,d={addEditOperation:r,addTrackedEditOperation:(h,u,f)=>{a=!0,r(h,u,f)},trackSelection:(h,u)=>{let f=me.liftSelection(h),g;if(f.isEmpty())if(typeof u=="boolean")u?g=2:g=3;else{let b=e.model.getLineMaxColumn(f.startLineNumber);f.startColumn===b?g=2:g=3}else g=1;let p=e.trackedRanges.length,_=e.model._setTrackedRange(null,f,g);return e.trackedRanges[p]=_,e.trackedRangesDirection[p]=f.getDirection(),p.toString()}};try{i.getEditOperations(e.model,d)}catch(h){return De(h),{operations:[],hadTrackedEditOperation:!1}}return{operations:n,hadTrackedEditOperation:a}}static _getLoserCursorMap(e){e=e.slice(0),e.sort((i,n)=>-S.compareRangesUsingEnds(i.range,n.range));let t={};for(let i=1;is.identifier.major?r=n.identifier.major:r=s.identifier.major,t[r.toString()]=!0;for(let a=0;a0&&i--}}return t}},vJ=class{constructor(e,t,i,n){this.text=e,this.lineNumber=t,this.startSelectionOffset=i,this.endSelectionOffset=n}},wJ=class o{static _capture(e,t){let i=[];for(let n of t){if(n.startLineNumber!==n.endLineNumber)return null;let s=n.startLineNumber;i.push(new vJ(e.getLineContent(s),s,n.startColumn-1,n.endColumn-1))}return i}constructor(e,t){this._original=o._capture(e,t)}deduceOutcome(e,t){if(!this._original)return null;let i=o._capture(e,t);if(!i||this._original.length!==i.length)return null;let n=[];for(let s=0,r=this._original.length;s0;)r&&d?(g+=" ",d=!1):(g+=" ",d=!0),w--;break}case 60:g+="<",d=!1;break;case 62:g+=">",d=!1;break;case 38:g+="&",d=!1;break;case 0:g+="�",d=!1;break;case 65279:case 8232:case 8233:case 133:g+="\uFFFD",d=!1;break;case 13:g+="​",d=!1;break;case 32:r&&d?(g+=" ",d=!1):(g+=" ",d=!0);break;default:g+=String.fromCharCode(p),d=!1}}if(!(f<=i)&&(a+=`${g}`,f>n||l>=n||i>=n))break}return a+="",a}function rxe(o,e,t){let i='
',n=Eo(o),s=t.getInitialState();for(let r=0,a=n.length;r0&&(i+="
");let c=t.tokenizeEncoded(l,!0,s);Si.convertToEndOffset(c.tokens,l.length);let h=new Si(c.tokens,l,e).inflate(),u=0;for(let f=0,g=h.getCount();f${sc(l.substring(u,_))}`,u=_}s=c.endState}return i+="
",i}var sxe,CJ=x(()=>{He();ua();Ci();Kx();sxe={getInitialState:()=>Hf,tokenizeEncoded:(o,e,t)=>gb(0,t)}});var yJ,gD,mD,y0,SJ=x(()=>{qe();n0();yJ=class{constructor(e,t,i,n,s){this.decorationId=e,this.index=t,this.lineNumber=i,this.specialHeight=n,this.prefixSum=s,this.maximumSpecialHeight=n,this.deleted=!1}},gD=class{constructor(e,t){this._decorationIDToCustomLine=new y0,this._orderedCustomLines=[],this._pendingChanges=[],this._invalidIndex=1/0,this._hasPending=!1,this._defaultLineHeight=e;for(let i of t)this.insertOrChangeCustomLineHeight(i.decorationId,i.startLineNumber,i.endLineNumber,i.lineHeight)}set defaultLineHeight(e){this._defaultLineHeight=e}get defaultLineHeight(){return this._defaultLineHeight}removeCustomLineHeight(e){this._pendingChanges.push({kind:1,decorationId:e}),this._hasPending=!0}insertOrChangeCustomLineHeight(e,t,i,n){this._pendingChanges.push({kind:0,decorationId:e,startLineNumber:t,endLineNumber:i,lineHeight:n}),this._hasPending=!0}heightForLineNumber(e){this._commit();let t=this._binarySearchOverOrderedCustomLinesArray(e);return t>=0?this._orderedCustomLines[t].maximumSpecialHeight:this._defaultLineHeight}getAccumulatedLineHeightsIncludingLineNumber(e){this._commit();let t=this._binarySearchOverOrderedCustomLinesArray(e);if(t>=0)return this._orderedCustomLines[t].prefixSum+this._orderedCustomLines[t].maximumSpecialHeight;if(t===-1)return this._defaultLineHeight*e;let i=-(t+1),n=this._orderedCustomLines[i-1];return n.prefixSum+n.maximumSpecialHeight+this._defaultLineHeight*(e-n.lineNumber)}onLinesDeleted(e,t){this._pendingChanges.push({kind:2,fromLineNumber:e,toLineNumber:t}),this._hasPending=!0}onLinesInserted(e,t){this._pendingChanges.push({kind:3,fromLineNumber:e,toLineNumber:t}),this._hasPending=!0}_commit(){if(!this._hasPending)return;let e=this._pendingChanges;this._pendingChanges=[],this._hasPending=!1;let t=[],i=new y0;for(let n of e)switch(n.kind){case 1:this._doRemoveCustomLineHeight(n.decorationId,i);break;case 0:this._doInsertOrChangeCustomLineHeight(n.decorationId,n.startLineNumber,n.endLineNumber,n.lineHeight,t,i);break;case 2:this._flushStagedDecorationChanges(t,i),this._doLinesDeleted(n.fromLineNumber,n.toLineNumber);break;case 3:this._flushStagedDecorationChanges(t,i),this._doLinesInserted(n.fromLineNumber,n.toLineNumber,t,i);break}this._flushStagedDecorationChanges(t,i)}_doRemoveCustomLineHeight(e,t){let i=this._decorationIDToCustomLine.get(e);if(i){this._decorationIDToCustomLine.delete(e);for(let s of i)s.deleted=!0,this._invalidIndex=Math.min(this._invalidIndex,s.index)}let n=t.get(e);if(n){t.delete(e);for(let s of n)s.deleted=!0}}_doInsertOrChangeCustomLineHeight(e,t,i,n,s,r){this._doRemoveCustomLineHeight(e,r);for(let a=t;a<=i;a++){let l=new yJ(e,-1,a,n,0);s.push(l),r.add(e,l)}}_flushStagedDecorationChanges(e,t){if(e.length===0&&this._invalidIndex===1/0)return;for(let a of e){if(a.deleted)continue;let l=this._binarySearchOverOrderedCustomLinesArray(a.lineNumber),c=l>=0?l:-(l+1);this._orderedCustomLines.splice(c,0,a),this._invalidIndex=Math.min(this._invalidIndex,c)}if(e.length=0,t.clear(),this._invalidIndex===1/0)return;let i=new y0,n=[];for(let a=0;a0?n[this._invalidIndex-1]:void 0;for(let a=this._invalidIndex;a=0){r=s;for(let h=s-1;h>=0&&this._orderedCustomLines[h].lineNumber===e;h--)r--}else r=s===-(n+1)&&s!==-1?n-1:-(s+1);let a=this._binarySearchOverOrderedCustomLinesArray(t),l;if(a>=0){l=a;for(let h=a+1;hr,d=l===r&&this._orderedCustomLines[r]&&this._orderedCustomLines[r].lineNumber>=e&&this._orderedCustomLines[r].lineNumber<=t;if(c||d){let h=0;for(let k=r;k<=l;k++)h=Math.max(h,this._orderedCustomLines[k].maximumSpecialHeight);let u=0;if(r>0){let k=this._orderedCustomLines[r-1];u=k.prefixSum+k.maximumSpecialHeight+this._defaultLineHeight*(e-k.lineNumber-1)}else u=e>0?(e-1)*this._defaultLineHeight:0;let f=this._orderedCustomLines[r],g=this._orderedCustomLines[l],p=this._orderedCustomLines[l+1],_=p&&p.lineNumber===t+1?p.maximumSpecialHeight:this._defaultLineHeight,b=g.prefixSum+g.maximumSpecialHeight-f.prefixSum+this._defaultLineHeight*(t-g.lineNumber)+this._defaultLineHeight*(f.lineNumber-e)+_-h,v=new Set,w=[],C=new y0,y=0;for(let k=0;k=r&&k<=l){let E=I.decorationId;v.has(E)?y++:(I.index-=y,I.lineNumber=e,I.prefixSum=u,I.maximumSpecialHeight=h,w.push(I),C.add(I.decorationId,I))}else k>l&&(I.index-=y,I.lineNumber-=i,I.prefixSum-=b,w.push(I),C.add(I.decorationId,I));v.add(I.decorationId)}this._orderedCustomLines=w,this._decorationIDToCustomLine=C}else{let h=i*this._defaultLineHeight;for(let u=l;ut&&(f.lineNumber-=i,f.prefixSum-=h)}}}_doLinesInserted(e,t,i,n){let s=t-e+1,r=this._binarySearchOverOrderedCustomLinesArray(e),a;if(r>=0){a=r;for(let f=r-1;f>=0&&this._orderedCustomLines[f].lineNumber===e;f--)a--}else a=-(r+1);let l=[],c=new Set;for(let f=a;f=0;f--)this._orderedCustomLines[f].lineNumber===e-1&&d.add(this._orderedCustomLines[f].decorationId);let h=B3(d,c),u=s*this._defaultLineHeight;for(let f=a;f0){for(let f of h){let g=this._decorationIDToCustomLine.get(f);if(g){let p=g.reduce((v,w)=>Math.min(v,w.lineNumber),e),_=g.reduce((v,w)=>Math.max(v,w.lineNumber),e),b=g.reduce((v,w)=>Math.max(v,w.specialHeight),0);l.push({decorationId:f,startLineNumber:p,endLineNumber:_,lineHeight:b})}}for(let f of l)this._doInsertOrChangeCustomLineHeight(f.decorationId,f.startLineNumber,f.endLineNumber,f.lineHeight,i,n)}}_binarySearchOverOrderedCustomLinesArray(e){return __(this._orderedCustomLines.length,t=>{let i=this._orderedCustomLines[t];return i.lineNumber===e?0:i.lineNumber{let r=t.convertModelRangeToViewRange(s.range);return new o(s.id,r.startLineNumber,r.endLineNumber,s.options.lineHeight?s.options.lineHeight*n:0)})}},y0=class{constructor(){this._map=new Map}add(e,t){let i=this._map.get(e);i?i.push(t):this._map.set(e,[t])}get(e){return this._map.get(e)}delete(e){this._map.delete(e)}clear(){this._map.clear()}}});var xJ,kJ,mW,cxe=x(()=>{He();SJ();xJ=class{constructor(){this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[]}insert(e){this._hasPending=!0,this._inserts.push(e)}change(e){this._hasPending=!0,this._changes.push(e)}remove(e){this._hasPending=!0,this._removes.push(e)}commit(e){if(!this._hasPending)return;let t=this._inserts,i=this._changes,n=this._removes;this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[],e._commitPendingChanges(t,i,n)}},kJ=class{constructor(e,t,i,n,s){this.id=e,this.afterLineNumber=t,this.ordinal=i,this.height=n,this.minWidth=s,this.prefixSum=0}},mW=class o{static{this.INSTANCE_COUNT=0}constructor(e,t,i,n,s){this._instanceId=cO(++o.INSTANCE_COUNT),this._pendingChanges=new xJ,this._lastWhitespaceId=0,this._arr=[],this._prefixSumValidIndex=-1,this._minWidth=-1,this._lineCount=e,this._paddingTop=i,this._paddingBottom=n,this._lineHeightsManager=new gD(t,s)}static findInsertionIndex(e,t,i){let n=0,s=e.length;for(;n>>1;t===e[r].afterLineNumber?i{t=!0,this._lineHeightsManager.insertOrChangeCustomLineHeight(n,s,r,a)},removeCustomLineHeight:n=>{t=!0,this._lineHeightsManager.removeCustomLineHeight(n)}}),t}changeWhitespace(e){let t=!1;try{e({insertWhitespace:(n,s,r,a)=>{t=!0,n=n|0,s=s|0,r=r|0,a=a|0;let l=this._instanceId+ ++this._lastWhitespaceId;return this._pendingChanges.insert(new kJ(l,n,s,r,a)),l},changeOneWhitespace:(n,s,r)=>{t=!0,s=s|0,r=r|0,this._pendingChanges.change({id:n,newAfterLineNumber:s,newHeight:r})},removeWhitespace:n=>{t=!0,this._pendingChanges.remove({id:n})}})}finally{this._pendingChanges.commit(this)}return t}_commitPendingChanges(e,t,i){if((e.length>0||i.length>0)&&(this._minWidth=-1),e.length+t.length+i.length<=1){for(let l of e)this._insertWhitespace(l);for(let l of t)this._changeOneWhitespace(l.id,l.newAfterLineNumber,l.newHeight);for(let l of i){let c=this._findWhitespaceIndex(l.id);c!==-1&&this._removeWhitespace(c)}return}let n=new Set;for(let l of i)n.add(l.id);let s=new Map;for(let l of t)s.set(l.id,l);let r=l=>{let c=[];for(let d of l)if(!n.has(d.id)){if(s.has(d.id)){let h=s.get(d.id);d.afterLineNumber=h.newAfterLineNumber,d.height=h.newHeight}c.push(d)}return c},a=r(this._arr).concat(r(e));a.sort((l,c)=>l.afterLineNumber===c.afterLineNumber?l.ordinal-c.ordinal:l.afterLineNumber-c.afterLineNumber),this._arr=a,this._prefixSumValidIndex=-1}_insertWhitespace(e){let t=o.findInsertionIndex(this._arr,e.afterLineNumber,e.ordinal);this._arr.splice(t,0,e),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,t-1)}_findWhitespaceIndex(e){let t=this._arr;for(let i=0,n=t.length;it&&(this._arr[i].afterLineNumber-=t-e+1)}this._lineHeightsManager.onLinesDeleted(e,t)}onLinesInserted(e,t){e=e|0,t=t|0,this._lineCount+=t-e+1;for(let i=0,n=this._arr.length;i=t.length||t[a+1].afterLineNumber>=e)return a;i=a+1|0}else n=a-1|0}return-1}_findFirstWhitespaceAfterLineNumber(e){e=e|0;let i=this._findLastWhitespaceBeforeLineNumber(e)+1;return i1?i=this._lineHeightsManager.getAccumulatedLineHeightsIncludingLineNumber(e-1):i=0;let n=this.getWhitespaceAccumulatedHeightBeforeLineNumber(e-(t?1:0));return i+n+this._paddingTop}getLineHeightForLineNumber(e){return this._lineHeightsManager.heightForLineNumber(e)}getVerticalOffsetAfterLineNumber(e,t=!1){e=e|0;let i=this._lineHeightsManager.getAccumulatedLineHeightsIncludingLineNumber(e),n=this.getWhitespaceAccumulatedHeightBeforeLineNumber(e+(t?1:0));return i+n+this._paddingTop}getWhitespaceMinWidth(){if(this._minWidth===-1){let e=0;for(let t=0,i=this._arr.length;tt}isInTopPadding(e){return this._paddingTop===0?!1:e=t-this._paddingBottom}getLineNumberAtOrAfterVerticalOffset(e){if(e=e|0,e<0)return 1;let t=this._lineCount|0,i=1,n=t;for(;i=a+r)i=s+1;else{if(e>=a)return s;n=s}}return i>t?t:i}getLinesViewportData(e,t){e=e|0,t=t|0;let i=this.getLineNumberAtOrAfterVerticalOffset(e)|0,n=this.getVerticalOffsetForLineNumber(i)|0,s=this._lineCount|0,r=this.getFirstWhitespaceIndexAfterLineNumber(i)|0,a=this.getWhitespacesCount()|0,l,c;r===-1?(r=a,c=s+1,l=0):(c=this.getAfterLineNumberForWhitespaceIndex(r)|0,l=this.getHeightForWhitespaceIndex(r)|0);let d=n,h=d,u=5e5,f=0;n>=u&&(f=Math.floor(n/u)*u,f=Math.floor(f/this._lineHeightsManager.defaultLineHeight)*this._lineHeightsManager.defaultLineHeight,h-=f);let g=[],p=e+(t-e)/2,_=-1;for(let C=i;C<=s;C++){let y=this.getLineHeightForLineNumber(C);if(_===-1){let k=d,I=d+y;(k<=p&&pp)&&(_=C)}for(d+=y,g[C-i]=h,h+=y;c===C;)h+=l,d+=l,r++,r>=a?c=s+1:(c=this.getAfterLineNumberForWhitespaceIndex(r)|0,l=this.getHeightForWhitespaceIndex(r)|0);if(d>=t){s=C;break}}_===-1&&(_=s);let b=this.getVerticalOffsetForLineNumber(s)|0,v=i,w=s;if(vt&&w--}return{bigNumbersDelta:f,startLineNumber:i,endLineNumber:s,relativeVerticalOffset:g,centeredLineNumber:_,completelyVisibleStartLineNumber:v,completelyVisibleEndLineNumber:w,lineHeight:this._lineHeightsManager.defaultLineHeight}}getVerticalOffsetForWhitespaceIndex(e){e=e|0;let t=this.getAfterLineNumberForWhitespaceIndex(e),i;t>=1?i=this._lineHeightsManager.getAccumulatedLineHeightsIncludingLineNumber(t):i=0;let n;return e>0?n=this.getWhitespacesAccumulatedHeight(e-1):n=0,i+n+this._paddingTop}getWhitespaceIndexAtOrAfterVerticallOffset(e){e=e|0;let t=0,i=this.getWhitespacesCount()-1;if(i<0)return-1;let n=this.getVerticalOffsetForWhitespaceIndex(i),s=this.getHeightForWhitespaceIndex(i);if(e>=n+s)return-1;for(;t=a+l)t=r+1;else{if(e>=a)return r;i=r}}return t}getWhitespaceAtVerticalOffset(e){e=e|0;let t=this.getWhitespaceIndexAtOrAfterVerticallOffset(e);if(t<0||t>=this.getWhitespacesCount())return null;let i=this.getVerticalOffsetForWhitespaceIndex(t);if(i>e)return null;let n=this.getHeightForWhitespaceIndex(t),s=this.getIdForWhitespaceIndex(t),r=this.getAfterLineNumberForWhitespaceIndex(t);return{id:s,afterLineNumber:r,verticalOffset:i,height:n}}getWhitespaceViewportData(e,t){e=e|0,t=t|0;let i=this.getWhitespaceIndexAtOrAfterVerticallOffset(e),n=this.getWhitespacesCount()-1;if(i<0)return[];let s=[];for(let r=i;r<=n;r++){let a=this.getVerticalOffsetForWhitespaceIndex(r),l=this.getHeightForWhitespaceIndex(r);if(a>=t)break;s.push({id:this.getIdForWhitespaceIndex(r),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(r),verticalOffset:a,height:l})}return s}getWhitespaces(){return this._arr.slice(0)}getWhitespacesCount(){return this._arr.length}getIdForWhitespaceIndex(e){return e=e|0,this._arr[e].id}getAfterLineNumberForWhitespaceIndex(e){return e=e|0,this._arr[e].afterLineNumber}getHeightForWhitespaceIndex(e){return e=e|0,this._arr[e].height}}});var sBe,ty,LJ,pW,dxe=x(()=>{ae();W();C1();cxe();Km();uW();sBe=125,ty=class{constructor(e,t,i,n){e=e|0,t=t|0,i=i|0,n=n|0,e<0&&(e=0),t<0&&(t=0),i<0&&(i=0),n<0&&(n=0),this.width=e,this.contentWidth=t,this.scrollWidth=Math.max(e,t),this.height=i,this.contentHeight=n,this.scrollHeight=Math.max(i,n)}equals(e){return this.width===e.width&&this.contentWidth===e.contentWidth&&this.height===e.height&&this.contentHeight===e.contentHeight}},LJ=class extends T{constructor(e,t){super(),this._onDidContentSizeChange=this._register(new N),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._dimensions=new ty(0,0,0,0),this._scrollable=this._register(new Yd({forceIntegerValues:!0,smoothScrollDuration:e,scheduleAtNextAnimationFrame:t})),this.onDidScroll=this._scrollable.onScroll}getScrollable(){return this._scrollable}setSmoothScrollDuration(e){this._scrollable.setSmoothScrollDuration(e)}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}getScrollDimensions(){return this._dimensions}setScrollDimensions(e){if(this._dimensions.equals(e))return;let t=this._dimensions;this._dimensions=e,this._scrollable.setScrollDimensions({width:e.width,scrollWidth:e.scrollWidth,height:e.height,scrollHeight:e.scrollHeight},!0);let i=t.contentWidth!==e.contentWidth,n=t.contentHeight!==e.contentHeight;(i||n)&&this._onDidContentSizeChange.fire(new XB(t.contentWidth,t.contentHeight,e.contentWidth,e.contentHeight))}getFutureScrollPosition(){return this._scrollable.getFutureScrollPosition()}getCurrentScrollPosition(){return this._scrollable.getCurrentScrollPosition()}setScrollPositionNow(e){this._scrollable.setScrollPositionNow(e)}setScrollPositionSmooth(e){this._scrollable.setScrollPositionSmooth(e)}hasPendingScrollAnimation(){return this._scrollable.hasPendingScrollAnimation()}},pW=class extends T{constructor(e,t,i,n){super(),this._configuration=e;let s=this._configuration.options,r=s.get(165),a=s.get(96);this._linesLayout=new mW(t,s.get(75),a.top,a.bottom,i),this._maxLineWidth=0,this._overlayWidgetsMinWidth=0,this._scrollable=this._register(new LJ(0,n)),this._configureSmoothScrollDuration(),this._scrollable.setScrollDimensions(new ty(r.contentWidth,0,r.height,0)),this.onDidScroll=this._scrollable.onDidScroll,this.onDidContentSizeChange=this._scrollable.onDidContentSizeChange,this._updateHeight()}getScrollable(){return this._scrollable.getScrollable()}onHeightMaybeChanged(){this._updateHeight()}_configureSmoothScrollDuration(){this._scrollable.setSmoothScrollDuration(this._configuration.options.get(130)?sBe:0)}onConfigurationChanged(e){let t=this._configuration.options;if(e.hasChanged(75)&&this._linesLayout.setDefaultLineHeight(t.get(75)),e.hasChanged(96)){let i=t.get(96);this._linesLayout.setPadding(i.top,i.bottom)}if(e.hasChanged(165)){let i=t.get(165),n=i.contentWidth,s=i.height,r=this._scrollable.getScrollDimensions(),a=r.contentWidth;this._scrollable.setScrollDimensions(new ty(n,r.contentWidth,s,this._getContentHeight(n,s,a)))}else this._updateHeight();e.hasChanged(130)&&this._configureSmoothScrollDuration()}onFlushed(e,t){this._linesLayout.onFlushed(e,t)}onLinesDeleted(e,t){this._linesLayout.onLinesDeleted(e,t)}onLinesInserted(e,t){this._linesLayout.onLinesInserted(e,t)}_getHorizontalScrollbarHeight(e,t){let n=this._configuration.options.get(117);return n.horizontal===2||e>=t?0:n.horizontalScrollbarSize}_getContentHeight(e,t,i){let n=this._configuration.options,s=this._linesLayout.getLinesTotalHeight();return n.get(119)?s+=Math.max(0,t-n.get(75)-n.get(96).bottom):n.get(117).ignoreHorizontalScrollbarInContentHeight||(s+=this._getHorizontalScrollbarHeight(e,i)),s}_updateHeight(){let e=this._scrollable.getScrollDimensions(),t=e.width,i=e.height,n=e.contentWidth;this._scrollable.setScrollDimensions(new ty(t,e.contentWidth,i,this._getContentHeight(t,i,n)))}getCurrentViewport(){let e=this._scrollable.getScrollDimensions(),t=this._scrollable.getCurrentScrollPosition();return new GE(t.scrollTop,t.scrollLeft,e.width,e.height)}getFutureViewport(){let e=this._scrollable.getScrollDimensions(),t=this._scrollable.getFutureScrollPosition();return new GE(t.scrollTop,t.scrollLeft,e.width,e.height)}_computeContentWidth(){let e=this._configuration.options,t=this._maxLineWidth,i=e.get(166),n=e.get(59),s=e.get(165);if(i.isViewportWrapping){let r=e.get(81);return t>s.contentWidth+n.typicalHalfwidthCharacterWidth&&r.enabled&&r.side==="right"?t+s.verticalScrollbarWidth:t}else{let r=e.get(118)*n.typicalHalfwidthCharacterWidth,a=this._linesLayout.getWhitespaceMinWidth();return Math.max(t+r+s.verticalScrollbarWidth,a,this._overlayWidgetsMinWidth)}}setMaxLineWidth(e){this._maxLineWidth=e,this._updateContentWidth()}setOverlayWidgetsMinWidth(e){this._overlayWidgetsMinWidth=e,this._updateContentWidth()}_updateContentWidth(){let e=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new ty(e.width,this._computeContentWidth(),e.height,e.contentHeight)),this._updateHeight()}saveState(){let e=this._scrollable.getFutureScrollPosition(),t=e.scrollTop,i=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t),n=this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(i);return{scrollTop:t,scrollTopWithoutViewZones:t-n,scrollLeft:e.scrollLeft}}changeWhitespace(e){let t=this._linesLayout.changeWhitespace(e);return t&&this.onHeightMaybeChanged(),t}changeSpecialLineHeights(e){let t=this._linesLayout.changeLineHeights(e);return t&&this.onHeightMaybeChanged(),t}getVerticalOffsetForLineNumber(e,t=!1){return this._linesLayout.getVerticalOffsetForLineNumber(e,t)}getVerticalOffsetAfterLineNumber(e,t=!1){return this._linesLayout.getVerticalOffsetAfterLineNumber(e,t)}getLineHeightForLineNumber(e){return this._linesLayout.getLineHeightForLineNumber(e)}isAfterLines(e){return this._linesLayout.isAfterLines(e)}isInTopPadding(e){return this._linesLayout.isInTopPadding(e)}isInBottomPadding(e){return this._linesLayout.isInBottomPadding(e)}getLineNumberAtVerticalOffset(e){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(e)}getWhitespaceAtVerticalOffset(e){return this._linesLayout.getWhitespaceAtVerticalOffset(e)}getLinesViewportData(){let e=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(e.top,e.top+e.height)}getLinesViewportDataAtScrollTop(e){let t=this._scrollable.getScrollDimensions();return e+t.height>t.scrollHeight&&(e=t.scrollHeight-t.height),e<0&&(e=0),this._linesLayout.getLinesViewportData(e,e+t.height)}getWhitespaceViewportData(){let e=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(e.top,e.top+e.height)}getWhitespaces(){return this._linesLayout.getWhitespaces()}getContentWidth(){return this._scrollable.getScrollDimensions().contentWidth}getScrollWidth(){return this._scrollable.getScrollDimensions().scrollWidth}getContentHeight(){return this._scrollable.getScrollDimensions().contentHeight}getScrollHeight(){return this._scrollable.getScrollDimensions().scrollHeight}getCurrentScrollLeft(){return this._scrollable.getCurrentScrollPosition().scrollLeft}getCurrentScrollTop(){return this._scrollable.getCurrentScrollPosition().scrollTop}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}setScrollPosition(e,t){t===1?this._scrollable.setScrollPositionNow(e):this._scrollable.setScrollPositionSmooth(e)}hasPendingScrollAnimation(){return this._scrollable.hasPendingScrollAnimation()}deltaScrollNow(e,t){let i=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:i.scrollLeft+e,scrollTop:i.scrollTop+t})}}});var $h,_W,bW,S0=x(()=>{ue();Pe();R5();$h=class{constructor(e,t,i){this.range=e,this.inlineClassName=t,this.type=i}},_W=class{constructor(e,t,i){this.context=e,this.model=t,this.coordinatesConverter=i,this._decorationsCache=Object.create(null)}getInlineDecorations(e){let t=new S(e,1,e,this.model.getLineMaxColumn(e)),i=this.coordinatesConverter.convertModelRangeToViewRange(t);return this.getDecorations(i,!1,!1).inlineDecorations}getDecorations(e,t,i){let n=this.context.getModelDecorations(e,t,i),s=e.startLineNumber,r=e.endLineNumber,a=[],l=0,c=[],d=[];for(let h=s;h<=r;h++)c[h-s]=[],d[h-s]=!1;for(let h=0,u=n.length;h0?a[l-1]:0,h=a[l];for(;sh)break;if(d0?_:0,v=b+Math.max(f-d,0),w=b+Math.min(g-d,h-d);if(v!==w){let C=this.context.getBaseViewLineNumber(e)+l,y=new S(C,v+1,C,w+1),k=p.inlineClassNameAffectsLetterSpacing?3:0;c.push(new $h(y,p.inlineClassName,k))}}}if(g<=h)n+=u,s++;else break}}return i}}});var vW,hxe=x(()=>{ue();S0();Uo();vW=class{constructor(e,t,i,n,s){this.editorId=e,this.configuration=i,this._linesCollection=n;let r={getModelDecorations:(a,l,c)=>this._linesCollection.getDecorationsInRange(a,this.editorId,vw(this.configuration.options),ww(this.configuration.options),l,c)};this._inlineDecorationsComputer=new _W(r,t,s),this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}_clearCachedModelDecorationsResolver(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}dispose(){this._inlineDecorationsComputer.reset(),this._clearCachedModelDecorationsResolver()}reset(){this._inlineDecorationsComputer.reset(),this._clearCachedModelDecorationsResolver()}onModelDecorationsChanged(){this._inlineDecorationsComputer.onModelDecorationsChanged(),this._clearCachedModelDecorationsResolver()}onLineMappingChanged(){this._inlineDecorationsComputer.onLineMappingChanged(),this._clearCachedModelDecorationsResolver()}getMinimapDecorationsInRange(e){return this._inlineDecorationsComputer.getDecorations(e,!0,!1).decorations}getDecorationsViewportData(e){let t=this._cachedModelDecorationsResolver!==null;return t=t&&e.equalsRange(this._cachedModelDecorationsResolverViewRange),t||(this._cachedModelDecorationsResolver=this._inlineDecorationsComputer.getDecorations(e,!1,!1),this._cachedModelDecorationsResolverViewRange=e),this._cachedModelDecorationsResolver}getDecorationsOnLine(e,t=!1,i=!1){let n=new S(e,this._linesCollection.getViewLineMinColumn(e),e,this._linesCollection.getViewLineMaxColumn(e));return this._inlineDecorationsComputer.getDecorations(n,t,i)}}});function yW(o,e){return o===null?e?wW.INSTANCE:CW.INSTANCE:new EJ(o,e)}function uxe(o){if(o>=IJ.length)for(let e=1;e<=o;e++)IJ[e]=rBe(e);return IJ[o]}function rBe(o){return new Array(o+1).join(" ")}var EJ,wW,CW,IJ,fxe=x(()=>{Pe();KC();Km();S0();Kn();EJ=class{constructor(e,t){this._projectionData=e,this._isVisible=t}isVisible(){return this._isVisible}setVisible(e){return this._isVisible=e,this}getProjectionData(){return this._projectionData}getViewLineCount(){return this._isVisible?this._projectionData.getOutputLineCount():0}getViewLineContent(e,t,i){this._assertVisible();let n=i>0?this._projectionData.breakOffsets[i-1]:0,s=this._projectionData.breakOffsets[i],r;if(this._projectionData.injectionOffsets!==null){let a=this._projectionData.injectionOffsets.map((c,d)=>new zh(0,0,c+1,this._projectionData.injectionOptions[d],0));r=zh.applyInjectedText(e.getLineContent(t),a).substring(n,s)}else r=e.getValueInRange({startLineNumber:t,startColumn:n+1,endLineNumber:t,endColumn:s+1});return i>0&&(r=uxe(this._projectionData.wrappedTextIndentLength)+r),r}getViewLineLength(e,t,i){return this._assertVisible(),this._projectionData.getLineLength(i)}getViewLineMinColumn(e,t,i){return this._assertVisible(),this._projectionData.getMinOutputOffset(i)+1}getViewLineMaxColumn(e,t,i){return this._assertVisible(),this._projectionData.getMaxOutputOffset(i)+1}getViewLineData(e,t,i,n){let s=new Array;return this.getViewLinesData(e,t,i,1,n,0,[!0],s),s[0]}getViewLinesData(e,t,i,n,s,r,a,l){this._assertVisible();let c=this._projectionData,d=c.injectionOffsets,h=c.injectionOptions,u={getInjectionOptions:()=>h,getInjectionOffsets:()=>d,getBreakOffsets:()=>c.breakOffsets,getWrappedTextIndentLength:()=>c.wrappedTextIndentLength,getBaseViewLineNumber:()=>s},g=new bW(u).getInlineDecorations(t),p=e.tokenization.getLineTokens(t),_=XSe(p,h,d);for(let b=i;b0?n.wrappedTextIndentLength:0,r=i>0?n.breakOffsets[i-1]:0,a=n.breakOffsets[i],l=e.sliceAndInflate(r,a,s),c=l.getLineContent();i>0&&(c=uxe(n.wrappedTextIndentLength)+c);let d=this._projectionData.getMinOutputOffset(i)+1,h=c.length+1,u=i+1{SW=class{constructor(e){this._model=e}_validPosition(e){return this._model.validatePosition(e)}_validRange(e){return this._model.validateRange(e)}convertViewPositionToModelPosition(e){return this._validPosition(e)}convertViewRangeToModelRange(e){return this._validRange(e)}validateViewPosition(e,t){return this._validPosition(t)}validateViewRange(e,t){return this._validRange(t)}convertModelPositionToViewPosition(e){return this._validPosition(e)}convertModelRangeToViewRange(e){return this._validRange(e)}modelPositionIsVisible(e){let t=this._model.getLineCount();return!(e.lineNumber<1||e.lineNumber>t)}getModelLineViewLineCount(e){return 1}getViewLineNumberOfModelPosition(e,t){return e}}});function aBe(o){if(o.length===0)return[];let e=o.slice();e.sort(S.compareRangesUsingStarts);let t=[],i=e[0].startLineNumber,n=e[0].endLineNumber;for(let s=1,r=e.length;sn+1?(t.push(new S(i,1,n,1)),i=a.startLineNumber,n=a.endLineNumber):a.endLineNumber>n&&(n=a.endLineNumber)}return t.push(new S(i,1,n,1)),t}var xW,kW,LW,TJ,IW,mxe=x(()=>{Pe();ue();C5();Kn();YB();fxe();vY();Km();gxe();xW=class{constructor(e,t,i,n,s,r,a,l,c,d,h){this._editorId=e,this.model=t,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=i,this._monospaceLineBreaksComputerFactory=n,this.fontInfo=s,this.tabSize=r,this.wrappingStrategy=a,this.wrappingColumn=l,this.wrappingIndent=c,this.wordBreak=d,this.wrapOnEscapedLineFeeds=h,this._constructLines(!0,null)}dispose(){this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[])}createCoordinatesConverter(){return new TJ(this)}_constructLines(e,t){this.modelLineProjections=[],e&&(this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[]));let n=this.model.getLinesContent().length,s=this.createLineBreaksComputer();for(let f=0;fthis.model.getDecorationRange(f)).sort(S.compareRangesUsingStarts),c=1,d=0,h=-1,u=h+1=c&&g<=d,_=yW(r[f],!p);a[f]=_.getViewLineCount(),this.modelLineProjections[f]=_}this._validModelVersionId=this.model.getVersionId(),this.projectedModelLineLineCounts=new tF(a),this._ensureAtLeastOneVisibleLine()}getHiddenAreas(){return this.hiddenAreasDecorationIds.map(e=>this.model.getDecorationRange(e))}setHiddenAreas(e){let t=e.map(u=>this.model.validateRange(u)),i=aBe(t),n=this.hiddenAreasDecorationIds.map(u=>this.model.getDecorationRange(u)).sort(S.compareRangesUsingStarts);if(i.length===n.length){let u=!1;for(let f=0;f({range:u,options:Ve.EMPTY}));this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,s);let r=i,a=1,l=0,c=-1,d=c+1=a&&f<=l?this.modelLineProjections[u].isVisible()&&(this.modelLineProjections[u]=this.modelLineProjections[u].setVisible(!1),g=!0):(h=!0,this.modelLineProjections[u].isVisible()||(this.modelLineProjections[u]=this.modelLineProjections[u].setVisible(!0),g=!0)),g){let p=this.modelLineProjections[u].getViewLineCount();this.projectedModelLineLineCounts.setValue(u,p)}}return h||this.setHiddenAreas([]),!0}modelPositionIsVisible(e,t){return e<1||e>this.modelLineProjections.length?!1:this.modelLineProjections[e-1].isVisible()}getModelLineViewLineCount(e){return e<1||e>this.modelLineProjections.length?1:this.modelLineProjections[e-1].getViewLineCount()}setTabSize(e){return this.tabSize===e?!1:(this.tabSize=e,this._constructLines(!1,null),!0)}setWrappingSettings(e,t,i,n,s){let r=this.fontInfo.equals(e),a=this.wrappingStrategy===t,l=this.wrappingColumn===i,c=this.wrappingIndent===n,d=this.wordBreak===s;if(r&&a&&l&&c&&d)return!1;let h=r&&a&&!l&&c&&d;this.fontInfo=e,this.wrappingStrategy=t,this.wrappingColumn=i,this.wrappingIndent=n,this.wordBreak=s;let u=null;if(h){u=[];for(let f=0,g=this.modelLineProjections.length;fthis.model.getLineContent(n),getLineInjectedText:n=>this.model.getLineInjectedText(n,this._editorId)};return t.createLineBreaksComputer(i,this.fontInfo,this.tabSize,this.wrappingColumn,this.wrappingIndent,this.wordBreak,this.wrapOnEscapedLineFeeds)}onModelFlushed(){this._constructLines(!0,null)}onModelLinesDeleted(e,t,i){if(!e||e<=this._validModelVersionId)return null;let n=t===1?1:this.projectedModelLineLineCounts.getPrefixSum(t-1)+1,s=this.projectedModelLineLineCounts.getPrefixSum(i);return this.modelLineProjections.splice(t-1,i-t+1),this.projectedModelLineLineCounts.removeValues(t-1,i-t+1),new w0(n,s)}onModelLinesInserted(e,t,i,n){if(!e||e<=this._validModelVersionId)return null;let s=t>2&&!this.modelLineProjections[t-2].isVisible(),r=t===1?1:this.projectedModelLineLineCounts.getPrefixSum(t-1)+1,a=0,l=[],c=[];for(let d=0,h=n.length;dl?(d=this.projectedModelLineLineCounts.getPrefixSum(t-1)+1,h=d+l-1,g=h+1,p=g+(s-l)-1,c=!0):s0&&(this.modelLineProjections[0]=this.modelLineProjections[0].setVisible(!0),this.projectedModelLineLineCounts.setValue(0,this.modelLineProjections[0].getViewLineCount()))}getViewLineCount(){return this.projectedModelLineLineCounts.getTotalSum()}_toValidViewLineNumber(e){if(e<1)return 1;let t=this.getViewLineCount();return e>t?t:e|0}getActiveIndentGuide(e,t,i){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t),i=this._toValidViewLineNumber(i);let n=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),s=this.convertViewPositionToModelPosition(t,this.getViewLineMinColumn(t)),r=this.convertViewPositionToModelPosition(i,this.getViewLineMinColumn(i)),a=this.model.guides.getActiveIndentGuide(n.lineNumber,s.lineNumber,r.lineNumber),l=this.convertModelPositionToViewPosition(a.startLineNumber,1),c=this.convertModelPositionToViewPosition(a.endLineNumber,this.model.getLineMaxColumn(a.endLineNumber));return{startLineNumber:l.lineNumber,endLineNumber:c.lineNumber,indent:a.indent}}getViewLineInfo(e){e=this._toValidViewLineNumber(e);let t=this.projectedModelLineLineCounts.getIndexOf(e-1),i=t.index,n=t.remainder;return new kW(i+1,n)}getMinColumnOfViewLine(e){return this.modelLineProjections[e.modelLineNumber-1].getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getMaxColumnOfViewLine(e){return this.modelLineProjections[e.modelLineNumber-1].getViewLineMaxColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getModelStartPositionOfViewLine(e){let t=this.modelLineProjections[e.modelLineNumber-1],i=t.getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),n=t.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,i);return new M(e.modelLineNumber,n)}getModelEndPositionOfViewLine(e){let t=this.modelLineProjections[e.modelLineNumber-1],i=t.getViewLineMaxColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),n=t.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,i);return new M(e.modelLineNumber,n)}getViewLineInfosGroupedByModelRanges(e,t){let i=this.getViewLineInfo(e),n=this.getViewLineInfo(t),s=new Array,r=this.getModelStartPositionOfViewLine(i),a=new Array;for(let l=i.modelLineNumber;l<=n.modelLineNumber;l++){let c=this.modelLineProjections[l-1];if(c.isVisible()){let d=l===i.modelLineNumber?i.modelLineWrappedLineIdx:0,h=l===n.modelLineNumber?n.modelLineWrappedLineIdx+1:c.getViewLineCount();for(let u=d;u{if(f.forWrappedLinesAfterColumn!==-1&&this.modelLineProjections[d.modelLineNumber-1].getViewPositionOfModelPosition(0,f.forWrappedLinesAfterColumn).lineNumber>=d.modelLineWrappedLineIdx||f.forWrappedLinesBeforeOrAtColumn!==-1&&this.modelLineProjections[d.modelLineNumber-1].getViewPositionOfModelPosition(0,f.forWrappedLinesBeforeOrAtColumn).lineNumberd.modelLineWrappedLineIdx)return}let p=this.convertModelPositionToViewPosition(d.modelLineNumber,f.horizontalLine.endColumn),_=this.modelLineProjections[d.modelLineNumber-1].getViewPositionOfModelPosition(0,f.horizontalLine.endColumn);return _.lineNumber===d.modelLineWrappedLineIdx?new Bh(f.visibleColumn,g,f.className,new dp(f.horizontalLine.top,p.column),-1,-1):_.lineNumber!!f))}}return r}getViewLinesIndentGuides(e,t){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);let i=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),n=this.convertViewPositionToModelPosition(t,this.getViewLineMaxColumn(t)),s=[],r=[],a=[],l=i.lineNumber-1,c=n.lineNumber-1,d=null;for(let g=l;g<=c;g++){let p=this.modelLineProjections[g];if(p.isVisible()){let _=p.getViewLineNumberOfModelPosition(0,g===l?i.column:1),b=p.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(g+1)),v=b-_+1,w=0;v>1&&p.getViewLineMinColumn(this.model,g+1,b)===1&&(w=_===0?1:2),r.push(v),a.push(w),d===null&&(d=new M(g+1,0))}else d!==null&&(s=s.concat(this.model.guides.getLinesIndentGuides(d.lineNumber,g)),d=null)}d!==null&&(s=s.concat(this.model.guides.getLinesIndentGuides(d.lineNumber,n.lineNumber)),d=null);let h=t-e+1,u=new Array(h),f=0;for(let g=0,p=s.length;gt&&(g=!0,f=t-s+1);let p=this.projectedModelLineLineCounts.getPrefixSum(c)+1;if(h.getViewLinesData(this.model,c+1,u,f,p,s-e,i,l),s+=f,g)break}return l}validateViewPosition(e,t,i){e=this._toValidViewLineNumber(e);let n=this.projectedModelLineLineCounts.getIndexOf(e-1),s=n.index,r=n.remainder,a=this.modelLineProjections[s],l=a.getViewLineMinColumn(this.model,s+1,r),c=a.getViewLineMaxColumn(this.model,s+1,r);tc&&(t=c);let d=a.getModelColumnOfViewPosition(r,t);return this.model.validatePosition(new M(s+1,d)).equals(i)?new M(e,t):this.convertModelPositionToViewPosition(i.lineNumber,i.column)}validateViewRange(e,t){let i=this.validateViewPosition(e.startLineNumber,e.startColumn,t.getStartPosition()),n=this.validateViewPosition(e.endLineNumber,e.endColumn,t.getEndPosition());return new S(i.lineNumber,i.column,n.lineNumber,n.column)}convertViewPositionToModelPosition(e,t){let i=this.getViewLineInfo(e),n=this.modelLineProjections[i.modelLineNumber-1].getModelColumnOfViewPosition(i.modelLineWrappedLineIdx,t);return this.model.validatePosition(new M(i.modelLineNumber,n))}convertViewRangeToModelRange(e){let t=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),i=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);return new S(t.lineNumber,t.column,i.lineNumber,i.column)}convertModelPositionToViewPosition(e,t,i=2,n=!1,s=!1){let r=this.model.validatePosition(new M(e,t)),a=r.lineNumber,l=r.column,c=a-1,d=!1;if(s)for(;c0&&!this.modelLineProjections[c].isVisible();)c--,d=!0;if(c===0&&!this.modelLineProjections[c].isVisible())return new M(n?0:1,1);let h=1+this.projectedModelLineLineCounts.getPrefixSum(c),u;return d?s?u=this.modelLineProjections[c].getViewPositionOfModelPosition(h,1,i):u=this.modelLineProjections[c].getViewPositionOfModelPosition(h,this.model.getLineMaxColumn(c+1),i):u=this.modelLineProjections[a-1].getViewPositionOfModelPosition(h,l,i),u}convertModelRangeToViewRange(e,t=0){if(e.isEmpty()){let i=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,t);return S.fromPositions(i)}else{let i=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,1),n=this.convertModelPositionToViewPosition(e.endLineNumber,e.endColumn,0);return new S(i.lineNumber,i.column,n.lineNumber,n.column)}}getViewLineNumberOfModelPosition(e,t){let i=e-1;if(this.modelLineProjections[i].isVisible()){let s=1+this.projectedModelLineLineCounts.getPrefixSum(i);return this.modelLineProjections[i].getViewLineNumberOfModelPosition(s,t)}for(;i>0&&!this.modelLineProjections[i].isVisible();)i--;if(i===0&&!this.modelLineProjections[i].isVisible())return 1;let n=1+this.projectedModelLineLineCounts.getPrefixSum(i);return this.modelLineProjections[i].getViewLineNumberOfModelPosition(n,this.model.getLineMaxColumn(i+1))}getDecorationsInRange(e,t,i,n,s,r){let a=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),l=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);if(l.lineNumber-a.lineNumber<=e.endLineNumber-e.startLineNumber)return this.model.getDecorationsInRange(new S(a.lineNumber,1,l.lineNumber,l.column),t,i,n,s,r);let c=[],d=a.lineNumber-1,h=l.lineNumber-1,u=null;for(let _=d;_<=h;_++)if(this.modelLineProjections[_].isVisible())u===null&&(u=new M(_+1,_===d?a.column:1));else if(u!==null){let v=this.model.getLineMaxColumn(_);c=c.concat(this.model.getDecorationsInRange(new S(u.lineNumber,u.column,_,v),t,i,n,s)),u=null}u!==null&&(c=c.concat(this.model.getDecorationsInRange(new S(u.lineNumber,u.column,l.lineNumber,l.column),t,i,n,s)),u=null),c.sort((_,b)=>{let v=S.compareRangesUsingStarts(_.range,b.range);return v===0?_.idb.id?1:0:v});let f=[],g=0,p=null;for(let _ of c){let b=_.id;p!==b&&(p=b,f[g++]=_)}return f}getInjectedTextAt(e){let t=this.getViewLineInfo(e.lineNumber);return this.modelLineProjections[t.modelLineNumber-1].getInjectedTextAt(t.modelLineWrappedLineIdx,e.column)}normalizePosition(e,t){let i=this.getViewLineInfo(e.lineNumber);return this.modelLineProjections[i.modelLineNumber-1].normalizePosition(i.modelLineWrappedLineIdx,e,t)}getLineIndentColumn(e){let t=this.getViewLineInfo(e);return t.modelLineWrappedLineIdx===0?this.model.getLineIndentColumn(t.modelLineNumber):0}};kW=class{constructor(e,t){this.modelLineNumber=e,this.modelLineWrappedLineIdx=t}},LW=class{constructor(e,t){this.modelRange=e,this.viewLines=t}},TJ=class{constructor(e){this._lines=e}convertViewPositionToModelPosition(e){return this._lines.convertViewPositionToModelPosition(e.lineNumber,e.column)}convertViewRangeToModelRange(e){return this._lines.convertViewRangeToModelRange(e)}validateViewPosition(e,t){return this._lines.validateViewPosition(e.lineNumber,e.column,t)}validateViewRange(e,t){return this._lines.validateViewRange(e,t)}convertModelPositionToViewPosition(e,t,i,n){return this._lines.convertModelPositionToViewPosition(e.lineNumber,e.column,t,i,n)}convertModelRangeToViewRange(e,t){return this._lines.convertModelRangeToViewRange(e,t)}modelPositionIsVisible(e){return this._lines.modelPositionIsVisible(e.lineNumber,e.column)}getModelLineViewLineCount(e){return this._lines.getModelLineViewLineCount(e)}getViewLineNumberOfModelPosition(e,t){return this._lines.getViewLineNumberOfModelPosition(e,t)}},IW=class{constructor(e){this.model=e}dispose(){}createCoordinatesConverter(){return new SW(this.model)}getHiddenAreas(){return[]}setHiddenAreas(e){return!1}setTabSize(e){return!1}setWrappingSettings(e,t,i,n){return!1}createLineBreaksComputer(){let e=[];return{addRequest:(t,i)=>{e.push(null)},finalize:()=>e}}onModelFlushed(){}onModelLinesDeleted(e,t,i){return new w0(t,i)}onModelLinesInserted(e,t,i,n){return new C0(t,i)}onModelLineChanged(e,t,i){return[!1,new hD(t,1),null,null]}acceptVersionId(e){}getViewLineCount(){return this.model.getLineCount()}getActiveIndentGuide(e,t,i){return{startLineNumber:e,endLineNumber:e,indent:0}}getViewLinesBracketGuides(e,t,i){return new Array(t-e+1).fill([])}getViewLinesIndentGuides(e,t){let i=t-e+1,n=new Array(i);for(let s=0;s{ho();iy=Oa.Right,EW=class{constructor(e){this.persist=0,this._requiredLanes=1,this.lanes=new Uint8Array(Math.ceil((e+1)*iy/8))}reset(e){let t=Math.ceil((e+1)*iy/8);this.lanes.length>>3]|=1<>>3]&1<>>3]&1<{qe();Ze();Yi();W();rt();He();Uo();Cm();oxe();Yc();Pe();ue();ho();KC();Ci();zd();CJ();YB();dxe();bX();Km();hxe();uW();mxe();pxe();SJ();TW=class extends T{constructor(e,t,i,n,s,r,a,l,c,d){if(super(),this.languageConfigurationService=a,this._themeService=l,this._attachedView=c,this._transactionalTarget=d,this.hiddenAreasModel=new RJ,this.previousHiddenAreas=[],this._editorId=e,this._configuration=t,this.model=i,this._eventDispatcher=new ZB,this.onEvent=this._eventDispatcher.onEvent,this.cursorConfig=new op(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._updateConfigurationViewLineCount=this._register(new at(()=>this._updateConfigurationViewLineCountNow(),0)),this._hasFocus=!1,this._viewportStart=DJ.create(this.model),this.glyphLanes=new EW(0),this.model.isTooLargeForTokenization())this._lines=new IW(this.model);else{let h=this._configuration.options,u=h.get(59),f=h.get(156),g=h.get(166),p=h.get(155),_=h.get(146),b=h.get(160);this._lines=new xW(this._editorId,this.model,n,s,u,this.model.getOptions().tabSize,f,g.wrappingColumn,p,_,b)}this.coordinatesConverter=this._lines.createCoordinatesConverter(),this._cursor=this._register(new fW(i,this,this.coordinatesConverter,this.cursorConfig)),this.viewLayout=this._register(new pW(this._configuration,this.getLineCount(),this._getCustomLineHeights(),r)),this._register(this.viewLayout.onDidScroll(h=>{h.scrollTopChanged&&this._handleVisibleLinesChanged(),h.scrollTopChanged&&this._viewportStart.invalidate(),this._eventDispatcher.emitSingleViewEvent(new $B(h)),this._eventDispatcher.emitOutgoingEvent(new JB(h.oldScrollWidth,h.oldScrollLeft,h.oldScrollHeight,h.oldScrollTop,h.scrollWidth,h.scrollLeft,h.scrollHeight,h.scrollTop))})),this._register(this.viewLayout.onDidContentSizeChange(h=>{this._eventDispatcher.emitOutgoingEvent(h)})),this._decorations=new vW(this._editorId,this.model,this._configuration,this._lines,this.coordinatesConverter),this._registerModelEvents(),this._register(this._configuration.onDidChangeFast(h=>{try{let u=this._eventDispatcher.beginEmitViewEvents();this._onConfigurationChanged(u,h)}finally{this._eventDispatcher.endEmitViewEvents()}})),this._register(U1.getInstance().onDidChange(()=>{this._eventDispatcher.emitSingleViewEvent(new KB)})),this._register(this._themeService.onDidColorThemeChange(h=>{this._invalidateDecorationsColorCache(),this._eventDispatcher.emitSingleViewEvent(new qB(h))})),this._updateConfigurationViewLineCountNow(),this.model.registerViewModel(this)}dispose(){super.dispose(),this._decorations.dispose(),this._lines.dispose(),this._viewportStart.dispose(),this._eventDispatcher.dispose(),this.model.unregisterViewModel(this)}getEditorOption(e){return this._configuration.options.get(e)}createLineBreaksComputer(e){return this._lines.createLineBreaksComputer(e)}addViewEventHandler(e){this._eventDispatcher.addViewEventHandler(e)}removeViewEventHandler(e){this._eventDispatcher.removeViewEventHandler(e)}_getCustomLineHeights(){if(!this._configuration.options.get(5))return[];let t=this.model.getCustomLineHeightsDecorations(this._editorId);return mD.fromDecorations(t,this.coordinatesConverter,this._configuration)}_getCustomLineHeightsForLines(e,t){if(!this._configuration.options.get(5))return[];let n=new S(e,1,t,this.model.getLineMaxColumn(t)),s=this.model.getCustomLineHeightsDecorationsInRange(n,this._editorId);return mD.fromDecorations(s,this.coordinatesConverter,this._configuration)}_updateConfigurationViewLineCountNow(){this._configuration.setViewLineCount(this._lines.getViewLineCount())}getModelVisibleRanges(){let e=this.viewLayout.getLinesViewportData(),t=new S(e.startLineNumber,this.getLineMinColumn(e.startLineNumber),e.endLineNumber,this.getLineMaxColumn(e.endLineNumber));return this._toModelVisibleRanges(t)}visibleLinesStabilized(){let e=this.getModelVisibleRanges();this._attachedView.setVisibleLines(e,!0)}_handleVisibleLinesChanged(){let e=this.getModelVisibleRanges();this._attachedView.setVisibleLines(e,!1)}setHasFocus(e){this._hasFocus=e,this._cursor.setHasFocus(e),this._eventDispatcher.emitSingleViewEvent(new zB(e)),this._eventDispatcher.emitOutgoingEvent(new uD(!e,e))}setHasWidgetFocus(e){this._eventDispatcher.emitOutgoingEvent(new QB(!e,e))}onCompositionStart(){this._eventDispatcher.emitSingleViewEvent(new BB)}onCompositionEnd(){this._eventDispatcher.emitSingleViewEvent(new WB)}_captureStableViewport(){if(this._viewportStart.isValid&&this.viewLayout.getCurrentScrollTop()>0){let e=new M(this._viewportStart.viewLineNumber,this.getLineMinColumn(this._viewportStart.viewLineNumber)),t=this.coordinatesConverter.convertViewPositionToModelPosition(e);return new DW(t,this._viewportStart.startLineDelta)}return new DW(null,0)}_onConfigurationChanged(e,t){let i=this._captureStableViewport(),n=this._configuration.options,s=n.get(59),r=n.get(156),a=n.get(166),l=n.get(155),c=n.get(146);this._lines.setWrappingSettings(s,r,a.wrappingColumn,l,c)&&(e.emitViewEvent(new JC),e.emitViewEvent(new ey),e.emitViewEvent(new ug(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount(),this._getCustomLineHeights()),this._updateConfigurationViewLineCount.schedule()),t.hasChanged(104)&&(this._decorations.reset(),e.emitViewEvent(new ug(null))),t.hasChanged(112)&&(this._decorations.reset(),e.emitViewEvent(new ug(null))),e.emitViewEvent(new HB(t)),this.viewLayout.onConfigurationChanged(t),i.recoverViewportStart(this.coordinatesConverter,this.viewLayout),op.shouldRecreate(t)&&(this.cursorConfig=new op(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig))}onDidChangeContentOrInjectedText(e){try{let i=this._eventDispatcher.beginEmitViewEvents(),n=!1,s=!1,r=e instanceof Hb?e.rawContentChangedEvent.changes:e.changes,a=e instanceof Hb?e.rawContentChangedEvent.versionId:null,l=this._lines.createLineBreaksComputer();for(let u of r)switch(u.changeType){case 4:{for(let f=0;f0&&this.viewLayout.changeSpecialLineHeights(u=>{for(let f of h){let g=this._getCustomLineHeightsForLines(f.fromLineNumber,f.toLineNumber);for(let p of g)u.insertOrChangeCustomLineHeight(p.decorationId,p.startLineNumber,p.endLineNumber,p.lineHeight)}}),this.viewLayout.onHeightMaybeChanged(),!n&&s&&(i.emitViewEvent(new ey),i.emitViewEvent(new ug(null)),this._cursor.onLineMappingChanged(i),this._decorations.onLineMappingChanged())}finally{this._eventDispatcher.endEmitViewEvents()}let t=this._viewportStart.isValid;if(this._viewportStart.invalidate(),this._configuration.setModelLineCount(this.model.getLineCount()),this._updateConfigurationViewLineCountNow(),!this._hasFocus&&this.model.getAttachedEditorCount()>=2&&t){let i=this.model._getTrackedRange(this._viewportStart.modelTrackedRange);if(i){let n=this.coordinatesConverter.convertModelPositionToViewPosition(i.getStartPosition()),s=this.viewLayout.getVerticalOffsetForLineNumber(n.lineNumber);this.viewLayout.setScrollPosition({scrollTop:s+this._viewportStart.startLineDelta},1)}}this._handleVisibleLinesChanged()}emitContentChangeEvent(e){this._emitViewEvent(t=>{e instanceof Hb&&t.emitOutgoingEvent(new aW(e.contentChangedEvent)),this._cursor.onModelContentChanged(t,e)})}_registerModelEvents(){this._configuration.options.get(5)&&this._register(this.model.onDidChangeLineHeight(i=>{let n=i.changes.filter(s=>s.ownerId===this._editorId||s.ownerId===0);if(this.viewLayout.changeSpecialLineHeights(s=>{for(let r of n){let{decorationId:a,lineNumber:l,lineHeightMultiplier:c}=r,d=this.coordinatesConverter.convertModelRangeToViewRange(new S(l,1,l,this.model.getLineMaxColumn(l)));c!==null?s.insertOrChangeCustomLineHeight(a,d.startLineNumber,d.endLineNumber,c*this._configuration.options.get(75)):s.removeCustomLineHeight(a)}}),n.length>0){let s=new e0(n);this._eventDispatcher.emitOutgoingEvent(new dW(s))}})),this._configuration.options.get(172)&&this._register(this.model.onDidChangeFont(i=>{let n=i.changes.filter(s=>s.ownerId===this._editorId||s.ownerId===0);if(n.length>0){let s=new t0(n);this._eventDispatcher.emitOutgoingEvent(new hW(s))}})),this._register(this.model.onDidChangeTokens(i=>{let n=[];for(let s=0,r=i.ranges.length;s{this._eventDispatcher.emitSingleViewEvent(new UB),this.cursorConfig=new op(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new rW(i))})),this._register(this.model.onDidChangeLanguage(i=>{this.cursorConfig=new op(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new sW(i))})),this._register(this.model.onDidChangeOptions(i=>{if(this._lines.setTabSize(this.model.getOptions().tabSize)){try{let n=this._eventDispatcher.beginEmitViewEvents();n.emitViewEvent(new JC),n.emitViewEvent(new ey),n.emitViewEvent(new ug(null)),this._cursor.onLineMappingChanged(n),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount(),this._getCustomLineHeights())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}this.cursorConfig=new op(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new lW(i))})),this._register(this.model.onDidChangeDecorations(i=>{this._decorations.onModelDecorationsChanged(),this._eventDispatcher.emitSingleViewEvent(new ug(i)),this._eventDispatcher.emitOutgoingEvent(new oW(i))}))}getFontSizeAtPosition(e){if(!this._configuration.options.get(172))return null;let i=this.model.getFontDecorationsInRange(S.fromPositions(e),this._editorId),n=this._configuration.options.get(59).fontSize+"px";for(let s of i)if(s.options.fontSize){n=s.options.fontSize;break}return n}setHiddenAreas(e,t,i){this.hiddenAreasModel.setHiddenAreas(t,e);let n=this.hiddenAreasModel.getMergedRanges();if(n===this.previousHiddenAreas&&!i)return;this.previousHiddenAreas=n;let s=this._captureStableViewport(),r=!1;try{let a=this._eventDispatcher.beginEmitViewEvents();r=this._lines.setHiddenAreas(n),r&&(a.emitViewEvent(new JC),a.emitViewEvent(new ey),a.emitViewEvent(new ug(null)),this._cursor.onLineMappingChanged(a),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount(),this._getCustomLineHeights()),this.viewLayout.onHeightMaybeChanged());let l=s.viewportStartModelPosition?.lineNumber;l&&n.some(d=>d.startLineNumber<=l&&l<=d.endLineNumber)||s.recoverViewportStart(this.coordinatesConverter,this.viewLayout)}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule(),r&&this._eventDispatcher.emitOutgoingEvent(new tW)}getVisibleRangesPlusViewportAboveBelow(){let e=this._configuration.options.get(165),t=this._configuration.options.get(75),i=Math.max(20,Math.round(e.height/t)),n=this.viewLayout.getLinesViewportData(),s=Math.max(1,n.completelyVisibleStartLineNumber-i),r=Math.min(this.getLineCount(),n.completelyVisibleEndLineNumber+i);return this._toModelVisibleRanges(new S(s,this.getLineMinColumn(s),r,this.getLineMaxColumn(r)))}getVisibleRanges(){let e=this.getCompletelyVisibleViewRange();return this._toModelVisibleRanges(e)}getHiddenAreas(){return this._lines.getHiddenAreas()}_toModelVisibleRanges(e){let t=this.coordinatesConverter.convertViewRangeToModelRange(e),i=this._lines.getHiddenAreas();if(i.length===0)return[t];let n=[],s=0,r=t.startLineNumber,a=t.startColumn,l=t.endLineNumber,c=t.endColumn;for(let d=0,h=i.length;dl||(rr?e:new S(s,this.getLineMinColumn(s),r,this.getLineMaxColumn(r))}saveState(){let e=this.viewLayout.saveState(),t=e.scrollTop,i=this.viewLayout.getLineNumberAtVerticalOffset(t),n=this.coordinatesConverter.convertViewPositionToModelPosition(new M(i,this.getLineMinColumn(i))),s=this.viewLayout.getVerticalOffsetForLineNumber(i)-t;return{scrollLeft:e.scrollLeft,firstPosition:n,firstPositionDeltaTop:s}}reduceRestoreState(e){if(typeof e.firstPosition>"u")return this._reduceRestoreStateCompatibility(e);let t=this.model.validatePosition(e.firstPosition),i=this.coordinatesConverter.convertModelPositionToViewPosition(t),n=this.viewLayout.getVerticalOffsetForLineNumber(i.lineNumber)-e.firstPositionDeltaTop;return{scrollLeft:e.scrollLeft,scrollTop:n}}_reduceRestoreStateCompatibility(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTopWithoutViewZones}}getTabSize(){return this.model.getOptions().tabSize}getLineCount(){return this._lines.getViewLineCount()}setViewport(e,t,i){this._viewportStart.update(this,e)}getActiveIndentGuide(e,t,i){return this._lines.getActiveIndentGuide(e,t,i)}getLinesIndentGuides(e,t){return this._lines.getViewLinesIndentGuides(e,t)}getBracketGuidesInRangeByLine(e,t,i,n){return this._lines.getViewLinesBracketGuides(e,t,i,n)}getLineContent(e){return this._lines.getViewLineContent(e)}getLineLength(e){return this._lines.getViewLineLength(e)}getLineMinColumn(e){return this._lines.getViewLineMinColumn(e)}getLineMaxColumn(e){return this._lines.getViewLineMaxColumn(e)}getLineFirstNonWhitespaceColumn(e){let t=Zn(this.getLineContent(e));return t===-1?0:t+1}getLineLastNonWhitespaceColumn(e){let t=Js(this.getLineContent(e));return t===-1?0:t+2}getMinimapDecorationsInRange(e){return this._decorations.getMinimapDecorationsInRange(e)}getDecorationsInViewport(e){return this._decorations.getDecorationsViewportData(e).decorations}getInjectedTextAt(e){return this._lines.getInjectedTextAt(e)}_getTextDirection(e,t){let i=0;for(let n of t){let s=n.range;if(s.startLineNumber>e||s.endLineNumber0?Fs.RTL:Fs.LTR}getTextDirection(e){let t=this._decorations.getDecorationsOnLine(e);return this._getTextDirection(e,t.decorations)}getViewportViewLineRenderingData(e,t){let i=this._decorations.getDecorationsViewportData(e),n=t-e.startLineNumber,s=i.inlineDecorations[n],r=i.hasVariableFonts[n];return this._getViewLineRenderingData(t,s,r,i.decorations)}getViewLineRenderingData(e){let t=this._decorations.getDecorationsOnLine(e);return this._getViewLineRenderingData(e,t.inlineDecorations[0],t.hasVariableFonts[0],t.decorations)}_getViewLineRenderingData(e,t,i,n){let s=this.model.mightContainRTL(),r=this.model.mightContainNonBasicASCII(),a=this.getTabSize(),l=this._lines.getViewLineData(e);return l.inlineDecorations&&(t=[...t,...l.inlineDecorations]),new Ja(l.minColumn,l.maxColumn,l.content,l.continuesWithWrappedLine,s,r,l.tokens,t,a,l.startVisibleColumn,this._getTextDirection(e,n),i)}getViewLineData(e){return this._lines.getViewLineData(e)}getMinimapLinesRenderingData(e,t,i){let n=this._lines.getViewLinesData(e,t,i);return new hF(this.getTabSize(),n)}getAllOverviewRulerDecorations(e){let t=this.model.getOverviewRulerDecorations(this._editorId,vw(this._configuration.options),ww(this._configuration.options)),i=new NJ;for(let n of t){let s=n.options,r=s.overviewRuler;if(!r)continue;let a=r.position;if(a===0)continue;let l=r.getColor(e.value),c=this.coordinatesConverter.getViewLineNumberOfModelPosition(n.range.startLineNumber,n.range.startColumn),d=this.coordinatesConverter.getViewLineNumberOfModelPosition(n.range.endLineNumber,n.range.endColumn);i.accept(l,s.zIndex,c,d,a)}return i.asArray}_invalidateDecorationsColorCache(){let e=this.model.getOverviewRulerDecorations();for(let t of e)t.options.overviewRuler?.invalidateCachedColor(),t.options.minimap?.invalidateCachedColor()}getValueInRange(e,t){let i=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueInRange(i,t)}getValueLengthInRange(e,t){let i=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueLengthInRange(i,t)}modifyPosition(e,t){let i=this.coordinatesConverter.convertViewPositionToModelPosition(e),n=this.model.modifyPosition(i,t);return this.coordinatesConverter.convertModelPositionToViewPosition(n)}deduceModelPositionRelativeToViewPosition(e,t,i){let n=this.coordinatesConverter.convertViewPositionToModelPosition(e);this.model.getEOL().length===2&&(t<0?t-=i:t+=i);let r=this.model.getOffsetAt(n)+t;return this.model.getPositionAt(r)}getPlainTextToCopy(e,t,i){let n=i?`\r +`:this.model.getEOL();e=e.slice(0),e.sort(S.compareRangesUsingStarts);let s=!1,r=!1;for(let d of e)d.isEmpty()?s=!0:r=!0;if(!r&&!t)return{sourceRanges:[],sourceText:""};let a=[],l=[],c=(d,h="")=>{a.push(d),l.push(this.model.getValueInRange(d,i?2:0)+h)};if(s&&t){let d=0;for(let h of e){let u=h.startLineNumber;h.isEmpty()?u!==d&&c(new S(u,this.model.getLineMinColumn(u),u,this.model.getLineMaxColumn(u)),n):c(h),d=u}}else for(let d of e)d.isEmpty()||c(d);return{sourceRanges:a,sourceText:l.length===1?l[0]:l}}getRichTextToCopy(e,t){let i=this.model.getLanguageId();if(i===cs||e.length!==1)return null;let n=e[0];if(n.isEmpty()){if(!t)return null;let d=n.startLineNumber;n=new S(d,this.model.getLineMinColumn(d),d,this.model.getLineMaxColumn(d))}let s=this._configuration.options.get(59),r=this._getColorMap(),l=/[:;\\\/<>]/.test(s.fontFamily)||s.fontFamily===_r.fontFamily,c;return l?c=_r.fontFamily:(c=s.fontFamily,c=c.replace(/"/g,"'"),/[,']/.test(c)||/[+ ]/.test(c)&&(c=`'${c}'`),c=`${c}, ${_r.fontFamily}`),{mode:i,html:`
`+this._getHTMLToCopy(n,r)+"
"}}_getHTMLToCopy(e,t){let i=e.startLineNumber,n=e.startColumn,s=e.endLineNumber,r=e.endColumn,a=this.getTabSize(),l="";for(let c=i;c<=s;c++){let d=this.model.tokenization.getLineTokens(c),h=d.getLineContent(),u=c===i?n-1:0,f=c===s?r-1:h.length;h===""?l+="
":l+=lxe(h,d.inflate(),t,u,f,a,sn)}return l}_getColorMap(){let e=Ti.getColorMap(),t=["#000000"];if(e)for(let i=1,n=e.length;ithis._cursor.setStates(n,e,t,i))}getCursorColumnSelectData(){return this._cursor.getCursorColumnSelectData()}getCursorAutoClosedCharacters(){return this._cursor.getAutoClosedCharacters()}setCursorColumnSelectData(e){this._cursor.setCursorColumnSelectData(e)}getPrevEditOperationType(){return this._cursor.getPrevEditOperationType()}setPrevEditOperationType(e){this._cursor.setPrevEditOperationType(e)}getSelection(){return this._cursor.getSelection()}getSelections(){return this._cursor.getSelections()}getPosition(){return this._cursor.getPrimaryCursorState().modelState.position}setSelections(e,t,i=0){this._withViewEventsCollector(n=>this._cursor.setSelections(n,e,t,i))}saveCursorState(){return this._cursor.saveState()}restoreCursorState(e){this._withViewEventsCollector(t=>this._cursor.restoreState(t,e))}_executeCursorEdit(e){if(this._cursor.context.cursorConfig.readOnly){this._eventDispatcher.emitOutgoingEvent(new nW);return}this._withViewEventsCollector(e)}executeEdits(e,t,i,n){this._executeCursorEdit(s=>this._cursor.executeEdits(s,e,t,i,n))}startComposition(){this._executeCursorEdit(e=>this._cursor.startComposition(e))}endComposition(e){this._executeCursorEdit(t=>this._cursor.endComposition(t,e))}type(e,t){this._executeCursorEdit(i=>this._cursor.type(i,e,t))}compositionType(e,t,i,n,s){this._executeCursorEdit(r=>this._cursor.compositionType(r,e,t,i,n,s))}paste(e,t,i,n){this._executeCursorEdit(s=>this._cursor.paste(s,e,t,i,n))}cut(e){this._executeCursorEdit(t=>this._cursor.cut(t,e))}executeCommand(e,t){this._executeCursorEdit(i=>this._cursor.executeCommand(i,e,t))}executeCommands(e,t){this._executeCursorEdit(i=>this._cursor.executeCommands(i,e,t))}revealAllCursors(e,t,i=!1){this._withViewEventsCollector(n=>this._cursor.revealAll(n,e,i,0,t,0))}revealPrimaryCursor(e,t,i=!1){this._withViewEventsCollector(n=>this._cursor.revealPrimary(n,e,i,0,t,0))}revealTopMostCursor(e){let t=this._cursor.getTopMostViewPosition(),i=new S(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector(n=>n.emitViewEvent(new Cp(e,!1,i,null,0,!0,0)))}revealBottomMostCursor(e){let t=this._cursor.getBottomMostViewPosition(),i=new S(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector(n=>n.emitViewEvent(new Cp(e,!1,i,null,0,!0,0)))}revealRange(e,t,i,n,s){this._withViewEventsCollector(r=>r.emitViewEvent(new Cp(e,!1,i,null,n,t,s)))}changeWhitespace(e){this.viewLayout.changeWhitespace(e)&&(this._eventDispatcher.emitSingleViewEvent(new GB),this._eventDispatcher.emitOutgoingEvent(new eW))}_withViewEventsCollector(e){return this._transactionalTarget.batchChanges(()=>this._emitViewEvent(e))}_emitViewEvent(e){try{let t=this._eventDispatcher.beginEmitViewEvents();return e(t)}finally{this._eventDispatcher.endEmitViewEvents()}}batchEvents(e){this._withViewEventsCollector(()=>{e()})}normalizePosition(e,t){return this._lines.normalizePosition(e,t)}getLineIndentColumn(e){return this._lines.getLineIndentColumn(e)}},DJ=class o{static create(e){let t=e._setTrackedRange(null,new S(1,1,1,1),1);return new o(e,1,!1,t,0)}get viewLineNumber(){return this._viewLineNumber}get isValid(){return this._isValid}get modelTrackedRange(){return this._modelTrackedRange}get startLineDelta(){return this._startLineDelta}constructor(e,t,i,n,s){this._model=e,this._viewLineNumber=t,this._isValid=i,this._modelTrackedRange=n,this._startLineDelta=s}dispose(){this._model._setTrackedRange(this._modelTrackedRange,null,1)}update(e,t){let i=e.coordinatesConverter.convertViewPositionToModelPosition(new M(t,e.getLineMinColumn(t))),n=e.model._setTrackedRange(this._modelTrackedRange,new S(i.lineNumber,i.column,i.lineNumber,i.column),1),s=e.viewLayout.getVerticalOffsetForLineNumber(t),r=e.viewLayout.getCurrentScrollTop();this._viewLineNumber=t,this._isValid=!0,this._modelTrackedRange=n,this._startLineDelta=r-s}invalidate(){this._isValid=!1}},NJ=class{constructor(){this._asMap=Object.create(null),this.asArray=[]}accept(e,t,i,n,s){let r=this._asMap[e];if(r){let a=r.data,l=a[a.length-3],c=a[a.length-1];if(l===s&&c+1>=i){n>c&&(a[a.length-1]=n);return}a.push(s,i,n)}else{let a=new cC(e,t,[s,i,n]);this._asMap[e]=a,this.asArray.push(a)}}},RJ=class{constructor(){this.hiddenAreas=new Map,this.shouldRecompute=!1,this.ranges=[]}setHiddenAreas(e,t){let i=this.hiddenAreas.get(e);i&&_xe(i,t)||(this.hiddenAreas.set(e,t),this.shouldRecompute=!0)}getMergedRanges(){if(!this.shouldRecompute)return this.ranges;this.shouldRecompute=!1;let e=Array.from(this.hiddenAreas.values()).reduce((t,i)=>lBe(t,i),[]);return _xe(this.ranges,e)?this.ranges:(this.ranges=e,this.ranges)}};DW=class{constructor(e,t){this.viewportStartModelPosition=e,this.startLineDelta=t}recoverViewportStart(e,t){if(!this.viewportStartModelPosition)return;let i=e.convertModelPositionToViewPosition(this.viewportStartModelPosition),n=t.getVerticalOffsetForLineNumber(i.lineNumber);t.setScrollPosition({scrollTop:n+this.startLineDelta},1)}}});var ed,ny=x(()=>{ed=class{constructor(...e){this._entries=new Map;for(let[t,i]of e)this.set(t,i)}set(e,t){let i=this._entries.get(e);return this._entries.set(e,t),i}get(e){return this._entries.get(e)}}});function x0(o){return hBe+encodeURIComponent(o.toString())+uBe}function vxe(o){return fBe+encodeURIComponent(o.toString())+gBe}var cBe,fg,oy,qh,dBe,AJ,NW,zs,MJ,OJ,PJ,hBe,uBe,fBe,gBe,sy=x(()=>{P_e();re();Ae();ae();W();jo();F_e();dc();U_e();pF();lt();ao();Tye();Rye();JZ();Aye();Uo();Fl();Wl();Pe();ue();gi();mT();nQ();$E();li();Do();Kn();Ut();exe();bxe();le();us();Ii();je();Ie();ny();Hs();$t();bi();Zi();xi();qi();Mi();Xi();$i();Vi();Qi();Ji();Kt();yi();Xd();Rt();eg();cBe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},fg=function(o,e){return function(t,i){e(t,i,o)}},qh=class extends T{static{oy=this}static{this.dropIntoEditorDecorationOptions=Ve.register({description:"workbench-dnd-target",className:"dnd-target"})}get isSimpleWidget(){return this._configuration.isSimpleWidget}get contextMenuId(){return this._configuration.contextMenuId}get contextKeyService(){return this._contextKeyService}constructor(e,t,i,n,s,r,a,l,c,d,h,u,f){super(),this.languageConfigurationService=h,this._deliveryQueue=Zfe(),this._contributions=this._register(new F3),this._onDidDispose=this._register(new N),this.onDidDispose=this._onDidDispose.event,this._onDidChangeModelContent=this._register(new N({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelContent=this._onDidChangeModelContent.event,this._onDidChangeModelLanguage=this._register(new N({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelLanguage=this._onDidChangeModelLanguage.event,this._onDidChangeModelLanguageConfiguration=this._register(new N({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelLanguageConfiguration=this._onDidChangeModelLanguageConfiguration.event,this._onDidChangeModelOptions=this._register(new N({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelOptions=this._onDidChangeModelOptions.event,this._onDidChangeModelDecorations=this._register(new N({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelDecorations=this._onDidChangeModelDecorations.event,this._onDidChangeLineHeight=this._register(new N({deliveryQueue:this._deliveryQueue})),this.onDidChangeLineHeight=this._onDidChangeLineHeight.event,this._onDidChangeFont=this._register(new N({deliveryQueue:this._deliveryQueue})),this.onDidChangeFont=this._onDidChangeFont.event,this._onDidChangeModelTokens=this._register(new N({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelTokens=this._onDidChangeModelTokens.event,this._onDidChangeConfiguration=this._register(new N({deliveryQueue:this._deliveryQueue})),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._onWillChangeModel=this._register(new N({deliveryQueue:this._deliveryQueue})),this.onWillChangeModel=this._onWillChangeModel.event,this._onDidChangeModel=this._register(new N({deliveryQueue:this._deliveryQueue})),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidChangeCursorPosition=this._register(new N({deliveryQueue:this._deliveryQueue})),this.onDidChangeCursorPosition=this._onDidChangeCursorPosition.event,this._onDidChangeCursorSelection=this._register(new N({deliveryQueue:this._deliveryQueue})),this.onDidChangeCursorSelection=this._onDidChangeCursorSelection.event,this._onDidAttemptReadOnlyEdit=this._register(new zs(this._contributions,this._deliveryQueue)),this.onDidAttemptReadOnlyEdit=this._onDidAttemptReadOnlyEdit.event,this._onDidLayoutChange=this._register(new N({deliveryQueue:this._deliveryQueue})),this.onDidLayoutChange=this._onDidLayoutChange.event,this._editorTextFocus=this._register(new NW({deliveryQueue:this._deliveryQueue})),this.onDidFocusEditorText=this._editorTextFocus.onDidChangeToTrue,this.onDidBlurEditorText=this._editorTextFocus.onDidChangeToFalse,this._editorWidgetFocus=this._register(new NW({deliveryQueue:this._deliveryQueue})),this.onDidFocusEditorWidget=this._editorWidgetFocus.onDidChangeToTrue,this.onDidBlurEditorWidget=this._editorWidgetFocus.onDidChangeToFalse,this._onWillType=this._register(new zs(this._contributions,this._deliveryQueue)),this.onWillType=this._onWillType.event,this._onDidType=this._register(new zs(this._contributions,this._deliveryQueue)),this.onDidType=this._onDidType.event,this._onDidCompositionStart=this._register(new zs(this._contributions,this._deliveryQueue)),this.onDidCompositionStart=this._onDidCompositionStart.event,this._onDidCompositionEnd=this._register(new zs(this._contributions,this._deliveryQueue)),this.onDidCompositionEnd=this._onDidCompositionEnd.event,this._onDidPaste=this._register(new zs(this._contributions,this._deliveryQueue)),this.onDidPaste=this._onDidPaste.event,this._onWillCopy=this._register(new zs(this._contributions,this._deliveryQueue)),this.onWillCopy=this._onWillCopy.event,this._onWillCut=this._register(new zs(this._contributions,this._deliveryQueue)),this.onWillCut=this._onWillCut.event,this._onWillPaste=this._register(new zs(this._contributions,this._deliveryQueue)),this.onWillPaste=this._onWillPaste.event,this._onMouseUp=this._register(new zs(this._contributions,this._deliveryQueue)),this.onMouseUp=this._onMouseUp.event,this._onMouseDown=this._register(new zs(this._contributions,this._deliveryQueue)),this.onMouseDown=this._onMouseDown.event,this._onMouseDrag=this._register(new zs(this._contributions,this._deliveryQueue)),this.onMouseDrag=this._onMouseDrag.event,this._onMouseDrop=this._register(new zs(this._contributions,this._deliveryQueue)),this.onMouseDrop=this._onMouseDrop.event,this._onMouseDropCanceled=this._register(new zs(this._contributions,this._deliveryQueue)),this.onMouseDropCanceled=this._onMouseDropCanceled.event,this._onDropIntoEditor=this._register(new zs(this._contributions,this._deliveryQueue)),this.onDropIntoEditor=this._onDropIntoEditor.event,this._onContextMenu=this._register(new zs(this._contributions,this._deliveryQueue)),this.onContextMenu=this._onContextMenu.event,this._onMouseMove=this._register(new zs(this._contributions,this._deliveryQueue)),this.onMouseMove=this._onMouseMove.event,this._onMouseLeave=this._register(new zs(this._contributions,this._deliveryQueue)),this.onMouseLeave=this._onMouseLeave.event,this._onMouseWheel=this._register(new zs(this._contributions,this._deliveryQueue)),this.onMouseWheel=this._onMouseWheel.event,this._onKeyUp=this._register(new zs(this._contributions,this._deliveryQueue)),this.onKeyUp=this._onKeyUp.event,this._onKeyDown=this._register(new zs(this._contributions,this._deliveryQueue)),this.onKeyDown=this._onKeyDown.event,this._onDidContentSizeChange=this._register(new N({deliveryQueue:this._deliveryQueue})),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._onDidScrollChange=this._register(new N({deliveryQueue:this._deliveryQueue})),this.onDidScrollChange=this._onDidScrollChange.event,this._onDidChangeViewZones=this._register(new N({deliveryQueue:this._deliveryQueue})),this.onDidChangeViewZones=this._onDidChangeViewZones.event,this._onDidChangeHiddenAreas=this._register(new N({deliveryQueue:this._deliveryQueue})),this.onDidChangeHiddenAreas=this._onDidChangeHiddenAreas.event,this._updateCounter=0,this._onWillTriggerEditorOperationEvent=this._register(new N),this._onBeginUpdate=this._register(new N),this.onBeginUpdate=this._onBeginUpdate.event,this._onEndUpdate=this._register(new N),this.onEndUpdate=this._onEndUpdate.event,this._onBeforeExecuteEdit=this._register(new N),this.onBeforeExecuteEdit=this._onBeforeExecuteEdit.event,this._actions=new Map,this._bannerDomNode=null,this._dropIntoEditorDecorations=this.createDecorationsCollection(),this.inComposition=!1,s.willCreateCodeEditor();let g={...t};if(this._domElement=e,this._userInteractionService=f,this._overflowWidgetsDomNode=g.overflowWidgetsDomNode,delete g.overflowWidgetsDomNode,this._id=++dBe,this._decorationTypeKeysToIds={},this._decorationTypeSubtypes={},this._telemetryData=i.telemetryData,this._configuration=this._register(this._createConfiguration(i.isSimpleWidget||!1,i.contextMenuId??(i.isSimpleWidget?Te.SimpleEditorContext:Te.EditorContext),g,d)),this._domElement.style?.setProperty("--editor-font-size",this._configuration.options.get(61)+"px"),this._register(this._configuration.onDidChange(b=>{this._onDidChangeConfiguration.fire(b);let v=this._configuration.options;if(b.hasChanged(165)){let w=v.get(165);this._onDidLayoutChange.fire(w)}b.hasChanged(61)&&this._domElement.style.setProperty("--editor-font-size",v.get(61)+"px")})),this._contextKeyService=this._register(a.createScoped(this._domElement)),i.contextKeyValues)for(let[b,v]of Object.entries(i.contextKeyValues))this._contextKeyService.createKey(b,v);this._notificationService=c,this._codeEditorService=s,this._commandService=r,this._themeService=l,this._register(new MJ(this,this._contextKeyService)),this._register(new OJ(this,this._contextKeyService,u)),this._instantiationService=this._register(n.createChild(new ed([Ce,this._contextKeyService]))),this._modelData=null,this._contentWidgets={},this._overlayWidgets={},this._glyphMarginWidgets={};let p;Array.isArray(i.contributions)?p=i.contributions:p=Y_.getEditorContributions(),this._contributions.initialize(this,p,this._instantiationService);for(let b of Y_.getEditorActions()){if(this._actions.has(b.id)){De(new Error(`Cannot have two actions with the same id ${b.id}`));continue}let v=new i0(b.id,b.label,b.alias,b.metadata,b.precondition??void 0,w=>this._instantiationService.invokeFunction(C=>Promise.resolve(b.runEditorCommand(C,this,w))),this._contextKeyService);this._actions.set(v.id,v)}let _=()=>!this._configuration.options.get(104)&&this._configuration.options.get(43).enabled;this._register(new MO(this._domElement,{onDragOver:b=>{if(!_())return;let v=this.getTargetAtClientPoint(b.clientX,b.clientY);v?.position&&this.showDropIndicatorAt(v.position)},onDrop:async b=>{if(!_()||(this.removeDropIndicator(),!b.dataTransfer))return;let v=this.getTargetAtClientPoint(b.clientX,b.clientY);v?.position&&this._onDropIntoEditor.fire({position:v.position,event:b})},onDragLeave:()=>{this.removeDropIndicator()},onDragEnd:()=>{this.removeDropIndicator()}})),this._codeEditorService.addCodeEditor(this)}writeScreenReaderContent(e){this._modelData?.view.writeScreenReaderContent(e)}_createConfiguration(e,t,i,n){return new _F(e,t,i,this._domElement,n)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return jm.ICodeEditor}dispose(){this._codeEditorService.removeCodeEditor(this),this._actions.clear(),this._contentWidgets={},this._overlayWidgets={},this._removeDecorationTypes(),this._postDetachModelCleanup(this._detachModel()),this._onDidDispose.fire(),super.dispose()}invokeWithinContext(e){return this._instantiationService.invokeFunction(e)}updateOptions(e){this._configuration.updateOptions(e||{})}getOptions(){return this._configuration.options}getOption(e){return this._configuration.options.get(e)}getRawOptions(){return this._configuration.getRawOptions()}getOverflowWidgetsDomNode(){return this._overflowWidgetsDomNode}getConfiguredWordAtPosition(e){return this._modelData?fs.getWordAtPosition(this._modelData.model,this._configuration.options.get(148),this._configuration.options.get(147),e):null}getValue(e=null){if(!this._modelData)return"";let t=!!(e&&e.preserveBOM),i=0;return e&&e.lineEnding&&e.lineEnding===` +`?i=1:e&&e.lineEnding&&e.lineEnding===`\r +`&&(i=2),this._modelData.model.getValue(i,t)}setValue(e){try{if(this._beginUpdate(),!this._modelData)return;this._modelData.model.setValue(e)}finally{this._endUpdate()}}getModel(){return this._modelData?this._modelData.model:null}setModel(e=null){try{this._beginUpdate();let t=e;if(this._modelData===null&&t===null||this._modelData&&this._modelData.model===t)return;let i={oldModelUrl:this._modelData?.model.uri||null,newModelUrl:t?.uri||null};this._onWillChangeModel.fire(i);let n=this.hasTextFocus(),s=this._detachModel();this._attachModel(t),this.hasModel()?n&&this.focus():(this._editorTextFocus.setValue(!1),this._editorWidgetFocus.setValue(!1)),this._removeDecorationTypes(),this._onDidChangeModel.fire(i),this._postDetachModelCleanup(s),this._contributionsDisposable=this._contributions.onAfterModelAttached()}finally{this._endUpdate()}}_removeDecorationTypes(){if(this._decorationTypeKeysToIds={},this._decorationTypeSubtypes){for(let e in this._decorationTypeSubtypes){let t=this._decorationTypeSubtypes[e];for(let i in t)this._removeDecorationType(e+"-"+i)}this._decorationTypeSubtypes={}}}getVisibleRanges(){return this._modelData?this._modelData.viewModel.getVisibleRanges():[]}getVisibleRangesPlusViewportAboveBelow(){return this._modelData?this._modelData.viewModel.getVisibleRangesPlusViewportAboveBelow():[]}getWhitespaces(){return this._modelData?this._modelData.viewModel.viewLayout.getWhitespaces():[]}static _getVerticalOffsetAfterPosition(e,t,i,n){let s=e.model.validatePosition({lineNumber:t,column:i}),r=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(s);return e.viewModel.viewLayout.getVerticalOffsetAfterLineNumber(r.lineNumber,n)}getTopForLineNumber(e,t=!1){return this._modelData?oy._getVerticalOffsetForPosition(this._modelData,e,1,t):-1}getTopForPosition(e,t){return this._modelData?oy._getVerticalOffsetForPosition(this._modelData,e,t,!1):-1}static _getVerticalOffsetForPosition(e,t,i,n=!1){let s=e.model.validatePosition({lineNumber:t,column:i}),r=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(s);return e.viewModel.viewLayout.getVerticalOffsetForLineNumber(r.lineNumber,n)}getBottomForLineNumber(e,t=!1){return this._modelData?oy._getVerticalOffsetAfterPosition(this._modelData,e,Number.MAX_SAFE_INTEGER,t):-1}getLineHeightForPosition(e){if(!this._modelData)return-1;let t=this._modelData.viewModel,i=t.coordinatesConverter,n=M.lift(e);if(i.modelPositionIsVisible(n)){let s=i.convertModelPositionToViewPosition(n);return t.viewLayout.getLineHeightForLineNumber(s.lineNumber)}return 0}setHiddenAreas(e,t,i){this._modelData?.viewModel.setHiddenAreas(e.map(n=>S.lift(n)),t,i)}getVisibleColumnFromPosition(e){if(!this._modelData)return e.column;let t=this._modelData.model.validatePosition(e),i=this._modelData.model.getOptions().tabSize;return mi.visibleColumnFromColumn(this._modelData.model.getLineContent(t.lineNumber),t.column,i)+1}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(e,t="api"){if(this._modelData){if(!M.isIPosition(e))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(t,[{selectionStartLineNumber:e.lineNumber,selectionStartColumn:e.column,positionLineNumber:e.lineNumber,positionColumn:e.column}])}}_sendRevealRange(e,t,i,n){if(!this._modelData)return;if(!S.isIRange(e))throw new Error("Invalid arguments");let s=this._modelData.model.validateRange(e),r=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(s);this._modelData.viewModel.revealRange("api",i,r,t,n)}revealAllCursors(e,t){this._modelData&&this._modelData.viewModel.revealAllCursors("api",e,t)}revealLine(e,t=0){this._revealLine(e,0,t)}revealLineInCenter(e,t=0){this._revealLine(e,1,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._revealLine(e,2,t)}revealLineNearTop(e,t=0){this._revealLine(e,5,t)}_revealLine(e,t,i){if(typeof e!="number")throw new Error("Invalid arguments");this._sendRevealRange(new S(e,1,e,1),t,!1,i)}revealPosition(e,t=0){this._revealPosition(e,0,!0,t)}revealPositionInCenter(e,t=0){this._revealPosition(e,1,!0,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._revealPosition(e,2,!0,t)}revealPositionNearTop(e,t=0){this._revealPosition(e,5,!0,t)}_revealPosition(e,t,i,n){if(!M.isIPosition(e))throw new Error("Invalid arguments");this._sendRevealRange(new S(e.lineNumber,e.column,e.lineNumber,e.column),t,i,n)}getSelection(){return this._modelData?this._modelData.viewModel.getSelection():null}getSelections(){return this._modelData?this._modelData.viewModel.getSelections():null}setSelection(e,t="api"){let i=me.isISelection(e),n=S.isIRange(e);if(!i&&!n)throw new Error("Invalid arguments");if(i)this._setSelectionImpl(e,t);else if(n){let s={selectionStartLineNumber:e.startLineNumber,selectionStartColumn:e.startColumn,positionLineNumber:e.endLineNumber,positionColumn:e.endColumn};this._setSelectionImpl(s,t)}}_setSelectionImpl(e,t){if(!this._modelData)return;let i=new me(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn);this._modelData.viewModel.setSelections(t,[i])}revealLines(e,t,i=0){this._revealLines(e,t,0,i)}revealLinesInCenter(e,t,i=0){this._revealLines(e,t,1,i)}revealLinesInCenterIfOutsideViewport(e,t,i=0){this._revealLines(e,t,2,i)}revealLinesNearTop(e,t,i=0){this._revealLines(e,t,5,i)}_revealLines(e,t,i,n){if(typeof e!="number"||typeof t!="number")throw new Error("Invalid arguments");this._sendRevealRange(new S(e,1,t,1),i,!1,n)}revealRange(e,t=0,i=!1,n=!0){this._revealRange(e,i?1:0,n,t)}revealRangeInCenter(e,t=0){this._revealRange(e,1,!0,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._revealRange(e,2,!0,t)}revealRangeNearTop(e,t=0){this._revealRange(e,5,!0,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._revealRange(e,6,!0,t)}revealRangeAtTop(e,t=0){this._revealRange(e,3,!0,t)}_revealRange(e,t,i,n){if(!S.isIRange(e))throw new Error("Invalid arguments");this._sendRevealRange(S.lift(e),t,i,n)}setSelections(e,t="api",i=0){if(this._modelData){if(!e||e.length===0)throw new Error("Invalid arguments");for(let n=0,s=e.length;n0&&this._modelData.viewModel.restoreCursorState(i):this._modelData.viewModel.restoreCursorState([i]),this._contributions.restoreViewState(t.contributionsState||{});let n=this._modelData.viewModel.reduceRestoreState(t.viewState);this._modelData.view.restoreState(n)}}handleInitialized(){this._getViewModel()?.visibleLinesStabilized()}getContribution(e){return this._contributions.get(e)}getActions(){return Array.from(this._actions.values())}getSupportedActions(){let e=this.getActions();return e=e.filter(t=>t.isSupported()),e}getAction(e){return this._actions.get(e)||null}trigger(e,t,i){i=i||{};try{switch(this._onWillTriggerEditorOperationEvent.fire({source:e,handlerId:t,payload:i}),this._beginUpdate(),t){case"compositionStart":this._startComposition();return;case"compositionEnd":this._endComposition(e);return;case"type":{let s=i;this._type(e,s.text||"");return}case"replacePreviousChar":{let s=i;this._compositionType(e,s.text||"",s.replaceCharCnt||0,0,0);return}case"compositionType":{let s=i;this._compositionType(e,s.text||"",s.replacePrevCharCnt||0,s.replaceNextCharCnt||0,s.positionDelta||0);return}case"paste":{let s=i;this._paste(e,s.text||"",s.pasteOnNewLine||!1,s.multicursorText||null,s.mode||null,s.clipboardEvent);return}case"cut":this._cut(e);return}let n=this.getAction(t);if(n){Promise.resolve(n.run(i)).then(void 0,De);return}if(!this._modelData||this._triggerEditorCommand(e,t,i))return;this._triggerCommand(t,i)}finally{this._endUpdate()}}_triggerCommand(e,t){this._commandService.executeCommand(e,t)}_startComposition(){this._modelData&&(this.inComposition=!0,this._modelData.viewModel.startComposition(),this._onDidCompositionStart.fire())}_endComposition(e){this._modelData&&(this.inComposition=!1,this._modelData.viewModel.endComposition(e),this._onDidCompositionEnd.fire())}_type(e,t){!this._modelData||t.length===0||(e==="keyboard"&&this._onWillType.fire(t),this._modelData.viewModel.type(t,e),e==="keyboard"&&this._onDidType.fire(t))}_compositionType(e,t,i,n,s){this._modelData&&this._modelData.viewModel.compositionType(t,i,n,s,e)}_paste(e,t,i,n,s,r){if(!this._modelData)return;let a=this._modelData.viewModel,l=a.getSelection().getStartPosition();a.paste(t,i,n,e);let c=a.getSelection().getStartPosition();e==="keyboard"&&this._onDidPaste.fire({clipboardEvent:r,range:new S(l.lineNumber,l.column,c.lineNumber,c.column),languageId:s})}_cut(e){this._modelData&&this._modelData.viewModel.cut(e)}_triggerEditorCommand(e,t,i){let n=Y_.getEditorCommand(t);return n?(i=i||{},ln(i)&&(i.source=e),this._instantiationService.invokeFunction(s=>{Promise.resolve(n.runEditorCommand(s,this,i)).then(void 0,De)}),!0):!1}_getViewModel(){return this._modelData?this._modelData.viewModel:null}pushUndoStop(){return!this._modelData||this._configuration.options.get(104)?!1:(this._modelData.model.pushStackElement(),!0)}popUndoStop(){return!this._modelData||this._configuration.options.get(104)?!1:(this._modelData.model.popStackElement(),!0)}edit(e,t){return this.executeEdits(t,e.replacements.map(i=>({range:i.range,text:i.text})),void 0)}executeEdits(e,t,i){if(!this._modelData||this._configuration.options.get(104))return!1;let n;i?Array.isArray(i)?n=()=>i:n=i:n=()=>null;let s,r;return e instanceof FT?(r=e,s=e.metadata.source):(r=fo.unknown({name:e}),s=e),this._onBeforeExecuteEdit.fire({source:s??void 0}),this._modelData.viewModel.executeEdits(s,t,n,r),!0}executeCommand(e,t){this._modelData&&this._modelData.viewModel.executeCommand(t,e)}executeCommands(e,t){this._modelData&&this._modelData.viewModel.executeCommands(t,e)}createDecorationsCollection(e){return new PJ(this,e)}changeDecorations(e){return this._modelData?this._modelData.model.changeDecorations(e,this._id):null}getLineDecorations(e){if(!this._modelData)return null;let t=this._configuration.options;return this._modelData.model.getLineDecorations(e,this._id,vw(t),ww(t))}getDecorationsInRange(e){if(!this._modelData)return null;let t=this._configuration.options;return this._modelData.model.getDecorationsInRange(e,this._id,vw(t),ww(t))}getFontSizeAtPosition(e){return this._modelData?this._modelData.viewModel.getFontSizeAtPosition(e):null}deltaDecorations(e,t){return this._modelData?e.length===0&&t.length===0?e:this._modelData.model.deltaDecorations(e,t,this._id):[]}removeDecorations(e){!this._modelData||e.length===0||this._modelData.model.changeDecorations(t=>{t.deltaDecorations(e,[])})}removeDecorationsByType(e){let t=this._decorationTypeKeysToIds[e];if(t&&this.changeDecorations(i=>i.deltaDecorations(t,[])),this._decorationTypeKeysToIds.hasOwnProperty(e)&&delete this._decorationTypeKeysToIds[e],this._decorationTypeSubtypes.hasOwnProperty(e)){let i=this._decorationTypeSubtypes[e];for(let n of Object.keys(i))this._removeDecorationType(e+"-"+n);delete this._decorationTypeSubtypes[e]}}getLayoutInfo(){return this._configuration.options.get(165)}createOverviewRuler(e){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.createOverviewRuler(e)}getContainerDomNode(){return this._domElement}getDomNode(){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.domNode.domNode}delegateVerticalScrollbarPointerDown(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.delegateScrollFromMouseWheelEvent(e)}layout(e,t=!1){this._configuration.observeContainer(e),t||this.render()}focus(){!this._modelData||!this._modelData.hasRealView||this._modelData.view.focus()}hasTextFocus(){return!this._modelData||!this._modelData.hasRealView?!1:this._modelData.view.isFocused()}hasWidgetFocus(){return!this._modelData||!this._modelData.hasRealView?!1:this._modelData.view.isWidgetFocused()}addContentWidget(e){let t={widget:e,position:e.getPosition()};this._contentWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a content widget with the same id:"+e.getId()),this._contentWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addContentWidget(t)}layoutContentWidget(e){let t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){let i=this._contentWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutContentWidget(i)}}removeContentWidget(e){let t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){let i=this._contentWidgets[t];delete this._contentWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeContentWidget(i)}}addOverlayWidget(e){let t={widget:e,position:e.getPosition()};this._overlayWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting an overlay widget with the same id."),this._overlayWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addOverlayWidget(t)}layoutOverlayWidget(e){let t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){let i=this._overlayWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutOverlayWidget(i)}}removeOverlayWidget(e){let t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){let i=this._overlayWidgets[t];delete this._overlayWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeOverlayWidget(i)}}addGlyphMarginWidget(e){let t={widget:e,position:e.getPosition()};this._glyphMarginWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a glyph margin widget with the same id."),this._glyphMarginWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addGlyphMarginWidget(t)}layoutGlyphMarginWidget(e){let t=e.getId();if(this._glyphMarginWidgets.hasOwnProperty(t)){let i=this._glyphMarginWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutGlyphMarginWidget(i)}}removeGlyphMarginWidget(e){let t=e.getId();if(this._glyphMarginWidgets.hasOwnProperty(t)){let i=this._glyphMarginWidgets[t];delete this._glyphMarginWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeGlyphMarginWidget(i)}}changeViewZones(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.change(e)}getTargetAtClientPoint(e,t){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.getTargetAtClientPoint(e,t)}getScrolledVisiblePosition(e){if(!this._modelData||!this._modelData.hasRealView)return null;let t=this._modelData.model.validatePosition(e),n=this._configuration.options.get(165),s=oy._getVerticalOffsetForPosition(this._modelData,t.lineNumber,t.column)-this.getScrollTop(),r=this._modelData.view.getOffsetForColumn(t.lineNumber,t.column)+n.glyphMarginWidth+n.lineNumbersWidth+n.decorationsWidth-this.getScrollLeft(),a=this.getLineHeightForPosition(t);return{top:s,left:r,height:a}}getOffsetForColumn(e,t){return!this._modelData||!this._modelData.hasRealView?-1:this._modelData.view.getOffsetForColumn(e,t)}getWidthOfLine(e){return!this._modelData||!this._modelData.hasRealView?-1:this._modelData.view.getLineWidth(e)}resetLineWidthCaches(){!this._modelData||!this._modelData.hasRealView||this._modelData.view.resetLineWidthCaches()}render(e=!1){!this._modelData||!this._modelData.hasRealView||this._modelData.viewModel.batchEvents(()=>{this._modelData.view.render(!0,e)})}renderAsync(e=!1){!this._modelData||!this._modelData.hasRealView||this._modelData.viewModel.batchEvents(()=>{this._modelData.view.render(!1,e)})}setAriaOptions(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.setAriaOptions(e)}applyFontInfo(e){wn(e,this._configuration.options.get(59))}setBanner(e,t){this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._bannerDomNode.remove(),this._bannerDomNode=e,this._configuration.setReservedHeight(e?t:0),this._bannerDomNode&&this._domElement.prepend(this._bannerDomNode)}_attachModel(e){if(!e){this._modelData=null;return}let t=[];this._domElement.setAttribute("data-mode-id",e.getLanguageId()),this._configuration.setIsDominatedByLongLines(e.isDominatedByLongLines()),this._configuration.setModelLineCount(e.getLineCount());let i=e.onBeforeAttached(),n=new TW(this._id,this._configuration,e,P3.create(we(this._domElement)),FB.create(this._configuration.options),a=>ws(we(this._domElement),a),this.languageConfigurationService,this._themeService,i,{batchChanges:a=>{try{return this._beginUpdate(),a()}finally{this._endUpdate()}}});t.push(e.onWillDispose(()=>this.setModel(null))),t.push(n.onEvent(a=>{switch(a.kind){case 0:this._onDidContentSizeChange.fire(a);break;case 1:this._editorTextFocus.setValue(a.hasFocus);break;case 2:this._editorWidgetFocus.setValue(a.hasFocus);break;case 3:this._onDidScrollChange.fire(a);break;case 4:this._onDidChangeViewZones.fire();break;case 5:this._onDidChangeHiddenAreas.fire();break;case 6:this._onDidAttemptReadOnlyEdit.fire();break;case 7:{if(a.reachedMaxCursorCount){let h=this.getOption(89),u=m(99,"The number of cursors has been limited to {0}. Consider using [find and replace](https://code.visualstudio.com/docs/editor/codebasics#_find-and-replace) for larger changes or increase the editor multi cursor limit setting.",h);this._notificationService.prompt(Vh.Warning,u,[{label:"Find and Replace",run:()=>{this._commandService.executeCommand("editor.action.startFindReplaceAction")}},{label:m(100,"Increase Multi Cursor Limit"),run:()=>{this._commandService.executeCommand("workbench.action.openSettings2",{query:"editor.multiCursorLimit"})}}])}let l=[];for(let h=0,u=a.selections.length;hthis._onWillCopy.fire(l))),t.push(s.onWillCut(l=>this._onWillCut.fire(l))),t.push(s.onWillPaste(l=>this._onWillPaste.fire(l)))}this._modelData=new AJ(e,n,s,r,t,i)}_createView(e){let t;this.isSimpleWidget?t={paste:(s,r,a,l)=>{this._paste("keyboard",s,r,a,l)},type:s=>{this._type("keyboard",s)},compositionType:(s,r,a,l)=>{this._compositionType("keyboard",s,r,a,l)},startComposition:()=>{this._startComposition()},endComposition:()=>{this._endComposition("keyboard")},cut:()=>{this._cut("keyboard")}}:t={paste:(s,r,a,l)=>{let c={text:s,pasteOnNewLine:r,multicursorText:a,mode:l};this._commandService.executeCommand("paste",c)},type:s=>{let r={text:s};this._commandService.executeCommand("type",r)},compositionType:(s,r,a,l)=>{if(a||l){let c={text:s,replacePrevCharCnt:r,replaceNextCharCnt:a,positionDelta:l};this._commandService.executeCommand("compositionType",c)}else{let c={text:s,replaceCharCnt:r};this._commandService.executeCommand("replacePreviousChar",c)}},startComposition:()=>{this._commandService.executeCommand("compositionStart",{})},endComposition:()=>{this._commandService.executeCommand("compositionEnd",{})},cut:()=>{this._commandService.executeCommand("cut",{})}};let i=new O1(e.coordinatesConverter);return i.onKeyDown=s=>this._onKeyDown.fire(s),i.onKeyUp=s=>this._onKeyUp.fire(s),i.onContextMenu=s=>this._onContextMenu.fire(s),i.onMouseMove=s=>this._onMouseMove.fire(s),i.onMouseLeave=s=>this._onMouseLeave.fire(s),i.onMouseDown=s=>this._onMouseDown.fire(s),i.onMouseUp=s=>this._onMouseUp.fire(s),i.onMouseDrag=s=>this._onMouseDrag.fire(s),i.onMouseDrop=s=>this._onMouseDrop.fire(s),i.onMouseDropCanceled=s=>this._onMouseDropCanceled.fire(s),i.onMouseWheel=s=>this._onMouseWheel.fire(s),[new T3(this._domElement,this.getId(),t,this._configuration,this._themeService.getColorTheme(),e,i,this._overflowWidgetsDomNode,this._instantiationService,this._userInteractionService),!0]}_postDetachModelCleanup(e){e?.removeAllDecorationsWithOwnerId(this._id)}_detachModel(){if(this._contributionsDisposable?.dispose(),this._contributionsDisposable=void 0,!this._modelData)return null;let e=this._modelData.model,t=this._modelData.hasRealView?this._modelData.view.domNode.domNode:null;return this._modelData.dispose(),this._modelData=null,this._domElement.removeAttribute("data-mode-id"),t&&this._domElement.contains(t)&&t.remove(),this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._bannerDomNode.remove(),e}_removeDecorationType(e){this._codeEditorService.removeDecorationType(e)}hasModel(){return this._modelData!==null}showDropIndicatorAt(e){let t=[{range:new S(e.lineNumber,e.column,e.lineNumber,e.column),options:oy.dropIntoEditorDecorationOptions}];this._dropIntoEditorDecorations.set(t),this.revealPosition(e,1)}removeDropIndicator(){this._dropIntoEditorDecorations.clear()}_beginUpdate(){this._updateCounter++,this._updateCounter===1&&this._onBeginUpdate.fire()}_endUpdate(){this._updateCounter--,this._updateCounter===0&&this._onEndUpdate.fire()}};qh=oy=cBe([fg(3,ie),fg(4,ot),fg(5,Et),fg(6,Ce),fg(7,yt),fg(8,si),fg(9,Ri),fg(10,zt),fg(11,be),fg(12,ba)],qh);dBe=0,AJ=class{constructor(e,t,i,n,s,r){this.model=e,this.viewModel=t,this.view=i,this.hasRealView=n,this.listenersToRemove=s,this.attachedView=r}dispose(){Ct(this.listenersToRemove),this.model.onBeforeDetached(this.attachedView),this.hasRealView&&this.view.dispose(),this.viewModel.dispose()}},NW=class extends T{constructor(e){super(),this._emitterOptions=e,this._onDidChangeToTrue=this._register(new N(this._emitterOptions)),this.onDidChangeToTrue=this._onDidChangeToTrue.event,this._onDidChangeToFalse=this._register(new N(this._emitterOptions)),this.onDidChangeToFalse=this._onDidChangeToFalse.event,this._value=0}setValue(e){let t=e?2:1;this._value!==t&&(this._value=t,this._value===2?this._onDidChangeToTrue.fire():this._value===1&&this._onDidChangeToFalse.fire())}},zs=class extends N{constructor(e,t){super({deliveryQueue:t}),this._contributions=e}fire(e){this._contributions.onBeforeInteractionEvent(),super.fire(e)}},MJ=class extends T{constructor(e,t){super(),this._editor=e,t.createKey("editorId",e.getId()),this._editorSimpleInput=R.editorSimpleInput.bindTo(t),this._editorFocus=R.focus.bindTo(t),this._textInputFocus=R.textInputFocus.bindTo(t),this._editorTextFocus=R.editorTextFocus.bindTo(t),this._tabMovesFocus=R.tabMovesFocus.bindTo(t),this._editorReadonly=R.readOnly.bindTo(t),this._inDiffEditor=R.inDiffEditor.bindTo(t),this._editorColumnSelection=R.columnSelection.bindTo(t),this._hasMultipleSelections=R.hasMultipleSelections.bindTo(t),this._hasNonEmptySelection=R.hasNonEmptySelection.bindTo(t),this._canUndo=R.canUndo.bindTo(t),this._canRedo=R.canRedo.bindTo(t),this._register(this._editor.onDidChangeConfiguration(()=>this._updateFromConfig())),this._register(this._editor.onDidChangeCursorSelection(()=>this._updateFromSelection())),this._register(this._editor.onDidFocusEditorWidget(()=>this._updateFromFocus())),this._register(this._editor.onDidBlurEditorWidget(()=>this._updateFromFocus())),this._register(this._editor.onDidFocusEditorText(()=>this._updateFromFocus())),this._register(this._editor.onDidBlurEditorText(()=>this._updateFromFocus())),this._register(this._editor.onDidChangeModel(()=>this._updateFromModel())),this._register(this._editor.onDidChangeConfiguration(()=>this._updateFromModel())),this._register(Gm.onDidChangeTabFocus(i=>this._tabMovesFocus.set(i))),this._updateFromConfig(),this._updateFromSelection(),this._updateFromFocus(),this._updateFromModel(),this._editorSimpleInput.set(this._editor.isSimpleWidget)}_updateFromConfig(){let e=this._editor.getOptions();this._tabMovesFocus.set(e.get(164)||Gm.getTabFocusMode()),this._editorReadonly.set(e.get(104)),this._inDiffEditor.set(e.get(70)),this._editorColumnSelection.set(e.get(28))}_updateFromSelection(){let e=this._editor.getSelections();e?(this._hasMultipleSelections.set(e.length>1),this._hasNonEmptySelection.set(e.some(t=>!t.isEmpty()))):(this._hasMultipleSelections.reset(),this._hasNonEmptySelection.reset())}_updateFromFocus(){this._editorFocus.set(this._editor.hasWidgetFocus()&&!this._editor.isSimpleWidget),this._editorTextFocus.set(this._editor.hasTextFocus()&&!this._editor.isSimpleWidget),this._textInputFocus.set(this._editor.hasTextFocus())}_updateFromModel(){let e=this._editor.getModel();this._canUndo.set(!!(e&&e.canUndo())),this._canRedo.set(!!(e&&e.canRedo()))}},OJ=class extends T{constructor(e,t,i){super(),this._editor=e,this._contextKeyService=t,this._languageFeaturesService=i,this._langId=R.languageId.bindTo(t),this._hasCompletionItemProvider=R.hasCompletionItemProvider.bindTo(t),this._hasCodeActionsProvider=R.hasCodeActionsProvider.bindTo(t),this._hasCodeLensProvider=R.hasCodeLensProvider.bindTo(t),this._hasDefinitionProvider=R.hasDefinitionProvider.bindTo(t),this._hasDeclarationProvider=R.hasDeclarationProvider.bindTo(t),this._hasImplementationProvider=R.hasImplementationProvider.bindTo(t),this._hasTypeDefinitionProvider=R.hasTypeDefinitionProvider.bindTo(t),this._hasHoverProvider=R.hasHoverProvider.bindTo(t),this._hasDocumentHighlightProvider=R.hasDocumentHighlightProvider.bindTo(t),this._hasDocumentSymbolProvider=R.hasDocumentSymbolProvider.bindTo(t),this._hasReferenceProvider=R.hasReferenceProvider.bindTo(t),this._hasRenameProvider=R.hasRenameProvider.bindTo(t),this._hasSignatureHelpProvider=R.hasSignatureHelpProvider.bindTo(t),this._hasInlayHintsProvider=R.hasInlayHintsProvider.bindTo(t),this._hasDocumentFormattingProvider=R.hasDocumentFormattingProvider.bindTo(t),this._hasDocumentSelectionFormattingProvider=R.hasDocumentSelectionFormattingProvider.bindTo(t),this._hasMultipleDocumentFormattingProvider=R.hasMultipleDocumentFormattingProvider.bindTo(t),this._hasMultipleDocumentSelectionFormattingProvider=R.hasMultipleDocumentSelectionFormattingProvider.bindTo(t),this._isInEmbeddedEditor=R.isInEmbeddedEditor.bindTo(t);let n=()=>this._update();this._register(e.onDidChangeModel(n)),this._register(e.onDidChangeModelLanguage(n)),this._register(i.completionProvider.onDidChange(n)),this._register(i.codeActionProvider.onDidChange(n)),this._register(i.codeLensProvider.onDidChange(n)),this._register(i.definitionProvider.onDidChange(n)),this._register(i.declarationProvider.onDidChange(n)),this._register(i.implementationProvider.onDidChange(n)),this._register(i.typeDefinitionProvider.onDidChange(n)),this._register(i.hoverProvider.onDidChange(n)),this._register(i.documentHighlightProvider.onDidChange(n)),this._register(i.documentSymbolProvider.onDidChange(n)),this._register(i.referenceProvider.onDidChange(n)),this._register(i.renameProvider.onDidChange(n)),this._register(i.documentFormattingEditProvider.onDidChange(n)),this._register(i.documentRangeFormattingEditProvider.onDidChange(n)),this._register(i.signatureHelpProvider.onDidChange(n)),this._register(i.inlayHintsProvider.onDidChange(n)),n()}dispose(){super.dispose()}reset(){this._contextKeyService.bufferChangeEvents(()=>{this._langId.reset(),this._hasCompletionItemProvider.reset(),this._hasCodeActionsProvider.reset(),this._hasCodeLensProvider.reset(),this._hasDefinitionProvider.reset(),this._hasDeclarationProvider.reset(),this._hasImplementationProvider.reset(),this._hasTypeDefinitionProvider.reset(),this._hasHoverProvider.reset(),this._hasDocumentHighlightProvider.reset(),this._hasDocumentSymbolProvider.reset(),this._hasReferenceProvider.reset(),this._hasRenameProvider.reset(),this._hasDocumentFormattingProvider.reset(),this._hasDocumentSelectionFormattingProvider.reset(),this._hasSignatureHelpProvider.reset(),this._isInEmbeddedEditor.reset()})}_update(){let e=this._editor.getModel();if(!e){this.reset();return}this._contextKeyService.bufferChangeEvents(()=>{this._langId.set(e.getLanguageId()),this._hasCompletionItemProvider.set(this._languageFeaturesService.completionProvider.has(e)),this._hasCodeActionsProvider.set(this._languageFeaturesService.codeActionProvider.has(e)),this._hasCodeLensProvider.set(this._languageFeaturesService.codeLensProvider.has(e)),this._hasDefinitionProvider.set(this._languageFeaturesService.definitionProvider.has(e)),this._hasDeclarationProvider.set(this._languageFeaturesService.declarationProvider.has(e)),this._hasImplementationProvider.set(this._languageFeaturesService.implementationProvider.has(e)),this._hasTypeDefinitionProvider.set(this._languageFeaturesService.typeDefinitionProvider.has(e)),this._hasHoverProvider.set(this._languageFeaturesService.hoverProvider.has(e)),this._hasDocumentHighlightProvider.set(this._languageFeaturesService.documentHighlightProvider.has(e)),this._hasDocumentSymbolProvider.set(this._languageFeaturesService.documentSymbolProvider.has(e)),this._hasReferenceProvider.set(this._languageFeaturesService.referenceProvider.has(e)),this._hasRenameProvider.set(this._languageFeaturesService.renameProvider.has(e)),this._hasSignatureHelpProvider.set(this._languageFeaturesService.signatureHelpProvider.has(e)),this._hasInlayHintsProvider.set(this._languageFeaturesService.inlayHintsProvider.has(e)),this._hasDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.has(e)||this._languageFeaturesService.documentRangeFormattingEditProvider.has(e)),this._hasDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.has(e)),this._hasMultipleDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.all(e).length+this._languageFeaturesService.documentRangeFormattingEditProvider.all(e).length>1),this._hasMultipleDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.all(e).length>1),this._isInEmbeddedEditor.set(e.uri.scheme===Fe.walkThroughSnippet||e.uri.scheme===Fe.vscodeChatCodeBlock)})}},PJ=class{get length(){return this._decorationIds.length}constructor(e,t){this._editor=e,this._decorationIds=[],this._isChangingDecorations=!1,Array.isArray(t)&&t.length>0&&this.set(t)}onDidChange(e,t,i){return this._editor.onDidChangeModelDecorations(n=>{this._isChangingDecorations||e.call(t,n)},i)}getRange(e){return!this._editor.hasModel()||e>=this._decorationIds.length?null:this._editor.getModel().getDecorationRange(this._decorationIds[e])}getRanges(){if(!this._editor.hasModel())return[];let e=this._editor.getModel(),t=[];for(let i of this._decorationIds){let n=e.getDecorationRange(i);n&&t.push(n)}return t}has(e){return this._decorationIds.includes(e.id)}clear(){this._decorationIds.length!==0&&this.set([])}set(e){try{this._isChangingDecorations=!0,this._editor.changeDecorations(t=>{this._decorationIds=t.deltaDecorations(this._decorationIds,e)})}finally{this._isChangingDecorations=!1}return this._decorationIds}append(e){let t=[];try{this._isChangingDecorations=!0,this._editor.changeDecorations(i=>{t=i.deltaDecorations([],e),this._decorationIds=this._decorationIds.concat(t)})}finally{this._isChangingDecorations=!1}return t}},hBe=encodeURIComponent("");fBe=encodeURIComponent('');Ro((o,e)=>{let t=o.getColor(bC);t&&(e.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${x0(t)}") repeat-x bottom left; }`),e.addRule(`:root { --monaco-editor-error-decoration: url("data:image/svg+xml,${x0(t)}"); }`));let i=o.getColor(qc);i&&(e.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${x0(i)}") repeat-x bottom left; }`),e.addRule(`:root { --monaco-editor-warning-decoration: url("data:image/svg+xml,${x0(i)}"); }`));let n=o.getColor(Ol);n&&(e.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${x0(n)}") repeat-x bottom left; }`),e.addRule(`:root { --monaco-editor-info-decoration: url("data:image/svg+xml,${x0(n)}"); }`));let s=o.getColor(sbe);s&&(e.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${vxe(s)}") no-repeat bottom left; }`),e.addRule(`:root { --monaco-editor-hint-decoration: url("data:image/svg+xml,${vxe(s)}"); }`));let r=o.getColor(Nwe);r&&(e.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${r.rgba.a}; }`),e.addRule(`:root { --monaco-editor-unnecessary-decoration-opacity: ${r.rgba.a}; }`))})});var mBe,wxe,Jn,gg,Cxe,ol=x(()=>{Ie();W();oi();re();mBe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},wxe=function(o,e){return function(t,i){e(t,i,o)}},Jn=Ne("hoverService"),gg=class extends T{get delay(){return this.isInstantlyHovering()?0:this.hoverOptions?.dynamicDelay?e=>this.hoverOptions?.dynamicDelay?.(e)??this._delay:this._delay}constructor(e,t,i={},n,s){super(),this.placement=e,this.hoverOptions=t,this.overrideOptions=i,this.configurationService=n,this.hoverService=s,this.lastHoverHideTime=0,this.timeLimit=200,this.hoverDisposables=this._register(new F),this._delay=this.configurationService.getValue("workbench.hover.delay"),this._register(this.configurationService.onDidChangeConfiguration(r=>{r.affectsConfiguration("workbench.hover.delay")&&(this._delay=this.configurationService.getValue("workbench.hover.delay"))}))}showHover(e,t){let i=typeof this.overrideOptions=="function"?this.overrideOptions(e,t):this.overrideOptions;this.hoverDisposables.clear();let n=xt(e.target)?[e.target]:e.target.targetElements;for(let r of n)this.hoverDisposables.add(_i(r,"keydown",a=>{a.equals(9)&&this.hoverService.hideHover()}));let s=xt(e.content)?void 0:typeof e.content=="string"?e.content.toString():e.content.value;return this.hoverService.showInstantHover({...e,...i,persistence:{hideOnKeyDown:!0,...i.persistence},id:s,appearance:{...e.appearance,compact:!0,skipFadeInAnimation:this.isInstantlyHovering(),...i.appearance}},t)}isInstantlyHovering(){return!!this.hoverOptions?.instantHover&&Date.now()-this.lastHoverHideTime{Ie();sl=Ne("contextViewService"),eo=Ne("contextMenuService")});var yxe=x(()=>{});var Sxe=x(()=>{});function AW(o,e){return o&&e?m(7,"Inspect this in the accessible view with {0}.",e):o?m(8,"Inspect this in the accessible view via the command Open Accessible View which is currently not triggerable via keybinding."):""}var RW,Gb,k0,pD,_D,L0=x(()=>{re();wr();Gc();W();Sxe();le();RW=j,Gb=class extends T{constructor(e){super(),this.containerDomNode=document.createElement("div"),this.containerDomNode.className="monaco-hover",this.containerDomNode.classList.toggle("fade-in",!!e),this.containerDomNode.tabIndex=0,this.containerDomNode.setAttribute("role","tooltip"),this.contentsDomNode=document.createElement("div"),this.contentsDomNode.className="monaco-hover-content",this.scrollbar=this._register(new Fh(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this.scrollbar.getDomNode())}onContentsChanged(){this.scrollbar.scanDomNode()}},k0=class o extends T{static render(e,t,i){return new o(e,t,i)}constructor(e,t,i){super(),this.actionLabel=t.label,this.actionKeybindingLabel=i,this.actionContainer=X(e,RW("div.action-container")),this.actionContainer.setAttribute("tabindex","0"),this.action=X(this.actionContainer,RW("a.action")),this.action.setAttribute("role","button"),t.iconClass&&X(this.action,RW("span.icon")).classList.add(...t.iconClass.split(" ")),this.actionRenderedLabel=i?`${t.label} (${i})`:t.label;let n=X(this.action,RW("span"));n.textContent=this.actionRenderedLabel,this._store.add(new pD(this.actionContainer,t.run)),this._store.add(new _D(this.actionContainer,t.run,[3,10])),this.setEnabled(!0)}setEnabled(e){e?(this.actionContainer.classList.remove("disabled"),this.actionContainer.removeAttribute("aria-disabled")):(this.actionContainer.classList.add("disabled"),this.actionContainer.setAttribute("aria-disabled","true"))}};pD=class extends T{constructor(e,t){super(),this._register(B(e,ee.CLICK,i=>{i.stopPropagation(),i.preventDefault(),t(e)}))}},_D=class extends T{constructor(e,t,i){super(),this._register(B(e,ee.KEY_DOWN,n=>{let s=new Mt(n);i.some(r=>s.equals(r))&&(n.stopPropagation(),n.preventDefault(),t(e))}))}}});function xxe(o){let e=pBe(o);if(e&&e.length>0)return new Uint32Array(e)}function pBe(o){if(td=0,mg(o,FJ,4352),td>0||(mg(o,BJ,4449),td>0)||(mg(o,WJ,4520),td>0)||(mg(o,ry,12593),td))return Yb.subarray(0,td);if(o>=44032&&o<=55203){let e=o-44032,t=e%588,i=Math.floor(e/588),n=Math.floor(t/28),s=t%28-1;if(i=0&&(s0)return Yb.subarray(0,td)}}function mg(o,e,t){o>=t&&o>8&&(Yb[td++]=o>>8&255),o>>16&&(Yb[td++]=o>>16&255))}var td,Yb,FJ,BJ,WJ,ry,kxe=x(()=>{td=0,Yb=new Uint32Array(10);FJ=new Uint8Array([114,82,115,101,69,102,97,113,81,116,84,100,119,87,99,122,120,118,103]),BJ=new Uint16Array([107,111,105,79,106,112,117,80,104,27496,28520,27752,121,110,27246,28782,27758,98,109,27757,108]),WJ=new Uint16Array([114,82,29810,115,30579,26483,101,102,29286,24934,29030,29798,30822,30310,26470,97,113,29809,116,84,100,119,99,122,120,118,103]),ry=new Uint16Array([114,82,29810,115,30579,26483,101,69,102,29286,24934,29030,29798,30822,30310,26470,97,113,81,29809,116,84,100,119,87,99,122,120,118,103,107,111,105,79,106,112,117,80,104,27496,28520,27752,121,110,27246,28782,27758,98,109,27757,108])});function vBe(o){return CBe(o,"NFD",bBe)}function CBe(o,e,t){if(!o)return o;let i=t.get(o);if(i)return i;let n;return wBe.test(o)?n=o.normalize(e):n=o,t.set(o,n),n}var bBe,wBe,bD,Lxe=x(()=>{yo();new Zo(1e4);bBe=new Zo(1e4);wBe=/[^\u0000-\u0080]/;bD=(function(){let o=new Zo(1e4),e=/[\u0300-\u036f]/g;return function(t){let i=o.get(t);if(i)return i;let n=vBe(t).replace(e,""),s=(n.length===t.length?n:t).toLowerCase();return o.set(t,s),s}})()});function BW(...o){return function(e,t){for(let i=0,n=o.length;i0?[{start:0,end:e.length}]:[]:null}function yBe(o,e){if(o.length>e.length)return null;let t=e.toLowerCase().indexOf(o.toLowerCase());return t===-1?null:[{start:t,end:t+o.length}]}function Axe(o,e){if(o.length>e.length)return null;o=bD(o),e=bD(e);let t=e.indexOf(o);return t===-1?null:[{start:t,end:t+o.length}]}function qJ(o,e){return o.length>e.length?null:VJ(o.toLowerCase(),e.toLowerCase(),0,0)}function VJ(o,e,t,i){if(t===o.length)return[];if(i===e.length)return null;if(o[t]===e[i]){let n=null;return(n=VJ(o,e,t+1,i+1))?GJ({start:i,end:i+1},n):null}return VJ(o,e,t,i+1)}function jJ(o){return 97<=o&&o<=122}function WW(o){return 65<=o&&o<=90}function KJ(o){return 48<=o&&o<=57}function Mxe(o){return o===32||o===9||o===10||o===13}function FW(o){return Mxe(o)||Oxe.has(o)}function Ixe(o,e){return o===e||FW(o)&&FW(e)}function Exe(o){if(HJ.has(o))return HJ.get(o);let e,t=xxe(o);return t&&(e=t),HJ.set(o,e),e}function Pxe(o){return jJ(o)||WW(o)||KJ(o)}function GJ(o,e){return e.length===0?e=[o]:o.end===e[0].start?e[0].start=o.start:e.unshift(o),e}function Fxe(o,e){for(let t=e;t0&&!Pxe(o.charCodeAt(t-1)))return t}return o.length}function zJ(o,e,t,i){if(t===o.length)return[];if(i===e.length)return null;if(o[t]!==e[i].toLowerCase())return null;{let n=null,s=i+1;for(n=zJ(o,e,t+1,i+1);!n&&(s=Fxe(e,s)).6}function kBe(o){let{upperPercent:e,lowerPercent:t,alphaPercent:i,numericPercent:n}=o;return t>.2&&e<.8&&i>.6&&n<.2}function LBe(o){let e=0,t=0,i=0,n=0;for(let s=0;s60&&(e=e.substring(0,60));let t=SBe(e);if(!kBe(t)){if(!xBe(t))return null;e=e.toLowerCase()}let i=null,n=0;for(o=o.toLowerCase();n0&&FW(o.charCodeAt(t-1)))return t;return o.length}function YJ(o,e,t=!1){if(typeof o!="string"||typeof e!="string")return null;let i=Dxe.get(o);i||(i=new RegExp(yge(o),"i"),Dxe.set(o,i));let n=i.exec(e);return n?[{start:n.index,end:n.index+n[0].length}]:t?TBe(o,e):EBe(o,e)}function Vxe(o,e){let t=pg(o,o.toLowerCase(),0,e,e.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return t?Xb(t):null}function zxe(o,e,t,i,n,s){let r=Math.min(13,o.length);for(;t"u")return[];let e=[],t=o[1];for(let i=o.length-1;i>1;i--){let n=o[i]+t,s=e[e.length-1];s&&s.end===n?s.end=n+1:e.push({start:n,end:n+1})}return e}function ZJ(){let o=[],e=[];for(let t=0;t<=Zb;t++)e[t]=0;for(let t=0;t<=Zb;t++)o.push(e.slice(0));return o}function Uxe(o){let e=[];for(let t=0;t<=o;t++)e[t]=0;return e}function OW(o,e){if(e<0||e>=o.length)return!1;let t=o.codePointAt(e);switch(t){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:case 36:case 60:case 62:case 40:case 41:case 91:case 93:case 123:case 125:return!0;case void 0:return!1;default:return!!JI(t)}}function Nxe(o,e){if(e<0||e>=o.length)return!1;switch(o.charCodeAt(e)){case 32:case 9:return!0;default:return!1}}function PW(o,e,t){return e[o]!==t[o]}function DBe(o,e,t,i,n,s,r=!1){for(;eZb?Zb:o.length,l=i.length>Zb?Zb:i.length;if(t>=a||s>=l||a-t>l-s||!DBe(e,t,a,n,s,l,!0))return;NBe(a,l,t,s,e,n);let c=1,d=1,h=t,u=s,f=[!1];for(c=1,h=t;hv,D=E?ay[c][d-1]+(yp[c][d-1]>0?-5:0):0,O=u>v+1&&yp[c][d-1]>0,P=O?ay[c][d-2]+(yp[c][d-2]>0?-5:0):0;if(O&&(!E||P>=D)&&(!k||P>=I))ay[c][d]=P,MW[c][d]=3,yp[c][d]=0;else if(E&&(!k||D>=I))ay[c][d]=D,MW[c][d]=2,yp[c][d]=0;else if(k)ay[c][d]=I,MW[c][d]=1,yp[c][d]=yp[c-1][d-1]+1;else throw new Error("not possible")}}if(!f[0]&&!r.firstMatchCanBeWeak)return;c--,d--;let g=[ay[c][d],s],p=0,_=0;for(;c>=1;){let v=d;do{let w=MW[c][v];if(w===3)v=v-2;else if(w===2)v=v-1;else break}while(v>=1);p>1&&e[t+c-1]===n[s+d-1]&&!PW(v+s-1,i,n)&&p+1>yp[c][v]&&(v=d),v===d?p++:p=1,_||(_=v),c--,d=v-1,g.push(d)}l-s===a&&r.boostFullMatch&&(g[0]+=2);let b=_-a;return g[0]-=b,g}function NBe(o,e,t,i,n,s){let r=o-1,a=e-1;for(;r>=t&&a>=i;)n[r]===s[a]&&($J[r]=a,r--),a--}function RBe(o,e,t,i,n,s,r,a,l,c,d){if(e[t]!==s[r])return Number.MIN_SAFE_INTEGER;let h=1,u=!1;return r===t-i?h=o[t]===n[r]?7:5:PW(r,n,s)&&(r===0||!PW(r-1,n,s))?(h=o[t]===n[r]?7:5,u=!0):OW(s,r)&&(r===0||!OW(s,r-1))?h=5:(OW(s,r-1)||Nxe(s,r-1))&&(h=5,u=!0),h>1&&t===i&&(d[0]=!0),u||(u=PW(r,n,s)||OW(s,r-1)||Nxe(s,r-1)),t===i?r>l&&(h-=u?3:5):c?h+=u?2:0:h+=u?0:1,r+1===a&&(h-=u?3:5),h}function qxe(o,e,t,i,n,s,r){return ABe(o,e,t,i,n,s,!0,r)}function ABe(o,e,t,i,n,s,r,a){let l=pg(o,e,t,i,n,s,a);if(o.length>=3){let c=Math.min(7,o.length-1);for(let d=t+1;dl[0])&&(l=u))}}}return l}function MBe(o,e){if(e+1>=o.length)return;let t=o[e],i=o[e+1];if(t!==i)return o.slice(0,e)+i+t+o.slice(e+2)}var vD,Oxe,HJ,EBe,TBe,Dxe,Zb,$xe,$J,yp,ay,MW,Ha,ly,id=x(()=>{yo();kxe();Lxe();He();Rxe.bind(void 0,!1);vD=Rxe.bind(void 0,!0);Oxe=new Set;"()[]{}<>`'\"-/;:,.?!".split("").forEach(o=>Oxe.add(o.charCodeAt(0)));HJ=new Map;EBe=BW(vD,Bxe,yBe),TBe=BW(vD,Bxe,qJ),Dxe=new Zo(1e4);Zb=128;$xe=Uxe(2*Zb),$J=Uxe(2*Zb),yp=ZJ(),ay=ZJ(),MW=ZJ();(function(o){o.Default=[-100,0];function e(t){return!t||t.length===2&&t[0]===-100&&t[1]===0}o.isDefault=e})(Ha||(Ha={}));ly=class{static{this.default={boostFullMatch:!0,firstMatchCanBeWeak:!1}}constructor(e,t){this.firstMatchCanBeWeak=e,this.boostFullMatch=t}}});function jxe(o){return o.replace(PBe,(e,t)=>t?e:`\\${e}`)}function Kxe(o){return o.replace(FBe,e=>`\\${e}`)}function Qb(o){return o.indexOf(OBe)===-1?o:o.replace(BBe,(e,t,i,n)=>i?e:t||n||"")}function I0(o){return o?o.replace(/\$\((.*?)\)/g,(e,t)=>` ${t} `).trim():""}function Sp(o){XJ.lastIndex=0;let e="",t=[],i=0;for(;;){let n=XJ.lastIndex,s=XJ.exec(o),r=o.substring(n,s?.index);if(r.length>0){e+=r;for(let a=0;a{id();He();Li();OBe="$(",QJ=new RegExp(`\\$\\(${Ee.iconNameExpression}(?:${Ee.iconModifierExpression})?\\)`,"g"),PBe=new RegExp(`(\\\\)?${QJ.source}`,"g");FBe=new RegExp(`\\\\${QJ.source}`,"g");BBe=new RegExp(`(\\s)?(\\\\)?${QJ.source}(\\s)?`,"g");XJ=new RegExp(`\\$\\(${Ee.iconNameCharacter}+\\)`,"g")});function xp(o){return wa(o)?!o.value:Array.isArray(o)?o.every(xp):!0}function wa(o){return o instanceof Gn?!0:o&&typeof o=="object"?typeof o.value=="string"&&(typeof o.isTrusted=="boolean"||typeof o.isTrusted=="object"||o.isTrusted===void 0)&&(typeof o.supportThemeIcons=="boolean"||o.supportThemeIcons===void 0)&&(typeof o.supportAlertSyntax=="boolean"||o.supportAlertSyntax===void 0):!1}function Gxe(o,e){return o===e?!0:!o||!e?!1:o.value===e.value&&o.isTrusted===e.isTrusted&&o.supportThemeIcons===e.supportThemeIcons&&o.supportHtml===e.supportHtml&&o.supportAlertSyntax===e.supportAlertSyntax&&(o.baseUri===e.baseUri||!!o.baseUri&&!!e.baseUri&&Nl(Le.from(o.baseUri),Le.from(e.baseUri)))}function WBe(o){return o.replace(/[\\`*_{}[\]()#+!~]/g,"\\$&").replace(/^([ \t]*)-/gm,"$1\\-")}function HBe(o,e){let t=o.match(/^`+/gm)?.reduce((n,s)=>n.length>s.length?n:s).length??0,i=t>=3?t+1:3;return[`${"`".repeat(i)}${e}`,o,`${"`".repeat(i)}`].join(` +`)}function E0(o){return o.replace(/"/g,""")}function HW(o){return o&&o.replace(/\\([\\`*_{}[\]()#+\-.!~])/g,"$1")}function Yxe(o){let e=[],t=o.split("|").map(n=>n.trim());o=t[0];let i=t[1];if(i){let n=/height=(\d+)/.exec(i),s=/width=(\d+)/.exec(i),r=n?n[1]:"",a=s?s[1]:"",l=isFinite(parseInt(a)),c=isFinite(parseInt(r));l&&e.push(`width="${a}"`),c&&e.push(`height="${r}"`)}return{href:o,dimensions:e}}function VW(o,...e){return Le.from({scheme:Fe.command,path:o,query:e.length?encodeURIComponent(JSON.stringify(e)):void 0})}var Gn,Rr=x(()=>{Ae();_g();jo();Xo();He();ai();Gn=class{constructor(e="",t=!1){if(this.value=e,typeof this.value!="string")throw Xs("value");typeof t=="boolean"?(this.isTrusted=t,this.supportThemeIcons=!1,this.supportHtml=!1,this.supportAlertSyntax=!1):(this.isTrusted=t.isTrusted??void 0,this.supportThemeIcons=t.supportThemeIcons??!1,this.supportHtml=t.supportHtml??!1,this.supportAlertSyntax=t.supportAlertSyntax??!1)}appendText(e,t=0){return this.value+=WBe(this.supportThemeIcons?jxe(e):e).replace(/([ \t]+)/g,(i,n)=>" ".repeat(n.length)).replace(/\>/gm,"\\>").replace(/\n/g,t===1?`\\ +`:` + +`),this}appendMarkdown(e){return this.value+=e,this}appendCodeblock(e,t){return this.value+=` +${HBe(t,e)} +`,this}appendLink(e,t,i){return this.value+="[",this.value+=this._escape(t,"]"),this.value+="](",this.value+=this._escape(String(e),")"),i&&(this.value+=` "${this._escape(this._escape(i,'"'),")")}"`),this.value+=")",this}_escape(e,t){let i=new RegExp($o(t),"g");return e.replace(i,(n,s)=>e.charAt(s-1)!=="\\"?`\\${n}`:n)}}});var dy,wD,CD=x(()=>{dy=class{constructor(e){this._prefix=e,this._lastId=0}nextId(){return this._prefix+ ++this._lastId}},wD=new dy("id#")});function eee(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function t1e(o){uy=o}function Qd(o,e){if(e){if(i1e.test(o))return o.replace(VBe,Zxe)}else if(n1e.test(o))return o.replace(zBe,Zxe);return o}function Ao(o,e){let t=typeof o=="string"?o:o.source;e=e||"";let i={replace:(n,s)=>{let r=typeof s=="string"?s:s.source;return r=r.replace($Be,"$1"),t=t.replace(n,r),i},getRegex:()=>new RegExp(t,e)};return i}function Xxe(o){try{o=encodeURI(o).replace(/%25/g,"%")}catch{return null}return o}function Qxe(o,e){let t=o.replace(/\|/g,(s,r,a)=>{let l=!1,c=r;for(;--c>=0&&a[c]==="\\";)l=!l;return l?"|":" |"}),i=t.split(/ \|/),n=0;if(i[0].trim()||i.shift(),i.length>0&&!i[i.length-1].trim()&&i.pop(),e)if(i.length>e)i.splice(e);else for(;i.length{let s=n.match(/^\s+/);if(s===null)return n;let[r]=s;return r.length>=i.length?n.slice(i.length):n}).join(` +`)}function ko(o,e){return hy.parse(o,e)}var uy,i1e,VBe,n1e,zBe,UBe,Zxe,$Be,xD,D0,KBe,GBe,YBe,ID,ZBe,o1e,s1e,tee,XBe,iee,QBe,JBe,$W,nee,eWe,r1e,tWe,oee,e1e,iWe,nWe,a1e,oWe,l1e,sWe,ED,rWe,aWe,lWe,cWe,dWe,hWe,uWe,fWe,gWe,UW,mWe,c1e,d1e,pWe,see,_We,JJ,bWe,zW,SD,kp,Jb,kD,Lp,T0,LD,hy,h1e,N0,u1e=x(()=>{uy=eee();i1e=/[&<>"']/,VBe=new RegExp(i1e.source,"g"),n1e=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,zBe=new RegExp(n1e.source,"g"),UBe={"&":"&","<":"<",">":">",'"':""","'":"'"},Zxe=o=>UBe[o];$Be=/(^|[^\[])\^/g;xD={exec:()=>null};D0=class{options;rules;lexer;constructor(e){this.options=e||uy}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let i=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?i:yD(i,` +`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let i=t[0],n=jBe(i,t[3]||"");return{type:"code",raw:i,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let i=t[2].trim();if(/#$/.test(i)){let n=yD(i,"#");(this.options.pedantic||!n||/ $/.test(n))&&(i=n.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:yD(t[0],` +`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let i=yD(t[0],` +`).split(` +`),n="",s="",r=[];for(;i.length>0;){let a=!1,l=[],c;for(c=0;c/.test(i[c]))l.push(i[c]),a=!0;else if(!a)l.push(i[c]);else break;i=i.slice(c);let d=l.join(` +`),h=d.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,` + $1`).replace(/^ {0,3}>[ \t]?/gm,"");n=n?`${n} +${d}`:d,s=s?`${s} +${h}`:h;let u=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(h,r,!0),this.lexer.state.top=u,i.length===0)break;let f=r[r.length-1];if(f?.type==="code")break;if(f?.type==="blockquote"){let g=f,p=g.raw+` +`+i.join(` +`),_=this.blockquote(p);r[r.length-1]=_,n=n.substring(0,n.length-g.raw.length)+_.raw,s=s.substring(0,s.length-g.text.length)+_.text;break}else if(f?.type==="list"){let g=f,p=g.raw+` +`+i.join(` +`),_=this.list(p);r[r.length-1]=_,n=n.substring(0,n.length-f.raw.length)+_.raw,s=s.substring(0,s.length-g.raw.length)+_.raw,i=p.substring(r[r.length-1].raw.length).split(` +`);continue}}return{type:"blockquote",raw:n,tokens:r,text:s}}}list(e){let t=this.rules.block.list.exec(e);if(t){let i=t[1].trim(),n=i.length>1,s={type:"list",raw:"",ordered:n,start:n?+i.slice(0,-1):"",loose:!1,items:[]};i=n?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=n?i:"[*+-]");let r=new RegExp(`^( {0,3}${i})((?:[ ][^\\n]*)?(?:\\n|$))`),a=!1;for(;e;){let l=!1,c="",d="";if(!(t=r.exec(e))||this.rules.block.hr.test(e))break;c=t[0],e=e.substring(c.length);let h=t[2].split(` +`,1)[0].replace(/^\t+/,b=>" ".repeat(3*b.length)),u=e.split(` +`,1)[0],f=!h.trim(),g=0;if(this.options.pedantic?(g=2,d=h.trimStart()):f?g=t[1].length+1:(g=t[2].search(/[^ ]/),g=g>4?1:g,d=h.slice(g),g+=t[1].length),f&&/^ *$/.test(u)&&(c+=u+` +`,e=e.substring(u.length+1),l=!0),!l){let b=new RegExp(`^ {0,${Math.min(3,g-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),v=new RegExp(`^ {0,${Math.min(3,g-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),w=new RegExp(`^ {0,${Math.min(3,g-1)}}(?:\`\`\`|~~~)`),C=new RegExp(`^ {0,${Math.min(3,g-1)}}#`);for(;e;){let y=e.split(` +`,1)[0];if(u=y,this.options.pedantic&&(u=u.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),w.test(u)||C.test(u)||b.test(u)||v.test(e))break;if(u.search(/[^ ]/)>=g||!u.trim())d+=` +`+u.slice(g);else{if(f||h.search(/[^ ]/)>=4||w.test(h)||C.test(h)||v.test(h))break;d+=` +`+u}!f&&!u.trim()&&(f=!0),c+=y+` +`,e=e.substring(y.length+1),h=u.slice(g)}}s.loose||(a?s.loose=!0:/\n *\n *$/.test(c)&&(a=!0));let p=null,_;this.options.gfm&&(p=/^\[[ xX]\] /.exec(d),p&&(_=p[0]!=="[ ] ",d=d.replace(/^\[[ xX]\] +/,""))),s.items.push({type:"list_item",raw:c,task:!!p,checked:_,loose:!1,text:d,tokens:[]}),s.raw+=c}s.items[s.items.length-1].raw=s.items[s.items.length-1].raw.trimEnd(),s.items[s.items.length-1].text=s.items[s.items.length-1].text.trimEnd(),s.raw=s.raw.trimEnd();for(let l=0;lh.type==="space"),d=c.length>0&&c.some(h=>/\n.*\n/.test(h.raw));s.loose=d}if(s.loose)for(let l=0;l$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:i,raw:t[0],href:n,title:s}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!/[:|]/.test(t[2]))return;let i=Qxe(t[1]),n=t[2].replace(/^\||\| *$/g,"").split("|"),s=t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split(` +`):[],r={type:"table",raw:t[0],header:[],align:[],rows:[]};if(i.length===n.length){for(let a of n)/^ *-+: *$/.test(a)?r.align.push("right"):/^ *:-+: *$/.test(a)?r.align.push("center"):/^ *:-+ *$/.test(a)?r.align.push("left"):r.align.push(null);for(let a=0;a({text:l,tokens:this.lexer.inline(l),header:!1,align:r.align[c]})));return r}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let i=t[1].charAt(t[1].length-1)===` +`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:i,tokens:this.lexer.inline(i)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:Qd(t[1])}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^
/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let i=t[2].trim();if(!this.options.pedantic&&/^$/.test(i))return;let r=yD(i.slice(0,-1),"\\");if((i.length-r.length)%2===0)return}else{let r=qBe(t[2],"()");if(r>-1){let l=(t[0].indexOf("!")===0?5:4)+t[1].length+r;t[2]=t[2].substring(0,r),t[0]=t[0].substring(0,l).trim(),t[3]=""}}let n=t[2],s="";if(this.options.pedantic){let r=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);r&&(n=r[1],s=r[3])}else s=t[3]?t[3].slice(1,-1):"";return n=n.trim(),/^$/.test(i)?n=n.slice(1):n=n.slice(1,-1)),Jxe(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer)}}reflink(e,t){let i;if((i=this.rules.inline.reflink.exec(e))||(i=this.rules.inline.nolink.exec(e))){let n=(i[2]||i[1]).replace(/\s+/g," "),s=t[n.toLowerCase()];if(!s){let r=i[0].charAt(0);return{type:"text",raw:r,text:r}}return Jxe(i,s,i[0],this.lexer)}}emStrong(e,t,i=""){let n=this.rules.inline.emStrongLDelim.exec(e);if(!n||n[3]&&i.match(/[\p{L}\p{N}]/u))return;if(!(n[1]||n[2]||"")||!i||this.rules.inline.punctuation.exec(i)){let r=[...n[0]].length-1,a,l,c=r,d=0,h=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,t=t.slice(-1*e.length+r);(n=h.exec(t))!=null;){if(a=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!a)continue;if(l=[...a].length,n[3]||n[4]){c+=l;continue}else if((n[5]||n[6])&&r%3&&!((r+l)%3)){d+=l;continue}if(c-=l,c>0)continue;l=Math.min(l,l+c+d);let u=[...n[0]][0].length,f=e.slice(0,r+n.index+u+l);if(Math.min(r,l)%2){let p=f.slice(1,-1);return{type:"em",raw:f,text:p,tokens:this.lexer.inlineTokens(p)}}let g=f.slice(2,-2);return{type:"strong",raw:f,text:g,tokens:this.lexer.inlineTokens(g)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let i=t[2].replace(/\n/g," "),n=/[^ ]/.test(i),s=/^ /.test(i)&&/ $/.test(i);return n&&s&&(i=i.substring(1,i.length-1)),i=Qd(i,!0),{type:"codespan",raw:t[0],text:i}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){let t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let i,n;return t[2]==="@"?(i=Qd(t[1]),n="mailto:"+i):(i=Qd(t[1]),n=i),{type:"link",raw:t[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let i,n;if(t[2]==="@")i=Qd(t[0]),n="mailto:"+i;else{let s;do s=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(s!==t[0]);i=Qd(t[0]),t[1]==="www."?n="http://"+t[0]:n=t[0]}return{type:"link",raw:t[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let i;return this.lexer.state.inRawBlock?i=t[0]:i=Qd(t[0]),{type:"text",raw:t[0],text:i}}}},KBe=/^(?: *(?:\n|$))+/,GBe=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,YBe=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ID=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,ZBe=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,o1e=/(?:[*+-]|\d{1,9}[.)])/,s1e=Ao(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,o1e).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),tee=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,XBe=/^[^\n]+/,iee=/(?!\s*\])(?:\\.|[^\[\]\\])+/,QBe=Ao(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",iee).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),JBe=Ao(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,o1e).getRegex(),$W="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",nee=/|$))/,eWe=Ao("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",nee).replace("tag",$W).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),r1e=Ao(tee).replace("hr",ID).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",$W).getRegex(),tWe=Ao(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",r1e).getRegex(),oee={blockquote:tWe,code:GBe,def:QBe,fences:YBe,heading:ZBe,hr:ID,html:eWe,lheading:s1e,list:JBe,newline:KBe,paragraph:r1e,table:xD,text:XBe},e1e=Ao("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ID).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",$W).getRegex(),iWe={...oee,table:e1e,paragraph:Ao(tee).replace("hr",ID).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",e1e).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",$W).getRegex()},nWe={...oee,html:Ao(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",nee).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:xD,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Ao(tee).replace("hr",ID).replace("heading",` *#{1,6} *[^ +]`).replace("lheading",s1e).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},a1e=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,oWe=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,l1e=/^( {2,}|\\)\n(?!\s*$)/,sWe=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,lWe=Ao(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,ED).getRegex(),cWe=Ao("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,ED).getRegex(),dWe=Ao("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,ED).getRegex(),hWe=Ao(/\\([punct])/,"gu").replace(/punct/g,ED).getRegex(),uWe=Ao(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),fWe=Ao(nee).replace("(?:-->|$)","-->").getRegex(),gWe=Ao("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",fWe).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),UW=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,mWe=Ao(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",UW).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),c1e=Ao(/^!?\[(label)\]\[(ref)\]/).replace("label",UW).replace("ref",iee).getRegex(),d1e=Ao(/^!?\[(ref)\](?:\[\])?/).replace("ref",iee).getRegex(),pWe=Ao("reflink|nolink(?!\\()","g").replace("reflink",c1e).replace("nolink",d1e).getRegex(),see={_backpedal:xD,anyPunctuation:hWe,autolink:uWe,blockSkip:aWe,br:l1e,code:oWe,del:xD,emStrongLDelim:lWe,emStrongRDelimAst:cWe,emStrongRDelimUnd:dWe,escape:a1e,link:mWe,nolink:d1e,punctuation:rWe,reflink:c1e,reflinkSearch:pWe,tag:gWe,text:sWe,url:xD},_We={...see,link:Ao(/^!?\[(label)\]\((.*?)\)/).replace("label",UW).getRegex(),reflink:Ao(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",UW).getRegex()},JJ={...see,escape:Ao(a1e).replace("])","~|])").getRegex(),url:Ao(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\l+" ".repeat(c.length));let n,s,r;for(;e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(a=>(n=a.call({lexer:this},e,t))?(e=e.substring(n.raw.length),t.push(n),!0):!1))){if(n=this.tokenizer.space(e)){e=e.substring(n.raw.length),n.raw.length===1&&t.length>0?t[t.length-1].raw+=` +`:t.push(n);continue}if(n=this.tokenizer.code(e)){e=e.substring(n.raw.length),s=t[t.length-1],s&&(s.type==="paragraph"||s.type==="text")?(s.raw+=` +`+n.raw,s.text+=` +`+n.text,this.inlineQueue[this.inlineQueue.length-1].src=s.text):t.push(n);continue}if(n=this.tokenizer.fences(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.heading(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.hr(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.blockquote(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.list(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.html(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.def(e)){e=e.substring(n.raw.length),s=t[t.length-1],s&&(s.type==="paragraph"||s.type==="text")?(s.raw+=` +`+n.raw,s.text+=` +`+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=s.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title});continue}if(n=this.tokenizer.table(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.lheading(e)){e=e.substring(n.raw.length),t.push(n);continue}if(r=e,this.options.extensions&&this.options.extensions.startBlock){let a=1/0,l=e.slice(1),c;this.options.extensions.startBlock.forEach(d=>{c=d.call({lexer:this},l),typeof c=="number"&&c>=0&&(a=Math.min(a,c))}),a<1/0&&a>=0&&(r=e.substring(0,a+1))}if(this.state.top&&(n=this.tokenizer.paragraph(r))){s=t[t.length-1],i&&s?.type==="paragraph"?(s.raw+=` +`+n.raw,s.text+=` +`+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=s.text):t.push(n),i=r.length!==e.length,e=e.substring(n.raw.length);continue}if(n=this.tokenizer.text(e)){e=e.substring(n.raw.length),s=t[t.length-1],s&&s.type==="text"?(s.raw+=` +`+n.raw,s.text+=` +`+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=s.text):t.push(n);continue}if(e){let a="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let i,n,s,r=e,a,l,c;if(this.tokens.links){let d=Object.keys(this.tokens.links);if(d.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)d.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.blockSkip.exec(r))!=null;)r=r.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(r))!=null;)r=r.slice(0,a.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(l||(c=""),l=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(d=>(i=d.call({lexer:this},e,t))?(e=e.substring(i.raw.length),t.push(i),!0):!1))){if(i=this.tokenizer.escape(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.tag(e)){e=e.substring(i.raw.length),n=t[t.length-1],n&&i.type==="text"&&n.type==="text"?(n.raw+=i.raw,n.text+=i.text):t.push(i);continue}if(i=this.tokenizer.link(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(i.raw.length),n=t[t.length-1],n&&i.type==="text"&&n.type==="text"?(n.raw+=i.raw,n.text+=i.text):t.push(i);continue}if(i=this.tokenizer.emStrong(e,r,c)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.codespan(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.br(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.del(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.autolink(e)){e=e.substring(i.raw.length),t.push(i);continue}if(!this.state.inLink&&(i=this.tokenizer.url(e))){e=e.substring(i.raw.length),t.push(i);continue}if(s=e,this.options.extensions&&this.options.extensions.startInline){let d=1/0,h=e.slice(1),u;this.options.extensions.startInline.forEach(f=>{u=f.call({lexer:this},h),typeof u=="number"&&u>=0&&(d=Math.min(d,u))}),d<1/0&&d>=0&&(s=e.substring(0,d+1))}if(i=this.tokenizer.inlineText(s)){e=e.substring(i.raw.length),i.raw.slice(-1)!=="_"&&(c=i.raw.slice(-1)),l=!0,n=t[t.length-1],n&&n.type==="text"?(n.raw+=i.raw,n.text+=i.text):t.push(i);continue}if(e){let d="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(d);break}else throw new Error(d)}}return t}},Jb=class{options;parser;constructor(e){this.options=e||uy}space(e){return""}code({text:e,lang:t,escaped:i}){let n=(t||"").match(/^\S*/)?.[0],s=e.replace(/\n$/,"")+` +`;return n?'
'+(i?s:Qd(s,!0))+`
+`:"
"+(i?s:Qd(s,!0))+`
+`}blockquote({tokens:e}){return`
+${this.parser.parse(e)}
+`}html({text:e}){return e}heading({tokens:e,depth:t}){return`${this.parser.parseInline(e)} +`}hr(e){return`
+`}list(e){let t=e.ordered,i=e.start,n="";for(let a=0;a +`+n+" +`}listitem(e){let t="";if(e.task){let i=this.checkbox({checked:!!e.checked});e.loose?e.tokens.length>0&&e.tokens[0].type==="paragraph"?(e.tokens[0].text=i+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=i+" "+e.tokens[0].tokens[0].text)):e.tokens.unshift({type:"text",raw:i+" ",text:i+" "}):t+=i+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`
  • ${t}
  • +`}checkbox({checked:e}){return"'}paragraph({tokens:e}){return`

    ${this.parser.parseInline(e)}

    +`}table(e){let t="",i="";for(let s=0;s${n}`),` + +`+t+` +`+n+`
    +`}tablerow({text:e}){return` +${e} +`}tablecell(e){let t=this.parser.parseInline(e.tokens),i=e.header?"th":"td";return(e.align?`<${i} align="${e.align}">`:`<${i}>`)+t+` +`}strong({tokens:e}){return`${this.parser.parseInline(e)}`}em({tokens:e}){return`${this.parser.parseInline(e)}`}codespan({text:e}){return`${e}`}br(e){return"
    "}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:t,tokens:i}){let n=this.parser.parseInline(i),s=Xxe(e);if(s===null)return n;e=s;let r='
    ",r}image({href:e,title:t,text:i}){let n=Xxe(e);if(n===null)return i;e=n;let s=`${i}{let a=s[r].flat(1/0);i=i.concat(this.walkTokens(a,t))}):s.tokens&&(i=i.concat(this.walkTokens(s.tokens,t)))}}return i}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(i=>{let n={...i};if(n.async=this.defaults.async||n.async||!1,i.extensions&&(i.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){let r=t.renderers[s.name];r?t.renderers[s.name]=function(...a){let l=s.renderer.apply(this,a);return l===!1&&(l=r.apply(this,a)),l}:t.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let r=t[s.level];r?r.unshift(s.tokenizer):t[s.level]=[s.tokenizer],s.start&&(s.level==="block"?t.startBlock?t.startBlock.push(s.start):t.startBlock=[s.start]:s.level==="inline"&&(t.startInline?t.startInline.push(s.start):t.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(t.childTokens[s.name]=s.childTokens)}),n.extensions=t),i.renderer){let s=this.defaults.renderer||new Jb(this.defaults);for(let r in i.renderer){if(!(r in s))throw new Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;let a=r,l=i.renderer[a],c=s[a];s[a]=(...d)=>{let h=l.apply(s,d);return h===!1&&(h=c.apply(s,d)),h||""}}n.renderer=s}if(i.tokenizer){let s=this.defaults.tokenizer||new D0(this.defaults);for(let r in i.tokenizer){if(!(r in s))throw new Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;let a=r,l=i.tokenizer[a],c=s[a];s[a]=(...d)=>{let h=l.apply(s,d);return h===!1&&(h=c.apply(s,d)),h}}n.tokenizer=s}if(i.hooks){let s=this.defaults.hooks||new T0;for(let r in i.hooks){if(!(r in s))throw new Error(`hook '${r}' does not exist`);if(r==="options")continue;let a=r,l=i.hooks[a],c=s[a];T0.passThroughHooks.has(r)?s[a]=d=>{if(this.defaults.async)return Promise.resolve(l.call(s,d)).then(u=>c.call(s,u));let h=l.call(s,d);return c.call(s,h)}:s[a]=(...d)=>{let h=l.apply(s,d);return h===!1&&(h=c.apply(s,d)),h}}n.hooks=s}if(i.walkTokens){let s=this.defaults.walkTokens,r=i.walkTokens;n.walkTokens=function(a){let l=[];return l.push(r.call(this,a)),s&&(l=l.concat(s.call(this,a))),l}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return kp.lex(e,t??this.defaults)}parser(e,t){return Lp.parse(e,t??this.defaults)}parseMarkdown(e,t){return(n,s)=>{let r={...s},a={...this.defaults,...r},l=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&r.async===!1)return l(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof n>"u"||n===null)return l(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(a.hooks&&(a.hooks.options=a),a.async)return Promise.resolve(a.hooks?a.hooks.preprocess(n):n).then(c=>e(c,a)).then(c=>a.hooks?a.hooks.processAllTokens(c):c).then(c=>a.walkTokens?Promise.all(this.walkTokens(c,a.walkTokens)).then(()=>c):c).then(c=>t(c,a)).then(c=>a.hooks?a.hooks.postprocess(c):c).catch(l);try{a.hooks&&(n=a.hooks.preprocess(n));let c=e(n,a);a.hooks&&(c=a.hooks.processAllTokens(c)),a.walkTokens&&this.walkTokens(c,a.walkTokens);let d=t(c,a);return a.hooks&&(d=a.hooks.postprocess(d)),d}catch(c){return l(c)}}}onError(e,t){return i=>{if(i.message+=` +Please report this to https://github.com/markedjs/marked.`,e){let n="

    An error occurred:

    "+Qd(i.message+"",!0)+"
    ";return t?Promise.resolve(n):n}if(t)return Promise.reject(i);throw i}}},hy=new LD;ko.options=ko.setOptions=function(o){return hy.setOptions(o),ko.defaults=hy.defaults,t1e(ko.defaults),ko};ko.getDefaults=eee;ko.defaults=uy;ko.use=function(...o){return hy.use(...o),ko.defaults=hy.defaults,t1e(ko.defaults),ko};ko.walkTokens=function(o,e){return hy.walkTokens(o,e)};ko.parseInline=hy.parseInline;ko.Parser=Lp;ko.parser=Lp.parse;ko.Renderer=Jb;ko.TextRenderer=kD;ko.Lexer=kp;ko.lexer=kp.lex;ko.Tokenizer=D0;ko.Hooks=T0;ko.parse=ko;ko.options;ko.setOptions;ko.use;ko.walkTokens;ko.parseInline;h1e=ko;Lp.parse;N0=kp.lex});function f1e(o){return JSON.stringify(o,vWe)}function TD(o){let e=JSON.parse(o);return e=ree(e),e}function vWe(o,e){return e instanceof RegExp?{$mid:2,source:e.source,flags:e.flags}:e}function ree(o,e=0){if(!o||e>200)return o;if(typeof o=="object"){switch(o.$mid){case 1:return Le.revive(o);case 2:return new RegExp(o.source,o.flags);case 17:return new Date(o.source)}if(o instanceof Lh||o instanceof Uint8Array)return o;if(Array.isArray(o))for(let t=0;t{O_();ai()});function g1e(o,e){(e==null||e>o.length)&&(e=o.length);for(var t=0,i=Array(e);t1?t-1:0),n=1;n2&&arguments[2]!==void 0?arguments[2]:ND;if(m1e&&m1e(o,null),!yc(e))return o;let i=e.length;for(;i--;){let n=e[i];if(typeof n=="string"){let s=t(n);s!==n&&(kWe(e)||(e[i]=s),n=s)}o[n]=!0}return o}function MWe(o){for(let e=0;e0&&arguments[0]!==void 0?arguments[0]:GWe(),e=Ft=>T1e(Ft);if(e.version="3.4.8",e.removed=[],!o||!o.document||o.document.nodeType!==bg.document||!o.Element)return e.isSupported=!1,e;let t=o.document,i=t,n=i.currentScript;o.DocumentFragment;let s=o.HTMLTemplateElement,r=o.Node,a=o.Element,l=o.NodeFilter,c=o.NamedNodeMap;c===void 0&&(o.NamedNodeMap||o.MozNamedAttrMap),o.HTMLFormElement;let d=o.DOMParser,h=o.trustedTypes,u=a.prototype,f=vg(u,"cloneNode"),g=vg(u,"remove"),p=vg(u,"nextSibling"),_=vg(u,"childNodes"),b=vg(u,"parentNode"),v=vg(u,"shadowRoot"),w=vg(u,"attributes"),C=r&&r.prototype?vg(r.prototype,"nodeType"):null,y=r&&r.prototype?vg(r.prototype,"nodeName"):null;if(typeof s=="function"){let Ft=t.createElement("template");Ft.content&&Ft.content.ownerDocument&&(t=Ft.content.ownerDocument)}let k,I="",E=0,D=function(q){if(E>0)throw M0('The configured TRUSTED_TYPES_POLICY.createHTML must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose createHTML wraps DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.');E++;try{return k.createHTML(q)}finally{E--}},O=t,P=O.implementation,H=O.createNodeIterator,z=O.createDocumentFragment,Y=O.getElementsByTagName,Z=i.importNode,te=L1e();e.isSupported=typeof I1e=="function"&&typeof b=="function"&&P&&P.createHTMLDocument!==void 0;let se=WWe,he=HWe,ce=VWe,Be=zWe,Ge=UWe,tt=$We,Nt=qWe,mt=KWe,Pt=k1e,ct=null,Fn=ji({},[...C1e,...lee,...cee,...dee,...y1e]),di=null,ia=ji({},[...S1e,...hee,...x1e,...jW]),Co=Object.seal(O0(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),um=null,qS=null,g_=Object.seal(O0(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),ife=!0,Tq=!0,nfe=!1,ofe=!0,m_=!1,SI=!0,dw=!1,Dq=!1,Nq=!1,jS=!1,gM=!1,mM=!1,sfe=!0,rfe=!1,afe="user-content-",Rq=!0,xI=!1,KS={},gf=null,Aq=ji({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),lfe=null,cfe=ji({},["audio","video","img","source","image","track"]),Mq=null,dfe=ji({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),pM="http://www.w3.org/1998/Math/MathML",_M="http://www.w3.org/2000/svg",mf="http://www.w3.org/1999/xhtml",GS=mf,Oq=!1,Pq=null,COe=ji({},[pM,_M,mf],aee),Fq=ji({},["mi","mo","mn","ms","mtext"]),Bq=ji({},["annotation-xml"]),yOe=ji({},["title","style","font","a","script"]),kI=null,SOe=["application/xhtml+xml","text/html"],xOe="text/html",gr=null,YS=null,kOe=t.createElement("form"),hfe=function(q){return q instanceof RegExp||q instanceof Function},Wq=function(){let q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(YS&&YS===q)return;(!q||typeof q!="object")&&(q={}),q=zl(q),kI=SOe.indexOf(q.PARSER_MEDIA_TYPE)===-1?xOe:q.PARSER_MEDIA_TYPE,gr=kI==="application/xhtml+xml"?aee:ND,ct=rr(q,"ALLOWED_TAGS")&&yc(q.ALLOWED_TAGS)?ji({},q.ALLOWED_TAGS,gr):Fn,di=rr(q,"ALLOWED_ATTR")&&yc(q.ALLOWED_ATTR)?ji({},q.ALLOWED_ATTR,gr):ia,Pq=rr(q,"ALLOWED_NAMESPACES")&&yc(q.ALLOWED_NAMESPACES)?ji({},q.ALLOWED_NAMESPACES,aee):COe,Mq=rr(q,"ADD_URI_SAFE_ATTR")&&yc(q.ADD_URI_SAFE_ATTR)?ji(zl(dfe),q.ADD_URI_SAFE_ATTR,gr):dfe,lfe=rr(q,"ADD_DATA_URI_TAGS")&&yc(q.ADD_DATA_URI_TAGS)?ji(zl(cfe),q.ADD_DATA_URI_TAGS,gr):cfe,gf=rr(q,"FORBID_CONTENTS")&&yc(q.FORBID_CONTENTS)?ji({},q.FORBID_CONTENTS,gr):Aq,um=rr(q,"FORBID_TAGS")&&yc(q.FORBID_TAGS)?ji({},q.FORBID_TAGS,gr):zl({}),qS=rr(q,"FORBID_ATTR")&&yc(q.FORBID_ATTR)?ji({},q.FORBID_ATTR,gr):zl({}),KS=rr(q,"USE_PROFILES")?q.USE_PROFILES&&typeof q.USE_PROFILES=="object"?zl(q.USE_PROFILES):q.USE_PROFILES:!1,ife=q.ALLOW_ARIA_ATTR!==!1,Tq=q.ALLOW_DATA_ATTR!==!1,nfe=q.ALLOW_UNKNOWN_PROTOCOLS||!1,ofe=q.ALLOW_SELF_CLOSE_IN_ATTR!==!1,m_=q.SAFE_FOR_TEMPLATES||!1,SI=q.SAFE_FOR_XML!==!1,dw=q.WHOLE_DOCUMENT||!1,jS=q.RETURN_DOM||!1,gM=q.RETURN_DOM_FRAGMENT||!1,mM=q.RETURN_TRUSTED_TYPE||!1,Nq=q.FORCE_BODY||!1,sfe=q.SANITIZE_DOM!==!1,rfe=q.SANITIZE_NAMED_PROPS||!1,Rq=q.KEEP_CONTENT!==!1,xI=q.IN_PLACE||!1,Pt=PWe(q.ALLOWED_URI_REGEXP)?q.ALLOWED_URI_REGEXP:k1e,GS=typeof q.NAMESPACE=="string"?q.NAMESPACE:mf,Fq=rr(q,"MATHML_TEXT_INTEGRATION_POINTS")&&q.MATHML_TEXT_INTEGRATION_POINTS&&typeof q.MATHML_TEXT_INTEGRATION_POINTS=="object"?zl(q.MATHML_TEXT_INTEGRATION_POINTS):ji({},["mi","mo","mn","ms","mtext"]),Bq=rr(q,"HTML_INTEGRATION_POINTS")&&q.HTML_INTEGRATION_POINTS&&typeof q.HTML_INTEGRATION_POINTS=="object"?zl(q.HTML_INTEGRATION_POINTS):ji({},["annotation-xml"]);let Oe=rr(q,"CUSTOM_ELEMENT_HANDLING")&&q.CUSTOM_ELEMENT_HANDLING&&typeof q.CUSTOM_ELEMENT_HANDLING=="object"?zl(q.CUSTOM_ELEMENT_HANDLING):O0(null);if(Co=O0(null),rr(Oe,"tagNameCheck")&&hfe(Oe.tagNameCheck)&&(Co.tagNameCheck=Oe.tagNameCheck),rr(Oe,"attributeNameCheck")&&hfe(Oe.attributeNameCheck)&&(Co.attributeNameCheck=Oe.attributeNameCheck),rr(Oe,"allowCustomizedBuiltInElements")&&typeof Oe.allowCustomizedBuiltInElements=="boolean"&&(Co.allowCustomizedBuiltInElements=Oe.allowCustomizedBuiltInElements),m_&&(Tq=!1),gM&&(jS=!0),KS&&(ct=ji({},y1e),di=O0(null),KS.html===!0&&(ji(ct,C1e),ji(di,S1e)),KS.svg===!0&&(ji(ct,lee),ji(di,hee),ji(di,jW)),KS.svgFilters===!0&&(ji(ct,cee),ji(di,hee),ji(di,jW)),KS.mathMl===!0&&(ji(ct,dee),ji(di,x1e),ji(di,jW))),g_.tagCheck=null,g_.attributeCheck=null,rr(q,"ADD_TAGS")&&(typeof q.ADD_TAGS=="function"?g_.tagCheck=q.ADD_TAGS:yc(q.ADD_TAGS)&&(ct===Fn&&(ct=zl(ct)),ji(ct,q.ADD_TAGS,gr))),rr(q,"ADD_ATTR")&&(typeof q.ADD_ATTR=="function"?g_.attributeCheck=q.ADD_ATTR:yc(q.ADD_ATTR)&&(di===ia&&(di=zl(di)),ji(di,q.ADD_ATTR,gr))),rr(q,"ADD_URI_SAFE_ATTR")&&yc(q.ADD_URI_SAFE_ATTR)&&ji(Mq,q.ADD_URI_SAFE_ATTR,gr),rr(q,"FORBID_CONTENTS")&&yc(q.FORBID_CONTENTS)&&(gf===Aq&&(gf=zl(gf)),ji(gf,q.FORBID_CONTENTS,gr)),rr(q,"ADD_FORBID_CONTENTS")&&yc(q.ADD_FORBID_CONTENTS)&&(gf===Aq&&(gf=zl(gf)),ji(gf,q.ADD_FORBID_CONTENTS,gr)),Rq&&(ct["#text"]=!0),dw&&ji(ct,["html","head","body"]),ct.table&&(ji(ct,["tbody"]),delete um.tbody),q.TRUSTED_TYPES_POLICY){if(typeof q.TRUSTED_TYPES_POLICY.createHTML!="function")throw M0('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof q.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw M0('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let gt=k;k=q.TRUSTED_TYPES_POLICY;try{I=D("")}catch(io){throw k=gt,io}}else k===void 0&&q.TRUSTED_TYPES_POLICY!==null&&(k=YWe(h,n)),k&&typeof I=="string"&&(I=D(""));(te.uponSanitizeElement.length>0||te.uponSanitizeAttribute.length>0)&&ct===Fn&&(ct=zl(ct)),te.uponSanitizeAttribute.length>0&&di===ia&&(di=zl(di)),Sc&&Sc(q),YS=q},ufe=ji({},[...lee,...cee,...FWe]),ffe=ji({},[...dee,...BWe]),LOe=function(q){let Oe=b(q);(!Oe||!Oe.tagName)&&(Oe={namespaceURI:GS,tagName:"template"});let gt=ND(q.tagName),io=ND(Oe.tagName);return Pq[q.namespaceURI]?q.namespaceURI===_M?Oe.namespaceURI===mf?gt==="svg":Oe.namespaceURI===pM?gt==="svg"&&(io==="annotation-xml"||Fq[io]):!!ufe[gt]:q.namespaceURI===pM?Oe.namespaceURI===mf?gt==="math":Oe.namespaceURI===_M?gt==="math"&&Bq[io]:!!ffe[gt]:q.namespaceURI===mf?Oe.namespaceURI===_M&&!Bq[io]||Oe.namespaceURI===pM&&!Fq[io]?!1:!ffe[gt]&&(yOe[gt]||!ufe[gt]):!!(kI==="application/xhtml+xml"&&Pq[q.namespaceURI]):!1},uu=function(q){R0(e.removed,{element:q});try{b(q).removeChild(q)}catch{g(q)}},hw=function(q,Oe){try{R0(e.removed,{attribute:Oe.getAttributeNode(q),from:Oe})}catch{R0(e.removed,{attribute:null,from:Oe})}if(Oe.removeAttribute(q),q==="is")if(jS||gM)try{uu(Oe)}catch{}else try{Oe.setAttribute(q,"")}catch{}},gfe=function(q){let Oe=null,gt=null;if(Nq)q=""+q;else{let Oo=_1e(q,/^[\r\n\t ]+/);gt=Oo&&Oo[0]}kI==="application/xhtml+xml"&&GS===mf&&(q=''+q+"");let io=k?D(q):q;if(GS===mf)try{Oe=new d().parseFromString(io,kI)}catch{}if(!Oe||!Oe.documentElement){Oe=P.createDocument(GS,"template",null);try{Oe.documentElement.innerHTML=Oq?I:io}catch{}}let on=Oe.body||Oe.documentElement;return q&>&&on.insertBefore(t.createTextNode(gt),on.childNodes[0]||null),GS===mf?Y.call(Oe,dw?"html":"body")[0]:dw?Oe.documentElement:on},mfe=function(q){return H.call(q.ownerDocument||q,q,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},Hq=function(q){var Oe,gt;q.normalize();let io=H.call(q.ownerDocument||q,q,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null),on=io.nextNode();for(;on;){let na=on.data;fy([se,he,ce],mh=>{na=A0(na,mh," ")}),on.data=na,on=io.nextNode()}let Oo=(Oe=(gt=q.querySelectorAll)===null||gt===void 0?void 0:gt.call(q,"template"))!==null&&Oe!==void 0?Oe:[];fy(Array.from(Oo),na=>{ZS(na.content)&&Hq(na.content)})},bM=function(q){let Oe=y?y(q):null;return typeof Oe!="string"||gr(Oe)!=="form"?!1:typeof q.nodeName!="string"||typeof q.textContent!="string"||typeof q.removeChild!="function"||q.attributes!==w(q)||typeof q.removeAttribute!="function"||typeof q.setAttribute!="function"||typeof q.namespaceURI!="string"||typeof q.insertBefore!="function"||typeof q.hasChildNodes!="function"||q.nodeType!==C(q)||q.childNodes!==_(q)},ZS=function(q){if(!C||typeof q!="object"||q===null)return!1;try{return C(q)===bg.documentFragment}catch{return!1}},vM=function(q){if(!C||typeof q!="object"||q===null)return!1;try{return typeof C(q)=="number"}catch{return!1}};function fm(Ft,q,Oe){fy(Ft,gt=>{gt.call(e,q,Oe,YS)})}let pfe=function(q){let Oe=null;if(fm(te.beforeSanitizeElements,q,null),bM(q))return uu(q),!0;let gt=gr(y?y(q):q.nodeName);if(fm(te.uponSanitizeElement,q,{tagName:gt,allowedTags:ct}),SI&&q.hasChildNodes()&&!vM(q.firstElementChild)&&rl(/<[/\w!]/g,q.innerHTML)&&rl(/<[/\w!]/g,q.textContent)||SI&&q.namespaceURI===mf&>==="style"&&vM(q.firstElementChild)||q.nodeType===bg.progressingInstruction||SI&&q.nodeType===bg.comment&&rl(/<[/\w]/g,q.data))return uu(q),!0;if(um[gt]||!(g_.tagCheck instanceof Function&&g_.tagCheck(gt))&&!ct[gt]){if(!um[gt]&&bfe(gt)&&(Co.tagNameCheck instanceof RegExp&&rl(Co.tagNameCheck,gt)||Co.tagNameCheck instanceof Function&&Co.tagNameCheck(gt)))return!1;if(Rq&&!gf[gt]){let on=b(q),Oo=_(q);if(Oo&&on){let na=Oo.length;for(let mh=na-1;mh>=0;--mh){let fu=f(Oo[mh],!0);on.insertBefore(fu,p(q))}}}return uu(q),!0}return(C?C(q):q.nodeType)===bg.element&&!LOe(q)||(gt==="noscript"||gt==="noembed"||gt==="noframes")&&rl(/<\/no(script|embed|frames)/i,q.innerHTML)?(uu(q),!0):(m_&&q.nodeType===bg.text&&(Oe=q.textContent,fy([se,he,ce],on=>{Oe=A0(Oe,on," ")}),q.textContent!==Oe&&(R0(e.removed,{element:q.cloneNode()}),q.textContent=Oe)),fm(te.afterSanitizeElements,q,null),!1)},_fe=function(q,Oe,gt){if(qS[Oe]||sfe&&(Oe==="id"||Oe==="name")&&(gt in t||gt in kOe))return!1;let io=di[Oe]||g_.attributeCheck instanceof Function&&g_.attributeCheck(Oe,q);if(!(Tq&&!qS[Oe]&&rl(Be,Oe))){if(!(ife&&rl(Ge,Oe))){if(!io||qS[Oe]){if(!(bfe(q)&&(Co.tagNameCheck instanceof RegExp&&rl(Co.tagNameCheck,q)||Co.tagNameCheck instanceof Function&&Co.tagNameCheck(q))&&(Co.attributeNameCheck instanceof RegExp&&rl(Co.attributeNameCheck,Oe)||Co.attributeNameCheck instanceof Function&&Co.attributeNameCheck(Oe,q))||Oe==="is"&&Co.allowCustomizedBuiltInElements&&(Co.tagNameCheck instanceof RegExp&&rl(Co.tagNameCheck,gt)||Co.tagNameCheck instanceof Function&&Co.tagNameCheck(gt))))return!1}else if(!Mq[Oe]){if(!rl(Pt,A0(gt,Nt,""))){if(!((Oe==="src"||Oe==="xlink:href"||Oe==="href")&&q!=="script"&&b1e(gt,"data:")===0&&lfe[q])){if(!(nfe&&!rl(tt,A0(gt,Nt,"")))){if(gt)return!1}}}}}}return!0},IOe=ji({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),bfe=function(q){return!IOe[ND(q)]&&rl(mt,q)},vfe=function(q){fm(te.beforeSanitizeAttributes,q,null);let Oe=q.attributes;if(!Oe||bM(q))return;let gt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:di,forceKeepAttr:void 0},io=Oe.length;for(;io--;){let on=Oe[io],Oo=on.name,na=on.namespaceURI,mh=on.value,fu=gr(Oo),Vq=mh,xa=Oo==="value"?Vq:DWe(Vq);if(gt.attrName=fu,gt.attrValue=xa,gt.keepAttr=!0,gt.forceKeepAttr=void 0,fm(te.uponSanitizeAttribute,q,gt),xa=gt.attrValue,rfe&&(fu==="id"||fu==="name")&&b1e(xa,afe)!==0&&(hw(Oo,q),xa=afe+xa),SI&&rl(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,xa)){hw(Oo,q);continue}if(fu==="attributename"&&_1e(xa,"href")){hw(Oo,q);continue}if(gt.forceKeepAttr)continue;if(!gt.keepAttr){hw(Oo,q);continue}if(!ofe&&rl(/\/>/i,xa)){hw(Oo,q);continue}m_&&fy([se,he,ce],Cfe=>{xa=A0(xa,Cfe," ")});let wfe=gr(q.nodeName);if(!_fe(wfe,fu,xa)){hw(Oo,q);continue}if(k&&typeof h=="object"&&typeof h.getAttributeType=="function"&&!na)switch(h.getAttributeType(wfe,fu)){case"TrustedHTML":{xa=D(xa);break}case"TrustedScriptURL":{xa=k.createScriptURL(xa);break}}if(xa!==Vq)try{na?q.setAttributeNS(na,Oo,xa):q.setAttribute(Oo,xa),bM(q)?uu(q):p1e(e.removed)}catch{hw(Oo,q)}}fm(te.afterSanitizeAttributes,q,null)},wM=function(q){let Oe=null,gt=mfe(q);for(fm(te.beforeSanitizeShadowDOM,q,null);Oe=gt.nextNode();)if(fm(te.uponSanitizeShadowNode,Oe,null),pfe(Oe),vfe(Oe),ZS(Oe.content)&&wM(Oe.content),(C?C(Oe):Oe.nodeType)===bg.element){let on=v?v(Oe):Oe.shadowRoot;ZS(on)&&(XS(on),wM(on))}fm(te.afterSanitizeShadowDOM,q,null)},XS=function(q){let Oe=C?C(q):q.nodeType;if(Oe===bg.element){let on=v?v(q):q.shadowRoot;ZS(on)&&(XS(on),wM(on))}let gt=_?_(q):q.childNodes;if(!gt)return;let io=[];fy(gt,on=>{R0(io,on)});for(let on of io)XS(on);if(Oe===bg.element){let on=y?y(q):null;if(typeof on=="string"&&gr(on)==="template"){let Oo=q.content;ZS(Oo)&&XS(Oo)}}};return e.sanitize=function(Ft){let q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Oe=null,gt=null,io=null,on=null;if(Oq=!Ft,Oq&&(Ft=""),typeof Ft!="string"&&!vM(Ft)&&(Ft=OWe(Ft),typeof Ft!="string"))throw M0("dirty is not a string, aborting");if(!e.isSupported)return Ft;if(Dq||Wq(q),e.removed=[],typeof Ft=="string"&&(xI=!1),xI){let mh=y?y(Ft):Ft.nodeName;if(typeof mh=="string"){let fu=gr(mh);if(!ct[fu]||um[fu])throw M0("root node is forbidden and cannot be sanitized in-place")}if(bM(Ft))throw M0("root node is clobbered and cannot be sanitized in-place");XS(Ft)}else if(vM(Ft))Oe=gfe(""),gt=Oe.ownerDocument.importNode(Ft,!0),gt.nodeType===bg.element&>.nodeName==="BODY"||gt.nodeName==="HTML"?Oe=gt:Oe.appendChild(gt),XS(gt);else{if(!jS&&!m_&&!dw&&Ft.indexOf("<")===-1)return k&&mM?D(Ft):Ft;if(Oe=gfe(Ft),!Oe)return jS?null:mM?I:""}Oe&&Nq&&uu(Oe.firstChild);let Oo=mfe(xI?Ft:Oe);for(;io=Oo.nextNode();)pfe(io),vfe(io),ZS(io.content)&&wM(io.content);if(xI)return m_&&Hq(Ft),Ft;if(jS){if(m_&&Hq(Oe),gM)for(on=z.call(Oe.ownerDocument);Oe.firstChild;)on.appendChild(Oe.firstChild);else on=Oe;return(di.shadowroot||di.shadowrootmode)&&(on=Z.call(i,on,!0)),on}let na=dw?Oe.outerHTML:Oe.innerHTML;return dw&&ct["!doctype"]&&Oe.ownerDocument&&Oe.ownerDocument.doctype&&Oe.ownerDocument.doctype.name&&rl(jWe,Oe.ownerDocument.doctype.name)&&(na=" +`+na),m_&&fy([se,he,ce],mh=>{na=A0(na,mh," ")}),k&&mM?D(na):na},e.setConfig=function(){let Ft=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Wq(Ft),Dq=!0},e.clearConfig=function(){YS=null,Dq=!1},e.isValidAttribute=function(Ft,q,Oe){YS||Wq({});let gt=gr(Ft),io=gr(q);return _fe(gt,io,Oe)},e.addHook=function(Ft,q){typeof q=="function"&&R0(te[Ft],q)},e.removeHook=function(Ft,q){if(q!==void 0){let Oe=EWe(te[Ft],q);return Oe===-1?void 0:TWe(te[Ft],Oe,1)[0]}return p1e(te[Ft])},e.removeHooks=function(Ft){te[Ft]=[]},e.removeAllHooks=function(){te=L1e()},e}var I1e,m1e,kWe,LWe,IWe,Sc,jh,O0,E1e,uee,fee,fy,EWe,p1e,R0,TWe,yc,ND,aee,_1e,A0,b1e,DWe,NWe,RWe,v1e,w1e,rr,DD,rl,M0,C1e,lee,cee,FWe,dee,BWe,y1e,S1e,hee,x1e,jW,WWe,HWe,VWe,zWe,UWe,k1e,$We,qWe,jWe,KWe,bg,GWe,YWe,L1e,gy,D1e=x(()=>{I1e=Object.entries,m1e=Object.setPrototypeOf,kWe=Object.isFrozen,LWe=Object.getPrototypeOf,IWe=Object.getOwnPropertyDescriptor,Sc=Object.freeze,jh=Object.seal,O0=Object.create,E1e=typeof Reflect<"u"&&Reflect,uee=E1e.apply,fee=E1e.construct;Sc||(Sc=function(e){return e});jh||(jh=function(e){return e});uee||(uee=function(e,t){for(var i=arguments.length,n=new Array(i>2?i-2:0),s=2;s1?t-1:0),n=1;n"u"?null:Gr(BigInt.prototype.toString),w1e=typeof Symbol>"u"?null:Gr(Symbol.prototype.toString),rr=Gr(Object.prototype.hasOwnProperty),DD=Gr(Object.prototype.toString),rl=Gr(RegExp.prototype.test),M0=AWe(TypeError);C1e=Sc(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),lee=Sc(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),cee=Sc(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),FWe=Sc(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),dee=Sc(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),BWe=Sc(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),y1e=Sc(["#text"]),S1e=Sc(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),hee=Sc(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),x1e=Sc(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),jW=Sc(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),WWe=jh(/{{[\w\W]*|^[\w\W]*}}/g),HWe=jh(/<%[\w\W]*|^[\w\W]*%>/g),VWe=jh(/\${[\w\W]*/g),zWe=jh(/^data-[\-\w.\u00B7-\uFFFF]+$/),UWe=jh(/^aria-[\-\w]+$/),k1e=jh(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),$We=jh(/^(?:\w+script|data):/i),qWe=jh(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),jWe=jh(/^html$/i),KWe=jh(/^[a-z][.\w]*(-[.\w]+)+$/i),bg={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},GWe=function(){return typeof window>"u"?null:window},YWe=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let i=null,n="data-tt-policy-suffix";t&&t.hasAttribute(n)&&(i=t.getAttribute(n));let s="dompurify"+(i?"#"+i:"");try{return e.createPolicy(s,{createHTML(r){return r},createScriptURL(r){return r}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},L1e=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};gy=T1e()});function N1e(o,e){if(e.override==="*")return!0;try{let t=new URL(o,gee+"://");return!!(e.override.includes(t.protocol.replace(/:$/,""))||e.allowRelativePaths&&t.protocol===gee+":"&&!o.trim().toLowerCase().startsWith(gee))}catch{return!1}}function ZWe(o,e){gy.addHook("afterSanitizeAttributes",t=>{for(let i of["href","src"])if(t.hasAttribute(i)){let n=t.getAttribute(i);i==="href"?!n.startsWith("#")&&!N1e(n,o)&&t.removeAttribute(i):N1e(n,e)||t.removeAttribute(i)}})}function A1e(o,e){return M1e(o,e,"trusted")}function M1e(o,e,t){try{let i={...XWe};e?.allowedTags&&(e.allowedTags.override&&(i.ALLOWED_TAGS=[...e.allowedTags.override]),e.allowedTags.augment&&(i.ALLOWED_TAGS=[...i.ALLOWED_TAGS??[],...e.allowedTags.augment]));let n=[...R1e];e?.allowedAttributes&&(e.allowedAttributes.override&&(n=[...e.allowedAttributes.override]),e.allowedAttributes.augment&&(n=[...n,...e.allowedAttributes.augment])),n=n.map(a=>typeof a=="string"?a.toLowerCase():{attributeName:a.attributeName.toLowerCase(),shouldKeep:a.shouldKeep});let s=new Set(n.map(a=>typeof a=="string"?a:a.attributeName)),r=new Map;for(let a of n)typeof a=="string"?r.delete(a):r.set(a.attributeName,a);return i.ALLOWED_ATTR=Array.from(s),ZWe({override:e?.allowedLinkProtocols?.override??[Fe.http,Fe.https],allowRelativePaths:e?.allowRelativeLinkPaths??!1},{override:e?.allowedMediaProtocols?.override??[Fe.http,Fe.https],allowRelativePaths:e?.allowRelativeMediaPaths??!1}),e?.replaceWithPlaintext&&gy.addHook("uponSanitizeElement",JWe),r.size&&gy.addHook("uponSanitizeAttribute",(a,l)=>{let c=r.get(l.attrName);if(c){let d=c.shouldKeep(a,l);typeof d=="string"?(l.keepAttr=!0,l.attrValue=d):l.keepAttr=d}else l.keepAttr=s.has(l.attrName)}),t==="dom"?gy.sanitize(o,{...i,RETURN_DOM_FRAGMENT:!0}):gy.sanitize(o,{...i,RETURN_TRUSTED_TYPE:!0})}finally{gy.removeAllHooks()}}function pee(o){if(!o.ownerDocument)return;let e,t;if(o.nodeType===Node.COMMENT_NODE)e=``;else if(o instanceof Element){let r=o.tagName.toLowerCase(),a=QWe.includes(r),l=o.attributes.length?" "+Array.from(o.attributes).map(c=>`${c.name}="${c.value}"`).join(" "):"";e=`<${r}${l}>`,a||(t=``)}else return;let i=document.createDocumentFragment(),n=o.ownerDocument.createTextNode(e);for(i.appendChild(n);o.firstChild;)i.appendChild(o.firstChild);let s=t?o.ownerDocument.createTextNode(t):void 0;return s&&i.appendChild(s),i}function KW(o,e,t){let i=M1e(e,t,"dom");Wn(o,i)}var mee,R1e,gee,XWe,QWe,JWe,_ee=x(()=>{jo();re();D1e();mee=Object.freeze(["a","abbr","b","bdo","blockquote","br","caption","cite","code","col","colgroup","dd","del","details","dfn","div","dl","dt","em","figcaption","figure","h1","h2","h3","h4","h5","h6","hr","i","img","ins","kbd","label","li","mark","ol","p","pre","q","rp","rt","ruby","s","samp","small","small","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","time","tr","tt","u","ul","var","video","wbr"]),R1e=Object.freeze(["href","target","src","alt","title","for","name","role","tabindex","x-dispatch","required","checked","placeholder","type","start","width","height","align"]),gee="vscode-relative-path";XWe=Object.freeze({ALLOWED_TAGS:[...mee],ALLOWED_ATTR:[...R1e],ALLOW_UNKNOWN_PROTOCOLS:!0});QWe=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],JWe=(o,e,t)=>{if(!e.allowedTags[e.tagName]&&e.tagName!=="body"){let i=pee(o);i&&(o.nodeType===Node.COMMENT_NODE?o.parentElement?.insertBefore(i,o):o.parentElement?.replaceChild(i,o))}}});function nd(o,e){let t=new Array,i,n=0,s=0;for(;(i=e8e.exec(o))!==null;){s=i.index||0,n{re();Li();e8e=new RegExp(`(\\\\)?\\$\\((${Ee.iconNameExpression}(?:${Ee.iconModifierExpression})?)\\)`,"g")});function t8e(o){try{let e=Le.parse(o);if(e.scheme===Fe.file){let t=e.fsPath,i=e.fragment;return E0(i?`${t}#${i}`:t)}}catch{}return""}function i8e(o){return function(e){let{tokens:t}=e,i=t[0];if(i?.type!=="paragraph")return o.call(this,e);let n=i.tokens;if(!n||n.length===0)return o.call(this,e);let s=n[0];if(s?.type!=="text")return o.call(this,e);let r=/^\s*\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\]\s*?\n*/i,a=s.raw.match(r);if(!a)return o.call(this,e);s.raw=s.raw.replace(r,""),s.text=s.text.replace(r,"");let l={note:"info",tip:"light-bulb",important:"comment",warning:"alert",caution:"stop"},c=a[1],d=c.charAt(0).toUpperCase()+c.slice(1).toLowerCase(),h=c.toLowerCase(),u=Us({id:l[h]}).outerHTML,f=this.parser.parse(t);return`

    ${u}${d}${f.substring(3)}

    +`}}function Jd(o,e={},t){let i=new F,n=!1,s=new LD(...e.markedExtensions??[]),{renderer:r,codeBlocks:a,syncCodeBlocks:l}=o8e(s,e,o),c=s8e(o),d;if(e.fillInIncompleteTokens){let g={...s.defaults,...e.markedOptions,renderer:r},p=s.lexer(c,g),_=_8e(p);d=s.parser(_,g)}else d=s.parse(c,{...e?.markedOptions,renderer:r,async:!1});o.supportThemeIcons&&(d=nd(d).map(p=>typeof p=="string"?p:p.outerHTML).join(""));let h=document.createElement("div"),u=B1e(o,e.sanitizerConfig??{});KW(h,d,u),n8e(o,e,h);let f;if(t?(f=t,Wn(t,...h.childNodes)):f=h,a.length>0)Promise.all(a).then(g=>{if(n)return;let p=new Map(g),_=f.querySelectorAll("div[data-code]");for(let b of _){let v=p.get(b.dataset.code??"");v&&Wn(b,v)}e.asyncRenderCallback?.()});else if(l.length>0){let g=new Map(l),p=f.querySelectorAll("div[data-code]");for(let _ of p){let b=g.get(_.dataset.code??"");b&&Wn(_,b)}}if(e.asyncRenderCallback)for(let g of f.getElementsByTagName("img")){let p=i.add(B(g,"load",()=>{p.dispose(),e.asyncRenderCallback()}))}if(e.actionHandler){let g=p=>{let _=new so(we(f),p);!_.leftButton&&!_.middleButton||O1e(o,e,_)};i.add(B(f,"click",g)),i.add(B(f,"auxclick",g)),i.add(B(f,"keydown",p=>{let _=new Mt(p);!_.equals(10)&&!_.equals(3)||O1e(o,e,_)}))}for(let g of[...f.getElementsByTagName("input")])if(g.attributes.getNamedItem("type")?.value==="checkbox")g.setAttribute("disabled","");else if(e.sanitizerConfig?.replaceWithPlaintext){let p=pee(g);p?g.parentElement?.replaceChild(p,g):g.remove()}else g.remove();return{element:f,dispose:()=>{n=!0,i.dispose()}}}function n8e(o,e,t){for(let i of t.querySelectorAll("img, audio, video, source")){let n=i.getAttribute("src");if(n){let s=n;try{o.baseUri&&(s=vee(Le.from(o.baseUri),s))}catch{}if(i.setAttribute("src",P1e(o,s,!0)),e.sanitizerConfig?.remoteImageIsAllowed){let r=Le.parse(s);r.scheme!==Fe.file&&r.scheme!==Fe.data&&!e.sanitizerConfig.remoteImageIsAllowed(r)&&i.replaceWith(j("",void 0,i.outerHTML))}}}for(let i of t.querySelectorAll("a")){let n=i.getAttribute("href");if(i.setAttribute("href",""),!n||/^data:|javascript:/i.test(n)||/^command:/i.test(n)&&!o.isTrusted||/^command:(\/\/\/)?_workbench\.downloadResource/i.test(n))i.replaceWith(...i.childNodes);else{let s=P1e(o,n,!1);o.baseUri&&(s=vee(Le.from(o.baseUri),n)),i.dataset.href=s}}}function o8e(o,e,t){let i=new o.Renderer(e.markedOptions);i.image=bee.image,i.link=bee.link,i.paragraph=bee.paragraph,t.supportAlertSyntax&&(i.blockquote=i8e(i.blockquote));let n=[],s=[];return e.codeBlockRendererSync?i.code=({text:r,lang:a,raw:l})=>{let c=wD.nextId(),d=e.codeBlockRendererSync(F1e(a),r,l);return s.push([c,d]),`
    ${sc(r)}
    `}:e.codeBlockRenderer&&(i.code=({text:r,lang:a})=>{let l=wD.nextId(),c=e.codeBlockRenderer(F1e(a),r);return n.push(c.then(d=>[l,d])),`
    ${sc(r)}
    `}),t.supportHtml||(i.html=({text:r})=>e.sanitizerConfig?.replaceWithPlaintext?sc(r):(t.isTrusted?r.match(/^(]+>)|(<\/\s*span>)$/):void 0)?r:""),{renderer:i,codeBlocks:n,syncCodeBlocks:s}}function s8e(o){let e=o.value;return e.length>1e5&&(e=`${e.substr(0,1e5)}\u2026`),o.supportThemeIcons&&(e=Kxe(e)),e}function O1e(o,e,t){let i=t.target.closest("a[data-href]");if(xt(i))try{let n=i.dataset.href;n&&(o.baseUri&&(n=vee(Le.from(o.baseUri),n)),e.actionHandler?.(n,o))}catch(n){De(n)}finally{t.preventDefault(),t.stopPropagation()}}function r8e(o,e){let t;try{t=TD(decodeURIComponent(e))}catch{}return t?(t=ix(t,i=>{if(o.uris&&o.uris[i])return Le.revive(o.uris[i])}),encodeURIComponent(JSON.stringify(t))):e}function P1e(o,e,t){let i=o.uris&&o.uris[e],n=Le.revive(i);return t?e.startsWith(Fe.data+":")?e:(n||(n=Le.parse(e)),M_.uriToBrowserUri(n).toString(!0)):!n||Le.parse(e).toString()===n.toString()?e:(n.query&&(n=n.with({query:r8e(o,n.query)})),n.toString())}function F1e(o){if(!o)return"";let e=o.split(/[\s+|:|,|\{|\?]/,1);return e.length?e[0]:o}function vee(o,e){return/^\w[\w\d+.-]*:/.test(e)?e:o.path.endsWith("/")?uG(o,e).toString():uG(G_(o),e).toString()}function a8e(o,e,t={}){let i=B1e(e,t);return A1e(o,i)}function B1e(o,e){let t=o.isTrusted??!1,i=[Fe.http,Fe.https,Fe.mailto,Fe.file,Fe.vscodeFileResource,Fe.vscodeRemote,Fe.vscodeRemoteResource,Fe.vscodeNotebookCell,Fe.internal];return t&&i.push(Fe.command),e.allowedLinkSchemes?.augment&&i.push(...e.allowedLinkSchemes.augment),{allowedTags:{override:e.allowedTags?.override??l8e},allowedAttributes:{override:e.allowedAttributes?.override??c8e},allowedLinkProtocols:{override:i},allowRelativeLinkPaths:!!o.baseUri,allowedMediaProtocols:{override:[Fe.http,Fe.https,Fe.data,Fe.file,Fe.vscodeFileResource,Fe.vscodeRemote,Fe.vscodeRemoteResource]},allowRelativeMediaPaths:!!o.baseUri,replaceWithPlaintext:e.replaceWithPlaintext}}function W1e(o,e){if(typeof o=="string")return o;let t=o.value??"";t.length>1e5&&(t=`${t.substr(0,1e5)}\u2026`);let i=h8e(),n=h1e(t,{async:!1,renderer:i});return a8e(n,{isTrusted:!1},{}).toString().replace(/&(#\d+|[a-zA-Z]+);/g,s=>d8e.get(s)??s).trim()}function h8e(){let o=new Jb;return o.code=({text:e})=>sc(e),o.blockquote=({text:e})=>e+` +`,o.html=e=>"",o.heading=function({tokens:e}){return this.parser.parseInline(e)+` +`},o.hr=()=>"",o.list=function({items:e}){return e.map(t=>this.listitem(t)).join(` +`)+` +`},o.listitem=({text:e})=>e+` +`,o.paragraph=function({tokens:e}){return this.parser.parseInline(e)+` +`},o.table=function({header:e,rows:t}){return e.map(i=>this.tablecell(i)).join(" ")+` +`+t.map(i=>i.map(n=>this.tablecell(n)).join(" ")).join(` +`)+` +`},o.tablerow=({text:e})=>e,o.tablecell=function({tokens:e}){return this.parser.parseInline(e)},o.strong=({text:e})=>e,o.em=({text:e})=>e,o.codespan=({text:e})=>e,o.br=e=>` +`,o.del=({text:e})=>e,o.image=e=>"",o.text=({text:e})=>e,o.link=({text:e})=>e,o}function RD(o){let e="";return o.forEach(t=>{e+=t.raw}),e}function H1e(o){if(o.tokens)for(let e=o.tokens.length-1;e>=0;e--){let t=o.tokens[e];if(t.type==="text"){let i=t.raw.split(` +`),n=i[i.length-1];if(n.includes("`"))return v8e(o);if(n.includes("**"))return k8e(o);if(n.match(/\*\w/))return w8e(o);if(n.match(/(^|\s)__\w/))return L8e(o);if(n.match(/(^|\s)_\w/))return C8e(o);if(u8e(n)||f8e(n)&&o.tokens.slice(0,e).some(s=>s.type==="text"&&s.raw.match(/\[[^\]]*$/))){let s=o.tokens.slice(e+1);return s[0]?.type==="link"&&s[1]?.type==="text"&&s[1].raw.match(/^ *"[^"]*$/)||n.match(/^[^"]* +"[^"]*$/)?S8e(o):y8e(o)}else if(n.match(/(^|\s)\[\w*[^\]]*$/))return x8e(o)}}}function u8e(o){return!!o.match(/(^|\s)\[.*\]\(\w*/)}function f8e(o){return!!o.match(/^[^\[]*\]\([^\)]*$/)}function g8e(o){let e=o.items[o.items.length-1],t=e.tokens?e.tokens[e.tokens.length-1]:void 0,i=c=>{let h=c.items.at(-1)?.tokens.at(-1);return h?.type==="heading"||h?.type==="list"&&i(h)},n;if(t?.type==="text"&&!("inRawBlock"in e))n=H1e(t);else if(i(o)){let c=N0(o.raw.trim()+"  ")[0];return c.type!=="list"?void 0:c}if(!n||n.type!=="paragraph")return;let s=RD(o.items.slice(0,-1)),r=e.raw.match(/^(\s*(-|\d+\.|\*) +)/)?.[0];if(!r)return;let a=r+RD(e.tokens.slice(0,-1))+n.raw,l=N0(s+a)[0];if(l.type==="list")return l}function m8e(o,e){if(o.raw.match(/-\s*$/))return N0(e+"  ")}function _8e(o){for(let e=0;e=0&&(o[i].type==="space"||o[i].type==="html");)i--;let n=i>=0?o[i]:void 0,s=o.slice(i+1);if(!t&&n?.type==="list"){let a=g8e(n);a&&(t=[a,...s],e=i)}if(!t&&n?.type==="paragraph"){let a=H1e(n);a&&(t=[a,...s],e=i)}if(t){let a=[...o.slice(0,e),...t];return a.links=o.links,a}let r=o.at(-1);if(r?.type==="heading"){let a=m8e(r,RD(o));if(a)return a}return null}function v8e(o){return ev(o,"`")}function w8e(o){return ev(o,"*")}function C8e(o){return ev(o,"_")}function y8e(o){return ev(o,")",!1)}function S8e(o){return ev(o,'")',!1)}function x8e(o){return ev(o,"](https://microsoft.com)",!1)}function k8e(o){return ev(o,"**")}function L8e(o){return ev(o,"__")}function ev(o,e,t=!0){let i=RD(Array.isArray(o)?o:[o]),n=t?i.trimEnd():i;return N0(n+e)[0]}function I8e(o){let e=RD(o),t=e.split(` +`),i,n=!1;for(let s=0;s"u"&&r.match(/^\s*\|/)){let a=r.match(/(\|[^\|]+)(?=\||$)/g);a&&(i=a.length)}else if(typeof i=="number")if(r.match(/^\s*\|/)){if(s!==t.length-1)return;n=!0}else return}if(typeof i=="number"&&i>0){let s=n?t.slice(0,-1).join(` +`):e,r=!!s.match(/\|\s*$/),a=s+(r?"":"|")+` +|${" --- |".repeat(i)}`;return N0(a)}}var bee,l8e,c8e,d8e,p8e,my=x(()=>{Ae();Rr();_g();CD();W();u1e();qW();jo();$a();yh();Xo();He();ai();re();_ee();wr();Ya();od();bee=Object.freeze({image:({href:o,title:e,text:t})=>{let i=[],n=[];return o&&({href:o,dimensions:i}=Yxe(o),n.push(`src="${E0(o)}"`)),t&&n.push(`alt="${E0(t)}"`),e&&n.push(`title="${E0(e)}"`),i.length&&(n=n.concat(i)),""},paragraph({tokens:o}){return`

    ${this.parser.parseInline(o)}

    `},link({href:o,title:e,tokens:t}){let i=this.parser.parseInline(t);if(typeof o!="string")return"";o===i&&(i=HW(i)),e=typeof e=="string"?E0(HW(e)):"",o=HW(o),!e&&o.startsWith(`${Fe.file}:`)&&(e=t8e(o));let n=o.startsWith(`${Fe.command}:`);return o=o.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'"),`
    ${i}`}});l8e=Object.freeze([...mee,"input"]),c8e=Object.freeze(["align","autoplay","alt","colspan","controls","draggable","height","href","loop","muted","playsinline","poster","rowspan","src","target","title","type","width","start","checked","disabled","value","data-code","data-href","data-severity",{attributeName:"style",shouldKeep:(o,e)=>o.tagName==="SPAN"&&e.attrName==="style"?/^(color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z0-9]+)+\));)?(background-color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z0-9]+)+\));)?(border-radius:[0-9]+px;)?$/.test(e.attrValue):!1},{attributeName:"class",shouldKeep:(o,e)=>o.tagName==="SPAN"&&e.attrName==="class"?/^codicon codicon-[a-z\-]+( codicon-modifier-[a-z\-]+)?$/.test(e.attrValue):!1}]);d8e=new Map([[""",'"'],[" "," "],["&","&"],["'","'"],["<","<"],[">",">"]]);p8e=3});function V1e(o,e){return o.with({fragment:`${e.startLineNumber},${e.startColumn}${e.endLineNumber?`-${e.endLineNumber}${e.endColumn?`,${e.endColumn}`:""}`:""}`})}function z1e(o){let e,t=/^L?(\d+)(?:,(\d+))?(-L?(\d+)(?:,(\d+))?)?/.exec(o.fragment);return t&&(e={startLineNumber:parseInt(t[1]),startColumn:t[2]?parseInt(t[2]):1,endLineNumber:t[4]?parseInt(t[4]):void 0,endColumn:t[4]?t[5]?parseInt(t[5]):1:void 0},o=o.with({fragment:""})),{selection:e,uri:o}}var Ar,eh=x(()=>{Ie();Ar=Ne("openerService")});async function Cee(o,e,t,i){try{return await o.open(e,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:D8e(t),skipValidation:i})}catch(n){return De(n),!1}}function D8e(o){return o===!0?!0:o&&Array.isArray(o.enabledCommands)?o.enabledCommands:!1}var E8e,T8e,ar,wee,Kh=x(()=>{my();Ae();Qo();Ie();eh();E8e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},T8e=function(o,e){return function(t,i){e(t,i,o)}},ar=Ne("markdownRendererService"),wee=class{constructor(e){this._openerService=e}render(e,t,i){let n={...t};n.actionHandler||(n.actionHandler=(r,a)=>Cee(this._openerService,r,a.isTrusted)),n.codeBlockRenderer||(n.codeBlockRenderer=(r,a)=>this._defaultCodeBlockRenderer?.renderCodeBlock(r,a,n??{})??Promise.resolve(document.createElement("span")));let s=Jd(e,n,i);return s.element.classList.add("rendered-markdown"),s}setDefaultCodeBlockRenderer(e){this._defaultCodeBlockRenderer=e}};wee=E8e([T8e(0,Ar)],wee);Je(ar,wee,1)});var N8e,GW,wg,YW,ZW,yee,U1e=x(()=>{yxe();W();ae();re();Oi();oi();L0();Gd();Kh();Rr();le();rt();us();hs();Ze();Rt();N8e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},GW=function(o,e){return function(t,i){e(t,i,o)}},wg=j,YW=class extends xo{get _targetWindow(){return we(this._target.targetElements[0])}get _targetDocumentElement(){return we(this._target.targetElements[0]).document.documentElement}get isDisposed(){return this._isDisposed}get isMouseIn(){return this._lockMouseTracker.isMouseIn}get domNode(){return this._hover.containerDomNode}get onDispose(){return this._onDispose.event}get onRequestLayout(){return this._onRequestLayout.event}get anchor(){return this._hoverPosition===2?0:1}get x(){return this._x}get y(){return this._y}get isLocked(){return this._isLocked}set isLocked(e){this._isLocked!==e&&(this._isLocked=e,this._hoverContainer.classList.toggle("locked",this._isLocked))}addMouseTrackingElement(e){return this._lockMouseTracker.addElement(e)}constructor(e,t,i,n,s){if(super(),this._keybindingService=t,this._configurationService=i,this._markdownRenderer=n,this._accessibilityService=s,this._messageListeners=new F,this._isDisposed=!1,this._forcePosition=!1,this._x=0,this._y=0,this._isLocked=!1,this._enableFocusTraps=!1,this._addedFocusTrap=!1,this._maxHeightRatioRelativeToWindow=.5,this._onDispose=this._register(new N),this._onRequestLayout=this._register(new N),this._linkHandler=e.linkHandler,this._target="targetElements"in e.target?e.target:new yee(e.target),e.style)switch(e.style){case 1:{e.appearance??={},e.appearance.compact??=!0,e.appearance.showPointer??=!0;break}case 2:{e.appearance??={},e.appearance.compact??=!0;break}}this._hoverPointer=e.appearance?.showPointer?wg("div.workbench-hover-pointer"):void 0,this._hover=this._register(new Gb(!e.appearance?.skipFadeInAnimation)),this._hover.containerDomNode.classList.add("workbench-hover"),e.appearance?.compact&&this._hover.containerDomNode.classList.add("workbench-hover","compact"),this._hoverPointer&&this._hover.containerDomNode.classList.add("with-pointer"),e.additionalClasses&&this._hover.containerDomNode.classList.add(...e.additionalClasses),e.position?.forcePosition&&(this._forcePosition=!0),e.trapFocus&&(this._enableFocusTraps=!0);let r=e.appearance?.maxHeightRatio;r!==void 0&&r>0&&r<=1&&(this._maxHeightRatioRelativeToWindow=r),this._hoverPosition=e.position?.hoverPosition===void 0?3:wl(e.position.hoverPosition)?e.position.hoverPosition:2,this.onmousedown(this._hover.containerDomNode,u=>u.stopPropagation()),this.onkeydown(this._hover.containerDomNode,u=>{u.equals(9)&&this.dispose()}),this._register(B(this._targetWindow,"blur",()=>this.dispose()));let a=wg("div.hover-row.markdown-hover"),l=wg("div.hover-contents");if(typeof e.content=="string")l.textContent=e.content,l.style.whiteSpace="pre-wrap";else if(xt(e.content)){l.appendChild(e.content),l.classList.add("html-hover-contents");let u=new ResizeObserver(()=>{this.layout(),this._onRequestLayout.fire()});u.observe(l),this._register(ne(()=>u.disconnect()))}else{let u=e.content,{element:f}=this._register(this._markdownRenderer.render(u,{actionHandler:this._linkHandler,asyncRenderCallback:()=>{l.classList.add("code-hover-contents"),this.layout(),this._onRequestLayout.fire()}}));l.appendChild(f)}if(a.appendChild(l),this._hover.contentsDomNode.appendChild(a),e.actions&&e.actions.length>0){let u=wg("div.hover-row.status-bar"),f=wg("div.actions");e.actions.forEach(g=>{let p=this._keybindingService.lookupKeybinding(g.commandId),_=p?p.getLabel():null;this._register(k0.render(f,{label:g.label,commandId:g.commandId,run:b=>{g.run(b),this.dispose()},iconClass:g.iconClass},_))}),u.appendChild(f),this._hover.containerDomNode.appendChild(u)}this._hoverContainer=wg("div.workbench-hover-container"),this._hoverPointer&&this._hoverContainer.appendChild(this._hoverPointer),this._hoverContainer.appendChild(this._hover.containerDomNode);let c;if(e.actions&&e.actions.length>0?c=!1:e.persistence?.hideOnHover===void 0?c=typeof e.content=="string"||wa(e.content)&&!e.content.value.includes("](")&&!e.content.value.includes(""):c=e.persistence.hideOnHover,e.appearance?.showHoverHint){let u=wg("div.hover-row.status-bar"),f=wg("div.info");f.textContent=m(1761,"Hold {0} key to mouse over",Ye?"Option":"Alt"),u.appendChild(f),this._hover.containerDomNode.appendChild(u)}let d=[...this._target.targetElements];c||d.push(this._hoverContainer);let h=this._mouseTracker=this._register(new ZW(d));if(this._register(h.onMouseOut(()=>{this._isLocked||this.dispose()})),c){let u=[...this._target.targetElements,this._hoverContainer];this._lockMouseTracker=this._register(new ZW(u)),this._register(this._lockMouseTracker.onMouseOut(()=>{this._isLocked||this.dispose()}))}else this._lockMouseTracker=h}addFocusTrap(){if(!this._enableFocusTraps||this._addedFocusTrap)return;this._addedFocusTrap=!0;let e=this._hover.containerDomNode,t=this.findLastFocusableChild(this._hover.containerDomNode);if(t){let i=z_(this._hoverContainer,wg("div")),n=X(this._hoverContainer,wg("div"));i.tabIndex=0,n.tabIndex=0,this._register(B(n,"focus",s=>{e.focus(),s.preventDefault()})),this._register(B(i,"focus",s=>{t.focus(),s.preventDefault()}))}}findLastFocusableChild(e){if(e.hasChildNodes())for(let t=0;t=0)return s}let n=this.findLastFocusableChild(i);if(n)return n}}render(e){e.appendChild(this._hoverContainer);let i=this._hoverContainer.contains(this._hoverContainer.ownerDocument.activeElement)&&AW(this._configurationService.getValue("accessibility.verbosity.hover")===!0&&this._accessibilityService.isScreenReaderOptimized(),this._keybindingService.lookupKeybinding("editor.action.accessibleView")?.getAriaLabel());i&&nr(i),this.layout(),this.addFocusTrap()}layout(){this._mouseTracker?.suppressPendingMouseOut(),this._lockMouseTracker!==this._mouseTracker&&this._lockMouseTracker?.suppressPendingMouseOut(),this._hover.containerDomNode.classList.remove("right-aligned"),this._hover.contentsDomNode.style.maxHeight="";let e=d=>{let h=PO(d),u=d.getBoundingClientRect();return{top:u.top*h,bottom:u.bottom*h,right:u.right*h,left:u.left*h}},t=this._target.targetElements.map(d=>e(d)),{top:i,right:n,bottom:s,left:r}=t[0],a=n-r,l=s-i,c={top:i,right:n,bottom:s,left:r,width:a,height:l,center:{x:r+a/2,y:i+l/2}};if(this.adjustHorizontalHoverPosition(c),this.adjustVerticalHoverPosition(c),this.adjustHoverMaxHeight(c),this._hoverContainer.style.padding="",this._hoverContainer.style.margin="",this._hoverPointer){switch(this._hoverPosition){case 1:c.left+=3,c.right+=3,this._hoverContainer.style.paddingLeft="3px",this._hoverContainer.style.marginLeft="-3px";break;case 0:c.left-=3,c.right-=3,this._hoverContainer.style.paddingRight="3px",this._hoverContainer.style.marginRight="-3px";break;case 2:c.top+=3,c.bottom+=3,this._hoverContainer.style.paddingTop="3px",this._hoverContainer.style.marginTop="-3px";break;case 3:c.top-=3,c.bottom-=3,this._hoverContainer.style.paddingBottom="3px",this._hoverContainer.style.marginBottom="-3px";break}c.center.x=c.left+a/2,c.center.y=c.top+l/2}this.computeXCordinate(c),this.computeYCordinate(c),this._hoverPointer&&(this._hoverPointer.classList.remove("top"),this._hoverPointer.classList.remove("left"),this._hoverPointer.classList.remove("right"),this._hoverPointer.classList.remove("bottom"),this.setHoverPointerPosition(c)),this._hover.onContentsChanged()}computeXCordinate(e){let t=this._hover.containerDomNode.clientWidth+2;this._target.x!==void 0?this._x=this._target.x:this._hoverPosition===1?this._x=e.right:this._hoverPosition===0?this._x=e.left-t:(this._hoverPointer?this._x=e.center.x-this._hover.containerDomNode.clientWidth/2:this._x=e.left,this._x+t>=this._targetDocumentElement.clientWidth&&(this._hover.containerDomNode.classList.add("right-aligned"),this._x=Math.max(this._targetDocumentElement.clientWidth-t-2,this._targetDocumentElement.clientLeft))),this._xthis._targetWindow.innerHeight&&(this._y=e.bottom)}adjustHorizontalHoverPosition(e){if(this._target.x!==void 0)return;let t=this._hoverPointer?3:0;if(this._forcePosition){let i=t+2;this._hoverPosition===1?this._hover.containerDomNode.style.maxWidth=`${this._targetDocumentElement.clientWidth-e.right-i}px`:this._hoverPosition===0&&(this._hover.containerDomNode.style.maxWidth=`${e.left-i}px`);return}this._hoverPosition===1?this._targetDocumentElement.clientWidth-e.right=this._hover.containerDomNode.clientWidth+t?this._hoverPosition=0:this._hoverPosition=2):this._hoverPosition===0&&(e.left=this._hover.containerDomNode.clientWidth+t?this._hoverPosition=1:this._hoverPosition=2),e.left-this._hover.containerDomNode.clientWidth-t<=this._targetDocumentElement.clientLeft&&(this._hoverPosition=1))}adjustVerticalHoverPosition(e){if(this._target.y!==void 0||this._forcePosition)return;let t=this._hoverPointer?3:0;this._hoverPosition===3?e.top-this._hover.containerDomNode.clientHeight-t<0&&(this._hoverPosition=2):this._hoverPosition===2&&e.bottom+this._hover.containerDomNode.offsetHeight+t>this._targetWindow.innerHeight&&(this._hoverPosition=3)}adjustHoverMaxHeight(e){let t=this._targetWindow.innerHeight*this._maxHeightRatioRelativeToWindow;if(this._forcePosition){let i=(this._hoverPointer?3:0)+2;this._hoverPosition===3?t=Math.min(t,e.top-i):this._hoverPosition===2&&(t=Math.min(t,this._targetWindow.innerHeight-e.bottom-i))}if(this._hover.containerDomNode.style.maxHeight=`${t}px`,this._hover.contentsDomNode.clientHeighte.height?this._hoverPointer.style.top=`${e.center.y-(this._y-t)-3}px`:this._hoverPointer.style.top=`${Math.round(t/2)-3}px`;break}case 3:case 2:{this._hoverPointer.classList.add(this._hoverPosition===3?"bottom":"top");let t=this._hover.containerDomNode.clientWidth,i=Math.round(t/2)-3,n=this._x+i;(ne.right)&&(i=e.center.x-this._x-3),this._hoverPointer.style.left=`${i}px`;break}}}focus(){this._hover.containerDomNode.focus()}dispose(){this._isDisposed||(this._onDispose.fire(),this._target.dispose?.(),this._hoverContainer.remove(),this._messageListeners.dispose(),super.dispose()),this._isDisposed=!0}};YW=N8e([GW(1,$e),GW(2,Me),GW(3,ar),GW(4,Ri)],YW);ZW=class extends xo{get onMouseOut(){return this._onMouseOut.event}get isMouseIn(){return this._isMouseIn}constructor(e,t=200){super(),this._elements=e,this._eventDebounceDelay=t,this._isMouseIn=!0,this._suppressNextMouseOut=!1,this._mouseTimer=this._register(new Qe),this._onMouseOut=this._register(new N);for(let i of this._elements)this.onmouseover(i,()=>this._onTargetMouseOver()),this.onmouseleave(i,()=>this._onTargetMouseLeave())}_onTargetMouseOver(){this._isMouseIn=!0,this._suppressNextMouseOut=!1,this._mouseTimer.clear()}_onTargetMouseLeave(){this._isMouseIn=!1,this._mouseTimer.value=new ro(()=>this._fireIfMouseOutside(),this._eventDebounceDelay)}_fireIfMouseOutside(){!this._isMouseIn&&!this._suppressNextMouseOut&&this._onMouseOut.fire()}suppressPendingMouseOut(){this._isMouseIn||(this._suppressNextMouseOut=!0)}addElement(e){if(this._elements.includes(e))return T.None;this._elements.push(e);let t=new F;return t.add(B(e,ee.MOUSE_OVER,()=>this._onTargetMouseOver())),t.add(B(e,ee.MOUSE_LEAVE,()=>this._onTargetMouseLeave())),t.add(ne(()=>{let i=this._elements.indexOf(e);i>=0&&this._elements.splice(i,1)})),t}},yee=class{constructor(e){this._element=e,this.targetElements=[this._element]}dispose(){}}});var $s,AD=x(()=>{(function(o){function e(s,r){if(s.start>=r.end||r.start>=s.end)return{start:0,end:0};let a=Math.max(s.start,r.start),l=Math.min(s.end,r.end);return l-a<=0?{start:0,end:0}:{start:a,end:l}}o.intersect=e;function t(s){return s.end-s.start<=0}o.isEmpty=t;function i(s,r){return!t(e(s,r))}o.intersects=i;function n(s,r){let a=[],l={start:s.start,end:Math.min(r.start,s.end)},c={start:Math.max(r.end,s.start),end:s.end};return t(l)||a.push(l),t(c)||a.push(c),a}o.relativeComplement=n})($s||($s={}))});function py(o,e,t){let i=t.mode===tv.ALIGN?t.offset:t.offset+t.size,n=t.mode===tv.ALIGN?t.offset+t.size:t.offset;return t.position===0?e<=o-i?{position:i,result:"ok"}:e<=n?{position:n-e,result:"flipped"}:{position:Math.max(o-e,0),result:"overlap"}:e<=n?{position:n-e,result:"ok"}:e<=o-i&&n{AD();(function(o){o[o.AVOID=0]="AVOID",o[o.ALIGN=1]="ALIGN"})(tv||(tv={}))});var $1e=x(()=>{});function R8e(o){let e=o;return!!e&&typeof e.x=="number"&&typeof e.y=="number"}function MD(o){if(xt(o)){let e=ii(o),t=PO(o);return{top:e.top*t,left:e.left*t,width:e.width*t,height:e.height*t}}else return R8e(o)?{top:o.y,left:o.x,width:o.width||1,height:o.height||2}:{top:o.posy,left:o.posx,width:2,height:2}}var P0,A8e,OD=x(()=>{uO();re();W();QW();rt();$1e();P0=class o extends T{static{this.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"]}static{this.BUBBLE_DOWN_EVENTS=["click"]}constructor(e,t){super(),this.container=null,this.useFixedPosition=!1,this.useShadowDOM=!1,this.delegate=null,this.toDisposeOnClean=T.None,this.toDisposeOnSetContainer=T.None,this.shadowRoot=null,this.shadowRootHostElement=null,this.view=j(".context-view"),Ms(this.view),this.setContainer(e,t),this._register(ne(()=>this.setContainer(null,1)))}setContainer(e,t){this.useFixedPosition=t!==1;let i=this.useShadowDOM;if(this.useShadowDOM=t===3,!(e===this.container&&i===this.useShadowDOM)&&(this.container&&(this.toDisposeOnSetContainer.dispose(),this.view.remove(),this.shadowRoot&&(this.shadowRoot=null,this.shadowRootHostElement?.remove(),this.shadowRootHostElement=null),this.container=null),e)){if(this.container=e,this.useShadowDOM){this.shadowRootHostElement=j(".shadow-root-host"),this.container.appendChild(this.shadowRootHostElement),this.shadowRoot=this.shadowRootHostElement.attachShadow({mode:"open"});let s=document.createElement("style");s.textContent=A8e,this.shadowRoot.appendChild(s),this.shadowRoot.appendChild(this.view),this.shadowRoot.appendChild(j("slot"))}else this.container.appendChild(this.view);let n=new F;o.BUBBLE_UP_EVENTS.forEach(s=>{n.add(_i(this.container,s,r=>{this.onDOMEvent(r,!1)}))}),o.BUBBLE_DOWN_EVENTS.forEach(s=>{n.add(_i(this.container,s,r=>{this.onDOMEvent(r,!0)},!0))}),this.toDisposeOnSetContainer=n}}show(e){this.isVisible()&&this.hide(),pn(this.view),this.view.className="context-view monaco-component",this.view.style.top="0px",this.view.style.left="0px",this.view.style.zIndex=`${2575+(e.layer??0)}`,this.view.style.position=this.useFixedPosition?"fixed":"absolute",tr(this.view),this.toDisposeOnClean=e.render(this.view)||T.None,this.delegate=e,this.doLayout(),this.delegate.focus?.()}getViewElement(){return this.view}layout(){if(this.isVisible()){if(this.delegate.canRelayout===!1&&!(pr&&R_.pointerEvents)){this.hide();return}this.delegate?.layout?.(),this.doLayout()}}doLayout(){if(!this.isVisible())return;let e=MD(this.delegate.getAnchor()),t=this.container?we(this.container):It(),i={top:t.pageYOffset,left:t.pageXOffset,width:t.innerWidth,height:t.innerHeight},n={width:yr(this.view),height:Bd(this.view)},s=this.delegate.anchorPosition,r=this.delegate.anchorAlignment,a=this.delegate.anchorAxisAlignment,{top:l,left:c}=XW(i,n,e,{anchorAlignment:r,anchorPosition:s,anchorAxisAlignment:a});this.view.classList.remove("top","bottom","left","right"),this.view.classList.add(s===0?"bottom":"top"),this.view.classList.add(r===0?"left":"right"),this.view.classList.toggle("fixed",this.useFixedPosition);let d=ii(this.container),h=this.container.scrollTop||0,u=this.container.scrollLeft||0;this.view.style.top=`${l-(this.useFixedPosition?ii(this.view).top:d.top)+h}px`,this.view.style.left=`${c-(this.useFixedPosition?ii(this.view).left:d.left)+u}px`,this.view.style.width="initial"}hide(e){let t=this.delegate;this.delegate=null,t?.onHide&&t.onHide(e);let i=this.toDisposeOnClean;this.toDisposeOnClean=T.None,i.dispose(),Ms(this.view)}isVisible(){return!!this.delegate}onDOMEvent(e,t){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(e,we(e).document.activeElement):t&&!mn(e.target,this.container)&&this.hide())}dispose(){this.hide(),super.dispose()}},A8e=` + :host { + all: initial; /* 1st rule so subsequent properties are reset. */ + } + + .codicon[class*='codicon-'] { + font: normal normal normal 16px/1 codicon; + display: inline-block; + text-decoration: none; + text-rendering: auto; + text-align: center; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + user-select: none; + -webkit-user-select: none; + -ms-user-select: none; + } + + :host { + font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", system-ui, "Ubuntu", "Droid Sans", sans-serif; + } + + :host-context(.mac) { font-family: -apple-system, BlinkMacSystemFont, sans-serif; } + :host-context(.mac:lang(zh-Hans)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif; } + :host-context(.mac:lang(zh-Hant)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif; } + :host-context(.mac:lang(ja)) { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic Pro", sans-serif; } + :host-context(.mac:lang(ko)) { font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Nanum Gothic", "AppleGothic", sans-serif; } + + :host-context(.windows) { font-family: "Segoe WPC", "Segoe UI", sans-serif; } + :host-context(.windows:lang(zh-Hans)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft YaHei", sans-serif; } + :host-context(.windows:lang(zh-Hant)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft Jhenghei", sans-serif; } + :host-context(.windows:lang(ja)) { font-family: "Segoe WPC", "Segoe UI", "Yu Gothic UI", "Meiryo UI", sans-serif; } + :host-context(.windows:lang(ko)) { font-family: "Segoe WPC", "Segoe UI", "Malgun Gothic", "Dotom", sans-serif; } + + :host-context(.linux) { font-family: system-ui, "Ubuntu", "Droid Sans", sans-serif; } + :host-context(.linux:lang(zh-Hans)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans SC", "Source Han Sans CN", "Source Han Sans", sans-serif; } + :host-context(.linux:lang(zh-Hant)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans TC", "Source Han Sans TW", "Source Han Sans", sans-serif; } + :host-context(.linux:lang(ja)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans J", "Source Han Sans JP", "Source Han Sans", sans-serif; } + :host-context(.linux:lang(ko)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans K", "Source Han Sans JR", "Source Han Sans", "UnDotum", "FBaekmuk Gulim", sans-serif; } +`});var Ca,Cg=x(()=>{Ie();Ca=Ne("layoutService")});function JW(o){let e=o;return typeof e=="object"&&"markdown"in e&&"markdownNotSupportedFallback"in e}var See=x(()=>{});var e8,q1e=x(()=>{re();See();Vt();Rr();Rt();le();e8=class{constructor(e,t,i){this.hoverDelegate=e,this.target=t,this.fadeInAnimation=i}async update(e,t,i){if(this._cancellationTokenSource&&(this._cancellationTokenSource.dispose(!0),this._cancellationTokenSource=void 0),this.isDisposed)return;let n;if(Ln(e)||xt(e)||e===void 0)n=e;else{this._cancellationTokenSource=new Lt;let s=this._cancellationTokenSource.token,r;if(JW(e)?bh(e.markdown)?r=e.markdown(s).then(a=>a??e.markdownNotSupportedFallback):r=e.markdown??e.markdownNotSupportedFallback:r=e.element(s),r instanceof Promise?(this._hoverWidget||this.show(m(1762,"Loading..."),t,i),n=await r):n=r,this.isDisposed||s.isCancellationRequested)return}this.show(n,t,i)}show(e,t,i){let n=this._hoverWidget;if(this.hasContent(e)){let s={content:e,target:this.target,actions:i?.actions,linkHandler:i?.linkHandler,trapFocus:i?.trapFocus,appearance:{showPointer:this.hoverDelegate.placement==="element",skipFadeInAnimation:!this.fadeInAnimation||!!n,showHoverHint:i?.appearance?.showHoverHint},position:{hoverPosition:2}};this._hoverWidget=this.hoverDelegate.showHover(s,t)}n?.dispose()}hasContent(e){return e?wa(e)?!!e.value:!0:!1}get isDisposed(){return this._hoverWidget?.isDisposed}dispose(){this._hoverWidget?.dispose(),this._cancellationTokenSource?.dispose(!0),this._cancellationTokenSource=void 0}}});function B0(o){if(o!==void 0)return o?.id??o}function j1e(o){if(!xt(o))return typeof o=="string"?o.toString():o.value}function K1e(o){let e=typeof o=="function"?o():o;if(Ln(e))return Qb(e);if(JW(e))return e.markdownNotSupportedFallback}function P8e(o,e){function t(i){i?o.setAttribute("title",i):o.removeAttribute("title")}return t(K1e(e)),{update:i=>t(K1e(i)),show:()=>{},hide:()=>{},dispose:()=>t(void 0)}}function xee(o,e){return xt(o.target)&&F8e(o.target,e)===e}function F8e(o,e){for(e=e??we(o).document.body;!o.hasAttribute("custom-hover")&&o!==e;)o=o.parentElement;return o}function G1e(o,e){return{targetElements:[o],x:e.x+10}}var M8e,F0,O8e,kee,Lee,Y1e=x(()=>{Qo();Kt();$t();bi();Zi();xi();qi();Mi();Xi();$i();Vi();Qi();Ji();ol();Kr();Ie();U1e();OD();W();re();Oi();wr();us();Cg();br();See();q1e();Ze();oi();Rt();Ta();Rh();_g();M8e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},F0=function(o,e){return function(t,i){e(t,i,o)}},O8e=3,kee=class extends T{get _currentHover(){return this._hoverStack.at(-1)?.hover}get _currentHoverOptions(){return this._hoverStack.at(-1)?.options}_getContainingHoverIndex(e){let t=xt(e)?[e]:e.targetElements;for(let i=this._hoverStack.length-1;i>=0;i--)for(let n of t)if(mn(n,this._hoverStack[i].hover.domNode))return i;return-1}constructor(e,t,i,n,s,r){super(),this._instantiationService=e,this._configurationService=t,this._keybindingService=n,this._layoutService=s,this._accessibilityService=r,this._hoverStack=[],this._currentDelayedHoverWasShown=!1,this._delayedHovers=new Map,this._managedHovers=new Map,this._register(i.onDidShowContextMenu(()=>this.hideHover())),this._register(Nn.registerCommandAndKeybindingRule({id:"workbench.action.showHover",weight:0,primary:hn(2089,2087),handler:()=>{this._showAndFocusHoverForActiveElement()}}))}showInstantHover(e,t,i,n){let s=this._createHover(e,i);if(s)return this._showHover(s,e,t),s.hover}showDelayedHover(e,t){if(e.id===void 0&&(e.id=j1e(e.content)),!this._currentDelayedHover||this._currentDelayedHoverWasShown){if(this._currentHover?.isLocked&&this._getContainingHoverIndex(e.target)<0)return;if(B0(this._currentHoverOptions)===B0(e))return this._currentHover;if(this._currentHover&&!this._currentHover.isDisposed&&this._currentDelayedHoverGroupId!==void 0&&this._currentDelayedHoverGroupId===t?.groupId)return this.showInstantHover({...e,appearance:{...e.appearance,skipFadeInAnimation:!0}})}else if(this._currentDelayedHover&&B0(this._currentHoverOptions)===B0(e))return this._currentDelayedHover;let i=this._createHover(e,void 0);if(!i){this._currentDelayedHover=void 0,this._currentDelayedHoverWasShown=!1,this._currentDelayedHoverGroupId=void 0;return}this._currentDelayedHover=i.hover,this._currentDelayedHoverWasShown=!1,this._currentDelayedHoverGroupId=t?.groupId;let n=t?.reducedDelay?this._configurationService.getValue("workbench.hover.reducedDelay"):this._configurationService.getValue("workbench.hover.delay");return Na(n).then(()=>{i.hover&&!i.hover.isDisposed&&(this._currentDelayedHoverWasShown=!0,this._showHover(i,e))}),i.hover}setupDelayedHover(e,t,i){let n=s=>{let r={...typeof t=="function"?t():t,target:e};return r.style===2&&s&&(r.target=G1e(e,s)),r};return this._setupDelayedHover(e,n,i)}setupDelayedHoverAtMouse(e,t,i){let n=s=>({...typeof t=="function"?t():t,target:s?G1e(e,s):e});return this._setupDelayedHover(e,n,i)}_setupDelayedHover(e,t,i){let n=new F;return n.add(B(e,ee.MOUSE_OVER,s=>{this.showDelayedHover(t(s),{groupId:i?.groupId,reducedDelay:i?.reducedDelay})})),i?.setupKeyboardEvents&&n.add(B(e,ee.KEY_DOWN,s=>{let r=new Mt(s);(r.equals(10)||r.equals(3))&&this.showInstantHover(t(),!0)})),this._delayedHovers.set(e,{show:s=>{this.showInstantHover(t(),s)}}),n.add(ne(()=>this._delayedHovers.delete(e))),n}_createHover(e,t){if(this._currentDelayedHover?.dispose(),this._currentDelayedHover=void 0,e.content==="")return;if(e.id===void 0&&(e.id=j1e(e.content)),this._getContainingHoverIndex(e.target)>=0){if(this._hoverStack.length>=O8e)return}else if(this._currentHover?.isLocked||B0(this._currentHoverOptions)===B0(e))return;this._lastHoverOptions=e;let s=e.trapFocus||this._accessibilityService.isScreenReaderOptimized(),r=Ui(),a;t||s&&r&&(r.classList.contains("monaco-hover")||(a=r));let l=new F,c=this._instantiationService.createInstance(YW,e);if(e.persistence?.sticky&&(c.isLocked=!0),e.position?.hoverPosition&&!wl(e.position.hoverPosition)&&(e.target={targetElements:xt(e.target)?[e.target]:e.target.targetElements,x:e.position.hoverPosition.x+10}),c.onDispose(()=>{let d=this._hoverStack.findIndex(h=>h.hover===c);if(d>=0){let h=this._hoverStack[d];for(W_(c.domNode)&&h.lastFocusedElementBeforeOpen&&h.lastFocusedElementBeforeOpen.focus();this._hoverStack.length>d+1;){let f=this._hoverStack.pop();f.contextView.dispose(),f.hover.dispose()}this._hoverStack.splice(d,1),h.contextView.dispose()}l.dispose()},void 0,l),!e.container){let d=xt(e.target)?e.target:e.target.targetElements[0];e.container=this._layoutService.getContainer(we(d))}if(l.add(B(we(e.container).document,ee.MOUSE_DOWN,d=>{mn(d.target,c.domNode)||this._hideHoverAndDescendants(c)})),!e.persistence?.sticky){if("targetElements"in e.target)for(let h of e.target.targetElements)l.add(B(h,ee.CLICK,()=>this._hideHoverAndDescendants(c)));else l.add(B(e.target,ee.CLICK,()=>this._hideHoverAndDescendants(c)));let d=Ui();if(d){let h=we(d).document;l.add(B(d,ee.KEY_DOWN,u=>this._keyDown(u,c,!!e.persistence?.hideOnKeyDown))),l.add(B(h,ee.KEY_DOWN,u=>this._keyDown(u,c,!!e.persistence?.hideOnKeyDown))),l.add(B(d,ee.KEY_UP,u=>this._keyUp(u,c))),l.add(B(h,ee.KEY_UP,u=>this._keyUp(u,c)))}}if("IntersectionObserver"in Tt){let d=new IntersectionObserver(u=>this._intersectionChange(u,c),{threshold:0}),h="targetElements"in e.target?e.target.targetElements[0]:e.target;d.observe(h),l.add(ne(()=>d.disconnect()))}return{hover:c,lastFocusedElementBeforeOpen:a,store:l}}_showHover(e,t,i){let{hover:n,lastFocusedElementBeforeOpen:s,store:r}=e,a=this._getContainingHoverIndex(t.target),l=a>=0;if(!l)this._hideAllHovers();else{for(let f=this._hoverStack.length-1;f>a;f--)this._hoverStack[f].hover.dispose();this._hoverStack.length=a+1}if(l)for(let f=0;f<=a;f++)r.add(this._hoverStack[f].hover.addMouseTrackingElement(n.domNode));let c=t.container??this._layoutService.getContainer(we(xt(t.target)?t.target:t.target.targetElements[0])),d=new P0(c,1),h={hover:n,options:t,contextView:d,lastFocusedElementBeforeOpen:s};this._hoverStack.push(h);let u=new Lee(n,i,this._hoverStack.length);if(d.show(u),r.add(n.onRequestLayout(()=>d.layout())),i||t.persistence?.sticky){let f=we(c);r.add(B(f,ee.RESIZE,()=>d.layout()))}if(t.onDidHide){let f=t.onDidHide;r.add(ne(()=>f()))}t.onDidShow?.()}_hideHoverAndDescendants(e){let t=this._hoverStack.findIndex(i=>i.hover===e);if(!(t<0)){for(let i=this._hoverStack.length-1;i>=t;i--)this._hoverStack[i].hover.dispose();this._hoverStack.length=t}}_hideAllHovers(){for(let e=this._hoverStack.length-1;e>=0;e--)this._hoverStack[e].hover.dispose();this._hoverStack.length=0}hideHover(e){this._hoverStack.length!==0&&(!e&&this._currentHover?.isLocked||this.doHideHover())}doHideHover(){let e=this._hoverStack.length;this._hoverStack[e-1]?.hover.dispose(),this._hoverStack.length=e-1}_intersectionChange(e,t){e[e.length-1].isIntersecting||t.dispose()}showAndFocusLastHover(){this._lastHoverOptions&&this.showInstantHover(this._lastHoverOptions,!0,!0)}_showAndFocusHoverForActiveElement(){let e=Ui();for(;e;){let t=this._delayedHovers.get(e)??this._managedHovers.get(e);if(t){t.show(!0);return}e=e.parentElement}}_keyDown(e,t,i){if(e.key==="Alt"){for(let r of this._hoverStack)r.hover.isLocked=!0;return}let n=new Mt(e);if(!(this._keybindingService.resolveKeyboardEvent(n).getSingleModifierDispatchChords().some(r=>!!r)||this._keybindingService.softDispatch(n,n.target).kind!==0)&&i&&(!this._currentHoverOptions?.trapFocus||e.key!=="Tab")){let r=this._hoverStack.find(a=>a.hover===t);this._hideHoverAndDescendants(t),r?.lastFocusedElementBeforeOpen?.focus()}}_keyUp(e,t){if(e.key==="Alt"){for(let n of this._hoverStack)n.options.persistence?.sticky||(n.hover.isLocked=!1);if(!this._hoverStack.some(n=>n.hover.isMouseIn)){let n=this._hoverStack[this._hoverStack.length-1];this._hideAllHovers(),n?.lastFocusedElementBeforeOpen?.focus()}}}setupManagedHover(e,t,i,n){if(e.showNativeHover)return P8e(t,i);t.setAttribute("custom-hover","true"),t.title!==""&&(console.warn("HTML element already has a title attribute, which will conflict with the custom hover. Please remove the title attribute."),t.title="");let s,r,a=(f,g)=>{let p=r!==void 0;f&&(r?.dispose(),r=void 0),g&&(s?.dispose(),s=void 0),p&&(e.onDidHideHover?.(),r=void 0)},l=(f,g,p,_)=>new ro(async()=>{(!r||r.isDisposed)&&(r=new e8(e,p||t,f>0),await r.update(typeof i=="function"?i():i,g,{...n,trapFocus:_}))},f),c=new F,d=!1;c.add(B(t,ee.MOUSE_DOWN,()=>{d=!0,a(!0,!0)},!0)),c.add(B(t,ee.MOUSE_UP,()=>{d=!1},!0)),c.add(B(t,ee.MOUSE_LEAVE,f=>{d=!1,a(!1,f.fromElement===t)},!0)),c.add(B(t,ee.MOUSE_OVER,f=>{if(s)return;let g=new F,p={targetElements:[t],dispose:()=>{}};if(e.placement===void 0||e.placement==="mouse"){let _=b=>{p.x=b.x+10,xee(b,t)||a(!0,!0)};g.add(B(t,ee.MOUSE_MOVE,_,!0))}s=g,xee(f,t)&&g.add(l(typeof e.delay=="function"?e.delay(i):e.delay,!1,p))},!0));let h=f=>{if(d||s||(r?.isDisposed&&(r=void 0),xt(f.relatedTarget)&&f.relatedTarget.closest(".monaco-hover")||!f.relatedTarget)||!xee(f,t))return;let p={targetElements:[t],dispose:()=>{}},_=new F,b=()=>a(!0,!0);_.add(B(t,ee.BLUR,b,!0)),_.add(l(typeof e.delay=="function"?e.delay(i):e.delay,!1,p)),s=_};Ll(t)||c.add(B(t,ee.FOCUS,h,!0));let u={show:f=>{a(!1,!0),l(0,f,void 0,f)},hide:()=>{a(!0,!0)},update:async(f,g)=>{i=f,await r?.update(i,void 0,g)},dispose:()=>{this._managedHovers.delete(t),c.dispose(),a(!0,!0)}};return this._managedHovers.set(t,u),u}showManagedHover(e){let t=this._managedHovers.get(e);t&&t.show(!0)}dispose(){this._managedHovers.forEach(e=>e.dispose()),super.dispose()}};kee=M8e([F0(0,ie),F0(1,Me),F0(2,eo),F0(3,$e),F0(4,Ca),F0(5,Ri)],kee);Lee=class{get anchorPosition(){return this._hover.anchor}constructor(e,t=!1,i=1){this._hover=e,this._focus=t,this.layer=i}render(e){return this._hover.render(e),this._focus&&this._hover.focus(),this._hover}getAnchor(){return{x:this._hover.x,y:this._hover.y}}layout(){this._hover.layout()}};Je(Jn,kee,1);Ro((o,e)=>{let t=o.getColor(yb);t&&(e.addRule(`.monaco-hover.workbench-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${t.transparent(.5)}; }`),e.addRule(`.monaco-hover.workbench-hover hr { border-top: 1px solid ${t.transparent(.5)}; }`))})});var yg,W0=x(()=>{Ie();yg=Ne("dialogService")});function t8(o){return o.scheme===Fe.file?o.fsPath:o.path}var B8e,Z1e,X1e,H0,i8,n8,Iee,o8,PD,Q1e,Eee,V0,J1e=x(()=>{Ae();W();jo();fp();le();W0();Qo();Hs();H3();B8e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Z1e=function(o,e){return function(t,i){e(t,i,o)}};X1e=0,H0=class{constructor(e,t,i,n,s,r,a){this.id=++X1e,this.type=0,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabel=t,this.strResource=i,this.resourceLabels=[this.resourceLabel],this.strResources=[this.strResource],this.groupId=n,this.groupOrder=s,this.sourceId=r,this.sourceOrder=a,this.isValid=!0}setValid(e){this.isValid=e}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.isValid?" VALID":"INVALID"}] ${this.actual.constructor.name} - ${this.actual}`}},i8=class{constructor(e,t){this.resourceLabel=e,this.reason=t}},n8=class{constructor(){this.elements=new Map}createMessage(){let e=[],t=[];for(let[,n]of this.elements)(n.reason===0?e:t).push(n.resourceLabel);let i=[];return e.length>0&&i.push(m(2099,"The following files have been closed and modified on disk: {0}.",e.join(", "))),t.length>0&&i.push(m(2100,"The following files have been modified in an incompatible way: {0}.",t.join(", "))),i.join(` +`)}get size(){return this.elements.size}has(e){return this.elements.has(e)}set(e,t){this.elements.set(e,t)}delete(e){return this.elements.delete(e)}},Iee=class{constructor(e,t,i,n,s,r,a){this.id=++X1e,this.type=1,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabels=t,this.strResources=i,this.groupId=n,this.groupOrder=s,this.sourceId=r,this.sourceOrder=a,this.removedResources=null,this.invalidatedResources=null}canSplit(){return typeof this.actual.split=="function"}removeResource(e,t,i){this.removedResources||(this.removedResources=new n8),this.removedResources.has(t)||this.removedResources.set(t,new i8(e,i))}setValid(e,t,i){i?this.invalidatedResources&&(this.invalidatedResources.delete(t),this.invalidatedResources.size===0&&(this.invalidatedResources=null)):(this.invalidatedResources||(this.invalidatedResources=new n8),this.invalidatedResources.has(t)||this.invalidatedResources.set(t,new i8(e,0)))}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources?"INVALID":" VALID"}] ${this.actual.constructor.name} - ${this.actual}`}},o8=class{constructor(e,t){this.resourceLabel=e,this.strResource=t,this._past=[],this._future=[],this.locked=!1,this.versionId=1}dispose(){for(let e of this._past)e.type===1&&e.removeResource(this.resourceLabel,this.strResource,0);for(let e of this._future)e.type===1&&e.removeResource(this.resourceLabel,this.strResource,0);this.versionId++}toString(){let e=[];e.push(`* ${this.strResource}:`);for(let t=0;t=0;t--)e.push(` * [REDO] ${this._future[t]}`);return e.join(` +`)}flushAllElements(){this._past=[],this._future=[],this.versionId++}_setElementValidFlag(e,t){e.type===1?e.setValid(this.resourceLabel,this.strResource,t):e.setValid(t)}setElementsValidFlag(e,t){for(let i of this._past)t(i.actual)&&this._setElementValidFlag(i,e);for(let i of this._future)t(i.actual)&&this._setElementValidFlag(i,e)}pushElement(e){for(let t of this._future)t.type===1&&t.removeResource(this.resourceLabel,this.strResource,1);this._future=[],this._past.push(e),this.versionId++}createSnapshot(e){let t=[];for(let i=0,n=this._past.length;i=0;i--)t.push(this._future[i].id);return new PT(e,t)}restoreSnapshot(e){let t=e.elements.length,i=!0,n=0,s=-1;for(let a=0,l=this._past.length;a=t||c.id!==e.elements[n])&&(i=!1,s=a),!i&&c.type===1&&c.removeResource(this.resourceLabel,this.strResource,0)}let r=-1;for(let a=this._future.length-1;a>=0;a--,n++){let l=this._future[a];i&&(n>=t||l.id!==e.elements[n])&&(i=!1,r=a),!i&&l.type===1&&l.removeResource(this.resourceLabel,this.strResource,0)}s!==-1&&(this._past=this._past.slice(0,s)),r!==-1&&(this._future=this._future.slice(r+1)),this.versionId++}getElements(){let e=[],t=[];for(let i of this._past)e.push(i.actual);for(let i of this._future)t.push(i.actual);return{past:e,future:t}}getClosestPastElement(){return this._past.length===0?null:this._past[this._past.length-1]}getSecondClosestPastElement(){return this._past.length<2?null:this._past[this._past.length-2]}getClosestFutureElement(){return this._future.length===0?null:this._future[this._future.length-1]}hasPastElements(){return this._past.length>0}hasFutureElements(){return this._future.length>0}splitPastWorkspaceElement(e,t){for(let i=this._past.length-1;i>=0;i--)if(this._past[i]===e){t.has(this.strResource)?this._past[i]=t.get(this.strResource):this._past.splice(i,1);break}this.versionId++}splitFutureWorkspaceElement(e,t){for(let i=this._future.length-1;i>=0;i--)if(this._future[i]===e){t.has(this.strResource)?this._future[i]=t.get(this.strResource):this._future.splice(i,1);break}this.versionId++}moveBackward(e){this._past.pop(),this._future.push(e),this.versionId++}moveForward(e){this._future.pop(),this._past.push(e),this.versionId++}},PD=class{constructor(e){this.editStacks=e,this._versionIds=[];for(let t=0,i=this.editStacks.length;tt.sourceOrder)&&(t=r,i=n)}return[t,i]}canUndo(e){if(e instanceof Vb){let[,i]=this._findClosestUndoElementWithSource(e.id);return!!i}let t=this.getUriComparisonKey(e);return this._editStacks.has(t)?this._editStacks.get(t).hasPastElements():!1}_onError(e,t){De(e);for(let i of t.strResources)this.removeElements(i);this._notificationService.error(e)}_acquireLocks(e){for(let t of e.editStacks)if(t.locked)throw new Error("Cannot acquire edit stack lock");for(let t of e.editStacks)t.locked=!0;return()=>{for(let t of e.editStacks)t.locked=!1}}_safeInvokeWithLocks(e,t,i,n,s){let r=this._acquireLocks(i),a;try{a=t()}catch(l){return r(),n.dispose(),this._onError(l,e)}return a?a.then(()=>(r(),n.dispose(),s()),l=>(r(),n.dispose(),this._onError(l,e))):(r(),n.dispose(),s())}async _invokeWorkspacePrepare(e){if(typeof e.actual.prepareUndoRedo>"u")return T.None;let t=e.actual.prepareUndoRedo();return typeof t>"u"?T.None:t}_invokeResourcePrepare(e,t){if(e.actual.type!==1||typeof e.actual.prepareUndoRedo>"u")return t(T.None);let i=e.actual.prepareUndoRedo();return i?Oc(i)?t(i):i.then(n=>t(n)):t(T.None)}_getAffectedEditStacks(e){let t=[];for(let i of e.strResources)t.push(this._editStacks.get(i)||Q1e);return new PD(t)}_tryToSplitAndUndo(e,t,i,n){if(t.canSplit())return this._splitPastWorkspaceElement(t,i),this._notificationService.warn(n),new V0(this._undo(e,0,!0));for(let s of t.strResources)this.removeElements(s);return this._notificationService.warn(n),new V0}_checkWorkspaceUndo(e,t,i,n){if(t.removedResources)return this._tryToSplitAndUndo(e,t,t.removedResources,m(2101,"Could not undo '{0}' across all files. {1}",t.label,t.removedResources.createMessage()));if(n&&t.invalidatedResources)return this._tryToSplitAndUndo(e,t,t.invalidatedResources,m(2102,"Could not undo '{0}' across all files. {1}",t.label,t.invalidatedResources.createMessage()));let s=[];for(let a of i.editStacks)a.getClosestPastElement()!==t&&s.push(a.resourceLabel);if(s.length>0)return this._tryToSplitAndUndo(e,t,null,m(2103,"Could not undo '{0}' across all files because changes were made to {1}",t.label,s.join(", ")));let r=[];for(let a of i.editStacks)a.locked&&r.push(a.resourceLabel);return r.length>0?this._tryToSplitAndUndo(e,t,null,m(2104,"Could not undo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,r.join(", "))):i.isValid()?null:this._tryToSplitAndUndo(e,t,null,m(2105,"Could not undo '{0}' across all files because an undo or redo operation occurred in the meantime",t.label))}_workspaceUndo(e,t,i){let n=this._getAffectedEditStacks(t),s=this._checkWorkspaceUndo(e,t,n,!1);return s?s.returnValue:this._confirmAndExecuteWorkspaceUndo(e,t,n,i)}_isPartOfUndoGroup(e){if(!e.groupId)return!1;for(let[,t]of this._editStacks){let i=t.getClosestPastElement();if(i){if(i===e){let n=t.getSecondClosestPastElement();if(n&&n.groupId===e.groupId)return!0}if(i.groupId===e.groupId)return!0}}return!1}async _confirmAndExecuteWorkspaceUndo(e,t,i,n){if(t.canSplit()&&!this._isPartOfUndoGroup(t)){let a;(function(d){d[d.All=0]="All",d[d.This=1]="This",d[d.Cancel=2]="Cancel"})(a||(a={}));let{result:l}=await this._dialogService.prompt({type:rn.Info,message:m(2106,"Would you like to undo '{0}' across all files?",t.label),buttons:[{label:m(2107,"&&Undo in {0} Files",i.editStacks.length),run:()=>a.All},{label:m(2108,"Undo this &&File"),run:()=>a.This}],cancelButton:{run:()=>a.Cancel}});if(l===a.Cancel)return;if(l===a.This)return this._splitPastWorkspaceElement(t,null),this._undo(e,0,!0);let c=this._checkWorkspaceUndo(e,t,i,!1);if(c)return c.returnValue;n=!0}let s;try{s=await this._invokeWorkspacePrepare(t)}catch(a){return this._onError(a,t)}let r=this._checkWorkspaceUndo(e,t,i,!0);if(r)return s.dispose(),r.returnValue;for(let a of i.editStacks)a.moveBackward(t);return this._safeInvokeWithLocks(t,()=>t.actual.undo(),i,s,()=>this._continueUndoInGroup(t.groupId,n))}_resourceUndo(e,t,i){if(!t.isValid){e.flushAllElements();return}if(e.locked){let n=m(2109,"Could not undo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.warn(n);return}return this._invokeResourcePrepare(t,n=>(e.moveBackward(t),this._safeInvokeWithLocks(t,()=>t.actual.undo(),new PD([e]),n,()=>this._continueUndoInGroup(t.groupId,i))))}_findClosestUndoElementInGroup(e){if(!e)return[null,null];let t=null,i=null;for(let[n,s]of this._editStacks){let r=s.getClosestPastElement();r&&r.groupId===e&&(!t||r.groupOrder>t.groupOrder)&&(t=r,i=n)}return[t,i]}_continueUndoInGroup(e,t){if(!e)return;let[,i]=this._findClosestUndoElementInGroup(e);if(i)return this._undo(i,0,t)}undo(e){if(e instanceof Vb){let[,t]=this._findClosestUndoElementWithSource(e.id);return t?this._undo(t,e.id,!1):void 0}return typeof e=="string"?this._undo(e,0,!1):this._undo(this.getUriComparisonKey(e),0,!1)}_undo(e,t=0,i){if(!this._editStacks.has(e))return;let n=this._editStacks.get(e),s=n.getClosestPastElement();if(!s)return;if(s.groupId){let[a,l]=this._findClosestUndoElementInGroup(s.groupId);if(s!==a&&l)return this._undo(l,t,i)}return(s.sourceId!==t||s.confirmBeforeUndo)&&!i?this._confirmAndContinueUndo(e,t,s):s.type===1?this._workspaceUndo(e,s,i):this._resourceUndo(n,s,i)}async _confirmAndContinueUndo(e,t,i){if((await this._dialogService.confirm({message:m(2110,"Would you like to undo '{0}'?",i.label),primaryButton:m(2111,"&&Yes"),cancelButton:m(2112,"No")})).confirmed)return this._undo(e,t,!0)}_findClosestRedoElementWithSource(e){if(!e)return[null,null];let t=null,i=null;for(let[n,s]of this._editStacks){let r=s.getClosestFutureElement();r&&r.sourceId===e&&(!t||r.sourceOrder0)return this._tryToSplitAndRedo(e,t,null,m(2115,"Could not redo '{0}' across all files because changes were made to {1}",t.label,s.join(", ")));let r=[];for(let a of i.editStacks)a.locked&&r.push(a.resourceLabel);return r.length>0?this._tryToSplitAndRedo(e,t,null,m(2116,"Could not redo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,r.join(", "))):i.isValid()?null:this._tryToSplitAndRedo(e,t,null,m(2117,"Could not redo '{0}' across all files because an undo or redo operation occurred in the meantime",t.label))}_workspaceRedo(e,t){let i=this._getAffectedEditStacks(t),n=this._checkWorkspaceRedo(e,t,i,!1);return n?n.returnValue:this._executeWorkspaceRedo(e,t,i)}async _executeWorkspaceRedo(e,t,i){let n;try{n=await this._invokeWorkspacePrepare(t)}catch(r){return this._onError(r,t)}let s=this._checkWorkspaceRedo(e,t,i,!0);if(s)return n.dispose(),s.returnValue;for(let r of i.editStacks)r.moveForward(t);return this._safeInvokeWithLocks(t,()=>t.actual.redo(),i,n,()=>this._continueRedoInGroup(t.groupId))}_resourceRedo(e,t){if(!t.isValid){e.flushAllElements();return}if(e.locked){let i=m(2118,"Could not redo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.warn(i);return}return this._invokeResourcePrepare(t,i=>(e.moveForward(t),this._safeInvokeWithLocks(t,()=>t.actual.redo(),new PD([e]),i,()=>this._continueRedoInGroup(t.groupId))))}_findClosestRedoElementInGroup(e){if(!e)return[null,null];let t=null,i=null;for(let[n,s]of this._editStacks){let r=s.getClosestFutureElement();r&&r.groupId===e&&(!t||r.groupOrder{Ie();t0e={ctrlCmd:!1,alt:!1,shift:!1};(function(o){o[o.Blur=1]="Blur",o[o.Gesture=2]="Gesture",o[o.Other=3]="Other"})(_y||(_y={}));(function(o){o[o.NONE=0]="NONE",o[o.FIRST=1]="FIRST",o[o.SECOND=2]="SECOND",o[o.LAST=3]="LAST"})(sd||(sd={}));(function(o){o[o.First=1]="First",o[o.Second=2]="Second",o[o.Last=3]="Last",o[o.Next=4]="Next",o[o.Previous=5]="Previous",o[o.NextPage=6]="NextPage",o[o.PreviousPage=7]="PreviousPage",o[o.NextSeparator=8]="NextSeparator",o[o.PreviousSeparator=9]="PreviousSeparator"})(pi||(pi={}));(function(o){o[o.Title=1]="Title",o[o.Inline=2]="Inline",o[o.Input=3]="Input"})(by||(by={}));Mn=Ne("quickInputService")});var iv,vy,wy,Cy,i0e=x(()=>{Ze();ae();W();qW();Rt();(function(o){o[o.STORAGE_DOES_NOT_EXIST=0]="STORAGE_DOES_NOT_EXIST",o[o.STORAGE_IN_MEMORY=1]="STORAGE_IN_MEMORY"})(iv||(iv={}));(function(o){o[o.None=0]="None",o[o.Initialized=1]="Initialized",o[o.Closed=2]="Closed"})(vy||(vy={}));wy=class o extends T{static{this.DEFAULT_FLUSH_DELAY=100}constructor(e,t=Object.create(null)){super(),this.database=e,this.options=t,this._onDidChangeStorage=this._register(new Ed),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=vy.None,this.cache=new Map,this.flushDelayer=this._register(new Cx(o.DEFAULT_FLUSH_DELAY)),this.pendingDeletes=new Set,this.pendingInserts=new Map,this.pendingClose=void 0,this.whenFlushedCallbacks=[],this.registerListeners()}registerListeners(){this._register(this.database.onDidChangeItemsExternal(e=>this.onDidChangeItemsExternal(e)))}onDidChangeItemsExternal(e){this._onDidChangeStorage.pause();try{e.changed?.forEach((t,i)=>this.acceptExternal(i,t)),e.deleted?.forEach(t=>this.acceptExternal(t,void 0))}finally{this._onDidChangeStorage.resume()}}acceptExternal(e,t){if(this.state===vy.Closed)return;let i=!1;ka(t)?i=this.cache.delete(e):this.cache.get(e)!==t&&(this.cache.set(e,t),i=!0),i&&this._onDidChangeStorage.fire({key:e,external:!0})}get(e,t){let i=this.cache.get(e);return ka(i)?t:i}getBoolean(e,t){let i=this.get(e);return ka(i)?t:i==="true"}getNumber(e,t){let i=this.get(e);return ka(i)?t:parseInt(i,10)}async set(e,t,i=!1){if(this.state===vy.Closed)return;if(ka(t))return this.delete(e,i);let n=ln(t)||Array.isArray(t)?f1e(t):String(t);if(this.cache.get(e)!==n)return this.cache.set(e,n),this.pendingInserts.set(e,n),this.pendingDeletes.delete(e),this._onDidChangeStorage.fire({key:e,external:i}),this.doFlush()}async delete(e,t=!1){if(!(this.state===vy.Closed||!this.cache.delete(e)))return this.pendingDeletes.has(e)||this.pendingDeletes.add(e),this.pendingInserts.delete(e),this._onDidChangeStorage.fire({key:e,external:t}),this.doFlush()}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}async flushPending(){if(!this.hasPending)return;let e={insert:this.pendingInserts,delete:this.pendingDeletes};return this.pendingDeletes=new Set,this.pendingInserts=new Map,this.database.updateItems(e).finally(()=>{if(!this.hasPending)for(;this.whenFlushedCallbacks.length;)this.whenFlushedCallbacks.pop()?.()})}async flush(e){if(!(this.state===vy.Closed||this.pendingClose))return this.doFlush(e)}async doFlush(e){return this.options.hint===iv.STORAGE_IN_MEMORY?this.flushPending():this.flushDelayer.trigger(()=>this.flushPending(),e)}async whenFlushed(){if(this.hasPending)return new Promise(e=>this.whenFlushedCallbacks.push(e))}},Cy=class{constructor(){this.onDidChangeItemsExternal=Q.None,this.items=new Map}async updateItems(e){e.insert?.forEach((t,i)=>this.items.set(i,t)),e.delete?.forEach(t=>this.items.delete(t))}}});function W8e(o){let e=o.get(s8);if(e)try{return JSON.parse(e)}catch{}return Object.create(null)}var s8,zn,qu,Tee,r8,al=x(()=>{Ze();ae();W();Rt();i0e();Ie();s8="__$__targetStorageMarker",zn=Ne("storageService");(function(o){o[o.NONE=0]="NONE",o[o.SHUTDOWN=1]="SHUTDOWN"})(qu||(qu={}));Tee=class o extends T{static{this.DEFAULT_FLUSH_INTERVAL=60*1e3}constructor(e={flushInterval:o.DEFAULT_FLUSH_INTERVAL}){super(),this._onDidChangeValue=this._register(new Ed),this._onDidChangeTarget=this._register(new Ed),this._onWillSaveState=this._register(new N),this.onWillSaveState=this._onWillSaveState.event,this.runFlushWhenIdle=this._register(new Qe),this._workspaceKeyTargets=void 0,this._profileKeyTargets=void 0,this._applicationKeyTargets=void 0,this._applicationSharedKeyTargets=void 0,this.flushWhenIdleScheduler=this._register(new at(()=>this.doFlushWhenIdle(),e.flushInterval))}onDidChangeValue(e,t,i){return Q.filter(this._onDidChangeValue.event,n=>n.scope===e&&(t===void 0||n.key===t),i)}doFlushWhenIdle(){this.runFlushWhenIdle.value=sE(()=>{this.shouldFlushWhenIdle()&&this.flush(),this.flushWhenIdleScheduler.schedule()})}shouldFlushWhenIdle(){return!0}emitDidChangeValue(e,t){let{key:i,external:n}=t;if(i===s8){switch(e){case-2:this._applicationSharedKeyTargets=void 0;break;case-1:this._applicationKeyTargets=void 0;break;case 0:this._profileKeyTargets=void 0;break;case 1:this._workspaceKeyTargets=void 0;break}this._onDidChangeTarget.fire({scope:e})}else this._onDidChangeValue.fire({scope:e,key:i,target:this.getKeyTargets(e)[i],external:n})}get(e,t,i){return this.getStorage(t)?.get(e,i)}getBoolean(e,t,i){return this.getStorage(t)?.getBoolean(e,i)}getNumber(e,t,i){return this.getStorage(t)?.getNumber(e,i)}store(e,t,i,n,s=!1){if(ka(t)){this.remove(e,i,s);return}this.withPausedEmitters(()=>{this.updateKeyTarget(e,i,n),this.getStorage(i)?.set(e,t,s)})}remove(e,t,i=!1){this.withPausedEmitters(()=>{this.updateKeyTarget(e,t,void 0),this.getStorage(t)?.delete(e,i)})}withPausedEmitters(e){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{e()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}updateKeyTarget(e,t,i,n=!1){let s=this.getKeyTargets(t);typeof i=="number"?s[e]!==i&&(s[e]=i,this.getStorage(t)?.set(s8,JSON.stringify(s),n)):typeof s[e]=="number"&&(delete s[e],this.getStorage(t)?.set(s8,JSON.stringify(s),n))}get workspaceKeyTargets(){return this._workspaceKeyTargets||(this._workspaceKeyTargets=this.loadKeyTargets(1)),this._workspaceKeyTargets}get profileKeyTargets(){return this._profileKeyTargets||(this._profileKeyTargets=this.loadKeyTargets(0)),this._profileKeyTargets}get applicationKeyTargets(){return this._applicationKeyTargets||(this._applicationKeyTargets=this.loadKeyTargets(-1)),this._applicationKeyTargets}get applicationSharedKeyTargets(){return this._applicationSharedKeyTargets||(this._applicationSharedKeyTargets=this.loadKeyTargets(-2)),this._applicationSharedKeyTargets}getKeyTargets(e){switch(e){case-2:return this.applicationSharedKeyTargets;case-1:return this.applicationKeyTargets;case 0:return this.profileKeyTargets;default:return this.workspaceKeyTargets}}loadKeyTargets(e){let t=this.getStorage(e);return t?W8e(t):Object.create(null)}async flush(e=qu.NONE){this._onWillSaveState.fire({reason:e});let t=this.getStorage(-1),i=this.getStorage(-2),n=this.getStorage(0),s=this.getStorage(1);switch(e){case qu.NONE:await Nw.settled([t?.whenFlushed()??Promise.resolve(),i?.whenFlushed()??Promise.resolve(),n?.whenFlushed()??Promise.resolve(),s?.whenFlushed()??Promise.resolve()]);break;case qu.SHUTDOWN:await Nw.settled([t?.flush(0)??Promise.resolve(),i?.flush(0)??Promise.resolve(),n?.flush(0)??Promise.resolve(),s?.flush(0)??Promise.resolve()]);break}}},r8=class extends Tee{constructor(){super(),this.applicationStorage=this._register(new wy(new Cy,{hint:iv.STORAGE_IN_MEMORY})),this.applicationSharedStorage=this._register(new wy(new Cy,{hint:iv.STORAGE_IN_MEMORY})),this.profileStorage=this._register(new wy(new Cy,{hint:iv.STORAGE_IN_MEMORY})),this.workspaceStorage=this._register(new wy(new Cy,{hint:iv.STORAGE_IN_MEMORY})),this._register(this.workspaceStorage.onDidChangeStorage(e=>this.emitDidChangeValue(1,e))),this._register(this.profileStorage.onDidChangeStorage(e=>this.emitDidChangeValue(0,e))),this._register(this.applicationStorage.onDidChangeStorage(e=>this.emitDidChangeValue(-1,e))),this._register(this.applicationSharedStorage.onDidChangeStorage(e=>this.emitDidChangeValue(-2,e)))}getStorage(e){switch(e){case-2:return this.applicationSharedStorage;case-1:return this.applicationStorage;case 0:return this.profileStorage;default:return this.workspaceStorage}}shouldFlushWhenIdle(){return!1}}});var H8e,n0e,FD,o0e,Nee,V8e,z8e,Dee,a8,l8,c8=x(()=>{Ze();Ae();ae();W();le();yi();je();Qo();Ie();Mr();al();Dl();H8e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},n0e=function(o,e){return function(t,i){e(t,i,o)}},FD=Ne("IInlineCompletionsService"),o0e=new fe("inlineCompletions.snoozed",!1,m(83,"Whether inline completions are currently snoozed")),Nee=class extends T{get snoozeTimeLeft(){return this._snoozeTimeEnd===void 0?0:Math.max(0,this._snoozeTimeEnd-Date.now())}constructor(e,t){super(),this._contextKeyService=e,this._telemetryService=t,this._onDidChangeIsSnoozing=this._register(new N),this.onDidChangeIsSnoozing=this._onDidChangeIsSnoozing.event,this._snoozeTimeEnd=void 0,this._recentCompletionIds=[],this._timer=this._register(new ro);let i=o0e.bindTo(this._contextKeyService);this._register(this.onDidChangeIsSnoozing(()=>i.set(this.isSnoozing())))}setSnoozeDuration(e){if(e<0)throw new xe(`Invalid snooze duration: ${e}. Duration must be non-negative.`);if(e===0){this.cancelSnooze();return}let t=this.isSnoozing(),i=this.snoozeTimeLeft;this._snoozeTimeEnd=Date.now()+e,t||this._onDidChangeIsSnoozing.fire(!0),this._timer.cancelAndSet(()=>{if(!this.isSnoozing())this._onDidChangeIsSnoozing.fire(!1);else throw new xe("Snooze timer did not fire as expected")},this.snoozeTimeLeft+1),this._reportSnooze(e-i,e)}isSnoozing(){return this.snoozeTimeLeft>0}cancelSnooze(){this.isSnoozing()&&(this._reportSnooze(-this.snoozeTimeLeft,0),this._snoozeTimeEnd=void 0,this._timer.cancel(),this._onDidChangeIsSnoozing.fire(!1))}reportNewCompletion(e){this._lastCompletionId=e,this._recentCompletionIds.unshift(e),this._recentCompletionIds.length>5&&this._recentCompletionIds.pop()}_reportSnooze(e,t){let i=Math.round(e/1e3),n=Math.round(t/1e3);this._telemetryService.publicLog2("inlineCompletions.snooze",{deltaSeconds:i,totalSeconds:n,lastCompletionId:this._lastCompletionId,recentCompletionIds:this._recentCompletionIds})}};Nee=H8e([n0e(0,Ce),n0e(1,$n)],Nee);Je(FD,Nee,1);V8e="editor.action.inlineSuggest.snooze",z8e="editor.action.inlineSuggest.cancelSnooze",Dee="inlineCompletions.lastSnoozeDuration",a8=class o extends Cn{static{this.ID=V8e}constructor(){super({id:o.ID,title:U(97,"Snooze Inline Suggestions"),precondition:G.true(),f1:!0})}async run(e,...t){let i=e.get(Mn),n=e.get(FD),s=e.get(zn),r;t.length>0&&typeof t[0]=="number"&&(r=t[0]*6e4),r||(r=await this.getDurationFromUser(i,s)),r&&n.setSnoozeDuration(r)}async getDurationFromUser(e,t){let i=t.getNumber(Dee,0,3e5),n=[{label:m(84,"1 minute"),id:"1",value:6e4},{label:m(85,"5 minutes"),id:"5",value:3e5},{label:m(86,"10 minutes"),id:"10",value:6e5},{label:m(87,"15 minutes"),id:"15",value:9e5},{label:m(88,"30 minutes"),id:"30",value:18e5},{label:m(89,"60 minutes"),id:"60",value:36e5}],s=n;if(i>0&&!n.some(a=>a.value===i)){let a=i/6e4,l={label:m(90,"{0} minutes (Last used)",a),id:"last-custom",value:i,description:m(91,"Last used custom duration")},c=n.findIndex(d=>d.value>i);c===-1?s=[...n,l]:s=[...n.slice(0,c),l,...n.slice(c)]}s.push({label:m(92,"Custom..."),id:"custom",value:-1});let r=await e.pick(s,{placeHolder:m(93,"Select snooze duration for Inline Suggestions"),activeItem:s.find(a=>a.value===i)});if(r)return r.id==="custom"?this.getCustomDurationFromUser(e,t):(t.store(Dee,r.value,0,0),r.value)}async getCustomDurationFromUser(e,t){let i=await e.input({placeHolder:m(94,"Duration in minutes (e.g. 90)"),prompt:m(95,"Enter snooze duration in minutes"),validateInput:async n=>{let s=Number(n);if(isNaN(s)||s<=0||!Number.isFinite(s))return m(96,"Please enter a positive number")}});if(i){let n=Number(i)*6e4;return t.store(Dee,n,0,0),n}}},l8=class o extends Cn{static{this.ID=z8e}constructor(){super({id:o.ID,title:U(98,"Cancel Snooze Inline Suggestions"),precondition:o0e,f1:!0})}async run(e){e.get(FD).cancelSnooze()}}});function ts(o,e,t){return Math.min(Math.max(o,e),t)}var BD,d8,nv=x(()=>{BD=class{constructor(){this._n=1,this._val=0}update(e){return this._val=this._val+(e-this._val)/this._n,this._n+=1,this._val}get value(){return this._val}},d8=class{constructor(e){this._n=0,this._val=0,this._values=[],this._index=0,this._sum=0,this._values=new Array(e),this._values.fill(0,0,e)}update(e){let t=this._values[this._index];return this._values[this._index]=e,this._index=(this._index+1)%this._values.length,this._sum-=t,this._sum+=e,this._n{Ie();z0=Ne("environmentService")});var U8e,s0e,Is,u8,Ree,Aee,Mee,th=x(()=>{Nm();yo();nv();h8();Qo();Ie();So();jo();U8e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},s0e=function(o,e){return function(t,i){e(t,i,o)}},Is=Ne("ILanguageFeatureDebounceService");(function(o){let e=new WeakMap,t=0;function i(n){let s=e.get(n);return s===void 0&&(s=++t,e.set(n,s)),s}o.of=i})(u8||(u8={}));Ree=class{constructor(e){this._default=e}get(e){return this._default}update(e,t){return this._default}default(){return this._default}},Aee=class{constructor(e,t,i,n,s,r){this._logService=e,this._name=t,this._registry=i,this._default=n,this._min=s,this._max=r,this._cache=new Zo(50,.7)}_key(e){return e.id+this._registry.all(e).reduce((t,i)=>lE(u8.of(i),t),0)}get(e){let t=this._key(e),i=this._cache.get(t);return i?ts(i.value,this._min,this._max):this.default()}update(e,t){let i=this._key(e),n=this._cache.get(i);n||(n=new d8(6),this._cache.set(i,n));let s=ts(n.update(t),this._min,this._max);return Rw(e.uri,"output")||this._logService.trace(`[DEBOUNCE: ${this._name}] for ${e.uri.toString()} is ${s}ms`),s}_overall(){let e=new BD;for(let[,t]of this._cache)e.update(t.value);return e.value}default(){let e=this._overall()|0||this._default;return ts(e,this._min,this._max)}},Mee=class{constructor(e,t){this._logService=e,this._data=new Map,this._isDev=t.isExtensionDevelopment||!t.isBuilt}for(e,t,i){let n=i?.min??50,s=i?.max??n**2,r=i?.key??void 0,a=`${u8.of(e)},${n}${r?","+r:""}`,l=this._data.get(a);return l||(this._isDev?(this._logService.debug(`[DEBOUNCE: ${t}] is disabled in developed mode`),l=new Ree(n*1.5)):l=new Aee(this._logService,t,e,this._overallAverage()|0||n*1.5,n,s),this._data.set(a,l)),l}_overallAverage(){let e=new BD;for(let t of this._data.values())e.update(t.default());return e.value}};Mee=U8e([s0e(0,Ot),s0e(1,z0)],Mee);Je(Is,Mee,1)});function a0e(o,e){switch(o){case 0:return"";case 1:return`${m8}*?`;default:return`(?:${g8}|${m8}+${g8}${e?`|${g8}${m8}+`:""})*?`}}function l0e(o,e){if(!o)return[];let t=[],i=!1,n=!1,s="";for(let r of o){switch(r){case e:if(!i&&!n){t.push(s),s="";continue}break;case"{":i=!0;break;case"}":i=!1;break;case"[":n=!0;break;case"]":n=!1;break}s+=r}return s&&t.push(s),t}function f0e(o){if(!o)return"";let e="",t=l0e(o,r0e);if(t.every(i=>i===f8))e=".*";else{let i=!1;t.forEach((n,s)=>{if(n===f8){if(i)return;e+=a0e(2,s===t.length-1)}else{let r=!1,a="",l=!1,c="";for(let d of n){if(d!=="}"&&r){a+=d;continue}if(l&&(d!=="]"||!c)){let h;d==="-"?h=d:(d==="^"||d==="!")&&!c?h="^":d===r0e?h="":h=$o(d),c+=h;continue}switch(d){case"{":r=!0;continue;case"[":l=!0;continue;case"}":{let u=`(?:${l0e(a,",").map(f=>f0e(f)).join("|")})`;e+=u,r=!1,a="";break}case"]":{e+="["+c+"]",l=!1,c="";break}case"?":e+=m8;continue;case"*":e+=a0e(1);continue;default:e+=$o(d)}}sl===c,endsWith:i?rO:(l,c)=>l.endsWith(c),isEqualOrParent:(l,c)=>CE(l,c,e.ignoreCase??!po)},s=`${i?t.toLowerCase():t}_${!!e.trimForExclusions}_${i}`,r=c0e.get(s);if(r)return h0e(r,o,n);let a;return q8e.test(t)?r=X8e(t.substring(4),t,n):(a=j8e.exec(Oee(t,n)))?r=Q8e(a[1],t,n):(e.trimForExclusions?G8e:K8e).test(t)?r=J8e(t,n):(a=Y8e.exec(Oee(t,n)))?r=u0e(a[1].substring(1),t,!0,n):(a=Z8e.exec(Oee(t,n)))?r=u0e(a[1],t,!1,n):r=e6e(t,n),c0e.set(s,r),h0e(r,o,n)}function h0e(o,e,t){if(typeof e=="string")return o;let i=function(n,s){return t.isEqualOrParent(n,e.base)?o(Tm(n.substring(e.base.length),oc),s):null};return i.allBasenames=o.allBasenames,i.allPaths=o.allPaths,i.basenames=o.basenames,i.patterns=o.patterns,i}function Oee(o,e){return e.trimForExclusions&&o.endsWith("/**")?o.substring(0,o.length-2):o}function X8e(o,e,t){return function(i,n){return typeof i=="string"&&t.endsWith(i,o)?e:null}}function Q8e(o,e,t){let i=`/${o}`,n=`\\${o}`,s=function(a,l){return typeof a!="string"?null:l?t.equals(l,o)?e:null:t.equals(a,o)||t.endsWith(a,i)||t.endsWith(a,n)?e:null},r=[o];return s.basenames=r,s.patterns=[e],s.allBasenames=r,s}function J8e(o,e){let t=m0e(o.slice(1,-1).split(",").map(a=>Pee(a,e)).filter(a=>a!==Sg),o),i=t.length;if(!i)return Sg;if(i===1)return t[0];let n=function(a,l){for(let c=0,d=t.length;c!!a.allBasenames);s&&(n.allBasenames=s.allBasenames);let r=t.reduce((a,l)=>l.allPaths?a.concat(l.allPaths):a,[]);return r.length&&(n.allPaths=r),n}function u0e(o,e,t,i){let n=oc===vn.sep,s=n?o:o.replace($8e,oc),r=oc+s,a=vn.sep+o,l;return t?l=function(c,d){return typeof c=="string"&&(i.equals(c,s)||i.endsWith(c,r)||!n&&(i.equals(c,o)||i.endsWith(c,a)))?e:null}:l=function(c,d){return typeof c=="string"&&(i.equals(c,s)||!n&&i.equals(c,o))?e:null},l.allPaths=[(t?"*/":"./")+o],l}function e6e(o,e){try{let t=new RegExp(`^${f0e(o)}$`,e.ignoreCase?"i":void 0);return function(i){return t.lastIndex=0,typeof i=="string"&&t.test(i)?o:null}}catch{return Sg}}function g0e(o,e,t){return!o||typeof e!="string"?!1:Fee(o,t)(e)}function Fee(o,e={}){if(!o)return d0e;if(typeof o=="string"||t6e(o)){let t=Pee(o,e);if(t===Sg)return d0e;let i=function(n,s){return!!t(n,s)};return t.allBasenames&&(i.allBasenames=t.allBasenames),t.allPaths&&(i.allPaths=t.allPaths),i}return i6e(o,e)}function t6e(o){let e=o;return e?typeof e.base=="string"&&typeof e.pattern=="string":!1}function i6e(o,e){let t=m0e(Object.getOwnPropertyNames(o).map(a=>n6e(a,o[a],e)).filter(a=>a!==Sg)),i=t.length;if(!i)return Sg;if(!t.some(a=>!!a.requiresSiblings)){if(i===1)return t[0];let a=function(d,h){let u;for(let f=0,g=t.length;f{for(let f of u){let g=await f;if(typeof g=="string")return g}return null})():null},l=t.find(d=>!!d.allBasenames);l&&(a.allBasenames=l.allBasenames);let c=t.reduce((d,h)=>h.allPaths?d.concat(h.allPaths):d,[]);return c.length&&(a.allPaths=c),a}let n=function(a,l,c){let d,h;for(let u=0,f=t.length;u{for(let u of h){let f=await u;if(typeof f=="string")return f}return null})():null},s=t.find(a=>!!a.allBasenames);s&&(n.allBasenames=s.allBasenames);let r=t.reduce((a,l)=>l.allPaths?a.concat(l.allPaths):a,[]);return r.length&&(n.allPaths=r),n}function n6e(o,e,t){if(e===!1)return Sg;let i=Pee(o,t);if(i===Sg)return Sg;if(typeof e=="boolean")return i;if(e){let n=e.when;if(typeof n=="string"){let s=(r,a,l,c)=>{if(!c||!i(r,a))return null;let d=n.replace("$(basename)",()=>l),h=c(d);return wO(h)?h.then(u=>u?o:null):h?o:null};return s.requiresSiblings=!0,s}}return i}function m0e(o,e){let t=o.filter(a=>!!a.basenames);if(t.length<2)return o;let i=t.reduce((a,l)=>{let c=l.basenames;return c?a.concat(c):a},[]),n;if(e){n=[];for(let a=0,l=i.length;a{let c=l.patterns;return c?a.concat(c):a},[]);let s=function(a,l){if(typeof a!="string")return null;if(!l){let d;for(d=a.length;d>0;d--){let h=a.charCodeAt(d-1);if(h===47||h===92)break}l=a.substring(d)}let c=i.indexOf(l);return c!==-1?n[c]:null};s.basenames=i,s.patterns=n,s.allBasenames=i;let r=o.filter(a=>!a.basenames);return r.push(s),r}var f8,r0e,g8,m8,$8e,q8e,j8e,K8e,G8e,Y8e,Z8e,c0e,d0e,Sg,Bee=x(()=>{Ze();iP();yo();yh();rt();He();f8="**",r0e="/",g8="[/\\\\]",m8="[^/\\\\]",$8e=/\//g;q8e=/^\*\*\/\*\.[\w\.-]+$/,j8e=/^\*\*\/([\w\.-]+)\/?$/,K8e=/^{\*\*\/\*?[\w\.-]+\/?(,\*\*\/\*?[\w\.-]+\/?)*}$/,G8e=/^{\*\*\/\*?[\w\.-]+(\/(\*\*)?)?(,\*\*\/\*?[\w\.-]+(\/(\*\*)?)?)*}$/,Y8e=/^\*\*((\/[\w\.-]+)+)\/?$/,Z8e=/^([\w\.-]+(\/[\w\.-]+)*)\/?$/,c0e=new Zo(1e4),d0e=function(){return!1},Sg=function(){return null}});function WD(o,e,t,i,n,s){if(Array.isArray(o)){let r=0;for(let a of o){let l=WD(a,e,t,i,n,s);if(l===10)return l;l>r&&(r=l)}return r}else{if(typeof o=="string")return i?o==="*"?5:o===t?10:0:0;if(o){let{language:r,pattern:a,scheme:l,hasAccessToAllModels:c,notebookType:d}=o;if(!i&&!c)return 0;d&&n&&(e=n);let h=0;if(l)if(l===e.scheme)h=10;else if(l==="*")h=5;else return 0;if(r)if(r===t)h=10;else if(r==="*")h=Math.max(h,5);else return 0;if(d)if(d===s)h=10;else if(d==="*"&&s!==void 0)h=Math.max(h,5);else return 0;if(a){let u;if(typeof a=="string"?u=a:u={...a,base:yw(a.base)},u===e.fsPath||g0e(u,e.fsPath))h=10;else return 0}return h}else return 0}}var Wee=x(()=>{Bee();yh()});function p0e(o){return typeof o=="string"?!1:Array.isArray(o)?o.every(p0e):!!o.exclusive}function HD(o){return typeof o=="string"?!1:Array.isArray(o)?o.some(HD):!!o.isBuiltin}var p8,to,_0e=x(()=>{ae();W();ho();Wee();p8=class{constructor(e,t,i,n,s){this.uri=e,this.languageId=t,this.notebookUri=i,this.notebookType=n,this.recursive=s}equals(e){return this.notebookType===e.notebookType&&this.languageId===e.languageId&&this.uri.toString()===e.uri.toString()&&this.notebookUri?.toString()===e.notebookUri?.toString()&&this.recursive===e.recursive}},to=class o{get onDidChange(){return this._onDidChange.event}constructor(e){this._notebookInfoResolver=e,this._clock=0,this._entries=[],this._onDidChange=new N}register(e,t){let i={selector:e,provider:t,_score:-1,_time:this._clock++};return this._entries.push(i),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),ne(()=>{if(i){let n=this._entries.indexOf(i);n>=0&&(this._entries.splice(n,1),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),i=void 0)}})}has(e){return this.all(e).length>0}all(e){if(!e)return[];this._updateScores(e,!1);let t=[];for(let i of this._entries)i._score>0&&t.push(i.provider);return t}allNoModel(){return this._entries.map(e=>e.provider)}ordered(e,t=!1){let i=[];return this._orderedForEach(e,t,n=>i.push(n.provider)),i}orderedGroups(e){let t=[],i,n;return this._orderedForEach(e,!1,s=>{i&&n===s._score?i.push(s.provider):(n=s._score,i=[s.provider],t.push(i))}),t}_orderedForEach(e,t,i){this._updateScores(e,t);for(let n of this._entries)n._score>0&&i(n)}_updateScores(e,t){let i=this._notebookInfoResolver?.(e.uri),n=i?new p8(e.uri,e.getLanguageId(),i.uri,i.type,t):new p8(e.uri,e.getLanguageId(),void 0,void 0,t);if(!this._lastCandidate?.equals(n)){this._lastCandidate=n;for(let s of this._entries)if(s._score=WD(s.selector,n.uri,n.languageId,BP(e),n.notebookUri,n.notebookType),p0e(s.selector)&&s._score>0)if(t)s._score=0;else{for(let r of this._entries)r._score=0;s._score=1e3;break}this._entries.sort(o._compareByScoreAndTime)}}static _compareByScoreAndTime(e,t){return e._scoret._score?-1:HD(e.selector)&&!HD(t.selector)?1:!HD(e.selector)&&HD(t.selector)?-1:e._timet._time?-1:0}}});var Hee,b0e=x(()=>{_0e();Ut();Qo();Hee=class{constructor(){this.referenceProvider=new to(this._score.bind(this)),this.renameProvider=new to(this._score.bind(this)),this.newSymbolNamesProvider=new to(this._score.bind(this)),this.codeActionProvider=new to(this._score.bind(this)),this.definitionProvider=new to(this._score.bind(this)),this.typeDefinitionProvider=new to(this._score.bind(this)),this.declarationProvider=new to(this._score.bind(this)),this.implementationProvider=new to(this._score.bind(this)),this.documentSymbolProvider=new to(this._score.bind(this)),this.inlayHintsProvider=new to(this._score.bind(this)),this.colorProvider=new to(this._score.bind(this)),this.codeLensProvider=new to(this._score.bind(this)),this.documentFormattingEditProvider=new to(this._score.bind(this)),this.documentRangeFormattingEditProvider=new to(this._score.bind(this)),this.onTypeFormattingEditProvider=new to(this._score.bind(this)),this.signatureHelpProvider=new to(this._score.bind(this)),this.hoverProvider=new to(this._score.bind(this)),this.documentHighlightProvider=new to(this._score.bind(this)),this.multiDocumentHighlightProvider=new to(this._score.bind(this)),this.selectionRangeProvider=new to(this._score.bind(this)),this.foldingRangeProvider=new to(this._score.bind(this)),this.linkProvider=new to(this._score.bind(this)),this.inlineCompletionsProvider=new to(this._score.bind(this)),this.completionProvider=new to(this._score.bind(this)),this.linkedEditingRangeProvider=new to(this._score.bind(this)),this.documentRangeSemanticTokensProvider=new to(this._score.bind(this)),this.documentSemanticTokensProvider=new to(this._score.bind(this)),this.documentDropEditProvider=new to(this._score.bind(this)),this.documentPasteEditProvider=new to(this._score.bind(this))}_score(e){return this._notebookTypeResolver?.(e)}};Je(be,Hee,1)});var _8,v0e=x(()=>{_8=class{constructor(e=5){this.timesPerSecond=e,this._lastRun=0,this._minimumTimeBetweenRuns=1e3/e}runIfNotLimited(e){let t=Date.now();t-this._lastRun>=this._minimumTimeBetweenRuns&&(this._lastRun=t,e())}}});var b8,Vee,v8,w0e=x(()=>{Pe();ue();zb();v0e();b8=class o{static create(e,t){return new o(e,new Vee(t))}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._endLineNumber}constructor(e,t){this._startLineNumber=e,this._tokens=t,this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}toString(){return this._tokens.toString(this._startLineNumber)}_updateEndLineNumber(){this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}isEmpty(){return this._tokens.isEmpty()}getLineTokens(e){return this._startLineNumber<=e&&e<=this._endLineNumber?this._tokens.getLineTokens(e-this._startLineNumber):null}getRange(){let e=this._tokens.getRange();return e&&new S(this._startLineNumber+e.startLineNumber,e.startColumn,this._startLineNumber+e.endLineNumber,e.endColumn)}removeTokens(e){let t=e.startLineNumber-this._startLineNumber,i=e.endLineNumber-this._startLineNumber;this._startLineNumber+=this._tokens.removeTokens(t,e.startColumn-1,i,e.endColumn-1),this._updateEndLineNumber()}split(e){let t=e.startLineNumber-this._startLineNumber,i=e.endLineNumber-this._startLineNumber,[n,s,r]=this._tokens.split(t,e.startColumn-1,i,e.endColumn-1);return[new o(this._startLineNumber,n),new o(this._startLineNumber+r,s)]}applyEdit(e,t){let[i,n,s]=vc(t);this.acceptEdit(e,i,n,s,t.length>0?t.charCodeAt(0):0)}acceptEdit(e,t,i,n,s){this._acceptDeleteRange(e),this._acceptInsertText(new M(e.startLineNumber,e.startColumn),t,i,n,s),this._updateEndLineNumber()}_acceptDeleteRange(e){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return;let t=e.startLineNumber-this._startLineNumber,i=e.endLineNumber-this._startLineNumber;if(i<0){let s=i-t;this._startLineNumber-=s;return}let n=this._tokens.getMaxDeltaLine();if(!(t>=n+1)){if(t<0&&i>=n+1){this._startLineNumber=0,this._tokens.clear();return}if(t<0){let s=-t;this._startLineNumber-=s,this._tokens.acceptDeleteRange(e.startColumn-1,0,0,i,e.endColumn-1)}else this._tokens.acceptDeleteRange(0,t,e.startColumn-1,i,e.endColumn-1)}}_acceptInsertText(e,t,i,n,s){if(t===0&&i===0)return;let r=e.lineNumber-this._startLineNumber;if(r<0){this._startLineNumber+=t;return}let a=this._tokens.getMaxDeltaLine();r>=a+1||this._tokens.acceptInsertText(r,e.column-1,t,i,n,s)}reportIfInvalid(e){this._tokens.reportIfInvalid(e,this._startLineNumber)}},Vee=class o{constructor(e){this._tokens=e,this._tokenCount=e.length/4}toString(e){let t=[];for(let i=0;ie)i=n-1;else{let r=n;for(;r>t&&this._getDeltaLine(r-1)===e;)r--;let a=n;for(;ae||u===e&&g>=t)&&(ue||g===e&&_>=t){if(gs?p-=s-i:p=i;else if(f===t&&g===i)if(f===n&&p>s)p-=s-i;else{d=!0;continue}else if(fs)f=t,g=i,p=g+(p-s);else{d=!0;continue}else if(f>n){if(l===0&&!d){c=a;break}f-=l}else if(f===n&&g>=s)e&&f===0&&(g+=e,p+=e),f-=l,g-=s-i,p-=s-i;else throw new Error("Not possible!");let b=4*c;r[b]=f,r[b+1]=g,r[b+2]=p,r[b+3]=_,c++}this._tokenCount=c}acceptInsertText(e,t,i,n,s,r){let a=i===0&&n===1&&(r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122),l=this._tokens,c=this._tokenCount;for(let d=0;d{console.error("Invalid Semantic Tokens Data From Extension: lineNumber < 1")}):n>e.getLineCount()?o._rateLimiter.runIfNotLimited(()=>{console.error("Invalid Semantic Tokens Data From Extension: lineNumber > model.getLineCount()")}):this._getEndCharacter(i)>e.getLineLength(n)&&o._rateLimiter.runIfNotLimited(()=>{console.error("Invalid Semantic Tokens Data From Extension: end character > model.getLineLength(lineNumber)")})}}},v8=class{constructor(e){this._tokens=e}getCount(){return this._tokens.length/4}getStartCharacter(e){return this._tokens[4*e+1]}getEndCharacter(e){return this._tokens[4*e+2]}getMetadata(e){return this._tokens[4*e+3]}}});function C8(o,e,t){let i=o.data,n=o.data.length/5|0,s=Math.max(Math.ceil(n/1024),400),r=[],a=0,l=1,c=0;for(;ad&&i[5*v]===0;)v--;if(v-1===d){let w=h;for(;w+1k)e.warnOverlappingSemanticTokens(y,k+1);else{let P=e.getMetadata(D,O,t);P!==2147483647&&(g===0&&(g=y),u[f]=y-g,u[f+1]=k,u[f+2]=E,u[f+3]=P,f+=4,p=y,_=E)}l=y,c=k,a++}f!==u.length&&(u=u.subarray(0,f));let b=b8.create(g,u);r.push(b)}return r}var o6e,zee,w8,Uee,$ee,y8=x(()=>{Kt();So();w0e();xr();o6e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},zee=function(o,e){return function(t,i){e(t,i,o)}},w8=class{constructor(e,t,i,n){this._legend=e,this._themeService=t,this._languageService=i,this._logService=n,this._hasWarnedOverlappingTokens=!1,this._hasWarnedInvalidLengthTokens=!1,this._hasWarnedInvalidEditStart=!1,this._hashTable=new $ee}getMetadata(e,t,i){let n=this._languageService.languageIdCodec.encodeLanguageId(i),s=this._hashTable.get(e,t,n),r;if(s)r=s.metadata;else{let a=this._legend.tokenTypes[e],l=[];if(a){let c=t;for(let h=0;c>0&&h>1;let d=this._themeService.getColorTheme().getTokenStyleMetadata(a,l,i);if(typeof d>"u")r=2147483647;else{if(r=0,typeof d.italic<"u"){let h=(d.italic?1:0)<<11;r|=h|1}if(typeof d.bold<"u"){let h=(d.bold?2:0)<<11;r|=h|2}if(typeof d.underline<"u"){let h=(d.underline?4:0)<<11;r|=h|4}if(typeof d.strikethrough<"u"){let h=(d.strikethrough?8:0)<<11;r|=h|8}if(d.foreground){let h=d.foreground<<15;r|=h|16}r===0&&(r=2147483647)}}else r=2147483647,a="not-in-legend";this._hashTable.add(e,t,n,r)}return r}warnOverlappingSemanticTokens(e,t){this._hasWarnedOverlappingTokens||(this._hasWarnedOverlappingTokens=!0,this._logService.warn(`Overlapping semantic tokens detected at lineNumber ${e}, column ${t}`))}warnInvalidLengthSemanticTokens(e,t){this._hasWarnedInvalidLengthTokens||(this._hasWarnedInvalidLengthTokens=!0,this._logService.warn(`Semantic token with invalid length detected at lineNumber ${e}, column ${t}`))}warnInvalidEditStart(e,t,i,n,s){this._hasWarnedInvalidEditStart||(this._hasWarnedInvalidEditStart=!0,this._logService.warn(`Invalid semantic tokens edit detected (previousResultId: ${e}, resultId: ${t}) at edit #${i}: The provided start offset ${n} is outside the previous data (length ${s}).`))}};w8=o6e([zee(1,yt),zee(2,ri),zee(3,Ot)],w8);Uee=class{constructor(e,t,i,n){this.tokenTypeIndex=e,this.tokenModifierSet=t,this.languageId=i,this.metadata=n,this.next=null}},$ee=class o{static{this._SIZES=[3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143]}constructor(){this._elementsCount=0,this._currentLengthIndex=0,this._currentLength=o._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1=this._growCount){let s=this._elements;this._currentLengthIndex++,this._currentLength=o._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1{Ie();yy=Ne("semanticTokensStylingService")});var s6e,qee,jee,C0e=x(()=>{W();xr();Kt();So();y8();S8();Qo();s6e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},qee=function(o,e){return function(t,i){e(t,i,o)}},jee=class extends T{constructor(e,t,i){super(),this._themeService=e,this._logService=t,this._languageService=i,this._caches=new WeakMap,this._register(this._themeService.onDidColorThemeChange(()=>{this._caches=new WeakMap}))}getStyling(e){return this._caches.has(e)||this._caches.set(e,new w8(e.getLegend(),this._themeService,this._languageService,this._logService)),this._caches.get(e)}};jee=s6e([qee(0,yt),qee(1,Ot),qee(2,ri)],jee);Je(yy,jee,1)});var r6e,a6e,x8,y0e=x(()=>{ae();W();tc();Kt();r6e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},a6e=function(o,e){return function(t,i){e(t,i,o)}},x8=class extends T{constructor(e){super(),this._themeService=e,this._onWillCreateCodeEditor=this._register(new N),this._onCodeEditorAdd=this._register(new N),this.onCodeEditorAdd=this._onCodeEditorAdd.event,this._onCodeEditorRemove=this._register(new N),this.onCodeEditorRemove=this._onCodeEditorRemove.event,this._onWillCreateDiffEditor=this._register(new N),this._onDiffEditorAdd=this._register(new N),this.onDiffEditorAdd=this._onDiffEditorAdd.event,this._onDiffEditorRemove=this._register(new N),this.onDiffEditorRemove=this._onDiffEditorRemove.event,this._decorationOptionProviders=new Map,this._codeEditorOpenHandlers=new In,this._modelProperties=new Map,this._codeEditors=Object.create(null),this._diffEditors=Object.create(null),this._globalStyleSheet=null}willCreateCodeEditor(){this._onWillCreateCodeEditor.fire()}addCodeEditor(e){this._codeEditors[e.getId()]=e,this._onCodeEditorAdd.fire(e)}removeCodeEditor(e){delete this._codeEditors[e.getId()]&&this._onCodeEditorRemove.fire(e)}listCodeEditors(){return Object.keys(this._codeEditors).map(e=>this._codeEditors[e])}willCreateDiffEditor(){this._onWillCreateDiffEditor.fire()}addDiffEditor(e){this._diffEditors[e.getId()]=e,this._onDiffEditorAdd.fire(e)}removeDiffEditor(e){delete this._diffEditors[e.getId()]&&this._onDiffEditorRemove.fire(e)}listDiffEditors(){return Object.keys(this._diffEditors).map(e=>this._diffEditors[e])}getFocusedCodeEditor(){let e=null,t=this.listCodeEditors();for(let i of t){if(i.hasTextFocus())return i;i.hasWidgetFocus()&&(e=i)}return e}removeDecorationType(e){let t=this._decorationOptionProviders.get(e);t&&(t.refCount--,t.refCount<=0&&(this._decorationOptionProviders.delete(e),t.dispose(),this.listCodeEditors().forEach(i=>i.removeDecorationsByType(e))))}setModelProperty(e,t,i){let n=e.toString(),s;this._modelProperties.has(n)?s=this._modelProperties.get(n):(s=new Map,this._modelProperties.set(n,s)),s.set(t,i)}getModelProperty(e,t){let i=e.toString();if(this._modelProperties.has(i))return this._modelProperties.get(i).get(t)}async openCodeEditor(e,t,i){for(let n of this._codeEditorOpenHandlers){let s=await n(e,t,i);if(s!==null)return s}return null}registerCodeEditorOpenHandler(e){let t=this._codeEditorOpenHandlers.unshift(e);return ne(t)}};x8=r6e([a6e(0,yt)],x8)});var l6e,S0e,VD,Kee=x(()=>{re();jo();y0e();ao();je();Qo();Kt();l6e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},S0e=function(o,e){return function(t,i){e(t,i,o)}},VD=class extends x8{constructor(e,t){super(t),this._register(this.onCodeEditorAdd(()=>this._checkContextKey())),this._register(this.onCodeEditorRemove(()=>this._checkContextKey())),this._editorIsOpen=e.createKey("editorIsOpen",!1),this._activeCodeEditor=null,this._register(this.registerCodeEditorOpenHandler(async(i,n,s)=>n?this.doOpenEditor(n,i):null))}_checkContextKey(){let e=!1;for(let t of this.listCodeEditors())if(!t.isSimpleWidget){e=!0;break}this._editorIsOpen.set(e)}setActiveCodeEditor(e){this._activeCodeEditor=e}getActiveCodeEditor(){return this._activeCodeEditor}doOpenEditor(e,t){if(!this.findModel(e,t.resource)){if(t.resource){let s=t.resource.scheme;if(s===Fe.http||s===Fe.https)return WO(t.resource.toString()),e}return null}let n=t.options?t.options.selection:null;if(n)if(typeof n.endLineNumber=="number"&&typeof n.endColumn=="number")e.setSelection(n),e.revealRangeInCenter(n,1);else{let s={lineNumber:n.startLineNumber,column:n.startColumn};e.setPosition(s),e.revealPositionInCenter(s,1)}return e}findModel(e,t){let i=e.getModel();return i&&i.uri.toString()!==t.toString()?null:i}};VD=l6e([S0e(0,Ce),S0e(1,yt)],VD);Je(ot,VD,0)});var x0e,k0e,k8,L8,Gee=x(()=>{re();br();qe();ae();ao();Qo();Cg();x0e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},k0e=function(o,e){return function(t,i){e(t,i,o)}},k8=class{get mainContainer(){return this._codeEditorService.listCodeEditors().at(0)?.getContainerDomNode()??Tt.document.body}get activeContainer(){return(this._codeEditorService.getFocusedCodeEditor()??this._codeEditorService.getActiveCodeEditor())?.getContainerDomNode()??this.mainContainer}get mainContainerDimension(){return cc(this.mainContainer)}get activeContainerDimension(){return cc(this.activeContainer)}get containers(){return Zs(this._codeEditorService.listCodeEditors().map(e=>e.getContainerDomNode()))}getContainer(){return this.activeContainer}whenContainerStylesLoaded(){}focus(){this._codeEditorService.getFocusedCodeEditor()?.focus()}constructor(e){this._codeEditorService=e,this.onDidLayoutMainContainer=Q.None,this.onDidLayoutActiveContainer=Q.None,this.onDidLayoutContainer=Q.None,this.onDidChangeActiveContainer=Q.None,this.onDidAddContainer=Q.None,this.mainContainerOffset={top:0,quickPickTop:0},this.activeContainerOffset={top:0,quickPickTop:0}}};k8=x0e([k0e(0,ot)],k8);L8=class extends k8{get mainContainer(){return this._container}constructor(e,t){super(t),this._container=e}};L8=x0e([k0e(1,ot)],L8);Je(Ca,k8,1)});var c6e,Yee,I8,L0e=x(()=>{re();br();ae();W();us();oi();je();Cg();c6e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Yee=function(o,e){return function(t,i){e(t,i,o)}},I8=class extends T{constructor(e,t,i){super(),this._contextKeyService=e,this._layoutService=t,this._configurationService=i,this._accessibilitySupport=0,this._onDidChangeScreenReaderOptimized=this._register(new N),this._onDidChangeReducedMotion=this._register(new N),this._onDidChangeReducedTransparency=this._register(new N),this._onDidChangeLinkUnderline=this._register(new N),this._accessibilityModeEnabledContext=Ym.bindTo(this._contextKeyService);let n=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration(a=>{a.affectsConfiguration("editor.accessibilitySupport")&&(n(),this._onDidChangeScreenReaderOptimized.fire()),a.affectsConfiguration("workbench.reduceMotion")&&(this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this._onDidChangeReducedMotion.fire()),a.affectsConfiguration("workbench.reduceTransparency")&&(this._configTransparencyReduced=this._configurationService.getValue("workbench.reduceTransparency"),this._onDidChangeReducedTransparency.fire())})),n(),this._register(this.onDidChangeScreenReaderOptimized(()=>n()));let s=Tt.matchMedia("(prefers-reduced-motion: reduce)");this._systemMotionReduced=s.matches,this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion");let r=Tt.matchMedia("(prefers-reduced-transparency: reduce)");this._systemTransparencyReduced=r.matches,this._configTransparencyReduced=this._configurationService.getValue("workbench.reduceTransparency"),this._linkUnderlinesEnabled=this._configurationService.getValue("accessibility.underlineLinks"),this.initReducedMotionListeners(s),this.initReducedTransparencyListeners(r),this.initLinkUnderlineListeners()}initReducedMotionListeners(e){this._register(B(e,"change",()=>{this._systemMotionReduced=e.matches,this._configMotionReduced==="auto"&&this._onDidChangeReducedMotion.fire()}));let t=()=>{let i=this.isMotionReduced();this._layoutService.mainContainer.classList.toggle("monaco-reduce-motion",i),this._layoutService.mainContainer.classList.toggle("monaco-enable-motion",!i)};t(),this._register(this.onDidChangeReducedMotion(()=>t()))}initReducedTransparencyListeners(e){this._register(B(e,"change",()=>{this._systemTransparencyReduced=e.matches,this._configTransparencyReduced==="auto"&&this._onDidChangeReducedTransparency.fire()}));let t=()=>{let i=this.isTransparencyReduced();this._layoutService.mainContainer.classList.toggle("monaco-reduce-transparency",i)};t(),this._register(this.onDidChangeReducedTransparency(()=>t()))}initLinkUnderlineListeners(){this._register(this._configurationService.onDidChangeConfiguration(t=>{if(t.affectsConfiguration("accessibility.underlineLinks")){let i=this._configurationService.getValue("accessibility.underlineLinks");this._linkUnderlinesEnabled=i,this._onDidChangeLinkUnderline.fire()}}));let e=()=>{let t=this._linkUnderlinesEnabled;this._layoutService.mainContainer.classList.toggle("underline-links",t)};e(),this._register(this.onDidChangeLinkUnderlines(()=>e()))}onDidChangeLinkUnderlines(e){return this._onDidChangeLinkUnderline.event(e)}get onDidChangeScreenReaderOptimized(){return this._onDidChangeScreenReaderOptimized.event}isScreenReaderOptimized(){let e=this.getAccessibilitySupportConfigurationValue();return e==="on"||e==="auto"&&this._accessibilitySupport===2}getAccessibilitySupportConfigurationValue(){let e=this._configurationService.inspect("editor.accessibilitySupport");return e.policyValue??e.memoryValue??e.workspaceFolderValue??e.workspaceValue??e.userValue??e.applicationValue??e.defaultValue??"auto"}get onDidChangeReducedMotion(){return this._onDidChangeReducedMotion.event}isMotionReduced(){let e=this._configMotionReduced;return e==="on"||e==="auto"&&this._systemMotionReduced}get onDidChangeReducedTransparency(){return this._onDidChangeReducedTransparency.event}isTransparencyReduced(){let e=this._configTransparencyReduced;return e==="on"||e==="auto"&&this._systemTransparencyReduced}getAccessibilitySupport(){return this._accessibilitySupport}};I8=c6e([Yee(0,Ce),Yee(1,Ca),Yee(2,Me)],I8)});var ll,en,Zee,qs,Ip=x(()=>{le();Ie();ll=Ne("accessibilitySignalService"),en=class o{static register(e){return new o(e.fileName)}static{this.error=o.register({fileName:"error.mp3"})}static{this.warning=o.register({fileName:"warning.mp3"})}static{this.success=o.register({fileName:"success.mp3"})}static{this.foldedArea=o.register({fileName:"foldedAreas.mp3"})}static{this.break=o.register({fileName:"break.mp3"})}static{this.quickFixes=o.register({fileName:"quickFixes.mp3"})}static{this.taskCompleted=o.register({fileName:"taskCompleted.mp3"})}static{this.taskFailed=o.register({fileName:"taskFailed.mp3"})}static{this.terminalBell=o.register({fileName:"terminalBell.mp3"})}static{this.diffLineInserted=o.register({fileName:"diffLineInserted.mp3"})}static{this.diffLineDeleted=o.register({fileName:"diffLineDeleted.mp3"})}static{this.diffLineModified=o.register({fileName:"diffLineModified.mp3"})}static{this.requestSent=o.register({fileName:"requestSent.mp3"})}static{this.responseReceived1=o.register({fileName:"responseReceived1.mp3"})}static{this.responseReceived2=o.register({fileName:"responseReceived2.mp3"})}static{this.responseReceived3=o.register({fileName:"responseReceived3.mp3"})}static{this.responseReceived4=o.register({fileName:"responseReceived4.mp3"})}static{this.clear=o.register({fileName:"clear.mp3"})}static{this.save=o.register({fileName:"save.mp3"})}static{this.format=o.register({fileName:"format.mp3"})}static{this.voiceRecordingStarted=o.register({fileName:"voiceRecordingStarted.mp3"})}static{this.voiceRecordingStopped=o.register({fileName:"voiceRecordingStopped.mp3"})}static{this.progress=o.register({fileName:"progress.mp3"})}static{this.chatEditModifiedFile=o.register({fileName:"chatEditModifiedFile.mp3"})}static{this.editsKept=o.register({fileName:"editsKept.mp3"})}static{this.editsUndone=o.register({fileName:"editsUndone.mp3"})}static{this.nextEditSuggestion=o.register({fileName:"nextEditSuggestion.mp3"})}static{this.terminalCommandSucceeded=o.register({fileName:"terminalCommandSucceeded.mp3"})}static{this.chatUserActionRequired=o.register({fileName:"chatUserActionRequired.mp3"})}static{this.codeActionTriggered=o.register({fileName:"codeActionTriggered.mp3"})}static{this.codeActionApplied=o.register({fileName:"codeActionApplied.mp3"})}constructor(e){this.fileName=e}},Zee=class{constructor(e){this.randomOneOf=e}},qs=class o{constructor(e,t,i,n,s,r,a=!1){this.sound=e,this.name=t,this.legacySoundSettingsKey=i,this.settingsKey=n,this.legacyAnnouncementSettingsKey=s,this.announcementMessage=r,this.managesOwnEnablement=a}static{this._signals=new Set}static register(e){let t=new Zee("randomOneOf"in e.sound?e.sound.randomOneOf:[e.sound]),i=new o(t,e.name,e.legacySoundSettingsKey,e.settingsKey,e.legacyAnnouncementSettingsKey,e.announcementMessage,e.managesOwnEnablement);return o._signals.add(i),i}static{this.errorAtPosition=o.register({name:m(1630,"Error at Position"),sound:en.error,announcementMessage:m(1631,"Error"),settingsKey:"accessibility.signals.positionHasError",delaySettingsKey:"accessibility.signalOptions.delays.errorAtPosition"})}static{this.warningAtPosition=o.register({name:m(1632,"Warning at Position"),sound:en.warning,announcementMessage:m(1633,"Warning"),settingsKey:"accessibility.signals.positionHasWarning",delaySettingsKey:"accessibility.signalOptions.delays.warningAtPosition"})}static{this.errorOnLine=o.register({name:m(1634,"Error on Line"),sound:en.error,legacySoundSettingsKey:"audioCues.lineHasError",legacyAnnouncementSettingsKey:"accessibility.alert.error",announcementMessage:m(1635,"Error on Line"),settingsKey:"accessibility.signals.lineHasError"})}static{this.warningOnLine=o.register({name:m(1636,"Warning on Line"),sound:en.warning,legacySoundSettingsKey:"audioCues.lineHasWarning",legacyAnnouncementSettingsKey:"accessibility.alert.warning",announcementMessage:m(1637,"Warning on Line"),settingsKey:"accessibility.signals.lineHasWarning"})}static{this.foldedArea=o.register({name:m(1638,"Folded Area on Line"),sound:en.foldedArea,legacySoundSettingsKey:"audioCues.lineHasFoldedArea",legacyAnnouncementSettingsKey:"accessibility.alert.foldedArea",announcementMessage:m(1639,"Folded"),settingsKey:"accessibility.signals.lineHasFoldedArea"})}static{this.break=o.register({name:m(1640,"Breakpoint on Line"),sound:en.break,legacySoundSettingsKey:"audioCues.lineHasBreakpoint",legacyAnnouncementSettingsKey:"accessibility.alert.breakpoint",announcementMessage:m(1641,"Breakpoint"),settingsKey:"accessibility.signals.lineHasBreakpoint"})}static{this.inlineSuggestion=o.register({name:m(1642,"Inline Suggestion on Line"),sound:en.quickFixes,legacySoundSettingsKey:"audioCues.lineHasInlineSuggestion",settingsKey:"accessibility.signals.lineHasInlineSuggestion"})}static{this.nextEditSuggestion=o.register({name:m(1643,"Next Edit Suggestion on Line"),sound:en.nextEditSuggestion,legacySoundSettingsKey:"audioCues.nextEditSuggestion",settingsKey:"accessibility.signals.nextEditSuggestion",announcementMessage:m(1644,"Next Edit Suggestion")})}static{this.terminalQuickFix=o.register({name:m(1645,"Terminal Quick Fix"),sound:en.quickFixes,legacySoundSettingsKey:"audioCues.terminalQuickFix",legacyAnnouncementSettingsKey:"accessibility.alert.terminalQuickFix",announcementMessage:m(1646,"Quick Fix"),settingsKey:"accessibility.signals.terminalQuickFix"})}static{this.onDebugBreak=o.register({name:m(1647,"Debugger Stopped on Breakpoint"),sound:en.break,legacySoundSettingsKey:"audioCues.onDebugBreak",legacyAnnouncementSettingsKey:"accessibility.alert.onDebugBreak",announcementMessage:m(1648,"Breakpoint"),settingsKey:"accessibility.signals.onDebugBreak"})}static{this.noInlayHints=o.register({name:m(1649,"No Inlay Hints on Line"),sound:en.error,legacySoundSettingsKey:"audioCues.noInlayHints",legacyAnnouncementSettingsKey:"accessibility.alert.noInlayHints",announcementMessage:m(1650,"No Inlay Hints"),settingsKey:"accessibility.signals.noInlayHints"})}static{this.taskCompleted=o.register({name:m(1651,"Task Completed"),sound:en.taskCompleted,legacySoundSettingsKey:"audioCues.taskCompleted",legacyAnnouncementSettingsKey:"accessibility.alert.taskCompleted",announcementMessage:m(1652,"Task Completed"),settingsKey:"accessibility.signals.taskCompleted"})}static{this.taskFailed=o.register({name:m(1653,"Task Failed"),sound:en.taskFailed,legacySoundSettingsKey:"audioCues.taskFailed",legacyAnnouncementSettingsKey:"accessibility.alert.taskFailed",announcementMessage:m(1654,"Task Failed"),settingsKey:"accessibility.signals.taskFailed"})}static{this.terminalCommandFailed=o.register({name:m(1655,"Terminal Command Failed"),sound:en.error,legacySoundSettingsKey:"audioCues.terminalCommandFailed",legacyAnnouncementSettingsKey:"accessibility.alert.terminalCommandFailed",announcementMessage:m(1656,"Command Failed"),settingsKey:"accessibility.signals.terminalCommandFailed"})}static{this.terminalCommandSucceeded=o.register({name:m(1657,"Terminal Command Succeeded"),sound:en.terminalCommandSucceeded,announcementMessage:m(1658,"Command Succeeded"),settingsKey:"accessibility.signals.terminalCommandSucceeded"})}static{this.terminalBell=o.register({name:m(1659,"Terminal Bell"),sound:en.terminalBell,legacySoundSettingsKey:"audioCues.terminalBell",legacyAnnouncementSettingsKey:"accessibility.alert.terminalBell",announcementMessage:m(1660,"Terminal Bell"),settingsKey:"accessibility.signals.terminalBell"})}static{this.notebookCellCompleted=o.register({name:m(1661,"Notebook Cell Completed"),sound:en.taskCompleted,legacySoundSettingsKey:"audioCues.notebookCellCompleted",legacyAnnouncementSettingsKey:"accessibility.alert.notebookCellCompleted",announcementMessage:m(1662,"Notebook Cell Completed"),settingsKey:"accessibility.signals.notebookCellCompleted"})}static{this.notebookCellFailed=o.register({name:m(1663,"Notebook Cell Failed"),sound:en.taskFailed,legacySoundSettingsKey:"audioCues.notebookCellFailed",legacyAnnouncementSettingsKey:"accessibility.alert.notebookCellFailed",announcementMessage:m(1664,"Notebook Cell Failed"),settingsKey:"accessibility.signals.notebookCellFailed"})}static{this.diffLineInserted=o.register({name:m(1665,"Diff Line Inserted"),sound:en.diffLineInserted,legacySoundSettingsKey:"audioCues.diffLineInserted",settingsKey:"accessibility.signals.diffLineInserted"})}static{this.diffLineDeleted=o.register({name:m(1666,"Diff Line Deleted"),sound:en.diffLineDeleted,legacySoundSettingsKey:"audioCues.diffLineDeleted",settingsKey:"accessibility.signals.diffLineDeleted"})}static{this.diffLineModified=o.register({name:m(1667,"Diff Line Modified"),sound:en.diffLineModified,legacySoundSettingsKey:"audioCues.diffLineModified",settingsKey:"accessibility.signals.diffLineModified"})}static{this.chatEditModifiedFile=o.register({name:m(1668,"Chat Edit Modified File"),sound:en.chatEditModifiedFile,announcementMessage:m(1669,"File Modified from Chat Edits"),settingsKey:"accessibility.signals.chatEditModifiedFile"})}static{this.chatRequestSent=o.register({name:m(1670,"Chat Request Sent"),sound:en.requestSent,legacySoundSettingsKey:"audioCues.chatRequestSent",legacyAnnouncementSettingsKey:"accessibility.alert.chatRequestSent",announcementMessage:m(1671,"Chat Request Sent"),settingsKey:"accessibility.signals.chatRequestSent"})}static{this.chatResponseReceived=o.register({name:m(1672,"Chat Response Received"),legacySoundSettingsKey:"audioCues.chatResponseReceived",sound:{randomOneOf:[en.responseReceived1,en.responseReceived2,en.responseReceived3,en.responseReceived4]},settingsKey:"accessibility.signals.chatResponseReceived"})}static{this.codeActionTriggered=o.register({name:m(1673,"Code Action Request Triggered"),sound:en.codeActionTriggered,legacySoundSettingsKey:"audioCues.codeActionRequestTriggered",legacyAnnouncementSettingsKey:"accessibility.alert.codeActionRequestTriggered",announcementMessage:m(1674,"Code Action Request Triggered"),settingsKey:"accessibility.signals.codeActionTriggered"})}static{this.codeActionApplied=o.register({name:m(1675,"Code Action Applied"),legacySoundSettingsKey:"audioCues.codeActionApplied",sound:en.codeActionApplied,settingsKey:"accessibility.signals.codeActionApplied"})}static{this.progress=o.register({name:m(1676,"Progress"),sound:en.progress,legacySoundSettingsKey:"audioCues.chatResponsePending",legacyAnnouncementSettingsKey:"accessibility.alert.progress",announcementMessage:m(1677,"Progress"),settingsKey:"accessibility.signals.progress"})}static{this.clear=o.register({name:m(1678,"Clear"),sound:en.clear,legacySoundSettingsKey:"audioCues.clear",legacyAnnouncementSettingsKey:"accessibility.alert.clear",announcementMessage:m(1679,"Clear"),settingsKey:"accessibility.signals.clear"})}static{this.save=o.register({name:m(1680,"Save"),sound:en.save,legacySoundSettingsKey:"audioCues.save",legacyAnnouncementSettingsKey:"accessibility.alert.save",announcementMessage:m(1681,"Save"),settingsKey:"accessibility.signals.save"})}static{this.format=o.register({name:m(1682,"Format"),sound:en.format,legacySoundSettingsKey:"audioCues.format",legacyAnnouncementSettingsKey:"accessibility.alert.format",announcementMessage:m(1683,"Format"),settingsKey:"accessibility.signals.format"})}static{this.voiceRecordingStarted=o.register({name:m(1684,"Voice Recording Started"),sound:en.voiceRecordingStarted,legacySoundSettingsKey:"audioCues.voiceRecordingStarted",settingsKey:"accessibility.signals.voiceRecordingStarted"})}static{this.voiceRecordingStopped=o.register({name:m(1685,"Voice Recording Stopped"),sound:en.voiceRecordingStopped,legacySoundSettingsKey:"audioCues.voiceRecordingStopped",settingsKey:"accessibility.signals.voiceRecordingStopped"})}static{this.editsKept=o.register({name:m(1686,"Edits Kept"),sound:en.editsKept,announcementMessage:m(1687,"Edits Kept"),settingsKey:"accessibility.signals.editsKept"})}static{this.editsUndone=o.register({name:m(1688,"Undo Edits"),sound:en.editsUndone,announcementMessage:m(1689,"Edits Undone"),settingsKey:"accessibility.signals.editsUndone"})}static{this.chatUserActionRequired=o.register({name:m(1690,"Chat User Action Required"),sound:en.chatUserActionRequired,announcementMessage:m(1691,"Chat User Action Required"),settingsKey:"accessibility.signals.chatUserActionRequired"})}}});function d6e(o,e,t){let i=Pme(e)?e.submenu.id:e.id,n=typeof e.title=="string"?e.title:e.title.value,s=Nh({id:`hide/${o.id}/${i}`,label:m(1703,"Hide '{0}'",n),run(){t.updateHidden(o,i,!0)}}),r=Nh({id:`toggle/${o.id}/${i}`,label:n,get checked(){return!t.isHidden(o,i)},run(){t.updateHidden(o,i,!!this.checked)}});return{hide:s,toggle:r,get isHidden(){return!r.checked}}}function ete(o,e,t,i=void 0,n=!0){return Nh({id:`configureKeybinding/${t}`,label:m(1704,"Configure Keybinding"),enabled:n,run(){let r=!!!e.lookupKeybinding(t)&&i?i.serialize():void 0;o.executeCommand("workbench.action.openGlobalKeybindings",`@command:${t}`+(r?` +when:${r}`:""))}})}var D8,xg,U0,zD,E8,Xee,Qee,Jee,T8,tte=x(()=>{Ze();ae();W();yi();Ii();je();ys();al();qe();le();Oi();D8=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},xg=function(o,e){return function(t,i){e(t,i,o)}},E8=class extends T{constructor(e,t,i){super(),this._commandService=e,this._keybindingService=t,this._hiddenStates=this._register(new Xee(i))}createMenu(e,t,i){return new T8(e,this._hiddenStates,{emitEventsForSubmenuChanges:!1,eventDebounceDelay:50,...i},this._commandService,this._keybindingService,t)}getMenuActions(e,t,i){let n=new T8(e,this._hiddenStates,{emitEventsForSubmenuChanges:!1,eventDebounceDelay:50,...i},this._commandService,this._keybindingService,t),s=n.getActions(i);return n.dispose(),s}resetHiddenStates(e){this._hiddenStates.reset(e)}};E8=D8([xg(0,Et),xg(1,$e),xg(2,zn)],E8);Xee=class{static{U0=this}static{this._key="menu.hiddenCommands"}constructor(e){this._storageService=e,this._disposables=new F,this._onDidChange=new N,this.onDidChange=this._onDidChange.event,this._ignoreChangeEvent=!1,this._hiddenByDefaultCache=new Map;try{let t=e.get(U0._key,0,"{}");this._data=JSON.parse(t)}catch{this._data=Object.create(null)}this._disposables.add(e.onDidChangeValue(0,U0._key,this._disposables)(()=>{if(!this._ignoreChangeEvent)try{let t=e.get(U0._key,0,"{}");this._data=JSON.parse(t)}catch(t){console.log("FAILED to read storage after UPDATE",t)}this._onDidChange.fire()}))}dispose(){this._onDidChange.dispose(),this._disposables.dispose()}_isHiddenByDefault(e,t){return this._hiddenByDefaultCache.get(`${e.id}/${t}`)??!1}setDefaultState(e,t,i){this._hiddenByDefaultCache.set(`${e.id}/${t}`,i)}isHidden(e,t){let i=this._isHiddenByDefault(e,t),n=this._data[e.id]?.includes(t)??!1;return i?!n:n}updateHidden(e,t,i){this._isHiddenByDefault(e,t)&&(i=!i);let s=this._data[e.id];if(i)s?s.indexOf(t)<0&&s.push(t):this._data[e.id]=[t];else if(s){let r=s.indexOf(t);r>=0&&Sfe(s,r),s.length===0&&delete this._data[e.id]}this._persist()}reset(e){if(e===void 0)this._data=Object.create(null),this._persist();else{for(let{id:t}of e)this._data[t]&&delete this._data[t];this._persist()}}_persist(){try{this._ignoreChangeEvent=!0;let e=JSON.stringify(this._data);this._storageService.store(U0._key,e,0,0)}finally{this._ignoreChangeEvent=!1}}};Xee=U0=D8([xg(0,zn)],Xee);Qee=class o{constructor(e,t){this._id=e,this._collectContextKeysForSubmenus=t,this._menuGroups=[],this._allMenuIds=new Set,this._structureContextKeys=new Set,this._preconditionContextKeys=new Set,this._toggledContextKeys=new Set,this.refresh()}get allMenuIds(){return this._allMenuIds}get structureContextKeys(){return this._structureContextKeys}get preconditionContextKeys(){return this._preconditionContextKeys}get toggledContextKeys(){return this._toggledContextKeys}refresh(){this._menuGroups.length=0,this._allMenuIds.clear(),this._structureContextKeys.clear(),this._preconditionContextKeys.clear(),this._toggledContextKeys.clear();let e=this._sort(lo.getMenuItems(this._id)),t;for(let i of e){let n=i.group||"";(!t||t[0]!==n)&&(t=[n,[]],this._menuGroups.push(t)),t[1].push(i),this._collectContextKeysAndSubmenuIds(i)}this._allMenuIds.add(this._id)}_sort(e){return e}_collectContextKeysAndSubmenuIds(e){if(o._fillInKbExprKeys(e.when,this._structureContextKeys),j_(e)){if(e.command.precondition&&o._fillInKbExprKeys(e.command.precondition,this._preconditionContextKeys),e.command.toggled){let t=e.command.toggled.condition||e.command.toggled;o._fillInKbExprKeys(t,this._toggledContextKeys)}}else this._collectContextKeysForSubmenus&&(lo.getMenuItems(e.submenu).forEach(this._collectContextKeysAndSubmenuIds,this),this._allMenuIds.add(e.submenu))}static _fillInKbExprKeys(e,t){if(e)for(let i of e.keys())t.add(i)}},Jee=zD=class extends Qee{constructor(e,t,i,n,s,r){super(e,i),this._hiddenStates=t,this._commandService=n,this._keybindingService=s,this._contextKeyService=r,this.refresh()}createActionGroups(e){let t=[];for(let i of this._menuGroups){let[n,s]=i,r;for(let a of s)if(this._contextKeyService.contextMatchesRules(a.when)){let l=j_(a);l&&this._hiddenStates.setDefaultState(this._id,a.command.id,!!a.isHiddenByDefault);let c=d6e(this._id,l?a.command:a,this._hiddenStates);if(l){let d=ete(this._commandService,this._keybindingService,a.command.id,a.when);(r??=[]).push(new Ss(a.command,a.alt,e,c,d,this._contextKeyService,this._commandService))}else{let d=new zD(a.submenu,this._hiddenStates,this._collectContextKeysForSubmenus,this._commandService,this._keybindingService,this._contextKeyService).createActionGroups(e),h=Wi.join(...d.map(u=>u[1]));h.length>0&&(r??=[]).push(new Hd(a,c,h))}}r&&r.length>0&&t.push([n,r])}return t}_sort(e){return e.sort(zD._compareMenuItems)}static _compareMenuItems(e,t){let i=e.group,n=t.group;if(i!==n){if(i){if(!n)return-1}else return 1;if(i==="navigation")return-1;if(n==="navigation")return 1;let a=i.localeCompare(n);if(a!==0)return a}let s=e.order||0,r=t.order||0;return sr?1:zD._compareTitles(j_(e)?e.command.title:e.title,j_(t)?t.command.title:t.title)}static _compareTitles(e,t){let i=typeof e=="string"?e:e.original,n=typeof t=="string"?t:t.original;return i.localeCompare(n)}};Jee=zD=D8([xg(3,Et),xg(4,$e),xg(5,Ce)],Jee);T8=class{constructor(e,t,i,n,s,r){this._disposables=new F,this._menuInfo=new Jee(e,t,i.emitEventsForSubmenuChanges,n,s,r);let a=new at(()=>{this._menuInfo.refresh(),this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!0,isToggleChange:!0})},i.eventDebounceDelay);this._disposables.add(a),this._disposables.add(lo.onDidChangeMenu(h=>{for(let u of this._menuInfo.allMenuIds)if(h.has(u)){a.schedule();break}}));let l=this._disposables.add(new F),c=h=>{let u=!1,f=!1,g=!1;for(let p of h)if(u=u||p.isStructuralChange,f=f||p.isEnablementChange,g=g||p.isToggleChange,u&&f&&g)break;return{menu:this,isStructuralChange:u,isEnablementChange:f,isToggleChange:g}},d=()=>{l.add(r.onDidChangeContext(h=>{let u=h.affectsSome(this._menuInfo.structureContextKeys),f=h.affectsSome(this._menuInfo.preconditionContextKeys),g=h.affectsSome(this._menuInfo.toggledContextKeys);(u||f||g)&&this._onDidChange.fire({menu:this,isStructuralChange:u,isEnablementChange:f,isToggleChange:g})})),l.add(t.onDidChange(h=>{this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!1,isToggleChange:!1})}))};this._onDidChange=new $M({onWillAddFirstListener:d,onDidRemoveLastListener:l.clear.bind(l),delay:i.eventDebounceDelay,merge:c}),this.onDidChange=this._onDidChange.event}getActions(e){return this._menuInfo.createActionGroups(e)}dispose(){this._disposables.dispose(),this._onDidChange.dispose()}};T8=D8([xg(3,Et),xg(4,$e),xg(5,Ce)],T8)});var h6e,I0e,ite,E0e,N8,T0e=x(()=>{Ns();re();br();Ze();ae();Nm();W();ai();Cg();So();h6e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},I0e=function(o,e){return function(t,i){e(t,i,o)}},E0e="application/vnd.code.resources",N8=class extends T{static{ite=this}constructor(e,t){super(),this.layoutService=e,this.logService=t,this.mapTextToType=new Map,this.findText="",this.resources=[],this.resourcesStateHash=void 0,(kh||hO)&&this.installWebKitWriteTextWorkaround(),this._register(Q.runAndSubscribe(Fm,({window:i,disposables:n})=>{n.add(B(i.document,"copy",()=>this.clearResourcesState()))},{window:Tt,disposables:this._store}))}triggerPaste(){this.logService.trace("BrowserClipboardService#triggerPaste")}installWebKitWriteTextWorkaround(){let e=()=>{let t=new lc;this.webKitPendingClipboardWritePromise&&!this.webKitPendingClipboardWritePromise.isSettled&&this.webKitPendingClipboardWritePromise.cancel(),this.webKitPendingClipboardWritePromise=t,It().navigator.clipboard.write([new ClipboardItem({"text/plain":t.p})]).catch(async i=>{(!(i instanceof Error)||i.name!=="NotAllowedError"||!t.isRejected)&&this.logService.error(i)})};this._register(Q.runAndSubscribe(this.layoutService.onDidAddContainer,({container:t,disposables:i})=>{i.add(B(t,"click",e)),i.add(B(t,"keydown",e))},{container:this.layoutService.mainContainer,disposables:this._store}))}async writeText(e,t){if(this.logService.trace("BrowserClipboardService#writeText called with type:",t," text.length:",e.length),this.clearResourcesState(),t){this.mapTextToType.set(t,e),this.logService.trace("BrowserClipboardService#writeText");return}if(this.webKitPendingClipboardWritePromise)return this.webKitPendingClipboardWritePromise.complete(e);try{return this.logService.trace("before navigator.clipboard.writeText"),await It().navigator.clipboard.writeText(e)}catch(i){console.error(i)}this.fallbackWriteText(e)}fallbackWriteText(e){this.logService.trace("BrowserClipboardService#fallbackWriteText");let t=H_(),i=t.activeElement,n=t.body.appendChild(j("textarea",{"aria-hidden":!0}));n.style.height="1px",n.style.width="1px",n.style.position="absolute",n.value=e,n.focus(),n.select(),t.execCommand("copy"),xt(i)&&i.focus(),n.remove()}async readText(e){if(this.logService.trace("BrowserClipboardService#readText called with type:",e),e){let t=this.mapTextToType.get(e)||"";return this.logService.trace("BrowserClipboardService#readText text.length:",t.length),t}try{let t=await It().navigator.clipboard.readText();return this.logService.trace("BrowserClipboardService#readText text.length:",t.length),t}catch(t){console.error(t)}return""}async readFindText(){return this.findText}async writeFindText(e){this.findText=e}static{this.MAX_RESOURCE_STATE_SOURCE_LENGTH=1e3}async readResources(){try{let t=await It().navigator.clipboard.read();for(let i of t)if(i.types.includes(`web ${E0e}`)){let n=await i.getType(`web ${E0e}`);return JSON.parse(await n.text()).map(r=>Le.from(r))}}catch{}let e=await this.computeResourcesStateHash();return this.resourcesStateHash!==e&&this.clearResourcesState(),this.resources}async computeResourcesStateHash(){if(this.resources.length===0)return;let e=await this.readText();return yf(e.substring(0,ite.MAX_RESOURCE_STATE_SOURCE_LENGTH))}clearInternalState(){this.clearResourcesState()}clearResourcesState(){this.resources=[],this.resourcesStateHash=void 0}};N8=ite=h6e([I0e(0,Ca),I0e(1,Ot)],N8)});var Lo,ih=x(()=>{Ie();Lo=Ne("clipboardService")});function R8(o){return Object.isFrozen(o)?o:Afe(o)}var Va,nte,ote,UD,A8,ste=x(()=>{qe();yo();$a();Rt();ai();oi();Hm();ls();Va=class o{static createEmptyModel(e){return new o({},[],[],void 0,e)}constructor(e,t,i,n,s){this._contents=e,this._keys=t,this._overrides=i,this._raw=n,this.logService=s,this.overrideConfigurations=new Map}get rawConfiguration(){if(!this._rawConfiguration)if(this._raw){let e=(Array.isArray(this._raw)?this._raw:[this._raw]).map(t=>{if(t instanceof o)return t;let i=new nte("",this.logService);return i.parseRaw(t),i.configurationModel});this._rawConfiguration=e.reduce((t,i)=>i===t?i:t.merge(i),e[0])}else this._rawConfiguration=this;return this._rawConfiguration}get contents(){return this._contents}get overrides(){return this._overrides}get keys(){return this._keys}get raw(){if(this._raw&&!(Array.isArray(this._raw)&&this._raw.every(e=>e instanceof o)))return this._raw}isEmpty(){return this._keys.length===0&&Object.keys(this._contents).length===0&&this._overrides.length===0}getValue(e){return e?AG(this.contents,e):this.contents}inspect(e,t){let i=this;return{get value(){return R8(i.rawConfiguration.getValue(e))},get override(){return t?R8(i.rawConfiguration.getOverrideValue(e,t)):void 0},get merged(){return R8(t?i.rawConfiguration.override(t).getValue(e):i.rawConfiguration.getValue(e))},get overrides(){let n=[];for(let{contents:s,identifiers:r,keys:a}of i.rawConfiguration.overrides){let l=new o(s,a,[],void 0,i.logService).getValue(e);l!==void 0&&n.push({identifiers:r,value:l})}return n.length?R8(n):void 0}}}getOverrideValue(e,t){let i=this.getContentsForOverrideIdentifer(t);return i?e?AG(i,e):i:void 0}override(e){let t=this.overrideConfigurations.get(e);return t||(t=this.createOverrideConfigurationModel(e),this.overrideConfigurations.set(e,t)),t}merge(...e){let t=Rc(this.contents),i=Rc(this.overrides),n=[...this.keys],s=this._raw?Array.isArray(this._raw)?[...this._raw]:[this._raw]:[this];for(let r of e)if(s.push(...r._raw?Array.isArray(r._raw)?r._raw:[r._raw]:[r]),!r.isEmpty()){this.mergeContents(t,r.contents);for(let a of r.overrides){let[l]=i.filter(c=>Bt(c.identifiers,a.identifiers));l?(this.mergeContents(l.contents,a.contents),l.keys.push(...a.keys),l.keys=vl(l.keys)):i.push(Rc(a))}for(let a of r.keys)n.indexOf(a)===-1&&n.push(a)}return new o(t,n,i,!s.length||s.every(r=>r instanceof o)?void 0:s,this.logService)}createOverrideConfigurationModel(e){let t=this.getContentsForOverrideIdentifer(e);if(!t||typeof t!="object"||!Object.keys(t).length)return this;let i={};for(let n of vl([...Object.keys(this.contents),...Object.keys(t)])){let s=this.contents[n],r=t[n];r&&(typeof s=="object"&&typeof r=="object"?(s=Rc(s),this.mergeContents(s,r)):s=r),i[n]=s}return new o(i,this.keys,this.overrides,void 0,this.logService)}mergeContents(e,t){for(let i of Object.keys(t)){if(i in e&&ln(e[i])&&ln(t[i])){this.mergeContents(e[i],t[i]);continue}e[i]=Rc(t[i])}}getContentsForOverrideIdentifer(e){let t=null,i=null,n=s=>{s&&(i?this.mergeContents(i,s):i=Rc(s))};for(let s of this.overrides)s.identifiers.length===1&&s.identifiers[0]===e?t=s.contents:s.identifiers.includes(e)&&n(s.contents);return n(t),i}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}setValue(e,t){this.updateValue(e,t,!1)}removeValue(e){let t=this.keys.indexOf(e);t!==-1&&(this.keys.splice(t,1),hpe(this.contents,e),Wm.test(e)&&this.overrides.splice(this.overrides.findIndex(i=>Bt(i.identifiers,LE(e))),1))}updateValue(e,t,i){if(RG(this.contents,e,t,n=>this.logService.error(n)),i=i||this.keys.indexOf(e)===-1,i&&this.keys.push(e),Wm.test(e)){let n=this.contents[e],s=LE(e),r={identifiers:s,keys:Object.keys(n),contents:SP(n,l=>this.logService.error(l))},a=this.overrides.findIndex(l=>Bt(l.identifiers,s));a!==-1?this.overrides[a]=r:this.overrides.push(r)}}},nte=class{constructor(e,t){this._name=e,this.logService=t,this._raw=null,this._configurationModel=null,this._restrictedConfigurations=[]}get configurationModel(){return this._configurationModel||Va.createEmptyModel(this.logService)}parseRaw(e,t){this._raw=e;let{contents:i,keys:n,overrides:s,restricted:r,hasExcludedProperties:a}=this.doParseRaw(e,t);this._configurationModel=new Va(i,n,s,a?[e]:void 0,this.logService),this._restrictedConfigurations=r||[]}doParseRaw(e,t){let i=jt.as(da.Configuration),n=i.getConfigurationProperties(),s=i.getExcludedConfigurationProperties(),r=this.filter(e,n,s,!0,t);e=r.raw;let a=SP(e,d=>this.logService.error(`Conflict in settings file ${this._name}: ${d}`)),l=Object.keys(e),c=this.toOverrides(e,d=>this.logService.error(`Conflict in settings file ${this._name}: ${d}`));return{contents:a,keys:l,overrides:c,restricted:r.restricted,hasExcludedProperties:r.hasExcludedProperties}}filter(e,t,i,n,s){let r=!1;if(!s?.scopes&&!s?.skipRestricted&&!s?.skipUnregistered&&!s?.exclude?.length)return{raw:e,restricted:[],hasExcludedProperties:r};let a={},l=[];for(let c in e)if(Wm.test(c)&&n){let d=this.filter(e[c],t,i,!1,s);a[c]=d.raw,r=r||d.hasExcludedProperties,l.push(...d.restricted)}else{let d=t[c];d?.restricted&&l.push(c),this.shouldInclude(c,d,i,s)?a[c]=e[c]:r=!0}return{raw:a,restricted:l,hasExcludedProperties:r}}shouldInclude(e,t,i,n){if(n.exclude?.includes(e))return!1;if(n.include?.includes(e))return!0;if(n.skipRestricted&&t?.restricted||n.skipUnregistered&&!t)return!1;let s=t??i[e],r=s?typeof s.scope<"u"?s.scope:4:void 0;return r===void 0||n.scopes===void 0?!0:n.scopes.includes(r)}toOverrides(e,t){let i=[];for(let n of Object.keys(e))if(Wm.test(n)){let s={},r=e[n];for(let a in r)s[a]=r[a];i.push({identifiers:LE(n),keys:Object.keys(s),contents:SP(s,t)})}return i}},ote=class{constructor(e,t,i,n,s,r,a,l,c,d,h,u,f){this.key=e,this.overrides=t,this._value=i,this.overrideIdentifiers=n,this.defaultConfiguration=s,this.policyConfiguration=r,this.applicationConfiguration=a,this.userConfiguration=l,this.localUserConfiguration=c,this.remoteUserConfiguration=d,this.workspaceConfiguration=h,this.folderConfigurationModel=u,this.memoryConfigurationModel=f}toInspectValue(e){return e?.value!==void 0||e?.override!==void 0||e?.overrides!==void 0?e:void 0}get defaultInspectValue(){return this._defaultInspectValue||(this._defaultInspectValue=this.defaultConfiguration.inspect(this.key,this.overrides.overrideIdentifier)),this._defaultInspectValue}get defaultValue(){return this.defaultInspectValue.merged}get policyInspectValue(){return this._policyInspectValue===void 0&&(this._policyInspectValue=this.policyConfiguration?this.policyConfiguration.inspect(this.key):null),this._policyInspectValue}get policyValue(){return this.policyInspectValue?.merged}get applicationInspectValue(){return this._applicationInspectValue===void 0&&(this._applicationInspectValue=this.applicationConfiguration?this.applicationConfiguration.inspect(this.key):null),this._applicationInspectValue}get applicationValue(){return this.applicationInspectValue?.merged}get userInspectValue(){return this._userInspectValue||(this._userInspectValue=this.userConfiguration.inspect(this.key,this.overrides.overrideIdentifier)),this._userInspectValue}get userValue(){return this.userInspectValue.merged}get user(){return this.toInspectValue(this.userInspectValue)}get workspaceInspectValue(){return this._workspaceInspectValue===void 0&&(this._workspaceInspectValue=this.workspaceConfiguration?this.workspaceConfiguration.inspect(this.key,this.overrides.overrideIdentifier):null),this._workspaceInspectValue}get workspaceValue(){return this.workspaceInspectValue?.merged}get workspaceFolderInspectValue(){return this._workspaceFolderInspectValue===void 0&&(this._workspaceFolderInspectValue=this.folderConfigurationModel?this.folderConfigurationModel.inspect(this.key,this.overrides.overrideIdentifier):null),this._workspaceFolderInspectValue}get workspaceFolderValue(){return this.workspaceFolderInspectValue?.merged}get memoryInspectValue(){return this._memoryInspectValue===void 0&&(this._memoryInspectValue=this.memoryConfigurationModel.inspect(this.key,this.overrides.overrideIdentifier)),this._memoryInspectValue}get memoryValue(){return this.memoryInspectValue.merged}},UD=class o{constructor(e,t,i,n,s,r,a,l,c,d){this._defaultConfiguration=e,this._policyConfiguration=t,this._applicationConfiguration=i,this._localUserConfiguration=n,this._remoteUserConfiguration=s,this._workspaceConfiguration=r,this._folderConfigurations=a,this._memoryConfiguration=l,this._memoryConfigurationByResource=c,this.logService=d,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new un,this._userConfiguration=null}getValue(e,t,i){return this.getConsolidatedConfigurationModel(e,t,i).getValue(e)}updateValue(e,t,i={}){let n;i.resource?(n=this._memoryConfigurationByResource.get(i.resource),n||(n=Va.createEmptyModel(this.logService),this._memoryConfigurationByResource.set(i.resource,n))):n=this._memoryConfiguration,t===void 0?n.removeValue(e):n.setValue(e,t),i.resource||(this._workspaceConsolidatedConfiguration=null)}inspect(e,t,i){let n=this.getConsolidatedConfigurationModel(e,t,i),s=this.getFolderConfigurationModelForResource(t.resource,i),r=t.resource?this._memoryConfigurationByResource.get(t.resource)||this._memoryConfiguration:this._memoryConfiguration,a=new Set;for(let l of n.overrides)for(let c of l.identifiers)n.getOverrideValue(e,c)!==void 0&&a.add(c);return new ote(e,t,n.getValue(e),a.size?[...a]:void 0,this._defaultConfiguration,this._policyConfiguration.isEmpty()?void 0:this._policyConfiguration,this.applicationConfiguration.isEmpty()?void 0:this.applicationConfiguration,this.userConfiguration,this.localUserConfiguration,this.remoteUserConfiguration,i?this._workspaceConfiguration:void 0,s||void 0,r)}get applicationConfiguration(){return this._applicationConfiguration}get userConfiguration(){if(!this._userConfiguration)if(this._remoteUserConfiguration.isEmpty())this._userConfiguration=this._localUserConfiguration;else{let e=this._localUserConfiguration.merge(this._remoteUserConfiguration);this._userConfiguration=new Va(e.contents,e.keys,e.overrides,void 0,this.logService)}return this._userConfiguration}get localUserConfiguration(){return this._localUserConfiguration}get remoteUserConfiguration(){return this._remoteUserConfiguration}getConsolidatedConfigurationModel(e,t,i){let n=this.getConsolidatedConfigurationModelForResource(t,i);if(t.overrideIdentifier&&(n=n.override(t.overrideIdentifier)),!this._policyConfiguration.isEmpty()&&this._policyConfiguration.getValue(e)!==void 0){n=n.merge();for(let s of this._policyConfiguration.keys)n.setValue(s,this._policyConfiguration.getValue(s))}return n}getConsolidatedConfigurationModelForResource({resource:e},t){let i=this.getWorkspaceConsolidatedConfiguration();if(t&&e){let n=t.getFolder(e);n&&(i=this.getFolderConsolidatedConfiguration(n.uri)||i);let s=this._memoryConfigurationByResource.get(e);s&&(i=i.merge(s))}return i}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.applicationConfiguration,this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration)),this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(e){let t=this._foldersConsolidatedConfigurations.get(e);if(!t){let i=this.getWorkspaceConsolidatedConfiguration(),n=this._folderConfigurations.get(e);n?(t=i.merge(n),this._foldersConsolidatedConfigurations.set(e,t)):t=i}return t}getFolderConfigurationModelForResource(e,t){if(t&&e){let i=t.getFolder(e);if(i)return this._folderConfigurations.get(i.uri)}}toData(){return{defaults:{contents:this._defaultConfiguration.contents,overrides:this._defaultConfiguration.overrides,keys:this._defaultConfiguration.keys},policy:{contents:this._policyConfiguration.contents,overrides:this._policyConfiguration.overrides,keys:this._policyConfiguration.keys},application:{contents:this.applicationConfiguration.contents,overrides:this.applicationConfiguration.overrides,keys:this.applicationConfiguration.keys,raw:Array.isArray(this.applicationConfiguration.raw)?void 0:this.applicationConfiguration.raw},userLocal:{contents:this.localUserConfiguration.contents,overrides:this.localUserConfiguration.overrides,keys:this.localUserConfiguration.keys,raw:Array.isArray(this.localUserConfiguration.raw)?void 0:this.localUserConfiguration.raw},userRemote:{contents:this.remoteUserConfiguration.contents,overrides:this.remoteUserConfiguration.overrides,keys:this.remoteUserConfiguration.keys,raw:Array.isArray(this.remoteUserConfiguration.raw)?void 0:this.remoteUserConfiguration.raw},workspace:{contents:this._workspaceConfiguration.contents,overrides:this._workspaceConfiguration.overrides,keys:this._workspaceConfiguration.keys},folders:[...this._folderConfigurations.keys()].reduce((e,t)=>{let{contents:i,overrides:n,keys:s}=this._folderConfigurations.get(t);return e.push([t,{contents:i,overrides:n,keys:s}]),e},[])}}static parse(e,t){let i=this.parseConfigurationModel(e.defaults,t),n=this.parseConfigurationModel(e.policy,t),s=this.parseConfigurationModel(e.application,t),r=this.parseConfigurationModel(e.userLocal,t),a=this.parseConfigurationModel(e.userRemote,t),l=this.parseConfigurationModel(e.workspace,t),c=e.folders.reduce((d,h)=>(d.set(Le.revive(h[0]),this.parseConfigurationModel(h[1],t)),d),new un);return new o(i,n,s,r,a,l,c,Va.createEmptyModel(t),new un,t)}static parseConfigurationModel(e,t){return new Va(e.contents,e.keys,e.overrides,e.raw,t)}},A8=class{constructor(e,t,i,n,s){this.change=e,this.previous=t,this.currentConfiguraiton=i,this.currentWorkspace=n,this.logService=s,this._marker=` +`,this._markerCode1=this._marker.charCodeAt(0),this._markerCode2=46,this.affectedKeys=new Set,this._previousConfiguration=void 0;for(let r of e.keys)this.affectedKeys.add(r);for(let[,r]of e.overrides)for(let a of r)this.affectedKeys.add(a);this._affectsConfigStr=this._marker;for(let r of this.affectedKeys)this._affectsConfigStr+=r+this._marker}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=UD.parse(this.previous.data,this.logService)),this._previousConfiguration}affectsConfiguration(e,t){let i=this._marker+e,n=this._affectsConfigStr.indexOf(i);if(n<0)return!1;let s=n+i.length;if(s>=this._affectsConfigStr.length)return!1;let r=this._affectsConfigStr.charCodeAt(s);if(r!==this._markerCode1&&r!==this._markerCode2)return!1;if(t){let a=this.previousConfiguration?this.previousConfiguration.getValue(e,t,this.previous?.workspace):void 0,l=this.currentConfiguraiton.getValue(e,t,this.currentWorkspace);return!os(a,l)}return!0}}});var M8,D0e=x(()=>{W();$a();ste();Hm();ls();M8=class extends T{get configurationModel(){return this._configurationModel}constructor(e){super(),this.logService=e,this._configurationModel=Va.createEmptyModel(e)}reload(){return this.resetConfigurationModel(),this.configurationModel}getConfigurationDefaultOverrides(){return{}}resetConfigurationModel(){this._configurationModel=Va.createEmptyModel(this.logService);let e=jt.as(da.Configuration).getConfigurationProperties();this.updateConfigurationModel(Object.keys(e),e)}updateConfigurationModel(e,t){let i=this.getConfigurationDefaultOverrides();for(let n of e){let s=i[n],r=t[n];s!==void 0?this._configurationModel.setValue(n,s):r?this._configurationModel.setValue(n,this.getDefaultValue(n,r)):this._configurationModel.removeValue(n)}}getDefaultValue(e,t){return Rc(t.default)}}});var rte,ate,lte,cte,Ep,$0,q0,O8=x(()=>{Fr();He();rte=class{constructor(){this._value="",this._pos=0}reset(e){return this._value=e,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos=0;t--,this._valueLen--){let i=this._value.charCodeAt(t);if(!(i===47||this._splitOnBackslash&&i===92))break}return this.next()}hasNext(){return this._to!1,t=()=>!1){return new o(new cte(e,t))}static forStrings(){return new o(new rte)}static forConfigKeys(){return new o(new ate)}constructor(e){this._iter=e}clear(){this._root=void 0}set(e,t){let i=this._iter.reset(e),n;this._root||(this._root=new $0,this._root.segment=i.value());let s=[];for(n=this._root;;){let a=i.cmp(n.segment);if(a>0)n.left||(n.left=new $0,n.left.segment=i.value()),s.push([-1,n]),n=n.left;else if(a<0)n.right||(n.right=new $0,n.right.segment=i.value()),s.push([1,n]),n=n.right;else if(i.hasNext())i.next(),n.mid||(n.mid=new $0,n.mid.segment=i.value()),s.push([0,n]),n=n.mid;else break}let r=Ep.unwrap(n.value);n.value=Ep.wrap(t),n.key=e;for(let a=s.length-1;a>=0;a--){let l=s[a][1];l.updateHeight();let c=l.balanceFactor();if(c<-1||c>1){let d=s[a][0],h=s[a+1][0];if(d===1&&h===1)s[a][1]=l.rotateLeft();else if(d===-1&&h===-1)s[a][1]=l.rotateRight();else if(d===1&&h===-1)l.right=s[a+1][1]=s[a+1][1].rotateRight(),s[a][1]=l.rotateLeft();else if(d===-1&&h===1)l.left=s[a+1][1]=s[a+1][1].rotateLeft(),s[a][1]=l.rotateRight();else throw new Error;if(a>0)switch(s[a-1][0]){case-1:s[a-1][1].left=s[a][1];break;case 1:s[a-1][1].right=s[a][1];break;case 0:s[a-1][1].mid=s[a][1];break}else this._root=s[0][1]}}return r}get(e){return Ep.unwrap(this._getNode(e)?.value)}_getNode(e){let t=this._iter.reset(e),i=this._root;for(;i;){let n=t.cmp(i.segment);if(n>0)i=i.left;else if(n<0)i=i.right;else if(t.hasNext())t.next(),i=i.mid;else break}return i}has(e){let t=this._getNode(e);return!(t?.value===void 0&&t?.mid===void 0)}delete(e){return this._delete(e,!1)}deleteSuperstr(e){return this._delete(e,!0)}_delete(e,t){let i=this._iter.reset(e),n=[],s=this._root;for(;s;){let r=i.cmp(s.segment);if(r>0)n.push([-1,s]),s=s.left;else if(r<0)n.push([1,s]),s=s.right;else if(i.hasNext())i.next(),n.push([0,s]),s=s.mid;else break}if(s){if(t?(s.left=void 0,s.mid=void 0,s.right=void 0,s.height=1):(s.key=void 0,s.value=void 0),!s.mid&&!s.value)if(s.left&&s.right){let r=[[1,s]],a=this._min(s.right,r);if(a.key){s.key=a.key,s.value=a.value,s.segment=a.segment;let l=a.right;if(r.length>1){let[d,h]=r[r.length-1];switch(d){case-1:h.left=l;break;case 0:pm(!1);case 1:pm(!1)}}else s.right=l;let c=this._balanceByStack(r);if(n.length>0){let[d,h]=n[n.length-1];switch(d){case-1:h.left=c;break;case 0:h.mid=c;break;case 1:h.right=c;break}}else this._root=c}}else{let r=s.left??s.right;if(n.length>0){let[a,l]=n[n.length-1];switch(a){case-1:l.left=r;break;case 0:l.mid=r;break;case 1:l.right=r;break}}else this._root=r}this._root=this._balanceByStack(n)??this._root}}_min(e,t){for(;e.left;)t.push([-1,e]),e=e.left;return e}_balanceByStack(e){for(let t=e.length-1;t>=0;t--){let i=e[t][1];i.updateHeight();let n=i.balanceFactor();if(n>1?(i.right.balanceFactor()>=0||(i.right=i.right.rotateRight()),e[t][1]=i.rotateLeft()):n<-1&&(i.left.balanceFactor()<=0||(i.left=i.left.rotateLeft()),e[t][1]=i.rotateRight()),t>0)switch(e[t-1][0]){case-1:e[t-1][1].left=e[t][1];break;case 1:e[t-1][1].right=e[t][1];break;case 0:e[t-1][1].mid=e[t][1];break}else return e[0][1]}}findSubstr(e){let t=this._iter.reset(e),i=this._root,n;for(;i;){let s=t.cmp(i.segment);if(s>0)i=i.left;else if(s<0)i=i.right;else if(t.hasNext())t.next(),n=Ep.unwrap(i.value)||n,i=i.mid;else break}return i&&Ep.unwrap(i.value)||n}findSuperstr(e){return this._findSuperstrOrElement(e,!1)}_findSuperstrOrElement(e,t){let i=this._iter.reset(e),n=this._root;for(;n;){let s=i.cmp(n.segment);if(s>0)n=n.left;else if(s<0)n=n.right;else if(i.hasNext())i.next(),n=n.mid;else return n.mid?this._entries(n.mid):t?Ep.unwrap(n.value):void 0}}forEach(e){for(let[t,i]of this)e(i,t)}*[Symbol.iterator](){yield*this._entries(this._root)}_entries(e){let t=[];return this._dfsEntries(e,t),t[Symbol.iterator]()}_dfsEntries(e,t){e&&(e.left&&this._dfsEntries(e.left,t),e.value!==void 0&&t.push([e.key,Ep.unwrap(e.value)]),e.mid&&this._dfsEntries(e.mid,t),e.right&&this._dfsEntries(e.right,t))}}});var $D,dte,hte,Sy,xy=x(()=>{rt();le();je();new fe("isMac",Ye,m(1746,"Whether the operating system is macOS"));new fe("isLinux",po,m(1747,"Whether the operating system is Linux"));$D=new fe("isWindows",sn,m(1748,"Whether the operating system is Windows")),dte=new fe("isWeb",Cl,m(1749,"Whether the platform is a web browser"));new fe("isMacNative",Ye&&!Cl,m(1750,"Whether the operating system is macOS on a non-browser platform"));new fe("isIOS",pr,m(1751,"Whether the operating system is iOS"));new fe("isMobile",OM,m(1752,"Whether the platform is a mobile web browser"));new fe("isDevelopment",!1,!0);new fe("productQualityType","",m(1753,"Quality type of VS Code"));hte="inputFocus",Sy=new fe(hte,!1,m(1754,"Whether keyboard focus is inside an input box"))});function g6e(o,e){return o.allKeysContainedIn(new Set(Object.keys(e)))}function m6e(o){for(;o;){if(o.hasAttribute(qD)){let e=o.getAttribute(qD);return e?parseInt(e,10):NaN}o=o.parentElement}return 0}function p6e(o,e,t){o.get(Ce).createKey(String(e),_6e(t))}function _6e(o){return ix(o,e=>{if(typeof e=="object"&&e.$mid===1)return Le.revive(e).toString();if(e instanceof Le)return e.toString()})}var u6e,f6e,qD,jD,j0,ute,fte,P8,F8,gte,B8,W8,mte,N0e=x(()=>{ae();oa();W();$a();O8();ai();le();Ii();oi();je();xy();br();re();u6e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},f6e=function(o,e){return function(t,i){e(t,i,o)}},qD="data-keybinding-context",jD=class{constructor(e,t){this._id=e,this._parent=t,this._value=Object.create(null),this._value._contextId=e}get value(){return{...this._value}}setValue(e,t){return os(this._value[e],t)?!1:(this._value[e]=t,!0)}removeValue(e){return e in this._value?(delete this._value[e],!0):!1}getValue(e){let t=this._value[e];return typeof t>"u"&&this._parent?this._parent.getValue(e):t}},j0=class o extends jD{static{this.INSTANCE=new o}constructor(){super(-1,null)}setValue(e,t){return!1}removeValue(e){return!1}getValue(e){}},ute=class o extends jD{static{this._keyPrefix="config."}constructor(e,t,i){super(e,null),this._configurationService=t,this._values=q0.forConfigKeys(),this._listener=this._configurationService.onDidChangeConfiguration(n=>{if(n.source===7){let s=Array.from(this._values,([r])=>r);this._values.clear(),i.fire(new F8(s))}else{let s=[];for(let r of n.affectedKeys){let a=`config.${r}`,l=this._values.findSuperstr(a);l!==void 0&&(s.push(...ut.map(l,([c])=>c)),this._values.deleteSuperstr(a)),this._values.has(a)&&(s.push(a),this._values.delete(a))}i.fire(new F8(s))}})}dispose(){this._listener.dispose()}getValue(e){if(e.indexOf(o._keyPrefix)!==0)return super.getValue(e);if(this._values.has(e))return this._values.get(e);let t=e.substr(o._keyPrefix.length),i=this._configurationService.getValue(t),n;switch(typeof i){case"number":case"boolean":case"string":n=i;break;default:Array.isArray(i)?n=JSON.stringify(i):n=i}return this._values.set(e,n),n}setValue(e,t){return super.setValue(e,t)}removeValue(e){return super.removeValue(e)}},fte=class{constructor(e,t,i){this._service=e,this._key=t,this._defaultValue=i,this.reset()}set(e){this._service.setContext(this._key,e)}reset(){typeof this._defaultValue>"u"?this._service.removeContext(this._key):this._service.setContext(this._key,this._defaultValue)}get(){return this._service.getContextKeyValue(this._key)}},P8=class{constructor(e){this.key=e}affectsSome(e){return e.has(this.key)}allKeysContainedIn(e){return this.affectsSome(e)}},F8=class{constructor(e){this.keys=e}affectsSome(e){for(let t of this.keys)if(e.has(t))return!0;return!1}allKeysContainedIn(e){return this.keys.every(t=>e.has(t))}},gte=class{constructor(e){this.events=e}affectsSome(e){for(let t of this.events)if(t.affectsSome(e))return!0;return!1}allKeysContainedIn(e){return this.events.every(t=>t.allKeysContainedIn(e))}};B8=class extends T{get onDidChangeContext(){return this._onDidChangeContext.event}constructor(e){super(),this._onDidChangeContext=this._register(new Ed({merge:t=>new gte(t)})),this._isDisposed=!1,this._myContextId=e}createKey(e,t){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new fte(this,e,t)}bufferChangeEvents(e){this._onDidChangeContext.pause();try{e()}finally{this._onDidChangeContext.resume()}}createScoped(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new mte(this,e)}contextMatchesRules(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");let t=this.getContextValuesContainer(this._myContextId);return e?e.evaluate(t):!0}getContextKeyValue(e){if(!this._isDisposed)return this.getContextValuesContainer(this._myContextId).getValue(e)}setContext(e,t){if(this._isDisposed)return;let i=this.getContextValuesContainer(this._myContextId);i&&i.setValue(e,t)&&this._onDidChangeContext.fire(new P8(e))}removeContext(e){this._isDisposed||this.getContextValuesContainer(this._myContextId).removeValue(e)&&this._onDidChangeContext.fire(new P8(e))}getContext(e){return this._isDisposed?j0.INSTANCE:this.getContextValuesContainer(m6e(e))}dispose(){super.dispose(),this._isDisposed=!0}},W8=class extends B8{constructor(e){super(0),this._contexts=new Map,this._lastContextId=0,this.inputFocusedContext=Sy.bindTo(this);let t=this._register(new ute(this._myContextId,e,this._onDidChangeContext));this._contexts.set(this._myContextId,t),this._register(Q.runAndSubscribe(Fm,({window:i,disposables:n})=>{let s=n.add(new Qe);n.add(B(i,ee.FOCUS_IN,()=>{s.value=new F,this.updateInputContextKeys(i.document,s.value)},!0))},{window:Tt,disposables:this._store}))}updateInputContextKeys(e,t){function i(){return!!e.activeElement&&Ll(e.activeElement)}let n=i();if(this.inputFocusedContext.set(n),n){let s=t.add(as(e.activeElement));Q.once(s.onDidBlur)(()=>{It().document===e&&this.inputFocusedContext.set(i()),s.dispose()},void 0,t)}}getContextValuesContainer(e){return this._isDisposed?j0.INSTANCE:this._contexts.get(e)||j0.INSTANCE}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ContextKeyService has been disposed");let t=++this._lastContextId;return this._contexts.set(t,new jD(t,this.getContextValuesContainer(e))),t}disposeContext(e){this._isDisposed||this._contexts.delete(e)}};W8=u6e([f6e(0,Me)],W8);mte=class extends B8{constructor(e,t){if(super(e.createChildContext()),this._parentChangeListener=this._register(new Qe),this._parent=e,this._updateParentChangeListener(),this._domNode=t,this._domNode.hasAttribute(qD)){let i="";this._domNode.classList&&(i=Array.from(this._domNode.classList.values()).join(", ")),console.error(`Element already has context attribute${i?": "+i:""}`)}this._domNode.setAttribute(qD,String(this._myContextId))}_updateParentChangeListener(){this._parentChangeListener.value=this._parent.onDidChangeContext(e=>{let i=this._parent.getContextValuesContainer(this._myContextId).value;g6e(e,i)||this._onDidChangeContext.fire(e)})}dispose(){this._isDisposed||(this._parentChangeListener.clear(),this._parent.disposeContext(this._myContextId),this._domNode.removeAttribute(qD),super.dispose())}getContextValuesContainer(e){return this._isDisposed?j0.INSTANCE:this._parent.getContextValuesContainer(e)}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ScopedContextKeyService has been disposed");return this._parent.createChildContext(e)}disposeContext(e){this._parent.disposeContext(e)}};st.registerCommand("_setContext",p6e);st.registerCommand({id:"getContextKeyInfo",handler(){return[...fe.all()].sort((o,e)=>o.key.localeCompare(e.key))},metadata:{description:m(1736,"A command that returns information about context keys"),args:[]}});st.registerCommand("_generateContextKeyInfo",function(){let o=[],e=new Set;for(let t of fe.all())e.has(t.key)||(e.add(t.key),o.push(t));o.sort((t,i)=>t.key.localeCompare(i.key)),console.log(JSON.stringify(o,void 0,2))})});function nh(o,e){if(o!==void 0){let t=o.match(/^\s*var\((.+)\)$/);if(t){let i=t[1].split(",",2);return i.length===2&&(e=nh(i[1].trim(),e)),`var(${i[0]}, ${e})`}return o}return e}function pte(o){let e=o.replaceAll(/[^_\-a-z0-9]/gi,"");return e!==o&&console.warn(`CSS ident value ${o} modified to ${e} to be safe for CSS`),e}function Tp(o){return`'${o.replaceAll(/'/g,"\\000027")}'`}function Ul(o){return o?$l`url('${CSS.escape(M_.uriToBrowserUri(o).toString(!0))}')`:"url('')"}function KD(o,e=!1){let t=CSS.escape(o);return!e&&t!==o&&console.warn(`CSS class name ${o} modified to ${t} to be safe for CSS`),t}function $l(o,...e){return o.reduce((t,i,n)=>{let s=e[n]||"";return t+i+s},"")}var K0,ju=x(()=>{jo();K0=class{constructor(){this._parts=[]}push(...e){this._parts.push(...e)}join(e=` +`){return this._parts.join(e)}}});function R0e(o){H8=o}function Yr(o){return o==="element"?w6e.value:v6e.value}function V8(){return H8("element",!0)}var b6e,H8,v6e,w6e,xc=x(()=>{vu();b6e=()=>({get delay(){return-1},dispose:()=>{},showHover:()=>{}}),H8=b6e,v6e=new _o(()=>H8("mouse",!1)),w6e=new _o(()=>H8("element",!1))});var _te=x(()=>{});function M0e(o){A0e=o}function ms(){return A0e}var A0e,rd=x(()=>{W();A0e={showInstantHover:()=>{},showDelayedHover:()=>{},setupDelayedHover:()=>T.None,setupDelayedHoverAtMouse:()=>T.None,hideHover:()=>{},showAndFocusLastHover:()=>{},setupManagedHover:()=>({dispose:()=>{},show:()=>{},hide:()=>{},update:()=>{}}),showManagedHover:()=>{}}});var z8,O0e=x(()=>{z8=class{constructor(e){this.spliceables=e}splice(e,t,i){this.spliceables.forEach(n=>n.splice(e,t,i))}}});var bte=x(()=>{});var GD,kg,P0e=x(()=>{GD="notSelectable",kg=class extends Error{constructor(e,t){super(`ListError [${e}] ${t}`)}}});function F0e(o,e){let t=[];for(let i of e){if(o.start>=i.range.end)continue;if(o.ende.concat(t),[]))}var U8,B0e=x(()=>{AD();U8=class{get paddingTop(){return this._paddingTop}set paddingTop(e){this._size=this._size+e-this._paddingTop,this._paddingTop=e}constructor(e){this.groups=[],this._size=0,this._paddingTop=0,this._paddingTop=e??0,this._size=this._paddingTop}splice(e,t,i=[]){let n=i.length-t,s=F0e({start:0,end:e},this.groups),r=F0e({start:e+t,end:Number.POSITIVE_INFINITY},this.groups).map(l=>({range:$8(l.range,n),size:l.size})),a=i.map((l,c)=>({range:{start:e+c,end:e+c+1},size:l.size}));this.groups=y6e(s,a,r),this._size=this._paddingTop+this.groups.reduce((l,c)=>l+c.size*(c.range.end-c.range.start),0)}get count(){let e=this.groups.length;return e?this.groups[e-1].range.end:0}get size(){return this._size}indexAt(e){if(e<0)return-1;if(e{re();q8=class{constructor(e){this.renderers=e,this.cache=new Map,this.transactionNodesPendingRemoval=new Set,this.inTransaction=!1}alloc(e){let t=this.getTemplateCache(e).pop(),i=!1;if(t)i=this.transactionNodesPendingRemoval.delete(t.domNode);else{let n=j(".monaco-list-row"),r=this.getRenderer(e).renderTemplate(n);t={domNode:n,templateId:e,templateData:r}}return{row:t,isReusingConnectedDomNode:i}}release(e){e&&this.releaseRow(e)}transact(e){if(this.inTransaction)throw new Error("Already in transaction");this.inTransaction=!0;try{e()}finally{for(let t of this.transactionNodesPendingRemoval)this.doRemoveNode(t);this.transactionNodesPendingRemoval.clear(),this.inTransaction=!1}}releaseRow(e){let{domNode:t,templateId:i}=e;t&&(this.inTransaction?this.transactionNodesPendingRemoval.add(t):this.doRemoveNode(t)),this.getTemplateCache(i).push(e)}doRemoveNode(e){e.classList.remove("scrolling"),e.remove()}getTemplateCache(e){let t=this.cache.get(e);return t||(t=[],this.cache.set(e,t)),t}dispose(){this.cache.forEach((e,t)=>{for(let i of e)this.getRenderer(t).disposeTemplate(i.templateData),i.templateData=null}),this.cache.clear(),this.transactionNodesPendingRemoval.clear()}getRenderer(e){let t=this.renderers.get(e);if(!t)throw new Error(`No renderer found for ${e}`);return t}}});var H0e=x(()=>{});function V0e(o,e,t,i=[]){if(!o.dataTransfer)return;let n=j(".monaco-drag-image");n.textContent=t,n.classList.add(...i),(a=>{for(;a&&!a.classList.contains("monaco-workbench");)a=a.parentElement;return a||e.ownerDocument.body})(e).appendChild(n),o.dataTransfer.setDragImage(n,-10,-10),setTimeout(()=>n.remove(),0)}var z0e=x(()=>{re();H0e()});function S6e(o,e){return Array.isArray(o)&&Array.isArray(e)?Bt(o,e):o===e}var Np,ky,Lg,Dp,vte,wte,Cte,oh,j8=x(()=>{x1();re();Yf();Bl();Gc();qe();Ze();np();ae();W();AD();C1();B0e();W0e();Ae();nv();z0e();Np=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},ky={CurrentDragAndDropData:void 0},Lg={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements(o){return[o]},getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){},dispose(){}},horizontalScrolling:!1,transformOptimization:!0,alwaysConsumeMouseWheel:!0},Dp=class{constructor(e){this.elements=e}update(){}getData(){return this.elements}},vte=class{constructor(e){this.elements=e}update(){}getData(){return this.elements}},wte=class{constructor(){this.types=[],this.files=[]}update(e){if(e.types&&this.types.splice(0,this.types.length,...e.types),e.files){this.files.splice(0,this.files.length);for(let t=0;tn,e?.getPosInSet?this.getPosInSet=e.getPosInSet.bind(e):this.getPosInSet=(t,i)=>i+1,e?.getRole?this.getRole=e.getRole.bind(e):this.getRole=t=>"listitem",e?.isChecked?this.isChecked=e.isChecked.bind(e):this.isChecked=t=>{}}},oh=class o{static{this.InstanceCount=0}get contentHeight(){return this.rangeMap.size}get onDidScroll(){return this.scrollableElement.onScroll}get scrollableElementDomNode(){return this.scrollableElement.getDomNode()}get horizontalScrolling(){return this._horizontalScrolling}set horizontalScrolling(e){if(e!==this._horizontalScrolling){if(e&&this.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");if(this._horizontalScrolling=e,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this._horizontalScrolling){for(let t of this.items)this.measureItemWidth(t);this.updateScrollWidth(),this.scrollableElement.setScrollDimensions({width:FO(this.domNode)}),this.rowsContainer.style.width=`${Math.max(this.scrollWidth||0,this.renderWidth)}px`}else this.scrollableElementWidthDelayer.cancel(),this.scrollableElement.setScrollDimensions({width:this.renderWidth,scrollWidth:this.renderWidth}),this.rowsContainer.style.width="",this.domNode.style.removeProperty("--list-scroll-right-offset")}}constructor(e,t,i,n=Lg){if(this.virtualDelegate=t,this.domId=`list_id_${++o.InstanceCount}`,this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null,this.scrollableElementWidthDelayer=new qo(50),this.splicing=!1,this.dragOverAnimationStopDisposable=T.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=T.None,this.onDragLeaveTimeout=T.None,this.currentSelectionDisposable=T.None,this.disposables=new F,this._onDidChangeContentHeight=this.disposables.add(new N),this._onDidChangeContentWidth=this.disposables.add(new N),this.onDidChangeContentHeight=Q.latch(this._onDidChangeContentHeight.event,void 0,this.disposables),this._horizontalScrolling=!1,n.horizontalScrolling&&n.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");this.items=[],this.itemId=0,this.rangeMap=this.createRangeMap(n.paddingTop??0);for(let r of i)this.renderers.set(r.templateId,r);if(this.cache=this.disposables.add(new q8(this.renderers)),this.lastRenderTop=0,this.lastRenderHeight=0,this.domNode=document.createElement("div"),this.domNode.className="monaco-list",this.domNode.classList.add(this.domId),this.domNode.tabIndex=0,this.domNode.classList.toggle("mouse-support",typeof n.mouseSupport=="boolean"?n.mouseSupport:!0),this._horizontalScrolling=n.horizontalScrolling??Lg.horizontalScrolling,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this.paddingBottom=typeof n.paddingBottom>"u"?0:n.paddingBottom,this.accessibilityProvider=new Cte(n.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows",(n.transformOptimization??Lg.transformOptimization)&&(this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)",this.rowsContainer.style.overflow="hidden",this.rowsContainer.style.contain="strict"),this.disposables.add(jn.addTarget(this.rowsContainer)),this.scrollable=this.disposables.add(new Yd({forceIntegerValues:!0,smoothScrollDuration:n.smoothScrolling??!1?125:0,scheduleAtNextAnimationFrame:r=>ws(we(this.domNode),r)})),this.scrollableElement=this.disposables.add(new Gf(this.rowsContainer,{alwaysConsumeMouseWheel:n.alwaysConsumeMouseWheel??Lg.alwaysConsumeMouseWheel,horizontal:1,vertical:n.verticalScrollMode??Lg.verticalScrollMode,useShadows:n.useShadows??Lg.useShadows,mouseWheelScrollSensitivity:n.mouseWheelScrollSensitivity,fastScrollSensitivity:n.fastScrollSensitivity,scrollByPage:n.scrollByPage},this.scrollable)),this.domNode.appendChild(this.scrollableElement.getDomNode()),e.appendChild(this.domNode),this.scrollableElement.onScroll(this.onScroll,this,this.disposables),this.disposables.add(B(this.rowsContainer,vi.Change,r=>this.onTouchChange(r))),this.disposables.add(B(this.scrollableElement.getDomNode(),"scroll",r=>{let a=r.target,l=a.scrollTop;a.scrollTop=0,n.scrollToActiveElement&&this.setScrollTop(this.scrollTop+l)})),this.disposables.add(B(this.domNode,"dragover",r=>this.onDragOver(this.toDragEvent(r)))),this.disposables.add(B(this.domNode,"drop",r=>this.onDrop(this.toDragEvent(r)))),this.disposables.add(B(this.domNode,"dragleave",r=>this.onDragLeave(this.toDragEvent(r)))),this.disposables.add(B(this.domNode,"dragend",r=>this.onDragEnd(r))),n.userSelection){if(n.dnd)throw new Error("DND and user selection cannot be used simultaneously");this.disposables.add(B(this.domNode,"mousedown",r=>this.onPotentialSelectionStart(r)))}this.setRowLineHeight=n.setRowLineHeight??Lg.setRowLineHeight,this.setRowHeight=n.setRowHeight??Lg.setRowHeight,this.supportDynamicHeights=n.supportDynamicHeights??Lg.supportDynamicHeights,this.dnd=n.dnd??this.disposables.add(Lg.dnd),this.layout(n.initialSize?.height,n.initialSize?.width),n.scrollToActiveElement&&this._setupFocusObserver(e)}_setupFocusObserver(e){this.disposables.add(B(e,"focus",()=>{let t=Ui();this.activeElement!==t&&t!==null&&(this.activeElement=t,this._scrollToActiveElement(this.activeElement,e))},!0))}_scrollToActiveElement(e,t){let i=t.getBoundingClientRect(),s=e.getBoundingClientRect().top-i.top;s<0&&this.setScrollTop(this.scrollTop+s)}updateOptions(e){e.paddingBottom!==void 0&&(this.paddingBottom=e.paddingBottom,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),e.smoothScrolling!==void 0&&this.scrollable.setSmoothScrollDuration(e.smoothScrolling?125:0),e.horizontalScrolling!==void 0&&(this.horizontalScrolling=e.horizontalScrolling);let t;if(e.scrollByPage!==void 0&&(t={...t??{},scrollByPage:e.scrollByPage}),e.mouseWheelScrollSensitivity!==void 0&&(t={...t??{},mouseWheelScrollSensitivity:e.mouseWheelScrollSensitivity}),e.fastScrollSensitivity!==void 0&&(t={...t??{},fastScrollSensitivity:e.fastScrollSensitivity}),t&&this.scrollableElement.updateOptions(t),e.paddingTop!==void 0&&e.paddingTop!==this.rangeMap.paddingTop){let i=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),n=e.paddingTop-this.rangeMap.paddingTop;this.rangeMap.paddingTop=e.paddingTop,this.render(i,Math.max(0,this.lastRenderTop+n),this.lastRenderHeight,void 0,void 0,!0),this.setScrollTop(this.lastRenderTop),this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.lastRenderTop,this.lastRenderHeight)}}createRangeMap(e){return new U8(e)}splice(e,t,i=[]){if(this.splicing)throw new Error("Can't run recursive splices.");this.splicing=!0;try{return this._splice(e,t,i)}finally{this.splicing=!1,this._onDidChangeContentHeight.fire(this.contentHeight)}}_splice(e,t,i=[]){let n=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),s={start:e,end:e+t},r=$s.intersect(n,s),a=new Map;for(let y=r.end-1;y>=r.start;y--){let k=this.items[y];if(k.dragStartDisposable.dispose(),k.checkedDisposable.dispose(),k.row){let I=a.get(k.templateId);I||(I=[],a.set(k.templateId,I));let E=this.renderers.get(k.templateId);E&&E.disposeElement&&E.disposeElement(k.element,y,k.row.templateData,{height:k.size}),I.unshift(k.row)}k.row=null,k.stale=!0}let l={start:e+t,end:this.items.length},c=$s.intersect(l,n),d=$s.relativeComplement(l,n),h=i.map(y=>({id:String(this.itemId++),element:y,templateId:this.virtualDelegate.getTemplateId(y),size:this.virtualDelegate.getHeight(y),width:void 0,hasDynamicHeight:!!this.virtualDelegate.hasDynamicHeight&&this.virtualDelegate.hasDynamicHeight(y),lastDynamicHeightWidth:void 0,row:null,uri:void 0,dropTarget:!1,dragStartDisposable:T.None,checkedDisposable:T.None,stale:!1})),u;e===0&&t>=this.items.length?(this.rangeMap=this.createRangeMap(this.rangeMap.paddingTop),this.rangeMap.splice(0,0,h),u=this.items,this.items=h):(this.rangeMap.splice(e,t,h),u=fw(this.items,e,t,h));let f=i.length-t,g=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),p=$8(c,f),_=$s.intersect(g,p);for(let y=_.start;y<_.end;y++)this.updateItemInDOM(this.items[y],y);let b=$s.relativeComplement(p,g);for(let y of b)for(let k=y.start;k$8(y,f)),C=[{start:e,end:e+i.length},...v].map(y=>$s.intersect(g,y)).reverse();for(let y of C)for(let k=y.end-1;k>=y.start;k--){let I=this.items[k],D=a.get(I.templateId)?.pop();this.insertItemInDOM(k,D)}for(let y of a.values())for(let k of y)this.cache.release(k);return this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight),u.map(y=>y.element)}eventuallyUpdateScrollDimensions(){this._scrollHeight=this.contentHeight,this.rowsContainer.style.height=`${this._scrollHeight}px`,this.scrollableElementUpdateDisposable||(this.scrollableElementUpdateDisposable=ws(we(this.domNode),()=>{this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight}),this.updateScrollWidth(),this.scrollableElementUpdateDisposable=null}))}eventuallyUpdateScrollWidth(){if(!this.horizontalScrolling){this.scrollableElementWidthDelayer.cancel();return}this.scrollableElementWidthDelayer.trigger(()=>this.updateScrollWidth())}updateScrollWidth(){if(!this.horizontalScrolling)return;let e=0;for(let t of this.items)typeof t.width<"u"&&(e=Math.max(e,t.width));this.scrollWidth=e,this.scrollableElement.setScrollDimensions({scrollWidth:e===0?0:e+10}),this._onDidChangeContentWidth.fire(this.scrollWidth)}rerender(){if(this.supportDynamicHeights){for(let e of this.items)e.lastDynamicHeightWidth=void 0;this._rerender(this.lastRenderTop,this.lastRenderHeight)}}get length(){return this.items.length}get renderHeight(){return this.scrollableElement.getScrollDimensions().height}get firstVisibleIndex(){return this.getVisibleRange(this.lastRenderTop,this.lastRenderHeight).start}element(e){return this.items[e].element}indexOf(e){return this.items.findIndex(t=>t.element===e)}domElement(e){let t=this.items[e].row;return t&&t.domNode}elementHeight(e){return this.items[e].size}elementTop(e){return this.rangeMap.positionAt(e)}indexAt(e){return this.rangeMap.indexAt(e)}indexAfter(e){return this.rangeMap.indexAfter(e)}layout(e,t){let i={height:typeof e=="number"?e:gme(this.domNode)};if(this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,i.scrollHeight=this.scrollHeight),this.scrollableElement.setScrollDimensions(i),typeof t<"u"&&(this.renderWidth=t,this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight)),this.horizontalScrolling){this.scrollableElement.setScrollDimensions({width:typeof t=="number"?t:FO(this.domNode)});let n=this.scrollableElement.getScrollPosition(),s=this.scrollableElement.getScrollDimensions(),r=Math.max(0,s.scrollWidth-n.scrollLeft-this.renderWidth);this.domNode.style.setProperty("--list-scroll-right-offset",`${Math.max(r-12,0)}px`)}}render(e,t,i,n,s,r=!1,a=!1){let l=this.getRenderRange(t,i),c=$s.relativeComplement(l,e).reverse(),d=$s.relativeComplement(e,l);if(r){let h=$s.intersect(e,l);for(let u=h.start;u{for(let h of d)for(let u=h.start;u=h.start;u--)this.insertItemInDOM(u)}),n!==void 0&&(this.rowsContainer.style.left=`-${n}px`),this.rowsContainer.style.top=`-${t}px`,this.horizontalScrolling&&s!==void 0){this.rowsContainer.style.width=`${Math.max(s,this.renderWidth)}px`;let h=Math.max(0,s-(n??0)-this.renderWidth);this.domNode.style.setProperty("--list-scroll-right-offset",`${Math.max(h-12,0)}px`)}this.lastRenderTop=t,this.lastRenderHeight=i}insertItemInDOM(e,t){let i=this.items[e];if(!i.row)if(t)i.row=t,i.stale=!0;else{let c=this.cache.alloc(i.templateId);i.row=c.row,i.stale||=c.isReusingConnectedDomNode}let n=this.accessibilityProvider.getRole(i.element)||"listitem";i.row.domNode.setAttribute("role",n);let s=this.accessibilityProvider.isChecked(i.element),r=c=>c==="mixed"?"mixed":String(!!c);if(typeof s=="boolean"||s==="mixed")i.row.domNode.setAttribute("aria-checked",r(s));else if(s){let c=d=>i.row.domNode.setAttribute("aria-checked",r(d));c(s.value),i.checkedDisposable=s.onDidChange(()=>c(s.value))}if(i.stale||!i.row.domNode.parentElement){let c=this.items.at(e+1)?.row?.domNode??null;(i.row.domNode.parentElement!==this.rowsContainer||i.row.domNode.nextElementSibling!==c)&&this.rowsContainer.insertBefore(i.row.domNode,c),i.stale=!1}this.updateItemInDOM(i,e);let a=this.renderers.get(i.templateId);if(!a)throw new Error(`No renderer found for template id ${i.templateId}`);a?.renderElement(i.element,e,i.row.templateData,{height:i.size});let l=this.dnd.getDragURI(i.element);i.dragStartDisposable.dispose(),i.row.domNode.draggable=!!l,l&&(i.dragStartDisposable=B(i.row.domNode,"dragstart",c=>this.onDragStart(i.element,l,c))),this.horizontalScrolling&&(this.measureItemWidth(i),this.eventuallyUpdateScrollWidth())}measureItemWidth(e){if(!e.row||!e.row.domNode)return;e.row.domNode.style.width="fit-content",e.width=FO(e.row.domNode);let t=we(e.row.domNode).getComputedStyle(e.row.domNode);t.paddingLeft&&(e.width+=parseFloat(t.paddingLeft)),t.paddingRight&&(e.width+=parseFloat(t.paddingRight)),e.row.domNode.style.width=""}updateItemInDOM(e,t){e.row.domNode.style.top=`${this.elementTop(t)}px`,this.setRowHeight&&(e.row.domNode.style.height=`${e.size}px`),this.setRowLineHeight&&(e.row.domNode.style.lineHeight=`${e.size}px`),e.row.domNode.setAttribute("data-index",`${t}`),e.row.domNode.setAttribute("data-last-element",t===this.length-1?"true":"false"),e.row.domNode.setAttribute("data-parity",t%2===0?"even":"odd"),e.row.domNode.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(e.element,t,this.length))),e.row.domNode.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(e.element,t))),e.row.domNode.setAttribute("id",this.getElementDomId(t)),e.row.domNode.classList.toggle("drop-target",e.dropTarget)}removeItemFromDOM(e,t){let i=this.items[e];if(i.dragStartDisposable.dispose(),i.checkedDisposable.dispose(),i.row){let n=this.renderers.get(i.templateId);n&&n.disposeElement&&n.disposeElement(i.element,e,i.row.templateData,{height:i.size,onScroll:t}),this.cache.release(i.row),i.row=null}this.horizontalScrolling&&this.eventuallyUpdateScrollWidth()}getScrollTop(){return this.scrollableElement.getScrollPosition().scrollTop}setScrollTop(e,t){this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),this.scrollableElement.setScrollPosition({scrollTop:e,reuseAnimation:t})}get scrollTop(){return this.getScrollTop()}set scrollTop(e){this.setScrollTop(e)}get scrollHeight(){return this._scrollHeight+(this.horizontalScrolling?10:0)+this.paddingBottom}get onMouseClick(){return Q.map(this.disposables.add(new Xt(this.domNode,"click")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseDblClick(){return Q.map(this.disposables.add(new Xt(this.domNode,"dblclick")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseMiddleClick(){return Q.filter(Q.map(this.disposables.add(new Xt(this.domNode,"auxclick")).event,e=>this.toMouseEvent(e),this.disposables),e=>e.browserEvent.button===1,this.disposables)}get onMouseDown(){return Q.map(this.disposables.add(new Xt(this.domNode,"mousedown")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseOver(){return Q.map(this.disposables.add(new Xt(this.domNode,"mouseover")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseOut(){return Q.map(this.disposables.add(new Xt(this.domNode,"mouseout")).event,e=>this.toMouseEvent(e),this.disposables)}get onContextMenu(){return Q.any(Q.map(this.disposables.add(new Xt(this.domNode,"contextmenu")).event,e=>this.toMouseEvent(e),this.disposables),Q.map(this.disposables.add(new Xt(this.domNode,vi.Contextmenu)).event,e=>this.toGestureEvent(e),this.disposables))}get onTouchStart(){return Q.map(this.disposables.add(new Xt(this.domNode,"touchstart")).event,e=>this.toTouchEvent(e),this.disposables)}get onTap(){return Q.map(this.disposables.add(new Xt(this.rowsContainer,vi.Tap)).event,e=>this.toGestureEvent(e),this.disposables)}toMouseEvent(e){let t=this.getItemIndexFromEventTarget(e.target||null),i=typeof t>"u"?void 0:this.items[t],n=i&&i.element;return{browserEvent:e,index:t,element:n}}toTouchEvent(e){let t=this.getItemIndexFromEventTarget(e.target||null),i=typeof t>"u"?void 0:this.items[t],n=i&&i.element;return{browserEvent:e,index:t,element:n}}toGestureEvent(e){let t=this.getItemIndexFromEventTarget(e.initialTarget||null),i=typeof t>"u"?void 0:this.items[t],n=i&&i.element;return{browserEvent:e,index:t,element:n}}toDragEvent(e){let t=this.getItemIndexFromEventTarget(e.target||null),i=typeof t>"u"?void 0:this.items[t],n=i&&i.element,s=this.getTargetSector(e,t);return{browserEvent:e,index:t,element:n,sector:s}}onScroll(e){try{let t=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);this.render(t,e.scrollTop,e.height,e.scrollLeft,e.scrollWidth,void 0,!0),this.supportDynamicHeights&&this._rerender(e.scrollTop,e.height,e.inSmoothScrolling)}catch(t){throw console.error("Got bad scroll event:",e),t}}onTouchChange(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY}onDragStart(e,t,i){if(!i.dataTransfer)return;let n=this.dnd.getDragElements(e);i.dataTransfer.effectAllowed="copyMove",i.dataTransfer.setData(Wu.TEXT,t);let s;this.dnd.getDragLabel&&(s=this.dnd.getDragLabel(n,i)),typeof s>"u"&&(s=String(n.length)),V0e(i,this.domNode,s,[this.domId]),this.domNode.classList.add("dragging"),this.currentDragData=new Dp(n),ky.CurrentDragAndDropData=new vte(n),this.dnd.onDragStart?.(this.currentDragData,i)}onPotentialSelectionStart(e){this.currentSelectionDisposable.dispose();let t=ame(this.domNode),i=this.currentSelectionDisposable=new F,n=i.add(new F);n.add(B(this.domNode,"selectstart",()=>{n.add(B(t,"mousemove",s=>{t.getSelection()?.isCollapsed===!1&&this.setupDragAndDropScrollTopAnimation(s)})),i.add(ne(()=>{let s=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);this.currentSelectionBounds=void 0,this.render(s,this.lastRenderTop,this.lastRenderHeight,void 0,void 0)})),i.add(B(t,"selectionchange",()=>{let s=t.getSelection();if(!s||s.isCollapsed){n.isDisposed&&i.dispose();return}let r=this.getIndexOfListElement(s.anchorNode),a=this.getIndexOfListElement(s.focusNode);r!==void 0&&a!==void 0&&(a{n.dispose(),this.teardownDragAndDropScrollTopAnimation(),t.getSelection()?.isCollapsed!==!1&&i.dispose()}))}getIndexOfListElement(e){if(!(!e||!this.domNode.contains(e)))for(;e&&e!==this.domNode;){if(e.dataset?.index)return Number(e.dataset.index);e=e.parentElement}}onDragOver(e){if(e.browserEvent.preventDefault(),this.onDragLeaveTimeout.dispose(),ky.CurrentDragAndDropData&&ky.CurrentDragAndDropData.getData()==="vscode-ui"||(this.setupDragAndDropScrollTopAnimation(e.browserEvent),!e.browserEvent.dataTransfer))return!1;if(!this.currentDragData)if(ky.CurrentDragAndDropData)this.currentDragData=ky.CurrentDragAndDropData;else{if(!e.browserEvent.dataTransfer.types)return!1;this.currentDragData=new wte}let t=this.dnd.onDragOver(this.currentDragData,e.element,e.index,e.sector,e.browserEvent);if(this.canDrop=typeof t=="boolean"?t:t.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;e.browserEvent.dataTransfer.dropEffect=typeof t!="boolean"&&t.effect?.type===0?"copy":"move";let i;typeof t!="boolean"&&t.feedback?i=t.feedback:typeof e.index>"u"?i=[-1]:i=[e.index],i=vl(i).filter(s=>s>=-1&&ss-r),i=i[0]===-1?[-1]:i;let n=typeof t!="boolean"&&t.effect&&t.effect.position?t.effect.position:"drop-target";if(S6e(this.currentDragFeedback,i)&&this.currentDragFeedbackPosition===n)return!0;if(this.currentDragFeedback=i,this.currentDragFeedbackPosition=n,this.currentDragFeedbackDisposable.dispose(),i[0]===-1)this.domNode.classList.add(n),this.rowsContainer.classList.add(n),this.currentDragFeedbackDisposable=ne(()=>{this.domNode.classList.remove(n),this.rowsContainer.classList.remove(n)});else{if(i.length>1&&n!=="drop-target")throw new Error("Can't use multiple feedbacks with position different than 'over'");n==="drop-target-after"&&i[0]{for(let s of i){let r=this.items[s];r.dropTarget=!1,r.row?.domNode.classList.remove(n)}})}return!0}onDragLeave(e){this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=er(()=>this.clearDragOverFeedback(),100,this.disposables),this.currentDragData&&this.dnd.onDragLeave?.(this.currentDragData,e.element,e.index,e.browserEvent)}onDrop(e){if(!this.canDrop)return;let t=this.currentDragData;this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,ky.CurrentDragAndDropData=void 0,!(!t||!e.browserEvent.dataTransfer)&&(e.browserEvent.preventDefault(),t.update(e.browserEvent.dataTransfer),this.dnd.drop(t,e.element,e.index,e.sector,e.browserEvent))}onDragEnd(e){this.canDrop=!1,this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,ky.CurrentDragAndDropData=void 0,this.dnd.onDragEnd?.(e)}clearDragOverFeedback(){this.currentDragFeedback=void 0,this.currentDragFeedbackPosition=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=T.None}setupDragAndDropScrollTopAnimation(e){if(!this.dragOverAnimationDisposable){let t=OO(this.domNode).top;this.dragOverAnimationDisposable=Sme(we(this.domNode),this.animateDragAndDropScrollTop.bind(this,t))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=er(()=>{this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)},1e3,this.disposables),this.dragOverMouseY=e.pageY}animateDragAndDropScrollTop(e){if(this.dragOverMouseY===void 0)return;let t=this.dragOverMouseY-e,i=this.renderHeight-35;t<35?this.scrollTop+=Math.max(-14,Math.floor(.3*(t-35))):t>i&&(this.scrollTop+=Math.min(14,Math.floor(.3*(t-i))))}teardownDragAndDropScrollTopAnimation(){this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}getTargetSector(e,t){if(t===void 0)return;let i=e.offsetY/this.items[t].size,n=Math.floor(i/.25);return ts(n,0,3)}getItemIndexFromEventTarget(e){let t=this.scrollableElement.getDomNode(),i=e;for(;(xt(i)||qK(i))&&i!==this.rowsContainer&&t.contains(i);){let n=i.getAttribute("data-index");if(n){let s=Number(n);if(!isNaN(s))return s}i=i.parentElement}}getVisibleRange(e,t){return{start:this.rangeMap.indexAt(e),end:this.rangeMap.indexAfter(e+t-1)}}getRenderRange(e,t){let i=this.getVisibleRange(e,t);if(this.currentSelectionBounds){let n=this.rangeMap.count;i.start=Math.min(i.start,this.currentSelectionBounds.start,n),i.end=Math.min(Math.max(i.end,this.currentSelectionBounds.end+1),n)}return i}_rerender(e,t,i){let n=this.getRenderRange(e,t),s,r;e===this.elementTop(n.start)?(s=n.start,r=0):n.end-n.start>1&&(s=n.start+1,r=this.elementTop(s)-e);let a=0;for(;;){let l=this.getRenderRange(e,t),c=!1;for(let d=l.start;d=u.start;f--)this.insertItemInDOM(f);for(let u=l.start;u0&&this.virtualDelegate.setDynamicHeight?.(t.element,t.size),i}probeDynamicHeightForItem(e,t){if(this.virtualDelegate.getDynamicHeight){let r=this.virtualDelegate.getDynamicHeight(e.element);if(r!==null){let a=e.size;return e.size=r,e.lastDynamicHeightWidth=this.renderWidth,r-a}}if(!e.hasDynamicHeight||e.lastDynamicHeightWidth===this.renderWidth||this.virtualDelegate.hasDynamicHeight&&!this.virtualDelegate.hasDynamicHeight(e.element))return 0;let i=e.size;if(e.row)return e.row.domNode.style.height="",e.size=e.row.domNode.offsetHeight,e.size===0&&(mn(e.row.domNode,we(e.row.domNode).document.body)?console.warn("Measured item node at 0px- ensure that ListView is not display:none before measuring row height!",new Error().stack):console.warn("Measuring item node that is not in DOM! Add ListView to the DOM before measuring row height!",new Error().stack)),e.lastDynamicHeightWidth=this.renderWidth,e.size-i;let{row:n}=this.cache.alloc(e.templateId);n.domNode.style.height="",this.rowsContainer.appendChild(n.domNode);let s=this.renderers.get(e.templateId);if(!s)throw new xe("Missing renderer for templateId: "+e.templateId);return s.renderElement(e.element,t,n.templateData),e.size=n.domNode.offsetHeight,s.disposeElement?.(e.element,t,n.templateData),e.lastDynamicHeightWidth=this.renderWidth,n.domNode.remove(),this.cache.release(n),e.size-i}getElementDomId(e){return`${this.domId}_${e}`}dispose(){for(let e of this.items)if(e.dragStartDisposable.dispose(),e.checkedDisposable.dispose(),e.row){let t=this.renderers.get(e.row.templateId);t&&(t.disposeElement?.(e.element,-1,e.row.templateData,void 0),t.disposeTemplate(e.row.templateData))}this.items=[],this.domNode?.remove(),this.dragOverAnimationDisposable?.dispose(),this.disposables.dispose()}};Np([_n],oh.prototype,"onMouseClick",null);Np([_n],oh.prototype,"onMouseDblClick",null);Np([_n],oh.prototype,"onMouseMiddleClick",null);Np([_n],oh.prototype,"onMouseDown",null);Np([_n],oh.prototype,"onMouseOver",null);Np([_n],oh.prototype,"onMouseOut",null);Np([_n],oh.prototype,"onContextMenu",null);Np([_n],oh.prototype,"onTouchStart",null);Np([_n],oh.prototype,"onTap",null)});function ht(o){return new yte(o)}var yte,Es=x(()=>{xf();yte=class extends hE{constructor(e){super(),this.value=e}get debugName(){return this.toString()}get(){return this.value}addObserver(e){}removeObserver(e){}toString(){return`Const: ${this.value}`}}});function XD(o,e){return o.classList.contains(e)?!0:o.classList.contains("monaco-list")||!o.parentElement?!1:XD(o.parentElement,e)}function G0(o){return XD(o,"monaco-editor")}function q0e(o){return XD(o,"monaco-custom-toggle")}function j0e(o){return XD(o,"action-item")}function X0(o){return XD(o,"monaco-tree-sticky-row")}function Q0(o){return o.classList.contains("monaco-tree-sticky-container")}function Rte(o){return o.tagName==="A"&&o.classList.contains("monaco-button")||o.tagName==="DIV"&&o.classList.contains("monaco-button-dropdown")?!0:o.classList.contains("monaco-list")||!o.parentElement?!1:Rte(o.parentElement)}function Ate(o){return Ye?o.browserEvent.metaKey:o.browserEvent.ctrlKey}function Mte(o){return o.browserEvent.shiftKey}function k6e(o){return V_(o)&&o.button===2}function I6e(o,e){let t=o.indexOf(e);if(t===-1)return[];let i=[],n=t-1;for(;n>=0&&o[n]===e-(t-n);)i.push(o[n--]);for(i.reverse(),n=t;n=o.length)t.push(e[n++]);else if(n>=e.length)t.push(o[i++]);else if(o[i]===e[n]){t.push(o[i]),i++,n++;continue}else o[i]=o.length)t.push(e[n++]);else if(n>=e.length)t.push(o[i++]);else if(o[i]===e[n]){i++,n++;continue}else o[i]{re();qd();ju();Yf();wr();Bl();hs();O0e();qe();Ze();Yi();np();ae();id();W();nv();rt();Rt();bte();P0e();j8();Ya();et();Es();Jt();ov=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ste=class{constructor(e){this.trait=e,this.renderedElements=[]}get templateId(){return`template:${this.trait.name}`}renderTemplate(e){return e}renderElement(e,t,i){let n=this.renderedElements.findIndex(s=>s.templateData===i);if(n>=0){let s=this.renderedElements[n];this.trait.unrender(i),s.index=t}else{let s={index:t,templateData:i};this.renderedElements.push(s)}this.trait.renderIndex(t,i)}splice(e,t,i){let n=[];for(let s of this.renderedElements)s.index=e+t&&n.push({index:s.index+i-t,templateData:s.templateData});this.renderedElements=n}renderIndexes(e){for(let{index:t,templateData:i}of this.renderedElements)e.indexOf(t)>-1&&this.trait.renderIndex(t,i)}disposeTemplate(e){let t=this.renderedElements.findIndex(i=>i.templateData===e);t<0||this.renderedElements.splice(t,1)}},Z0=class{get onChange(){return this._onChange.event}get name(){return this._trait}get renderer(){return new Ste(this)}constructor(e){this._trait=e,this.indexes=[],this.sortedIndexes=[],this._onChange=new N}splice(e,t,i){let n=i.length-t,s=e+t,r=[],a=0;for(;a=s;)r.push(this.sortedIndexes[a++]+n);this.renderer.splice(e,t,i.length),this._set(r,r)}renderIndex(e,t){t.classList.toggle(this._trait,this.contains(e))}unrender(e){e.classList.remove(this._trait)}set(e,t){return this._set(e,[...e].sort($0e),t)}_set(e,t,i){let n=this.indexes,s=this.sortedIndexes;this.indexes=e,this.sortedIndexes=t;let r=Ete(s,e);return this.renderer.renderIndexes(r),this._onChange.fire({indexes:e,browserEvent:i}),n}get(){return this.indexes}contains(e){return uw(this.sortedIndexes,e,$0e)>=0}dispose(){Ct(this._onChange)}};ov([_n],Z0.prototype,"renderer",null);xte=class extends Z0{constructor(e){super("selected"),this.setAriaSelected=e}renderIndex(e,t){super.renderIndex(e,t),this.setAriaSelected&&(this.contains(e)?t.setAttribute("aria-selected","true"):t.setAttribute("aria-selected","false"))}},YD=class{constructor(e,t,i){this.trait=e,this.view=t,this.identityProvider=i}splice(e,t,i){if(!this.identityProvider)return this.trait.splice(e,t,new Array(i.length).fill(!1));let n=this.trait.get().map(a=>this.identityProvider.getId(this.view.element(a)).toString());if(n.length===0)return this.trait.splice(e,t,new Array(i.length).fill(!1));let s=new Set(n),r=i.map(a=>s.has(this.identityProvider.getId(a).toString()));this.trait.splice(e,t,r)}};K8=class{get onKeyDown(){return Q.chain(this.disposables.add(new Xt(this.view.domNode,"keydown")).event,e=>e.filter(t=>!Ll(t.target)).map(t=>new Mt(t)))}constructor(e,t,i){this.list=e,this.view=t,this.disposables=new F,this.multipleSelectionDisposables=new F,this.multipleSelectionSupport=i.multipleSelectionSupport,this.disposables.add(this.onKeyDown(n=>{switch(n.keyCode){case 3:return this.onEnter(n);case 16:return this.onUpArrow(n);case 18:return this.onDownArrow(n);case 11:return this.onPageUpArrow(n);case 12:return this.onPageDownArrow(n);case 9:return this.onEscape(n);case 31:this.multipleSelectionSupport&&(Ye?n.metaKey:n.ctrlKey)&&this.onCtrlA(n)}}))}updateOptions(e){e.multipleSelectionSupport!==void 0&&(this.multipleSelectionSupport=e.multipleSelectionSupport)}onEnter(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(this.list.getFocus(),e.browserEvent)}onUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPrevious(1,!1,e.browserEvent);let t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNext(1,!1,e.browserEvent);let t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onPageUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPreviousPage(e.browserEvent);let t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onPageDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNextPage(e.browserEvent);let t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onCtrlA(e){e.preventDefault(),e.stopPropagation();let t=mr(this.list.length),i=this.list.getFocus(),n=i.length>0?this.list.getElementGroupId(i[0]):void 0;n!==void 0&&(t=this.list.filterIndicesByGroup(t,n)),this.list.setSelection(t,e.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus()}onEscape(e){this.list.getSelection().length&&(e.preventDefault(),e.stopPropagation(),this.list.setSelection([],e.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus())}dispose(){this.disposables.dispose(),this.multipleSelectionDisposables.dispose()}};ov([_n],K8.prototype,"onKeyDown",null);(function(o){o[o.Automatic=0]="Automatic",o[o.Trigger=1]="Trigger"})(Ku||(Ku={}));(function(o){o[o.Idle=0]="Idle",o[o.Typing=1]="Typing"})(Y0||(Y0={}));x6e=new class{mightProducePrintableCharacter(o){return o.ctrlKey||o.metaKey||o.altKey?!1:o.keyCode>=31&&o.keyCode<=56||o.keyCode>=21&&o.keyCode<=30||o.keyCode>=98&&o.keyCode<=107||o.keyCode>=85&&o.keyCode<=95}},kte=class{constructor(e,t,i,n,s){this.list=e,this.view=t,this.keyboardNavigationLabelProvider=i,this.keyboardNavigationEventFilter=n,this.delegate=s,this.enabled=!1,this.state=Y0.Idle,this.mode=Ku.Automatic,this.triggered=!1,this.previouslyFocused=-1,this.enabledDisposables=new F,this.disposables=new F,this.updateOptions(e.options)}updateOptions(e){e.typeNavigationEnabled??!0?this.enable():this.disable(),this.mode=e.typeNavigationMode??Ku.Automatic}enable(){if(this.enabled)return;let e=!1,t=Q.chain(this.enabledDisposables.add(new Xt(this.view.domNode,"keydown")).event,s=>s.filter(r=>!Ll(r.target)).filter(()=>this.mode===Ku.Automatic||this.triggered).map(r=>new Mt(r)).filter(r=>e||this.keyboardNavigationEventFilter(r)).filter(r=>this.delegate.mightProducePrintableCharacter(r)).forEach(r=>vt.stop(r,!0)).map(r=>r.browserEvent.key)),i=Q.debounce(t,()=>null,800,void 0,void 0,void 0,this.enabledDisposables);Q.reduce(Q.any(t,i),(s,r)=>r===null?null:(s||"")+r,void 0,this.enabledDisposables)(this.onInput,this,this.enabledDisposables),i(this.onClear,this,this.enabledDisposables),t(()=>e=!0,void 0,this.enabledDisposables),i(()=>e=!1,void 0,this.enabledDisposables),this.enabled=!0,this.triggered=!1}disable(){this.enabled&&(this.enabledDisposables.clear(),this.enabled=!1,this.triggered=!1)}onClear(){let e=this.list.getFocus();if(e.length>0&&e[0]===this.previouslyFocused){let t=this.list.options.accessibilityProvider?.getAriaLabel(this.list.element(e[0]));typeof t=="string"?qn(t):t&&qn(t.get())}this.previouslyFocused=-1}onInput(e){if(!e){this.state=Y0.Idle,this.triggered=!1;return}let t=this.list.getFocus(),i=t.length>0?t[0]:0,n=this.state===Y0.Idle?1:0;this.state=Y0.Typing;for(let s=0;s1&&c.length===1){this.previouslyFocused=i,this.list.setFocus([r]),this.list.reveal(r);return}}}else if(typeof l>"u"||vD(e,l)){this.previouslyFocused=i,this.list.setFocus([r]),this.list.reveal(r);return}}}dispose(){this.disable(),this.enabledDisposables.dispose(),this.disposables.dispose()}},Lte=class{constructor(e,t){this.list=e,this.view=t,this.disposables=new F;let i=Q.chain(this.disposables.add(new Xt(t.domNode,"keydown")).event,s=>s.filter(r=>!Ll(r.target)).map(r=>new Mt(r)));Q.chain(i,s=>s.filter(r=>r.keyCode===2&&!r.ctrlKey&&!r.metaKey&&!r.shiftKey&&!r.altKey))(this.onTab,this,this.disposables)}onTab(e){if(e.target!==this.view.domNode)return;let t=this.list.getFocus();if(t.length===0)return;let i=this.view.domElement(t[0]);if(!i)return;let n=i.querySelector("[tabIndex]");if(!n||!xt(n)||n.tabIndex===-1)return;let s=we(n).getComputedStyle(n);s.visibility==="hidden"||s.display==="none"||(e.preventDefault(),e.stopPropagation(),n.focus())}dispose(){this.disposables.dispose()}};U0e={isSelectionSingleChangeEvent:Ate,isSelectionRangeChangeEvent:Mte},ZD=class{get onPointer(){return this._onPointer.event}constructor(e){this.list=e,this.disposables=new F,this._onPointer=this.disposables.add(new N),e.options.multipleSelectionSupport!==!1&&(this.multipleSelectionController=this.list.options.multipleSelectionController||U0e),this.mouseSupport=typeof e.options.mouseSupport>"u"||!!e.options.mouseSupport,this.mouseSupport&&(e.onMouseDown(this.onMouseDown,this,this.disposables),e.onContextMenu(this.onContextMenu,this,this.disposables),e.onMouseDblClick(this.onDoubleClick,this,this.disposables),e.onTouchStart(this.onMouseDown,this,this.disposables),this.disposables.add(jn.addTarget(e.getHTMLElement()))),Q.any(e.onMouseClick,e.onMouseMiddleClick,e.onTap)(this.onViewPointer,this,this.disposables)}updateOptions(e){e.multipleSelectionSupport!==void 0&&(this.multipleSelectionController=void 0,e.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||U0e))}isSelectionSingleChangeEvent(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionSingleChangeEvent(e):!1}isSelectionRangeChangeEvent(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionRangeChangeEvent(e):!1}isSelectionChangeEvent(e){return this.isSelectionSingleChangeEvent(e)||this.isSelectionRangeChangeEvent(e)}onMouseDown(e){G0(e.browserEvent.target)||Ui()!==e.browserEvent.target&&this.list.domFocus()}onContextMenu(e){if(Ll(e.browserEvent.target)||G0(e.browserEvent.target))return;let t=typeof e.index>"u"?[]:[e.index];this.list.setFocus(t,e.browserEvent)}onViewPointer(e){if(!this.mouseSupport||Ll(e.browserEvent.target)||G0(e.browserEvent.target)||e.browserEvent.isHandledByList)return;e.browserEvent.isHandledByList=!0;let t=e.index;if(typeof t>"u"){this.list.setFocus([],e.browserEvent),this.list.setSelection([],e.browserEvent),this.list.setAnchor(void 0);return}if(this.isSelectionChangeEvent(e))return this.changeSelection(e);this.list.setFocus([t],e.browserEvent),this.list.setAnchor(t),k6e(e.browserEvent)||this.list.getElementGroupId(t)!==GD&&this.list.setSelection([t],e.browserEvent),this._onPointer.fire(e)}onDoubleClick(e){if(Ll(e.browserEvent.target)||G0(e.browserEvent.target)||this.isSelectionChangeEvent(e)||e.browserEvent.isHandledByList)return;e.browserEvent.isHandledByList=!0;let t=this.list.getFocus();this.list.setSelection(t,e.browserEvent)}changeSelection(e){let t=e.index,i=this.list.getAnchor();if(this.isSelectionRangeChangeEvent(e)){typeof i>"u"&&(i=this.list.getFocus()[0]??t,this.list.setAnchor(i));let n=Math.min(i,t),s=Math.max(i,t),r=mr(n,s+1),a=this.list.getSelection()[0];if(a!==void 0){let h=this.list.getElementGroupId(a);h!==void 0&&(r=this.list.filterIndicesByGroup(r,h))}let l=this.list.getSelection(),c=I6e(Ete(l,[i]),i);if(c.length===0)return;let d=Ete(r,E6e(l,c));this.list.setSelection(d,e.browserEvent),this.list.setFocus([t],e.browserEvent)}else if(this.isSelectionSingleChangeEvent(e)){let n=this.list.getSelection(),s=n.filter(a=>a!==t);this.list.setFocus([t]),this.list.setAnchor(t);let r=this.list.getElementGroupId(t);if(r===GD)return;if(n.length===s.length){let a=r!==void 0?this.list.filterIndicesByGroup([...s,t],r):[...s,t];this.list.setSelection(a,e.browserEvent)}else this.list.setSelection(s,e.browserEvent)}}dispose(){this.disposables.dispose()}},Ite=class{constructor(e,t){this.styleElement=e,this.selectorSuffix=t}style(e){let t=this.selectorSuffix&&`.${this.selectorSuffix}`,i=[];e.listBackground&&i.push(`.monaco-list${t} .monaco-list-rows { background: ${e.listBackground}; }`),e.listFocusBackground&&(i.push(`.monaco-list${t}:focus .monaco-list-row.focused { background-color: ${e.listFocusBackground}; }`),i.push(`.monaco-list${t}:focus .monaco-list-row.focused:hover { background-color: ${e.listFocusBackground}; }`)),e.listFocusForeground&&i.push(`.monaco-list${t}:focus .monaco-list-row.focused { color: ${e.listFocusForeground}; }`),e.listActiveSelectionBackground&&(i.push(`.monaco-list${t}:focus .monaco-list-row.selected { background-color: ${e.listActiveSelectionBackground}; }`),i.push(`.monaco-list${t}:focus .monaco-list-row.selected:hover { background-color: ${e.listActiveSelectionBackground}; }`)),e.listActiveSelectionForeground&&i.push(`.monaco-list${t}:focus .monaco-list-row.selected { color: ${e.listActiveSelectionForeground}; }`),e.listActiveSelectionIconForeground&&i.push(`.monaco-list${t}:focus .monaco-list-row.selected .codicon { color: ${e.listActiveSelectionIconForeground}; }`),e.listFocusAndSelectionBackground&&i.push(` + .monaco-drag-image${t}, + .monaco-list${t}:focus .monaco-list-row.selected.focused { background-color: ${e.listFocusAndSelectionBackground}; } + `),e.listFocusAndSelectionForeground&&i.push(` + .monaco-drag-image${t}, + .monaco-list${t}:focus .monaco-list-row.selected.focused { color: ${e.listFocusAndSelectionForeground}; } + `),e.listInactiveFocusForeground&&(i.push(`.monaco-list${t} .monaco-list-row.focused { color: ${e.listInactiveFocusForeground}; }`),i.push(`.monaco-list${t} .monaco-list-row.focused:hover { color: ${e.listInactiveFocusForeground}; }`)),e.listInactiveSelectionIconForeground&&i.push(`.monaco-list${t} .monaco-list-row.focused .codicon { color: ${e.listInactiveSelectionIconForeground}; }`),e.listInactiveFocusBackground&&(i.push(`.monaco-list${t} .monaco-list-row.focused { background-color: ${e.listInactiveFocusBackground}; }`),i.push(`.monaco-list${t} .monaco-list-row.focused:hover { background-color: ${e.listInactiveFocusBackground}; }`)),e.listInactiveSelectionBackground&&(i.push(`.monaco-list${t} .monaco-list-row.selected { background-color: ${e.listInactiveSelectionBackground}; }`),i.push(`.monaco-list${t} .monaco-list-row.selected:hover { background-color: ${e.listInactiveSelectionBackground}; }`)),e.listInactiveSelectionForeground&&i.push(`.monaco-list${t} .monaco-list-row.selected { color: ${e.listInactiveSelectionForeground}; }`),e.listHoverBackground&&i.push(`.monaco-list${t}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${e.listHoverBackground}; }`),e.listHoverForeground&&i.push(`.monaco-list${t}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { color: ${e.listHoverForeground}; }`);let n=nh(e.listFocusAndSelectionOutline,nh(e.listSelectionOutline,e.listFocusOutline??""));n&&i.push(`.monaco-list${t}:focus .monaco-list-row.focused.selected { outline: 1px solid ${n}; outline-offset: -1px;}`),e.listFocusOutline&&i.push(` + .monaco-drag-image${t}, + .monaco-list${t}:focus .monaco-list-row.focused, + .context-menu-visible .monaco-list${t}.last-focused .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; } + `);let s=nh(e.listSelectionOutline,e.listInactiveFocusOutline??"");s&&i.push(`.monaco-list${t} .monaco-list-row.focused.selected { outline: 1px dotted ${s}; outline-offset: -1px; }`),e.listSelectionOutline&&i.push(`.monaco-list${t} .monaco-list-row.selected { outline: 1px dotted ${e.listSelectionOutline}; outline-offset: -1px; }`),e.listInactiveFocusOutline&&i.push(`.monaco-list${t} .monaco-list-row.focused { outline: 1px dotted ${e.listInactiveFocusOutline}; outline-offset: -1px; }`),e.listHoverOutline&&i.push(`.monaco-list${t} .monaco-list-row:hover { outline: 1px dashed ${e.listHoverOutline}; outline-offset: -1px; }`),e.listDropOverBackground&&i.push(` + .monaco-list${t}.drop-target, + .monaco-list${t} .monaco-list-rows.drop-target, + .monaco-list${t} .monaco-list-row.drop-target { background-color: ${e.listDropOverBackground} !important; color: inherit !important; } + `),e.listDropBetweenBackground&&(i.push(` + .monaco-list${t} .monaco-list-rows.drop-target-before .monaco-list-row:first-child::before, + .monaco-list${t} .monaco-list-row.drop-target-before::before { + content: ""; position: absolute; top: 0px; left: 0px; width: 100%; height: 1px; + background-color: ${e.listDropBetweenBackground}; + }`),i.push(` + .monaco-list${t} .monaco-list-rows.drop-target-after .monaco-list-row:last-child::after, + .monaco-list${t} .monaco-list-row.drop-target-after::after { + content: ""; position: absolute; bottom: 0px; left: 0px; width: 100%; height: 1px; + background-color: ${e.listDropBetweenBackground}; + }`)),e.tableColumnsBorder&&i.push(` + .monaco-table > .monaco-split-view2, + .monaco-table > .monaco-split-view2 .monaco-sash.vertical::before, + .monaco-enable-motion .monaco-table:hover > .monaco-split-view2, + .monaco-enable-motion .monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before { + border-color: ${e.tableColumnsBorder}; + } + + .monaco-enable-motion .monaco-table > .monaco-split-view2, + .monaco-enable-motion .monaco-table > .monaco-split-view2 .monaco-sash.vertical::before { + border-color: transparent; + } + `),e.tableOddRowsBackgroundColor&&i.push(` + .monaco-table .monaco-list-row[data-parity=odd]:not(.focused):not(.selected):not(:hover) .monaco-table-tr, + .monaco-table .monaco-list:not(:focus) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr, + .monaco-table .monaco-list:not(.focused) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr { + background-color: ${e.tableOddRowsBackgroundColor}; + } + `),this.styleElement.textContent=i.join(` +`)}},K0e={listFocusBackground:"#7FB0D0",listActiveSelectionBackground:"#0E639C",listActiveSelectionForeground:"#FFFFFF",listActiveSelectionIconForeground:"#FFFFFF",listFocusAndSelectionOutline:"#90C2F9",listFocusAndSelectionBackground:"#094771",listFocusAndSelectionForeground:"#FFFFFF",listInactiveSelectionBackground:"#3F3F46",listInactiveSelectionIconForeground:"#FFFFFF",listHoverBackground:"#2A2D2E",listDropOverBackground:"#383B3D",listDropBetweenBackground:"#EEEEEE",treeIndentGuidesStroke:"#a9a9a9",treeInactiveIndentGuidesStroke:K.fromHex("#a9a9a9").transparent(.4).toString(),tableColumnsBorder:K.fromHex("#cccccc").transparent(.2).toString(),tableOddRowsBackgroundColor:K.fromHex("#cccccc").transparent(.04).toString(),listBackground:void 0,listFocusForeground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusForeground:void 0,listInactiveFocusBackground:void 0,listHoverForeground:void 0,listFocusOutline:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listHoverOutline:void 0,treeStickyScrollBackground:void 0,treeStickyScrollBorder:void 0,treeStickyScrollShadow:void 0},L6e={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){},dispose(){}}};$0e=(o,e)=>o-e,Tte=class{constructor(e,t){this._templateId=e,this.renderers=t}get templateId(){return this._templateId}renderTemplate(e){return this.renderers.map(t=>t.renderTemplate(e))}renderElement(e,t,i,n){let s=0;for(let r of this.renderers)r.renderElement(e,t,i[s++],n)}disposeElement(e,t,i,n){let s=0;for(let r of this.renderers)r.disposeElement?.(e,t,i[s],n),s+=1}disposeTemplate(e){let t=0;for(let i of this.renderers)i.disposeTemplate(e[t++])}},Dte=class{constructor(e){this.accessibilityProvider=e,this.templateId="a18n"}renderTemplate(e){return{container:e,disposables:new F}}renderElement(e,t,i){let n=this.accessibilityProvider.getAriaLabel(e),s=n&&typeof n!="string"?n:ht(n);i.disposables.add(Se(a=>{this.setAriaLabel(a.readObservable(s),i.container)}));let r=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(e);typeof r=="number"?i.container.setAttribute("aria-level",`${r}`):i.container.removeAttribute("aria-level")}setAriaLabel(e,t){e?t.setAttribute("aria-label",e):t.removeAttribute("aria-label")}disposeElement(e,t,i){i.disposables.clear()}disposeTemplate(e){e.disposables.dispose()}},Nte=class{constructor(e,t){this.list=e,this.dnd=t}getDragElements(e){let t=this.list.getSelectedElements();return t.indexOf(e)>-1?t:[e]}getDragURI(e){return this.dnd.getDragURI(e)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e,t)}onDragStart(e,t){this.dnd.onDragStart?.(e,t)}onDragOver(e,t,i,n,s){return this.dnd.onDragOver(e,t,i,n,s)}onDragLeave(e,t,i,n){this.dnd.onDragLeave?.(e,t,i,n)}onDragEnd(e){this.dnd.onDragEnd?.(e)}drop(e,t,i,n,s){this.dnd.drop(e,t,i,n,s)}dispose(){this.dnd.dispose()}},Ts=class{get onDidChangeFocus(){return Q.map(this.eventBufferer.wrapEvent(this.focus.onChange),e=>this.toListEvent(e),this.disposables)}get onDidChangeSelection(){return Q.map(this.eventBufferer.wrapEvent(this.selection.onChange),e=>this.toListEvent(e),this.disposables)}get domId(){return this.view.domId}get onDidScroll(){return this.view.onDidScroll}get onMouseClick(){return this.view.onMouseClick}get onMouseDblClick(){return this.view.onMouseDblClick}get onMouseMiddleClick(){return this.view.onMouseMiddleClick}get onPointer(){return this.mouseController.onPointer}get onMouseDown(){return this.view.onMouseDown}get onMouseOver(){return this.view.onMouseOver}get onMouseOut(){return this.view.onMouseOut}get onTouchStart(){return this.view.onTouchStart}get onTap(){return this.view.onTap}get onContextMenu(){let e=!1,t=Q.chain(this.disposables.add(new Xt(this.view.domNode,"keydown")).event,s=>s.map(r=>new Mt(r)).filter(r=>e=r.keyCode===58||r.shiftKey&&r.keyCode===68).map(r=>vt.stop(r,!0)).filter(()=>!1)),i=Q.chain(this.disposables.add(new Xt(this.view.domNode,"keyup")).event,s=>s.forEach(()=>e=!1).map(r=>new Mt(r)).filter(r=>r.keyCode===58||r.shiftKey&&r.keyCode===68).map(r=>vt.stop(r,!0)).map(({browserEvent:r})=>{let a=this.getFocus(),l=a.length?a[0]:void 0,c=typeof l<"u"?this.view.element(l):void 0,d=typeof l<"u"?this.view.domElement(l):this.view.domNode;return{index:l,element:c,anchor:d,browserEvent:r}})),n=Q.chain(this.view.onContextMenu,s=>s.filter(r=>!e).map(({element:r,index:a,browserEvent:l})=>({element:r,index:a,anchor:new so(we(this.view.domNode),l),browserEvent:l})));return Q.any(t,i,n)}get onKeyDown(){return this.disposables.add(new Xt(this.view.domNode,"keydown")).event}get onDidFocus(){return Q.signal(this.disposables.add(new Xt(this.view.domNode,"focus",!0)).event)}get onDidBlur(){return Q.signal(this.disposables.add(new Xt(this.view.domNode,"blur",!0)).event)}constructor(e,t,i,n,s=L6e){this.user=e,this._options=s,this.focus=new Z0("focused"),this.anchor=new Z0("anchor"),this.eventBufferer=new wh,this._ariaLabel="",this.disposables=new F,this._onDidDispose=new N,this.onDidDispose=this._onDidDispose.event;let r=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?this._options.accessibilityProvider?.getWidgetRole():"list";this.selection=new xte(r!=="listbox");let a=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=s.accessibilityProvider,this.accessibilityProvider&&(a.push(new Dte(this.accessibilityProvider)),this.accessibilityProvider.onDidChangeActiveDescendant?.(this.onDidChangeActiveDescendant,this,this.disposables)),n=n.map(c=>new Tte(c.templateId,[...a,c]));let l={...s,dnd:s.dnd&&new Nte(this,s.dnd)};if(this.view=this.createListView(t,i,n,l),this.view.domNode.setAttribute("role",r),s.styleController)this.styleController=s.styleController(this.view.domId);else{let c=or(this.view.domNode);this.styleController=new Ite(c,this.view.domId)}if(this.spliceable=new z8([new YD(this.focus,this.view,s.identityProvider),new YD(this.selection,this.view,s.identityProvider),new YD(this.anchor,this.view,s.identityProvider),this.view]),this.disposables.add(this.focus),this.disposables.add(this.selection),this.disposables.add(this.anchor),this.disposables.add(this.view),this.disposables.add(this._onDidDispose),this.disposables.add(new Lte(this,this.view)),(typeof s.keyboardSupport!="boolean"||s.keyboardSupport)&&(this.keyboardController=new K8(this,this.view,s),this.disposables.add(this.keyboardController)),s.keyboardNavigationLabelProvider){let c=s.keyboardNavigationDelegate||x6e;this.typeNavigationController=new kte(this,this.view,s.keyboardNavigationLabelProvider,s.keyboardNavigationEventFilter??(()=>!0),c),this.disposables.add(this.typeNavigationController)}if(this.mouseController=this.createMouseController(s),this.disposables.add(this.mouseController),this.onDidChangeFocus(this._onFocusChange,this,this.disposables),this.onDidChangeSelection(this._onSelectionChange,this,this.disposables),this.accessibilityProvider){let c=this.accessibilityProvider.getWidgetAriaLabel(),d=c&&typeof c!="string"?c:ht(c);this.disposables.add(Se(h=>{this.ariaLabel=h.readObservable(d)}))}this._options.multipleSelectionSupport!==!1&&this.view.domNode.setAttribute("aria-multiselectable","true")}createListView(e,t,i,n){return new oh(e,t,i,n)}createMouseController(e){return new ZD(this)}updateOptions(e={}){this._options={...this._options,...e},this.typeNavigationController?.updateOptions(this._options),this._options.multipleSelectionController!==void 0&&(this._options.multipleSelectionSupport?this.view.domNode.setAttribute("aria-multiselectable","true"):this.view.domNode.removeAttribute("aria-multiselectable")),this.mouseController.updateOptions(e),this.keyboardController?.updateOptions(e),this.view.updateOptions(e)}get options(){return this._options}splice(e,t,i=[]){if(e<0||e>this.view.length)throw new kg(this.user,`Invalid start index: ${e}`);if(t<0)throw new kg(this.user,`Invalid delete count: ${t}`);t===0&&i.length===0||this.eventBufferer.bufferEvents(()=>this.spliceable.splice(e,t,i))}rerender(){this.view.rerender()}element(e){return this.view.element(e)}indexOf(e){return this.view.indexOf(e)}indexAt(e){return this.view.indexAt(e)}get length(){return this.view.length}get contentHeight(){return this.view.contentHeight}get onDidChangeContentHeight(){return this.view.onDidChangeContentHeight}get scrollTop(){return this.view.getScrollTop()}set scrollTop(e){this.view.setScrollTop(e)}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}get firstVisibleIndex(){return this.view.firstVisibleIndex}get ariaLabel(){return this._ariaLabel}set ariaLabel(e){this._ariaLabel=e,this.view.domNode.setAttribute("aria-label",e)}domFocus(){this.view.domNode.focus({preventScroll:!0})}layout(e,t){this.view.layout(e,t)}setSelection(e,t){for(let i of e)if(i<0||i>=this.length)throw new kg(this.user,`Invalid index ${i}`);e=e.filter(i=>this.getElementGroupId(i)!==GD),this.selection.set(e,t)}getSelection(){return this.selection.get()}getSelectedElements(){return this.getSelection().map(e=>this.view.element(e))}setAnchor(e){if(typeof e>"u"){this.anchor.set([]);return}if(e<0||e>=this.length)throw new kg(this.user,`Invalid index ${e}`);this.anchor.set([e])}getAnchor(){return this.anchor.get().at(0)}getAnchorElement(){let e=this.getAnchor();return typeof e>"u"?void 0:this.element(e)}getElementGroupId(e){let t=this.options.identityProvider;if(!t?.getGroupId)return;let i=this.element(e);return t.getGroupId(i)}filterIndicesByGroup(e,t){let i=this.options.identityProvider;return i?.getGroupId?t===GD?[]:e.filter(n=>{let s=this.element(n);return i.getGroupId(s)===t}):e}setFocus(e,t){for(let i of e)if(i<0||i>=this.length)throw new kg(this.user,`Invalid index ${i}`);this.focus.set(e,t)}focusNext(e=1,t=!1,i,n){if(this.length===0)return;let s=this.focus.get(),r=this.findNextIndex(s.length>0?s[0]+e:0,t,n);r>-1&&this.setFocus([r],i)}focusPrevious(e=1,t=!1,i,n){if(this.length===0)return;let s=this.focus.get(),r=this.findPreviousIndex(s.length>0?s[0]-e:0,t,n);r>-1&&this.setFocus([r],i)}async focusNextPage(e,t){let i=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);i=i===0?0:i-1;let n=this.getFocus()[0];if(n!==i&&(n===void 0||i>n)){let s=this.findPreviousIndex(i,!1,t);s>-1&&n!==s?this.setFocus([s],e):this.setFocus([i],e)}else{let s=this.view.getScrollTop(),r=s+this.view.renderHeight;i>n&&(r-=this.view.elementHeight(i)),this.view.setScrollTop(r),this.view.getScrollTop()!==s&&(this.setFocus([]),await Na(0),await this.focusNextPage(e,t))}}async focusPreviousPage(e,t,i=()=>0){let n,s=i(),r=this.view.getScrollTop()+s;r===0?n=this.view.indexAt(r):n=this.view.indexAfter(r-1);let a=this.getFocus()[0];if(a!==n&&(a===void 0||a>=n)){let l=this.findNextIndex(n,!1,t);l>-1&&a!==l?this.setFocus([l],e):this.setFocus([n],e)}else{let l=r;this.view.setScrollTop(r-this.view.renderHeight-s),this.view.getScrollTop()+i()!==l&&(this.setFocus([]),await Na(0),await this.focusPreviousPage(e,t,i))}}focusLast(e,t){if(this.length===0)return;let i=this.findPreviousIndex(this.length-1,!1,t);i>-1&&this.setFocus([i],e)}focusFirst(e,t){this.focusNth(0,e,t)}focusNth(e,t,i){if(this.length===0)return;let n=this.findNextIndex(e,!1,i);n>-1&&this.setFocus([n],t)}findNextIndex(e,t=!1,i){for(let n=0;n=this.length&&!t)return-1;if(e=e%this.length,!i||i(this.element(e)))return e;e++}return-1}findPreviousIndex(e,t=!1,i){for(let n=0;nthis.view.element(e))}reveal(e,t,i=0){if(e<0||e>=this.length)throw new kg(this.user,`Invalid index ${e}`);let n=this.view.getScrollTop(),s=this.view.elementTop(e),r=this.view.elementHeight(e);if(wl(t)){let a=r-this.view.renderHeight+i;this.view.setScrollTop(a*ts(t,0,1)+s-i)}else{let a=s+r,l=n+this.view.renderHeight;s=l||(s=l&&r>=this.view.renderHeight?this.view.setScrollTop(s-i):a>=l&&this.view.setScrollTop(a-this.view.renderHeight))}}getRelativeTop(e,t=0){if(e<0||e>=this.length)throw new kg(this.user,`Invalid index ${e}`);let i=this.view.getScrollTop(),n=this.view.elementTop(e),s=this.view.elementHeight(e);if(ni+this.view.renderHeight)return null;let r=s-this.view.renderHeight+t;return Math.abs((i+t-n)/r)}getHTMLElement(){return this.view.domNode}getScrollableElement(){return this.view.scrollableElementDomNode}getElementID(e){return this.view.getElementDomId(e)}getElementTop(e){return this.view.elementTop(e)}style(e){this.styleController.style(e)}toListEvent({indexes:e,browserEvent:t}){return{indexes:e,elements:e.map(i=>this.view.element(i)),browserEvent:t}}_onFocusChange(){let e=this.focus.get();this.view.domNode.classList.toggle("element-focused",e.length>0),this.onDidChangeActiveDescendant()}onDidChangeActiveDescendant(){let e=this.focus.get();if(e.length>0){let t;this.accessibilityProvider?.getActiveDescendantId&&(t=this.accessibilityProvider.getActiveDescendantId(this.view.element(e[0]))),this.view.domNode.setAttribute("aria-activedescendant",t||this.view.getElementDomId(e[0]))}else this.view.domNode.removeAttribute("aria-activedescendant")}_onSelectionChange(){let e=this.selection.get();this.view.domNode.classList.toggle("selection-none",e.length===0),this.view.domNode.classList.toggle("selection-single",e.length===1),this.view.domNode.classList.toggle("selection-multiple",e.length>1)}dispose(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidDispose.dispose()}};ov([_n],Ts.prototype,"onDidChangeFocus",null);ov([_n],Ts.prototype,"onDidChangeSelection",null);ov([_n],Ts.prototype,"onContextMenu",null);ov([_n],Ts.prototype,"onKeyDown",null);ov([_n],Ts.prototype,"onDidFocus",null);ov([_n],Ts.prototype,"onDidBlur",null)});var G0e=x(()=>{});var Ly,Y0e,Ote,G8,Pte=x(()=>{le();qe();ae();Ta();W();rt();ju();re();qd();Yf();wr();my();rd();xc();Rp();G0e();Ly=j,Y0e="selectOption.entry.template",Ote=class{get templateId(){return Y0e}renderTemplate(e){let t=Object.create(null);return t.root=e,t.text=X(e,Ly(".option-text")),t.detail=X(e,Ly(".option-detail")),t.decoratorRight=X(e,Ly(".option-decorator-right")),t}renderElement(e,t,i){let n=i,s=e.text,r=e.detail,a=e.decoratorRight,l=e.isDisabled;n.text.textContent=s,n.detail.textContent=r||"",n.decoratorRight.textContent=a||"",l?n.root.classList.add("option-disabled"):n.root.classList.remove("option-disabled"),e.isSeparator?(n.root.classList.add("option-separator"),n.root.classList.add("option-disabled")):n.root.classList.remove("option-separator")}disposeTemplate(e){}},G8=class o extends T{static{this.DEFAULT_DROPDOWN_MINIMUM_BOTTOM_MARGIN=32}static{this.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN=2}static{this.DEFAULT_MINIMUM_VISIBLE_OPTIONS=3}constructor(e,t,i,n,s){super(),this.options=[],this._currentSelection=0,this._hasDetails=!1,this._selectionDetailsDisposables=this._register(new F),this._skipLayout=!1,this._sticky=!1,this._isVisible=!1,this.styles=n,this.selectBoxOptions=s||Object.create(null),typeof this.selectBoxOptions.minBottomMargin!="number"?this.selectBoxOptions.minBottomMargin=o.DEFAULT_DROPDOWN_MINIMUM_BOTTOM_MARGIN:this.selectBoxOptions.minBottomMargin<0&&(this.selectBoxOptions.minBottomMargin=0),this.selectElement=document.createElement("select"),this.selectElement.className="monaco-select-box",typeof this.selectBoxOptions.ariaLabel=="string"&&this.selectElement.setAttribute("aria-label",this.selectBoxOptions.ariaLabel),typeof this.selectBoxOptions.ariaDescription=="string"&&this.selectElement.setAttribute("aria-description",this.selectBoxOptions.ariaDescription),this._onDidSelect=new N,this._register(this._onDidSelect),this.registerListeners(),this.constructSelectDropDown(i),this.selected=t||0,e&&this.setOptions(e,t),this.initStyleSheet()}setTitle(e){!this._hover&&e?this._hover=this._register(ms().setupManagedHover(Yr("mouse"),this.selectElement,e)):this._hover&&this._hover.update(e)}getHeight(){return 22}getTemplateId(){return Y0e}constructSelectDropDown(e){this.contextViewProvider=e,this.selectDropDownContainer=j(".monaco-select-box-dropdown-container"),this.selectionDetailsPane=X(this.selectDropDownContainer,Ly(".select-box-details-pane"));let t=X(this.selectDropDownContainer,Ly(".select-box-dropdown-container-width-control")),i=X(t,Ly(".width-control-div"));this.widthControlElement=document.createElement("span"),this.widthControlElement.className="option-text-width-control",X(i,this.widthControlElement),this._dropDownPosition=0,this.styleElement=or(this.selectDropDownContainer),this.selectDropDownContainer.setAttribute("draggable","true"),this._register(B(this.selectDropDownContainer,ee.DRAG_START,n=>{vt.stop(n,!0)}))}registerListeners(){this._register(_i(this.selectElement,"change",t=>{this.selected=t.target.selectedIndex,this._onDidSelect.fire({index:t.target.selectedIndex,selected:t.target.value}),this.options[this.selected]&&this.options[this.selected].text&&this.setTitle(this.options[this.selected].text)})),this._register(B(this.selectElement,ee.CLICK,t=>{vt.stop(t),this._isVisible?this.hideSelectDropDown(!0):this.showSelectDropDown()})),this._register(B(this.selectElement,ee.MOUSE_DOWN,t=>{vt.stop(t)}));let e;this._register(B(this.selectElement,"touchstart",t=>{e=this._isVisible})),this._register(B(this.selectElement,"touchend",t=>{vt.stop(t),e?this.hideSelectDropDown(!0):this.showSelectDropDown()})),this._register(B(this.selectElement,ee.KEY_DOWN,t=>{let i=new Mt(t),n=!1;Ye?(i.keyCode===18||i.keyCode===16||i.keyCode===10||i.keyCode===3)&&(n=!0):(i.keyCode===18&&i.altKey||i.keyCode===16&&i.altKey||i.keyCode===10||i.keyCode===3)&&(n=!0),n&&(this.showSelectDropDown(),vt.stop(t,!0))}))}get onDidSelect(){return this._onDidSelect.event}setOptions(e,t){Bt(this.options,e)||(this.options=e,this.selectElement.options.length=0,this._hasDetails=!1,this._cachedMaxDetailsHeight=void 0,this.options.forEach((i,n)=>{this.selectElement.add(this.createOption(i.text,n,i.isDisabled)),typeof i.description=="string"&&(this._hasDetails=!0)})),t!==void 0&&(this.select(t),this._currentSelection=this.selected)}setOptionsList(){this.selectList?.splice(0,this.selectList.length,this.options)}select(e){e>=0&&ethis.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.options[this.selected]&&this.options[this.selected].text&&this.setTitle(this.options[this.selected].text)}focus(){this.selectElement&&(this.selectElement.tabIndex=0,this.selectElement.focus())}blur(){this.selectElement&&(this.selectElement.tabIndex=-1,this.selectElement.blur())}setFocusable(e){this.selectElement.tabIndex=e?0:-1}render(e){this.container=e,e.classList.add("select-container"),e.appendChild(this.selectElement),this.styleSelectElement()}initStyleSheet(){let e=[];this.styles.listFocusBackground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { background-color: ${this.styles.listFocusBackground} !important; }`),this.styles.listFocusForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { color: ${this.styles.listFocusForeground} !important; }`),this.styles.decoratorRightForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.focused) .option-decorator-right { color: ${this.styles.decoratorRightForeground}; }`),this.styles.selectBackground&&this.styles.selectBorder&&this.styles.selectBorder!==this.styles.selectBackground?(e.push(`.monaco-select-box-dropdown-container { border: 1px solid ${this.styles.selectBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectBorder} } `)):this.styles.selectListBorder&&(e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectListBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectListBorder} } `)),this.styles.listHoverForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { color: ${this.styles.listHoverForeground} !important; }`),this.styles.listHoverBackground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { background-color: ${this.styles.listHoverBackground} !important; }`),this.styles.listFocusOutline&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { outline: 1px solid ${this.styles.listFocusOutline} !important; outline-offset: -1px !important; }`),this.styles.listHoverOutline&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { outline: 1px solid ${this.styles.listHoverOutline} !important; outline-offset: -1px !important; }`),e.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled.focused { background-color: transparent !important; color: inherit !important; outline: none !important; }"),e.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled:hover { background-color: transparent !important; color: inherit !important; outline: none !important; }"),this.styleElement.textContent=e.join(` +`)}styleSelectElement(){let e=this.styles.selectBackground??"",t=this.styles.selectForeground??"",i=this.styles.selectBorder??"";this.selectElement.style.backgroundColor=e,this.selectElement.style.color=t,this.selectElement.style.borderColor=i}styleList(){let e=this.styles.selectBackground??"",t=nh(this.styles.selectListBackground,e);this.selectDropDownContainer.style.backgroundColor=t,this.selectDropDownListContainer.style.backgroundColor=t,this.selectionDetailsPane.style.backgroundColor=t,this.selectList.style(this.styles)}createOption(e,t,i){let n=document.createElement("option");return n.value=e,n.text=e,n.disabled=!!i,n}showSelectDropDown(){this.selectionDetailsPane.textContent="",!(!this.contextViewProvider||this._isVisible)&&(this.createSelectList(this.selectDropDownContainer),this.setOptionsList(),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:e=>this.renderSelectDropDown(e,!0),layout:()=>{this.layoutSelectDropDown()},onHide:()=>{this.selectDropDownContainer.classList.remove("visible")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._isVisible=!0,this.hideSelectDropDown(!1),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:e=>this.renderSelectDropDown(e),layout:()=>this.layoutSelectDropDown(),onHide:()=>{this.selectDropDownContainer.classList.remove("visible")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._currentSelection=this.selected,this._isVisible=!0,this.selectElement.setAttribute("aria-expanded","true"))}hideSelectDropDown(e){!this.contextViewProvider||!this._isVisible||(this._isVisible=!1,this.selectElement.setAttribute("aria-expanded","false"),e&&this.selectElement.focus(),this.contextViewProvider.hideContextView())}renderSelectDropDown(e,t){e.appendChild(this.selectDropDownContainer);let i=we(this.selectElement).getComputedStyle(this.selectElement).fontSize;return i&&(this.selectDropDownContainer.style.fontSize=i),this.layoutSelectDropDown(t),{dispose:()=>{this.selectDropDownContainer.remove()}}}measureMaxDetailsHeight(){let e=0;return this.options.forEach((t,i)=>{this.updateDetail(i),this.selectionDetailsPane.offsetHeight>e&&(e=this.selectionDetailsPane.offsetHeight)}),e}layoutSelectDropDown(e){if(this._skipLayout)return!1;if(this.selectList){this.selectDropDownContainer.classList.add("visible");let t=we(this.selectElement),i=ii(this.selectElement),n=t.innerHeight-i.top-i.height-(this.selectBoxOptions.minBottomMargin||0),s=i.top-o.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN,r=this.selectElement.offsetWidth,a=this.setWidthControlElement(this.widthControlElement),l=`${Math.max(a,Math.round(r))}px`;this.selectDropDownContainer.style.width=l,this.selectList.getHTMLElement().style.height="",this.selectList.layout();let c=this.selectList.contentHeight;this._hasDetails&&this._cachedMaxDetailsHeight===void 0&&(this._cachedMaxDetailsHeight=this.measureMaxDetailsHeight());let d=this._hasDetails?this._cachedMaxDetailsHeight:0,h=c+d,u=Math.floor((n-d)/this.getHeight()),f=Math.floor((s-d)/this.getHeight());if(e)return i.top+i.height>t.innerHeight-22||i.topu&&this.options.length>u?(this._dropDownPosition=1,this.selectDropDownListContainer.remove(),this.selectionDetailsPane.remove(),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectionDetailsPane.classList.remove("border-top"),this.selectionDetailsPane.classList.add("border-bottom")):(this._dropDownPosition=0,this.selectDropDownListContainer.remove(),this.selectionDetailsPane.remove(),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectionDetailsPane.classList.remove("border-bottom"),this.selectionDetailsPane.classList.add("border-top")),!0);if(i.top+i.height>t.innerHeight-22||i.topn&&(c=u*this.getHeight())}else h>s&&(c=f*this.getHeight());return this.selectList.layout(c),this.selectList.domFocus(),this.selectList.length>0&&(this.selectList.setFocus([this.selected||0]),this.selectList.reveal(this.selectList.getFocus()[0]||0)),this._hasDetails?(this.selectList.getHTMLElement().style.height=`${c}px`,this.selectDropDownContainer.style.height=""):this.selectDropDownContainer.style.height=`${c}px`,this.updateDetail(this.selected),this.selectDropDownContainer.style.width=l,this.selectDropDownListContainer.setAttribute("tabindex","0"),!0}else return!1}setWidthControlElement(e){let t=0;if(e){let i=0,n=0;this.options.forEach((s,r)=>{let a=s.detail?s.detail.length:0,l=s.decoratorRight?s.decoratorRight.length:0,c=s.text.length+a+l;c>n&&(i=r,n=c)}),e.textContent=this.options[i].text+(this.options[i].decoratorRight?`${this.options[i].decoratorRight} `:""),t=yr(e)}return t}createSelectList(e){if(this.selectList)return;this.selectDropDownListContainer=X(e,Ly(".select-box-dropdown-list-container")),this.listRenderer=new Ote,this.selectList=this._register(new Ts("SelectBoxCustom",this.selectDropDownListContainer,this,[this.listRenderer],{useShadows:!1,verticalScrollMode:3,keyboardSupport:!1,mouseSupport:!1,accessibilityProvider:{getAriaLabel:n=>{if(n.isSeparator)return m(17,"separator");let s=n.text;return n.detail&&(s+=`. ${n.detail}`),n.decoratorRight&&(s+=`. ${n.decoratorRight}`),n.description&&(s+=`. ${n.description}`),s},getWidgetAriaLabel:()=>m(18,"Select Box"),getRole:()=>Ye?"":"option",getWidgetRole:()=>"listbox"}})),this.selectBoxOptions.ariaLabel&&(this.selectList.ariaLabel=this.selectBoxOptions.ariaLabel);let t=this._register(new Xt(this.selectDropDownListContainer,"keydown")),i=Q.chain(t.event,n=>n.filter(()=>this.selectList.length>0).map(s=>new Mt(s)));this._register(Q.chain(i,n=>n.filter(s=>s.keyCode===3))(this.onEnter,this)),this._register(Q.chain(i,n=>n.filter(s=>s.keyCode===2))(this.onEnter,this)),this._register(Q.chain(i,n=>n.filter(s=>s.keyCode===9))(this.onEscape,this)),this._register(Q.chain(i,n=>n.filter(s=>s.keyCode===16))(this.onUpArrow,this)),this._register(Q.chain(i,n=>n.filter(s=>s.keyCode===18))(this.onDownArrow,this)),this._register(Q.chain(i,n=>n.filter(s=>s.keyCode===12))(this.onPageDown,this)),this._register(Q.chain(i,n=>n.filter(s=>s.keyCode===11))(this.onPageUp,this)),this._register(Q.chain(i,n=>n.filter(s=>s.keyCode===14))(this.onHome,this)),this._register(Q.chain(i,n=>n.filter(s=>s.keyCode===13))(this.onEnd,this)),this._register(Q.chain(i,n=>n.filter(s=>s.keyCode>=21&&s.keyCode<=56||s.keyCode>=85&&s.keyCode<=113))(this.onCharacter,this)),this._register(B(this.selectList.getHTMLElement(),ee.POINTER_UP,n=>this.onPointerUp(n))),this._register(this.selectList.onMouseOver(n=>typeof n.index<"u"&&!this.options[n.index]?.isDisabled&&this.selectList.setFocus([n.index]))),this._register(this.selectList.onDidChangeFocus(n=>this.onListFocus(n))),this._register(B(this.selectDropDownContainer,ee.FOCUS_OUT,n=>{!this._isVisible||mn(n.relatedTarget,this.selectDropDownContainer)||this.onListBlur()})),this.selectList.getHTMLElement().setAttribute("aria-label",this.selectBoxOptions.ariaLabel||""),this.selectList.getHTMLElement().setAttribute("aria-expanded","true"),this.styleList()}onPointerUp(e){if(!this.selectList.length)return;vt.stop(e);let t=e.target;if(!t||t.classList.contains("slider"))return;let i=t.closest(".monaco-list-row");if(!i)return;let n=Number(i.getAttribute("data-index")),s=i.classList.contains("option-disabled");n>=0&&n{for(let r=0;r=this.options.length)return;this.selected=t,this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0])}}onUpArrow(e){if(this.selected>0){vt.stop(e,!0);let t=this.selected-1;for(;t>=0&&this.options[t].isDisabled;)t--;if(t<0)return;this.selected=t,this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0])}}onPageUp(e){vt.stop(e),this.selectList.focusPreviousPage(),setTimeout(()=>{let t=this.selectList.getFocus()[0];for(;t>0&&this.options[t].isDisabled;)t--;this.options[t].isDisabled||(this.selected=t,this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selected),this.select(this.selected))},1)}onPageDown(e){vt.stop(e),this.selectList.focusNextPage(),setTimeout(()=>{let t=this.selectList.getFocus()[0];for(;t0&&this.options[t].isDisabled;)t--;this.options[t].isDisabled||(this.selected=t,this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selected),this.select(this.selected))}onCharacter(e){let t=Ch.toString(e.keyCode),i=-1;for(let n=0;n{re();Bl();qe();ae();W();rt();Y8=class extends T{constructor(e,t,i,n){super(),this.selected=0,this.selectBoxOptions=n||Object.create(null),this.options=[],this.selectElement=document.createElement("select"),this.selectElement.className="monaco-select-box",typeof this.selectBoxOptions.ariaLabel=="string"&&this.selectElement.setAttribute("aria-label",this.selectBoxOptions.ariaLabel),typeof this.selectBoxOptions.ariaDescription=="string"&&this.selectElement.setAttribute("aria-description",this.selectBoxOptions.ariaDescription),this._onDidSelect=this._register(new N),this.styles=i,this.registerListeners(),this.setOptions(e,t)}registerListeners(){this._register(jn.addTarget(this.selectElement)),[vi.Tap].forEach(e=>{this._register(B(this.selectElement,e,t=>{this.selectElement.focus()}))}),this._register(_i(this.selectElement,"click",e=>{vt.stop(e,!0)})),this._register(_i(this.selectElement,"change",e=>{this.selectElement.title=e.target.value,this._onDidSelect.fire({index:e.target.selectedIndex,selected:e.target.value})})),this._register(_i(this.selectElement,"keydown",e=>{let t=!1;Ye?(e.keyCode===18||e.keyCode===16||e.keyCode===10)&&(t=!0):(e.keyCode===18&&e.altKey||e.keyCode===10||e.keyCode===3)&&(t=!0),t&&e.stopPropagation()}))}get onDidSelect(){return this._onDidSelect.event}setOptions(e,t){(!this.options||!Bt(this.options,e))&&(this.options=e,this.selectElement.options.length=0,this.options.forEach((i,n)=>{this.selectElement.add(this.createOption(i.text,n,i.isDisabled,i.isSeparator))})),t!==void 0&&this.select(t)}select(e){this.options.length===0?this.selected=0:e>=0&&ethis.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.selected{rt();Gd();_te();Pte();Z0e();X0e=Object.freeze({text:"\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500",isDisabled:!0,isSeparator:!0}),Z8=class extends xo{constructor(e,t,i,n,s){super(),Ye&&!s?.useCustomDrawn?this.selectBoxDelegate=new Y8(e,t,n,s):this.selectBoxDelegate=new G8(e,t,i,n,s),this._register(this.selectBoxDelegate)}get onDidSelect(){return this.selectBoxDelegate.onDidSelect}setOptions(e,t){this.selectBoxDelegate.setOptions(e,t)}select(e){this.selectBoxDelegate.select(e)}focus(){this.selectBoxDelegate.focus()}blur(){this.selectBoxDelegate.blur()}setFocusable(e){this.selectBoxDelegate.setFocusable(e)}render(e){this.selectBoxDelegate.render(e)}}});var X8=x(()=>{});var ya,sh,Q8,sv=x(()=>{Ns();x1();re();Bl();xc();Fte();ys();W();rt();Rt();X8();le();rd();ya=class extends T{get action(){return this._action}constructor(e,t,i={}){super(),this.options=i,this._context=e||this,this._action=t,t instanceof Cs&&this._register(t.onDidChange(n=>{this.element&&this.handleActionChangeEvent(n)}))}handleActionChangeEvent(e){e.enabled!==void 0&&this.updateEnabled(),e.checked!==void 0&&this.updateChecked(),e.class!==void 0&&this.updateClass(),e.label!==void 0&&(this.updateLabel(),this.updateTooltip()),e.tooltip!==void 0&&this.updateTooltip()}get actionRunner(){return this._actionRunner||(this._actionRunner=this._register(new hc)),this._actionRunner}set actionRunner(e){this._actionRunner=e}isEnabled(){return this._action.enabled}setActionContext(e){this._context=e}render(e){let t=this.element=e;this._register(jn.addTarget(e));let i=this.options&&this.options.draggable;i&&(e.draggable=!0,bo&&this._register(B(e,ee.DRAG_START,n=>n.dataTransfer?.setData(Wu.TEXT,this._action.label)))),this._register(B(t,vi.Tap,n=>this.onClick(n,!0))),this._register(B(t,ee.MOUSE_DOWN,n=>{i||vt.stop(n,!0),this._action.enabled&&n.button===0&&t.classList.add("active")})),Ye&&this._register(B(t,ee.CONTEXT_MENU,n=>{n.button===0&&n.ctrlKey===!0&&this.onClick(n)})),this._register(B(t,ee.CLICK,n=>{vt.stop(n,!0),this.options&&this.options.isMenu||this.onClick(n)})),this._register(B(t,ee.DBLCLICK,n=>{vt.stop(n,!0)})),[ee.MOUSE_UP,ee.MOUSE_OUT].forEach(n=>{this._register(B(t,n,s=>{vt.stop(s),t.classList.remove("active")}))})}onClick(e,t=!1){vt.stop(e,!0);let i=ka(this._context)?this.options?.useEventAsContext?e:{preserveFocus:t}:this._context;this.actionRunner.run(this._action,i)}focus(){this.element&&(this.element.tabIndex=0,this.element.focus(),this.element.classList.add("focused"))}blur(){this.element&&(this.element.blur(),this.element.tabIndex=-1,this.element.classList.remove("focused"))}setFocusable(e){this.element&&(this.element.tabIndex=e?0:-1)}get trapsArrowNavigation(){return!1}updateEnabled(){}updateLabel(){}getClass(){return this.action.class}getTooltip(){return this.action.tooltip}getHoverContents(){return this.getTooltip()}updateTooltip(){if(!this.element)return;let e=this.getHoverContents()??"";if(this.updateAriaLabel(),!this.customHover&&e!==""){let t=this.options.hoverDelegate??Yr("element");this.customHover=this._store.add(ms().setupManagedHover(t,this.element,e))}else this.customHover&&this.customHover.update(e)}updateAriaLabel(){if(this.element){let e=this.getTooltip()??"";this.element.setAttribute("aria-label",e)}}updateClass(){}updateChecked(){}dispose(){this.element&&(this.element.remove(),this.element=void 0),this._context=void 0,super.dispose()}},sh=class extends ya{constructor(e,t,i){i={...i,icon:i.icon!==void 0?i.icon:!1,label:i.label!==void 0?i.label:!0},super(e,t,i),this.options=i,this.cssClass=""}render(e){super.render(e),bt(this.element);let t=document.createElement("a");if(t.classList.add("action-label"),t.setAttribute("role",this.getDefaultAriaRole()),this.label=t,this.element.appendChild(t),this.options.label&&this.options.keybinding&&!this.options.keybindingNotRenderedWithLabel){let i=document.createElement("span");i.classList.add("keybinding"),i.textContent=this.options.keybinding,this.element.appendChild(i)}this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked()}getDefaultAriaRole(){return this._action.id===Wi.ID?"presentation":this.options.isMenu?"menuitem":this.options.isTabList?"tab":"button"}focus(){this.label&&(this.label.tabIndex=0,this.label.focus())}blur(){this.label&&(this.label.tabIndex=-1)}setFocusable(e){this.label&&(this.label.tabIndex=e?0:-1)}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this.action.label)}getTooltip(){let e=null;return this.action.tooltip?e=this.action.tooltip:this.action.label&&(e=this.action.label,this.options.keybinding&&(e=m(0,"{0} ({1})",e,this.options.keybinding))),e??void 0}updateClass(){this.cssClass&&this.label&&this.label.classList.remove(...this.cssClass.split(" ")),this.action.id===Wi.ID&&this.action.class?this.label?.classList.add(this.action.class):this.options.icon?(this.cssClass=this.getClass(),this.label&&(this.label.classList.add("codicon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" "))),this.updateEnabled()):this.label?.classList.remove("codicon")}updateEnabled(){this.action.enabled?(this.label&&(this.label.removeAttribute("aria-disabled"),this.label.classList.remove("disabled")),this.element?.classList.remove("disabled")):(this.label&&(this.label.setAttribute("aria-disabled","true"),this.label.classList.add("disabled")),this.element?.classList.add("disabled"))}updateAriaLabel(){if(this.label){let e=this.getTooltip()??"";this.label.setAttribute("aria-label",e)}}updateChecked(){this.label&&(this.action.checked!==void 0?(this.label.classList.toggle("checked",this.action.checked),this.options.isTabList?this.label.setAttribute("aria-selected",this.action.checked?"true":"false"):(this.label.setAttribute("aria-pressed",this.action.checked?"true":"false"),this.label.setAttribute("role","button"))):(this.label.classList.remove("checked"),this.label.removeAttribute(this.options.isTabList?"aria-selected":"aria-pressed"),this.label.setAttribute("role",this.getDefaultAriaRole())))}},Q8=class extends ya{constructor(e,t,i,n,s,r,a){super(e,t),this.selectBox=new Z8(i,n,s,r,a),this.selectBox.setFocusable(!1),this._register(this.selectBox),this.registerListeners()}select(e){this.selectBox.select(e)}registerListeners(){this._register(this.selectBox.onDidSelect(e=>this.runAction(e.selected,e.index)))}runAction(e,t){this.actionRunner.run(this._action,this.getActionContext(e,t))}getActionContext(e,t){return e}setFocusable(e){this.selectBox.setFocusable(e)}focus(){this.selectBox?.focus()}blur(){this.selectBox?.blur()}render(e){this.selectBox.render(e)}}});var Bte=x(()=>{});var Wte,J8,Q0e=x(()=>{re();wr();Bl();ys();ae();Bte();Wte=class extends hc{constructor(e,t){super(),this._onDidChangeVisibility=this._register(new N),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._element=X(e,j(".monaco-dropdown")),this._label=X(this._element,j(".dropdown-label"));let i=t.labelRenderer;i||(i=s=>(s.textContent=t.label||"",null));for(let s of[ee.CLICK,ee.MOUSE_DOWN,vi.Tap])this._register(B(this.element,s,r=>vt.stop(r,!0)));for(let s of[ee.MOUSE_DOWN,vi.Tap])this._register(B(this._label,s,r=>{V_(r)&&r.button!==0||(this.visible?this.hide():this.show())}));this._register(B(this._label,ee.KEY_DOWN,s=>{let r=new Mt(s);(r.equals(3)||r.equals(10))&&(vt.stop(s,!0),this.visible?this.hide():this.show())}));let n=i(this._label);n&&this._register(n),this._register(jn.addTarget(this._label))}get element(){return this._element}show(){this.visible||(this.visible=!0,this._onDidChangeVisibility.fire(!0))}hide(){this.visible&&(this.visible=!1,this._onDidChangeVisibility.fire(!1))}dispose(){super.dispose(),this.hide(),this.boxContainer&&(this.boxContainer.remove(),this.boxContainer=void 0),this.contents&&(this.contents.remove(),this.contents=void 0),this._label&&(this._label.remove(),this._label=void 0)}},J8=class extends Wte{constructor(e,t){super(e,t),this._options=t,this._actions=[],this.actions=t.actions||[]}set menuOptions(e){this._menuOptions=e}get menuOptions(){return this._menuOptions}get actions(){return this._options.actionProvider?this._options.actionProvider.getActions():this._actions}set actions(e){this._actions=e}show(){super.show(),this.element.classList.add("active"),this._options.contextMenuProvider.showContextMenu({getAnchor:()=>this.element,getActions:()=>this.actions,getActionsContext:()=>this.menuOptions?this.menuOptions.context:null,getActionViewItem:(e,t)=>this.menuOptions&&this.menuOptions.actionViewItemProvider?this.menuOptions.actionViewItemProvider(e,t):void 0,getKeyBinding:e=>this.menuOptions&&this.menuOptions.getKeyBinding?this.menuOptions.getKeyBinding(e):void 0,getMenuClassName:()=>this._options.menuClassName||"",onHide:()=>this.onHide(),actionRunner:this.menuOptions?this.menuOptions.actionRunner:void 0,anchorAlignment:this.menuOptions?this.menuOptions.anchorAlignment:0,domForShadowRoot:this._options.menuAsChild?this.element:void 0,skipTelemetry:this._options.skipTelemetry})}hide(){super.hide()}onHide(){this.hide(),this.element.classList.remove("active")}}});var rv,Hte=x(()=>{ae();re();sv();rd();xc();Bte();Q0e();rv=class extends ya{get onDidChangeVisibility(){return this._onDidChangeVisibility.event}constructor(e,t,i,n=Object.create(null)){super(null,e,n),this.actionItem=null,this._onDidChangeVisibility=this._register(new N),this.menuActionsOrProvider=t,this.contextMenuProvider=i,this.options=n,this.options.actionRunner&&(this.actionRunner=this.options.actionRunner)}render(e){this.actionItem=e;let t=s=>(this.element=X(s,j("a.action-label")),this.setAriaLabelAttributes(this.element),this.renderLabel(this.element)),i=Array.isArray(this.menuActionsOrProvider),n={contextMenuProvider:this.contextMenuProvider,labelRenderer:t,menuAsChild:this.options.menuAsChild,actions:i?this.menuActionsOrProvider:void 0,actionProvider:i?void 0:this.menuActionsOrProvider,skipTelemetry:this.options.skipTelemetry};if(this.dropdownMenu=this._register(new J8(e,n)),this._register(this.dropdownMenu.onDidChangeVisibility(s=>{this.element?.setAttribute("aria-expanded",`${s}`),this._onDidChangeVisibility.fire(s)})),this.dropdownMenu.menuOptions={actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,getKeyBinding:this.options.keybindingProvider,context:this._context},this.options.anchorAlignmentProvider){let s=this;this.dropdownMenu.menuOptions={...this.dropdownMenu.menuOptions,get anchorAlignment(){return s.options.anchorAlignmentProvider()}}}this.updateTooltip(),this.updateEnabled()}renderLabel(e){let t=[];return typeof this.options.classNames=="string"?t=this.options.classNames.split(/\s+/g).filter(i=>!!i):this.options.classNames&&(t=this.options.classNames),t.find(i=>i==="icon")||t.push("codicon"),e.classList.add(...t),this._action.label&&this._register(ms().setupManagedHover(this.options.hoverDelegate??Yr("mouse"),e,this._action.label)),null}setAriaLabelAttributes(e){e.setAttribute("role","button"),e.setAttribute("aria-haspopup","true"),e.setAttribute("aria-expanded","false"),e.ariaLabel=this._action.label||""}getTooltip(){let e=null;return this.action.tooltip?e=this.action.tooltip:this.action.label&&(e=this.action.label),e??void 0}setActionContext(e){super.setActionContext(e),this.dropdownMenu&&(this.dropdownMenu.menuOptions?this.dropdownMenu.menuOptions.context=e:this.dropdownMenu.menuOptions={context:e})}show(){this.dropdownMenu?.show()}updateEnabled(){let e=!this.action.enabled;this.actionItem?.classList.toggle("disabled",e),this.element?.classList.toggle("disabled",e)}}});function T6e(o,e,t){if(e===null)return"";let i=[];return o.ctrlKey&&i.push(t.ctrlKey),o.shiftKey&&i.push(t.shiftKey),o.altKey&&i.push(t.altKey),o.metaKey&&i.push(t.metaKey),e!==""&&i.push(e),i.join(t.separator)}var J0,ek,J0e,eke,tke,e6=x(()=>{le();J0=class{constructor(e,t,i=t){this.modifierLabels=[null],this.modifierLabels[2]=e,this.modifierLabels[1]=t,this.modifierLabels[3]=i}toLabel(e,t,i){if(t.length===0)return null;let n=[];for(let s=0,r=t.length;s{});function D6e(o,e){let t={...e};for(let i in o){let n=o[i];t[i]=n!==void 0?de(n):void 0}return t}function Gu(o){return D6e(o,av)}var tk,oke,ske,ik,nk,ok,rke,t6,av,ake,lke,kc=x(()=>{$t();bi();Zi();xi();qi();Mi();Xi();$i();Vi();Qi();Ji();Yi();tk={keybindingLabelBackground:de(wve),keybindingLabelForeground:de(Cve),keybindingLabelBorder:de(yve),keybindingLabelBottomBorder:de(Sve),keybindingLabelShadow:de(Uf)},oke={buttonForeground:de(l1),buttonSeparator:de(ove),buttonBackground:de(Jm),buttonHoverBackground:de(sve),buttonSecondaryForeground:de(ave),buttonSecondaryBackground:de(lve),buttonSecondaryHoverBackground:de(dve),buttonSecondaryBorder:de(cve),buttonBorder:de(rve)},ske={progressBarBackground:de(Q_e)},ik={inputActiveOptionBorder:de(wC),inputActiveOptionForeground:de(CC),inputActiveOptionBackground:de(ep)};de(r1),de(hve),de(uve),de(fve),de(gve),de(mve),de(pve);nk={checkboxBackground:de(PF),checkboxBorder:de(_ve),checkboxForeground:de(FF),checkboxDisabledBackground:de(bve),checkboxDisabledForeground:de(vve)};de(sr),de(Zm),de(Uf),de(s1),de(Cbe),de(ybe),de(Sbe),de(Z_e);ok={inputBackground:de(sT),inputForeground:de(MF),inputBorder:de(OF),inputValidationInfoBorder:de(Zbe),inputValidationInfoBackground:de(Gbe),inputValidationInfoForeground:de(Ybe),inputValidationWarningBorder:de(Jbe),inputValidationWarningBackground:de(Xbe),inputValidationWarningForeground:de(Qbe),inputValidationErrorBorder:de(ive),inputValidationErrorBackground:de(eve),inputValidationErrorForeground:de(tve)},rke={listFilterWidgetBackground:de(Hbe),listFilterWidgetOutline:de(Vbe),listFilterWidgetNoMatchesOutline:de(zbe),listFilterWidgetShadow:de(Ube),inputBoxStyles:ok,toggleStyles:ik},t6={badgeBackground:de(t1),badgeForeground:de(X_e),badgeBorder:de(_t)};de(bbe),de(_be),de(cZ),de(cZ),de(vbe);av={listBackground:void 0,listInactiveFocusForeground:void 0,listFocusBackground:de(Tbe),listFocusForeground:de(Dbe),listFocusOutline:de(Nbe),listActiveSelectionBackground:de($f),listActiveSelectionForeground:de(xb),listActiveSelectionIconForeground:de(NF),listFocusAndSelectionOutline:de(Rbe),listFocusAndSelectionBackground:de($f),listFocusAndSelectionForeground:de(xb),listInactiveSelectionBackground:de(Abe),listInactiveSelectionIconForeground:de(Obe),listInactiveSelectionForeground:de(Mbe),listInactiveFocusBackground:de(Pbe),listInactiveFocusOutline:de(Fbe),listHoverBackground:de(Qm),listHoverForeground:de(RF),listDropOverBackground:de(Bbe),listDropBetweenBackground:de(Wbe),listSelectionOutline:de(Ai),listHoverOutline:de(Ai),treeIndentGuidesStroke:de(fZ),treeInactiveIndentGuidesStroke:de($be),treeStickyScrollBackground:void 0,treeStickyScrollBorder:void 0,treeStickyScrollShadow:de(pC),tableColumnsBorder:de(qbe),tableOddRowsBackgroundColor:de(jbe)};ake={selectBackground:de(a1),selectListBackground:de(nve),selectForeground:de(rT),decoratorRightForeground:de(WF),selectBorder:de(aT),focusBorder:de(Uc),listFocusBackground:de(jf),listInactiveSelectionIconForeground:de(c1),listFocusForeground:de(qf),listFocusOutline:iZ(Ai,K.transparent.toString()),listHoverBackground:de(Qm),listHoverForeground:de(RF),listHoverOutline:de(Ai),selectListBorder:de(vb),listBackground:void 0,listActiveSelectionBackground:void 0,listActiveSelectionForeground:void 0,listActiveSelectionIconForeground:void 0,listFocusAndSelectionBackground:void 0,listDropOverBackground:void 0,listDropBetweenBackground:void 0,listInactiveSelectionBackground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusBackground:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listFocusAndSelectionForeground:void 0,listFocusAndSelectionOutline:void 0,listInactiveFocusForeground:void 0,tableColumnsBorder:void 0,tableOddRowsBackgroundColor:void 0,treeIndentGuidesStroke:void 0,treeInactiveIndentGuidesStroke:void 0,treeStickyScrollBackground:void 0,treeStickyScrollBorder:void 0,treeStickyScrollShadow:void 0},lke={shadowColor:de(Uf),borderColor:iZ(xve,vb),foregroundColor:de(kve),backgroundColor:de(Lve),selectionForegroundColor:de(RF),selectionBackgroundColor:de(Qm),selectionBorderColor:de(Ive),separatorColor:de(Eve),scrollbarShadow:de(pC),scrollbarSliderBackground:de(SF),scrollbarSliderHoverBackground:de(xF),scrollbarSliderActiveBackground:de(kF)}});function i6(o){if(QD)return;let e=o.getBoundingClientRect(),t=we(o).document,i=j(".animation-overlay");return i.style.position="fixed",i.style.left=`${e.left}px`,i.style.top=`${e.top}px`,i.style.width=`${e.width}px`,i.style.height=`${e.height}px`,i.style.pointerEvents="none",i.style.overflow="visible",i.style.zIndex="10000",t.body.appendChild(i),QD=i,{overlay:i,cx:e.width/2,cy:e.height/2}}function n6(o){setTimeout(()=>{QD&&(QD.remove(),QD=void 0)},o)}function o6(o,e){let t=[],i=Math.max(e.scale?.length??0,e.rotate?.length??0,e.translateY?.length??0);if(i!==0){for(let n=0;n{Li();re();cke=["#007acc","#005a9e","#0098ff","#4fc3f7","#64b5f6","#42a5f5"]});function uke(o,e){if(Cl)return!1;let t=O6e(o,e),i=o.getValue("window");return i?.menuStyle==="native"?!(!Ye&&!t):i?.menuStyle==="custom"?!1:t}function O6e(o,e){return e||(e=fke(o)),e==="native"}function fke(o){if(Cl)return"custom";let e=o.getValue("window");if(e){if(Ye&&e.nativeTabs===!0||Ye&&e.nativeFullScreen===!1)return"native";let n=e.titleBarStyle;if(n==="native"||n==="custom")return n}return"custom"}function gke(o){if(Cl||Ye||fke(o)==="native")return"native";let t=o.getValue("window")?.controlsStyle;return t==="custom"||t==="hidden"?t:"native"}var zte=x(()=>{rt()});var mke=x(()=>{});function pke(o,e){let t=[];return P6e(o,t),t}function P6e(o,e,t){let i=xu.getInstance(),n=i.keyStatus.altKey||(sn||po)&&i.keyStatus.shiftKey;vke(o,e,n,s=>s==="navigation")}function sk(o,e,t,i){let n={primary:[],secondary:[]};return bke(o,n,e,t,i),n}function _ke(o,e,t,i){let n=[];return bke(o,n,e,t,i),n}function bke(o,e,t,i,n){vke(o,e,!1,typeof t=="string"?r=>r===t:t,i,n)}function vke(o,e,t,i=r=>r==="navigation",n=()=>!1,s=!1){let r,a;Array.isArray(e)?(r=e,a=e):(r=e.primary,a=e.secondary);let l=new Set;for(let[c,d]of o){let h;i(c)?(h=r,h.length>0&&s&&h.push(new Wi)):(h=a,h.length>0&&h.push(new Wi));for(let u of d){t&&(u=u instanceof Ss&&u.alt?u.alt:u);let f=h.push(u);u instanceof El&&l.add({group:c,action:u,index:f-1})}}for(let{group:c,action:d,index:h}of l){let u=i(c)?r:a,f=d.actions;n(d,c,u.length)&&u.splice(h,1,...f)}}function rk(o,e,t){return e instanceof Ss?o.createInstance(Gh,e,t):e instanceof Hd?e.item.isSelection?o.createInstance(qte,e):e.item.isSplitButton?o.createInstance($te,e,{...t,togglePrimaryAction:typeof e.item.isSplitButton!="boolean"?e.item.isSplitButton.togglePrimaryAction:!1}):o.createInstance(Ute,e,t):void 0}var r6,cl,Gh,s6,Ute,$te,qte,Ap=x(()=>{ju();re();wr();sv();Hte();Fte();ys();e6();W();rt();Li();Rt();le();us();Vte();oi();je();Kr();Ie();Oi();Hs();al();kc();$t();bi();Zi();xi();qi();Mi();Xi();$i();Vi();Qi();Ji();hke();Kc();Kt();zte();yi();mke();r6=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},cl=function(o,e){return function(t,i){e(t,i,o)}};Gh=class extends sh{constructor(e,t,i,n,s,r,a,l){super(void 0,e,{icon:!!(e.class||e.item.icon),label:!e.class&&!e.item.icon,draggable:t?.draggable,keybinding:t?.keybinding,hoverDelegate:t?.hoverDelegate,keybindingNotRenderedWithLabel:t?.keybindingNotRenderedWithLabel}),this._options=t,this._keybindingService=i,this._notificationService=n,this._contextKeyService=s,this._themeService=r,this._contextMenuService=a,this._accessibilityService=l,this._wantsAltCommand=!1,this._itemClassDispose=this._register(new Qe),this._altKey=xu.getInstance()}get _menuItemAction(){return this._action}get _commandAction(){return this._wantsAltCommand&&this._menuItemAction.alt||this._menuItemAction}async onClick(e){if(e.preventDefault(),e.stopPropagation(),this._options?.onClickAnimation&&this.element&&!this._accessibilityService.isMotionReduced()){let t=this._menuItemAction.item.icon;dke(this.element,this._options.onClickAnimation,Ee.isThemeIcon(t)?t:void 0)}try{await this.actionRunner.run(this._commandAction,this._context)}catch(t){this._notificationService.error(t)}}render(e){if(super.render(e),e.classList.add("menu-entry"),this.options.icon&&this._updateItemClass(this._menuItemAction.item),this._menuItemAction.alt){let t=!1,i=()=>{let n=!!this._menuItemAction.alt?.enabled&&(!this._accessibilityService.isMotionReduced()||t)&&(this._altKey.keyStatus.altKey||this._altKey.keyStatus.shiftKey&&t);n!==this._wantsAltCommand&&(this._wantsAltCommand=n,this.updateLabel(),this.updateTooltip(),this.updateClass())};this._register(this._altKey.event(i)),this._register(B(e,"mouseleave",n=>{t=!1,i()})),this._register(B(e,"mouseenter",n=>{t=!0,i()})),i()}}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this._commandAction.label)}getTooltip(){let e=this._commandAction.tooltip||this._commandAction.label,t=this._keybindingService.appendKeybinding(e,this._commandAction.id,this._contextKeyService);if(!this._wantsAltCommand&&this._menuItemAction.alt?.enabled){let i=this._menuItemAction.alt.tooltip||this._menuItemAction.alt.label,n=this._keybindingService.appendKeybinding(i,this._menuItemAction.alt.id,this._contextKeyService);t=m(1698,`{0} +[{1}] {2}`,t,ek.modifierLabels[Po].altKey,n)}return t}updateClass(){this.options.icon&&(this._commandAction!==this._menuItemAction?this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.alt.item):this._updateItemClass(this._menuItemAction.item))}_updateItemClass(e){this._itemClassDispose.value=void 0;let{element:t,label:i}=this;if(!t||!i)return;let n=this._commandAction.checked&&nke(e.toggled)&&e.toggled.icon?e.toggled.icon:e.icon;if(n)if(Ee.isThemeIcon(n)){let s=Ee.asClassNameArray(n);i.classList.add(...s),this._itemClassDispose.value=ne(()=>{i.classList.remove(...s)})}else i.style.backgroundImage=_c(this._themeService.getColorTheme().type)?Ul(n.dark):Ul(n.light),i.classList.add("icon"),this._itemClassDispose.value=sa(ne(()=>{i.style.backgroundImage="",i.classList.remove("icon")}),this._themeService.onDidColorThemeChange(()=>{this.updateClass()}))}};Gh=r6([cl(2,$e),cl(3,si),cl(4,Ce),cl(5,yt),cl(6,eo),cl(7,Ri)],Gh);s6=class o extends Gh{render(e){this.options.label=!0,this.options.icon=!1,super.render(e),e.classList.add("text-only"),e.classList.toggle("use-comma",this._options?.useComma??!1)}updateLabel(){let e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){let t=o._symbolPrintEnter(e);this._options?.conversational?this.label.textContent=m(1699,"{1} to {0}",this._action.label,t):this.label.textContent=m(1700,"{0} ({1})",this._action.label,t)}}static _symbolPrintEnter(e){return e.getLabel()?.replace(/\benter\b/gi,"\u23CE").replace(/\bEscape\b/gi,"Esc")}},Ute=class extends rv{constructor(e,t,i,n,s){let r={...t,menuAsChild:t?.menuAsChild??!1,classNames:t?.classNames??(Ee.isThemeIcon(e.item.icon)?Ee.asClassName(e.item.icon):void 0),keybindingProvider:t?.keybindingProvider??(a=>i.lookupKeybinding(a.id))};super(e,{getActions:()=>e.actions},n,r),this._keybindingService=i,this._contextMenuService=n,this._themeService=s}render(e){super.render(e),bt(this.element),e.classList.add("menu-entry");let t=this._action,{icon:i}=t.item;if(i&&!Ee.isThemeIcon(i)){this.element.classList.add("icon");let n=()=>{this.element&&(this.element.style.backgroundImage=_c(this._themeService.getColorTheme().type)?Ul(i.dark):Ul(i.light))};n(),this._register(this._themeService.onDidColorThemeChange(()=>{n()}))}}};Ute=r6([cl(2,$e),cl(3,eo),cl(4,yt)],Ute);$te=class extends ya{constructor(e,t,i,n,s,r,a,l){super(null,e),this._keybindingService=i,this._notificationService=n,this._contextMenuService=s,this._menuService=r,this._instaService=a,this._storageService=l,this._defaultActionDisposables=this._register(new F),this._container=null,this._primaryActionListener=this._register(new Qe),this._options=t,this._storageKey=`${e.item.submenu.id}_lastActionId`;let c,d=t?.togglePrimaryAction?l.get(this._storageKey,1):void 0;d&&(c=e.actions.find(u=>d===u.id)),c||(c=e.actions[0]),this._defaultAction=this._defaultActionDisposables.add(this._instaService.createInstance(Gh,c,{keybinding:this._getDefaultActionKeybindingLabel(c),hoverDelegate:t?.hoverDelegate}));let h={keybindingProvider:u=>this._keybindingService.lookupKeybinding(u.id),...t,menuAsChild:t?.menuAsChild??!0,classNames:t?.classNames??["codicon","codicon-chevron-down"],actionRunner:t?.actionRunner??this._register(new hc)};this._dropdown=this._register(new rv(e,e.actions,this._contextMenuService,h)),t?.togglePrimaryAction&&this.registerTogglePrimaryActionListener()}registerTogglePrimaryActionListener(){this._primaryActionListener.value=this._dropdown.actionRunner.onDidRun(e=>{e.action instanceof Ss&&this.update(e.action)})}update(e){this._options?.togglePrimaryAction&&this._storageService.store(this._storageKey,e.id,1,1),this._defaultActionDisposables.clear(),this._defaultAction=this._defaultActionDisposables.add(this._instaService.createInstance(Gh,e,{keybinding:this._getDefaultActionKeybindingLabel(e),hoverDelegate:this._options?.hoverDelegate})),this._defaultAction.actionRunner=this._defaultActionDisposables.add(new class extends hc{async runAction(t,i){await t.run(void 0)}}),this._container&&this._defaultAction.render(z_(this._container,j(".action-container")))}_getDefaultActionKeybindingLabel(e){let t;if(this._options?.renderKeybindingWithDefaultActionLabel){let i=this._keybindingService.lookupKeybinding(e.id);i&&(t=`(${i.getLabel()})`)}return t}setActionContext(e){super.setActionContext(e),this._defaultAction.setActionContext(e),this._dropdown.setActionContext(e)}set actionRunner(e){super.actionRunner=e,this._defaultAction.actionRunner=e,this._options?.togglePrimaryAction||(this._dropdown.actionRunner=e),this._primaryActionListener.value&&this.registerTogglePrimaryActionListener()}get actionRunner(){return super.actionRunner}render(e){this._container=e,super.render(this._container),this._container.classList.add("monaco-dropdown-with-default");let t=j(".action-container");this._defaultAction.render(X(this._container,t)),this._register(B(t,ee.KEY_DOWN,n=>{let s=new Mt(n);s.equals(17)&&(this._defaultAction.element.tabIndex=-1,this._dropdown.focus(),s.stopPropagation())}));let i=j(".dropdown-action-container");this._dropdown.render(X(this._container,i)),this._register(B(i,ee.KEY_DOWN,n=>{let s=new Mt(n);s.equals(15)&&(this._defaultAction.element.tabIndex=0,this._dropdown.setFocusable(!1),this._defaultAction.element?.focus(),s.stopPropagation())}))}focus(e){e?this._dropdown.focus():(this._defaultAction.element.tabIndex=0,this._defaultAction.element.focus())}blur(){this._defaultAction.element.tabIndex=-1,this._dropdown.blur(),this._container.blur()}setFocusable(e){e?this._defaultAction.element.tabIndex=0:(this._defaultAction.element.tabIndex=-1,this._dropdown.setFocusable(!1))}};$te=r6([cl(2,$e),cl(3,si),cl(4,eo),cl(5,Yo),cl(6,ie),cl(7,zn)],$te);qte=class extends Q8{constructor(e,t,i){super(null,e,e.actions.map(n=>n.id===Wi.ID?X0e:{text:n.label,isDisabled:!n.enabled}),0,t,ake,{ariaLabel:e.tooltip||e.label,optionsAsChildren:!0,useCustomDrawn:!uke(i)}),this.select(Math.max(0,e.actions.findIndex(n=>n.checked)))}render(e){super.render(e),e.style.borderColor=de(aT)}runAction(e,t){let i=this.action.actions[t];i&&this.actionRunner.run(i)}};qte=r6([cl(1,sl),cl(2,Me)],qte)});var Vo,Yh=x(()=>{re();wr();sv();xc();ys();ae();W();Rt();X8();Vo=class extends T{get viewItems(){return this._viewItems}get onDidBlur(){return this._onDidBlur.event}get onDidCancel(){return this._onDidCancel.event}get onDidRun(){return this._onDidRun.event}get onWillRun(){return this._onWillRun.event}constructor(e,t={}){super(),this._actionRunnerDisposables=this._register(new F),this.viewItemDisposables=this._register(new vh),this.triggerKeyDown=!1,this.focusable=!0,this._onDidBlur=this._register(new N),this._onDidCancel=this._register(new N({onWillAddFirstListener:()=>this.cancelHasListener=!0})),this.cancelHasListener=!1,this._onDidRun=this._register(new N),this._onWillRun=this._register(new N),this.options=t,this._context=t.context??null,this._orientation=this.options.orientation??0,this._triggerKeys={keyDown:this.options.triggerKeys?.keyDown??!1,keys:this.options.triggerKeys?.keys??[3,10]},this._hoverDelegate=t.hoverDelegate??this._register(V8()),this.options.actionRunner?this._actionRunner=this.options.actionRunner:(this._actionRunner=new hc,this._actionRunnerDisposables.add(this._actionRunner)),this._actionRunnerDisposables.add(this._actionRunner.onDidRun(s=>this._onDidRun.fire(s))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun(s=>this._onWillRun.fire(s))),this._viewItems=[],this.focusedItem=void 0,this.domNode=document.createElement("div"),this.domNode.className="monaco-action-bar";let i,n;switch(this._orientation){case 0:i=[15],n=[17];break;case 1:i=[16],n=[18],this.domNode.className+=" vertical";break}this._register(B(this.domNode,ee.KEY_DOWN,s=>{let r=new Mt(s),a=!0,l=typeof this.focusedItem=="number"?this.viewItems[this.focusedItem]:void 0;i&&(r.equals(i[0])||r.equals(i[1]))?a=this.focusPrevious():n&&(r.equals(n[0])||r.equals(n[1]))?a=this.focusNext():r.equals(9)&&this.cancelHasListener?this._onDidCancel.fire():r.equals(14)?a=this.focusFirst():r.equals(13)?a=this.focusLast():r.equals(2)&&l instanceof ya&&l.trapsArrowNavigation?a=this.focusNext(void 0,!0):this.isTriggerKeyEvent(r)?this._triggerKeys.keyDown?this.doTrigger(r):this.triggerKeyDown=!0:a=!1,a&&(r.preventDefault(),r.stopPropagation())})),this._register(B(this.domNode,ee.KEY_UP,s=>{let r=new Mt(s);this.isTriggerKeyEvent(r)?(!this._triggerKeys.keyDown&&this.triggerKeyDown&&(this.triggerKeyDown=!1,this.doTrigger(r)),r.preventDefault(),r.stopPropagation()):(r.equals(2)||r.equals(1026)||r.equals(16)||r.equals(18)||r.equals(15)||r.equals(17))&&this.updateFocusedItem()})),this.focusTracker=this._register(as(this.domNode)),this._register(this.focusTracker.onDidBlur(()=>{(Ui()===this.domNode||!mn(Ui(),this.domNode))&&(this._onDidBlur.fire(),this.previouslyFocusedItem=this.focusedItem,this.focusedItem=void 0,this.triggerKeyDown=!1)})),this._register(this.focusTracker.onDidFocus(()=>this.updateFocusedItem())),this.actionsList=document.createElement("ul"),this.actionsList.className="actions-container",this.options.highlightToggledItems&&this.actionsList.classList.add("highlight-toggled"),this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"),this.options.ariaLabel&&this.actionsList.setAttribute("aria-label",this.options.ariaLabel),this.domNode.appendChild(this.actionsList),e.appendChild(this.domNode)}refreshRole(){this.length()>=1?this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"):this.actionsList.setAttribute("role","presentation")}setFocusable(e){if(this.focusable=e,this.focusable){let t=this.viewItems.find(i=>i instanceof ya&&i.isEnabled());t instanceof ya&&t.setFocusable(!0)}else this.viewItems.forEach(t=>{t instanceof ya&&t.setFocusable(!1)})}isTriggerKeyEvent(e){let t=!1;return this._triggerKeys.keys.forEach(i=>{t=t||e.equals(i)}),t}updateFocusedItem(){for(let e=0;et.setActionContext(e))}get actionRunner(){return this._actionRunner}set actionRunner(e){this._actionRunner=e,this._actionRunnerDisposables.clear(),this._actionRunnerDisposables.add(this._actionRunner.onDidRun(t=>this._onDidRun.fire(t))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun(t=>this._onWillRun.fire(t))),this.viewItems.forEach(t=>t.actionRunner=e)}getContainer(){return this.domNode}hasAction(e){return this.viewItems.findIndex(t=>t.action.id===e.id)!==-1}getAction(e){if(typeof e=="number")return this.viewItems[e]?.action;if(xt(e)){for(;e.parentElement!==this.actionsList;){if(!e.parentElement)return;e=e.parentElement}for(let t=0;t{let r=document.createElement("li");r.className="action-item",r.setAttribute("role","presentation");let a,l={hoverDelegate:this._hoverDelegate,...t,isTabList:this.options.ariaRole==="tablist"};this.options.actionViewItemProvider&&(a=this.options.actionViewItemProvider(s,l)),a||(a=new sh(this.context,s,l)),this.options.allowContextMenu||this.viewItemDisposables.set(a,B(r,ee.CONTEXT_MENU,c=>{vt.stop(c,!0)})),a.actionRunner=this._actionRunner,a.setActionContext(this.context),a.render(r),n===null||n<0||n>=this.actionsList.children.length?(this.actionsList.appendChild(r),this._viewItems.push(a)):(this.actionsList.insertBefore(r,this.actionsList.children[n]),this._viewItems.splice(n,0,a),n++)}),this.focusable){let s=!1;for(let r of this.viewItems){if(!(r instanceof ya))continue;let a;s||r.action.id===Wi.ID||!r.isEnabled()&&this.options.focusOnlyEnabledItems?a=!1:a=!0,a?(r.setFocusable(!0),s=!0):r.setFocusable(!1)}}typeof this.focusedItem=="number"&&this.focus(this.focusedItem),this.refreshRole()}getWidth(e){return this.actionsList.children.item(e)?.clientWidth??0}pull(e){e>=0&&e"u"){let n=this.viewItems.findIndex(s=>s.isEnabled());this.focusedItem=n===-1?void 0:n,this.updateFocus(void 0,void 0,!0)}else i!==void 0&&(this.focusedItem=i),this.updateFocus(void 0,void 0,!0)}focusFirst(){return this.focusedItem=this.length()-1,this.focusNext(!0)}focusLast(){return this.focusedItem=0,this.focusPrevious(!0)}focusNext(e,t){if(typeof this.focusedItem>"u")this.focusedItem=this.viewItems.length-1;else if(this.viewItems.length<=1)return!1;let i=this.focusedItem,n;do{if(!e&&this.options.preventLoopNavigation&&this.focusedItem+1>=this.viewItems.length)return this.focusedItem=i,!1;this.focusedItem=(this.focusedItem+1)%this.viewItems.length,n=this.viewItems[this.focusedItem]}while(this.focusedItem!==i&&(this.options.focusOnlyEnabledItems&&!n.isEnabled()||n.action.id===Wi.ID));return this.updateFocus(void 0,void 0,t),!0}focusPrevious(e){if(typeof this.focusedItem>"u")this.focusedItem=0;else if(this.viewItems.length<=1)return!1;let t=this.focusedItem,i;do{if(this.focusedItem=this.focusedItem-1,this.focusedItem<0){if(!e&&this.options.preventLoopNavigation)return this.focusedItem=t,!1;this.focusedItem=this.viewItems.length-1}i=this.viewItems[this.focusedItem]}while(this.focusedItem!==t&&(this.options.focusOnlyEnabledItems&&!i.isEnabled()||i.action.id===Wi.ID));return this.updateFocus(!0),!0}updateFocus(e,t,i=!1){typeof this.focusedItem>"u"&&this.actionsList.focus({preventScroll:t}),this.previouslyFocusedItem!==void 0&&this.previouslyFocusedItem!==this.focusedItem&&this.viewItems[this.previouslyFocusedItem]?.blur();let n=this.focusedItem!==void 0?this.viewItems[this.focusedItem]:void 0;if(n){let s=!0;bh(n.focus)||(s=!1),this.options.focusOnlyEnabledItems&&bh(n.isEnabled)&&!n.isEnabled()&&(s=!1),n.action.id===Wi.ID&&(s=!1),s?(i||this.previouslyFocusedItem!==this.focusedItem)&&(n.focus(e),this.previouslyFocusedItem=this.focusedItem):(this.actionsList.focus({preventScroll:t}),this.previouslyFocusedItem=void 0),s&&n.showHover?.()}}doTrigger(e){if(typeof this.focusedItem>"u")return;let t=this.viewItems[this.focusedItem];if(t instanceof ya){let i=t._context===null||t._context===void 0?e:t._context;this.run(t._action,i)}}async run(e,t){await this._actionRunner.run(e,t)}dispose(){this._context=void 0,this._viewItems=Ct(this._viewItems),this.getContainer().remove(),super.dispose()}}});function F6e(o){let e=Kte,t=e.exec(o);if(!t)return o;let i=!t[1];return o.replace(e,i?"$2$3":"").trim()}function wke(o){let e=QM()[o.id];return`.codicon-${o.id}:before { content: '\\${e.toString(16)}'; }`}function B6e(o,e){let i=` +.monaco-menu { + font-size: 13px; + border-radius: var(--vscode-cornerRadius-large); + border: 1px solid ${o.borderColor??"var(--vscode-menu-border)"}; + min-width: 160px; +} + +${wke($.menuSelection)} +${wke($.menuSubmenu)} + +.monaco-menu .monaco-action-bar { + text-align: right; + overflow: hidden; + white-space: nowrap; +} + +.monaco-menu .monaco-action-bar .actions-container { + display: flex; + margin: 0 auto; + padding: 0; + width: 100%; + justify-content: flex-end; +} + +.monaco-menu .monaco-action-bar.vertical .actions-container { + display: inline-block; +} + +.monaco-menu .monaco-action-bar.reverse .actions-container { + flex-direction: row-reverse; +} + +.monaco-menu .monaco-action-bar .action-item { + cursor: pointer; + display: inline-block; + transition: transform 50ms ease; + position: relative; /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */ +} + +.monaco-menu .monaco-action-bar .action-item.disabled { + cursor: default; +} + +.monaco-menu .monaco-action-bar .action-item .icon, +.monaco-menu .monaco-action-bar .action-item .codicon { + display: inline-block; +} + +.monaco-menu .monaco-action-bar .action-item .codicon { + display: flex; + align-items: center; +} + +.monaco-menu .monaco-action-bar .action-label { + font-size: 11px; + margin-right: 4px; +} + +.monaco-menu .monaco-action-bar .action-item.disabled .action-label, +.monaco-menu .monaco-action-bar .action-item.disabled .action-label:hover { + color: var(--vscode-disabledForeground); +} + +/* Vertical actions */ + +.monaco-menu .monaco-action-bar.vertical { + text-align: left; +} + +.monaco-menu .monaco-action-bar.vertical .action-item { + display: block; +} + +.monaco-menu .monaco-action-bar.vertical .action-label.separator { + display: block; + border-bottom: 1px solid var(--vscode-menu-separatorBackground); + padding-top: 1px; + padding: 30px; +} + +.monaco-menu .secondary-actions .monaco-action-bar .action-label { + margin-left: 6px; +} + +/* Action Items */ +.monaco-menu .monaco-action-bar .action-item.select-container { + overflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */ + flex: 1; + max-width: 170px; + min-width: 60px; + display: flex; + align-items: center; + justify-content: center; + margin-right: 10px; +} + +.monaco-menu .monaco-action-bar.vertical { + margin-left: 0; + overflow: visible; +} + +.monaco-menu .monaco-action-bar.vertical .actions-container { + display: block; +} + +.monaco-menu .monaco-action-bar.vertical .action-item { + padding: 0; + transform: none; + display: flex; +} + +.monaco-menu .monaco-action-bar.vertical .action-item.active { + transform: none; +} + +.monaco-menu .monaco-action-bar.vertical .action-menu-item { + flex: 1 1 auto; + display: flex; + height: 24px; + align-items: center; + position: relative; + margin: 0 4px; + border-radius: var(--vscode-cornerRadius-medium); +} + +.monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .keybinding, +.monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .keybinding { + opacity: unset; +} + +.monaco-menu .monaco-action-bar.vertical .action-label { + flex: 1 1 auto; + text-decoration: none; + padding: 0 1em; + background: none; + font-size: 12px; + line-height: 1; +} + +.monaco-menu .monaco-action-bar.vertical .keybinding, +.monaco-menu .monaco-action-bar.vertical .submenu-indicator { + display: inline-block; + flex: 2 1 auto; + padding: 0 1em; + text-align: right; + font-size: 12px; + line-height: 1; + opacity: 0.7; +} + +.monaco-menu .monaco-action-bar.vertical .submenu-indicator { + height: 100%; +} + +.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon { + font-size: 16px !important; + display: flex; + align-items: center; +} + +.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon::before { + margin-left: auto; + margin-right: -20px; +} + +.monaco-menu .monaco-action-bar.vertical .action-item.disabled .keybinding, +.monaco-menu .monaco-action-bar.vertical .action-item.disabled .submenu-indicator { + opacity: 0.4; +} + +.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator) { + display: inline-block; + box-sizing: border-box; + margin: 0; +} + +.monaco-menu .monaco-action-bar.vertical .action-item { + position: static; + overflow: visible; +} + +.monaco-menu .monaco-action-bar.vertical .action-item .monaco-submenu { + position: absolute; +} + +.monaco-menu .monaco-action-bar.vertical .action-label.separator { + width: 100%; + height: 0px !important; + opacity: 1; +} + +.monaco-menu .monaco-action-bar.vertical .action-label.separator.text { + padding: 0.7em 1em 0.1em 1em; + font-weight: bold; + opacity: 1; +} + +.monaco-menu .monaco-action-bar.vertical .action-label:hover { + color: inherit; +} + +.monaco-menu .monaco-action-bar.vertical .menu-item-check { + position: absolute; + visibility: hidden; + width: 1em; + height: 100%; +} + +.monaco-menu .monaco-action-bar.vertical .action-menu-item.checked .menu-item-check { + visibility: visible; + display: flex; + align-items: center; + justify-content: center; +} + +/* Context Menu */ + +.context-view.monaco-menu-container { + outline: 0; + border: none; + animation: fadeIn 0.083s linear; + -webkit-app-region: no-drag; + box-shadow: var(--vscode-shadow-lg${o.shadowColor?`, 0 0 12px ${o.shadowColor}`:""}); + border-radius: var(--vscode-cornerRadius-large); + overflow: hidden; +} + +.context-view.monaco-menu-container :focus, +.context-view.monaco-menu-container .monaco-action-bar.vertical:focus, +.context-view.monaco-menu-container .monaco-action-bar.vertical :focus { + outline: 0; +} + +.hc-black .context-view.monaco-menu-container, +.hc-light .context-view.monaco-menu-container, +:host-context(.hc-black) .context-view.monaco-menu-container, +:host-context(.hc-light) .context-view.monaco-menu-container { + box-shadow: none; +} + +.hc-black .monaco-menu .monaco-action-bar.vertical .action-item.focused, +.hc-light .monaco-menu .monaco-action-bar.vertical .action-item.focused, +:host-context(.hc-black) .monaco-menu .monaco-action-bar.vertical .action-item.focused, +:host-context(.hc-light) .monaco-menu .monaco-action-bar.vertical .action-item.focused { + background: none; +} + +/* Show the menu item selection border only for keyboard navigation. Pointer-driven focus typically does not set :focus-visible, so suppress the border in that case. */ +.monaco-menu .monaco-action-bar.vertical .action-menu-item:focus:not(:focus-visible) { + outline: none !important; + outline-offset: 0 !important; +} + +/* High contrast themes always show the selection border to indicate the focused item, regardless of input modality. The duplicated .monaco-menu raises specificity above the keyboard-only suppression rule above so this wins independent of declaration order. */ +.hc-black .monaco-menu.monaco-menu .monaco-action-bar.vertical .action-item.focused .action-menu-item, +.hc-light .monaco-menu.monaco-menu .monaco-action-bar.vertical .action-item.focused .action-menu-item, +:host-context(.hc-black) .monaco-menu.monaco-menu .monaco-action-bar.vertical .action-item.focused .action-menu-item, +:host-context(.hc-light) .monaco-menu.monaco-menu .monaco-action-bar.vertical .action-item.focused .action-menu-item { + outline: 1px solid var(--vscode-menu-selectionBorder) !important; + outline-offset: -1px !important; +} + +/* Vertical Action Bar Styles */ + +.monaco-menu .monaco-action-bar.vertical { + padding: 4px 0; +} + +.monaco-menu .monaco-action-bar.vertical .action-menu-item { + height: 24px; +} + +.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator), +.monaco-menu .monaco-action-bar.vertical .keybinding { + font-size: inherit; + padding: 0 2em; + max-height: 100%; +} + +.monaco-menu .monaco-action-bar.vertical .menu-item-check { + font-size: inherit; + width: 2em; +} + +.monaco-menu .monaco-action-bar.vertical .action-label.separator { + font-size: inherit; + margin: 5px 0 !important; + padding: 0; + border-radius: 0; +} + +.linux .monaco-menu .monaco-action-bar.vertical .action-label.separator, +:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .action-label.separator { + margin-left: 0; + margin-right: 0; +} + +.monaco-menu .monaco-action-bar.vertical .submenu-indicator { + font-size: 60%; + padding: 0 1.8em; +} + +.linux .monaco-menu .monaco-action-bar.vertical .submenu-indicator, +:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .submenu-indicator { + height: 100%; + mask-size: 10px 10px; + -webkit-mask-size: 10px 10px; +} + +.monaco-menu .action-item { + cursor: default; +}`;if(e){i+=` + /* Arrows */ + .monaco-scrollable-element > .scrollbar > .scra { + cursor: pointer; + font-size: 11px !important; + } + + .monaco-scrollable-element > .visible { + opacity: 1; + + /* Background rule added for IE9 - to allow clicks on dom node */ + background:rgba(0,0,0,0); + + transition: opacity 100ms linear; + } + .monaco-scrollable-element > .invisible { + opacity: 0; + pointer-events: none; + } + .monaco-scrollable-element > .invisible.fade { + transition: opacity 800ms linear; + } + + /* Scrollable Content Inset Shadow */ + .monaco-scrollable-element > .shadow { + position: absolute; + display: none; + } + .monaco-scrollable-element > .shadow.top { + display: block; + top: 0; + left: 3px; + height: 3px; + width: 100%; + } + .monaco-scrollable-element > .shadow.left { + display: block; + top: 3px; + left: 0; + height: 100%; + width: 3px; + } + .monaco-scrollable-element > .shadow.top-left-corner { + display: block; + top: 0; + left: 0; + height: 3px; + width: 3px; + } + /* Fix for https://github.com/microsoft/vscode/issues/103170 */ + .monaco-menu .action-item .monaco-submenu { + z-index: 1; + } + `;let n=o.scrollbarShadow;n&&(i+=` + .monaco-scrollable-element > .shadow.top { + box-shadow: ${n} 0 6px 6px -6px inset; + } + + .monaco-scrollable-element > .shadow.left { + box-shadow: ${n} 6px 0 6px -6px inset; + } + + .monaco-scrollable-element > .shadow.top.left { + box-shadow: ${n} 6px 6px 6px -6px inset; + } + `);let s=o.scrollbarSliderBackground;s&&(i+=` + .monaco-scrollable-element > .scrollbar > .slider { + background: ${s}; + } + `);let r=o.scrollbarSliderHoverBackground;r&&(i+=` + .monaco-scrollable-element > .scrollbar > .slider:hover { + background: ${r}; + } + `);let a=o.scrollbarSliderActiveBackground;a&&(i+=` + .monaco-scrollable-element > .scrollbar > .slider.active { + background: ${a}; + } + `)}return i}var Kte,jte,a6,Gte,JD,l6,c6,d6,Cke=x(()=>{Ns();Bl();re();qd();wr();Ya();Yh();sv();Gc();ys();Ze();ti();KI();Li();_g();W();rt();He();QW();Kte=/\(&([^\s&])\)|(^|[^&])&([^\s&])/,jte=/(&)?(&)([^\s&])/g;(function(o){o[o.Right=0]="Right",o[o.Left=1]="Left"})(a6||(a6={}));(function(o){o[o.Above=0]="Above",o[o.Below=1]="Below"})(Gte||(Gte={}));JD=class o extends Vo{constructor(e,t,i,n){e.classList.add("monaco-menu-container"),e.setAttribute("role","presentation");let s=document.createElement("div");s.classList.add("monaco-menu"),s.setAttribute("role","presentation"),super(s,{orientation:1,actionViewItemProvider:c=>this.doGetActionViewItem(c,i,r),context:i.context,actionRunner:i.actionRunner,ariaLabel:i.ariaLabel,ariaRole:"menu",focusOnlyEnabledItems:!0,triggerKeys:{keys:[3,...Ye||po?[10]:[]],keyDown:!0}}),this.menuStyles=n,this.menuElement=s,this.actionsList.tabIndex=0,this.initializeOrUpdateStyleSheet(e,n),this._register(jn.addTarget(s)),this._register(B(s,ee.KEY_DOWN,c=>{new Mt(c).equals(2)&&c.preventDefault()})),i.enableMnemonics&&this._register(B(s,ee.KEY_DOWN,c=>{let d=c.key.toLocaleLowerCase(),h=this.mnemonics.get(d);if(h!==void 0&&(vt.stop(c,!0),h.length===1&&(h[0]instanceof c6&&h[0].container&&this.focusItemByElement(h[0].container),h[0].onClick(c)),h.length>1)){let u=h.shift();u&&u.container&&(this.focusItemByElement(u.container),h.push(u)),this.mnemonics.set(d,h)}})),po&&this._register(B(s,ee.KEY_DOWN,c=>{let d=new Mt(c);d.equals(14)||d.equals(11)?(this.focusedItem=this.viewItems.length-1,this.focusNext(),vt.stop(c,!0)):(d.equals(13)||d.equals(12))&&(this.focusedItem=0,this.focusPrevious(),vt.stop(c,!0))})),this._register(B(this.domNode,ee.MOUSE_OUT,c=>{let d=c.relatedTarget;mn(d,this.domNode)||(this.focusedItem=void 0,this.updateFocus(),c.stopPropagation())})),this._register(B(this.actionsList,ee.MOUSE_OVER,c=>{let d=c.target;if(!(!d||!mn(d,this.actionsList)||d===this.actionsList)){for(;d.parentElement!==this.actionsList&&d.parentElement!==null;)d=d.parentElement;if(d.classList.contains("action-item")){let h=this.focusedItem;this.setFocusedItem(d),h!==this.focusedItem&&this.updateFocus()}}})),this._register(jn.addTarget(this.actionsList)),this._register(B(this.actionsList,vi.Tap,c=>{let d=c.initialTarget;if(!(!d||!mn(d,this.actionsList)||d===this.actionsList)){for(;d.parentElement!==this.actionsList&&d.parentElement!==null;)d=d.parentElement;if(d.classList.contains("action-item")){let h=this.focusedItem;this.setFocusedItem(d),h!==this.focusedItem&&this.updateFocus()}}}));let r={parent:this};this.mnemonics=new Map,this.scrollableElement=this._register(new Fh(s,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3,verticalScrollbarSize:7,handleMouseWheel:!0,useShadows:!0}));let a=this.scrollableElement.getDomNode();a.style.position="",this.styleScrollElement(a,n),this._register(B(s,vi.Change,c=>{vt.stop(c,!0);let d=this.scrollableElement.getScrollPosition().scrollTop;this.scrollableElement.setScrollPosition({scrollTop:d-c.translationY})})),this._register(B(a,ee.MOUSE_UP,c=>{c.preventDefault()}));let l=we(e);s.style.maxHeight=`${Math.max(10,l.innerHeight-e.getBoundingClientRect().top-35)}px`,t=t.filter((c,d)=>i.submenuIds?.has(c.id)?(console.warn(`Found submenu cycle: ${c.id}`),!1):!(c instanceof Wi&&(d===t.length-1||d===0||t[d-1]instanceof Wi))),this.push(t,{icon:!0,label:!0,isMenu:!0}),e.appendChild(this.scrollableElement.getDomNode()),this.scrollableElement.scanDomNode(),this.viewItems.filter(c=>!(c instanceof d6)).forEach((c,d,h)=>{c.updatePositionInSet(d+1,h.length)})}initializeOrUpdateStyleSheet(e,t){this.styleSheet||(Hw(e)?this.styleSheet=or(e):(o.globalStyleSheet||(o.globalStyleSheet=or()),this.styleSheet=o.globalStyleSheet)),this.styleSheet.textContent=B6e(t,Hw(e))}styleScrollElement(e,t){let i=t.foregroundColor??"",n=t.backgroundColor??"",s=t.borderColor?`1px solid ${t.borderColor}`:"",r="var(--vscode-cornerRadius-large)";e.style.outline=s,e.style.borderRadius=r,e.style.color=i,e.style.backgroundColor=n}getContainer(){return this.scrollableElement.getDomNode()}get onScroll(){return this.scrollableElement.onScroll}focusItemByElement(e){let t=this.focusedItem;this.setFocusedItem(e),t!==this.focusedItem&&this.updateFocus()}setFocusedItem(e){for(let t=0;t{this.element&&(this._register(B(this.element,ee.MOUSE_UP,s=>{if(vt.stop(s,!0),bo){if(new so(we(this.element),s).rightButton)return;this.onClick(s)}else setTimeout(()=>{this.onClick(s)},0)})),this._register(B(this.element,ee.CONTEXT_MENU,s=>{vt.stop(s,!0)})))},100),this._register(this.runOnceToEnableMouseUp)}render(e){super.render(e),this.element&&(this.container=e,this.item=X(this.element,j("a.action-menu-item")),this._action.id===Wi.ID?this.item.setAttribute("role","presentation"):(this.item.setAttribute("role","menuitem"),this.mnemonic&&this.item.setAttribute("aria-keyshortcuts",`${this.mnemonic}`)),this.check=X(this.item,j("span.menu-item-check"+Ee.asCSSSelector($.menuSelection))),this.check.setAttribute("role","none"),this.label=X(this.item,j("span.action-label")),this.options.label&&this.options.keybinding&&(X(this.item,j("span.keybinding")).textContent=this.options.keybinding),this.runOnceToEnableMouseUp.schedule(),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked(),this.applyStyle())}blur(){super.blur(),this.applyStyle()}focus(){super.focus(),this.item?.focus(),this.applyStyle()}updatePositionInSet(e,t){this.item&&(this.item.setAttribute("aria-posinset",`${e}`),this.item.setAttribute("aria-setsize",`${t}`))}updateLabel(){if(this.label&&this.options.label){pn(this.label);let e=Qb(this.action.label);if(e){let t=F6e(e);this.options.enableMnemonics||(e=t),this.label.setAttribute("aria-label",t.replace(/&&/g,"&"));let i=Kte.exec(e);if(i){e=sc(e),jte.lastIndex=0;let n=jte.exec(e);for(;n&&n[1];)n=jte.exec(e);let s=r=>r.replace(/&&/g,"&");n?this.label.append(Tm(s(e.substr(0,n.index))," "),j("u",{"aria-hidden":"true"},n[3]),nK(s(e.substr(n.index+n[0].length))," ")):this.label.textContent=s(e).trim(),this.item?.setAttribute("aria-keyshortcuts",(i[1]?i[1]:i[3]).toLocaleLowerCase())}else this.label.textContent=e.replace(/&&/g,"&").trim()}}}updateTooltip(){}updateClass(){this.cssClass&&this.item&&this.item.classList.remove(...this.cssClass.split(" ")),this.options.icon&&this.label?(this.cssClass=this.action.class||"",this.label.classList.add("icon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" ")),this.updateEnabled()):this.label&&this.label.classList.remove("icon")}updateEnabled(){this.action.enabled?(this.element&&(this.element.classList.remove("disabled"),this.element.removeAttribute("aria-disabled")),this.item&&(this.item.classList.remove("disabled"),this.item.removeAttribute("aria-disabled"),this.item.tabIndex=0)):(this.element&&(this.element.classList.add("disabled"),this.element.setAttribute("aria-disabled","true")),this.item&&(this.item.classList.add("disabled"),this.item.setAttribute("aria-disabled","true")))}updateChecked(){if(!this.item)return;let e=this.action.checked;this.item.classList.toggle("checked",!!e),e!==void 0?(this.item.setAttribute("role","menuitemcheckbox"),this.item.setAttribute("aria-checked",e?"true":"false")):(this.item.setAttribute("role","menuitem"),this.item.setAttribute("aria-checked",""))}getMnemonic(){return this.mnemonic}applyStyle(){let e=this.element&&this.element.classList.contains("focused"),t=e&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor,i=e&&this.menuStyle.selectionBackgroundColor?this.menuStyle.selectionBackgroundColor:void 0,n=e&&this.menuStyle.selectionBorderColor?`1px solid ${this.menuStyle.selectionBorderColor}`:"",s=e&&this.menuStyle.selectionBorderColor?"-1px":"";this.item&&(this.item.style.color=t??"",this.item.style.backgroundColor=i??"",this.item.style.outline=n,this.item.style.outlineOffset=s),this.check&&(this.check.style.color=t??"")}},c6=class extends l6{constructor(e,t,i,n,s){super(e,e,n,s),this.submenuActions=t,this.parentData=i,this.submenuOptions=n,this.mysubmenu=null,this.submenuDisposables=this._register(new F),this.mouseOver=!1,this.expandDirection=n&&n.expandDirection!==void 0?n.expandDirection:{horizontal:a6.Right,vertical:Gte.Below},this.showScheduler=new at(()=>{this.mouseOver&&(this.cleanupExistingSubmenu(!1),this.createSubmenu(!1))},250),this.hideScheduler=new at(()=>{this.element&&!mn(Ui(),this.element)&&this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))},750)}render(e){super.render(e),this.element&&(this.item&&(this.item.classList.add("monaco-submenu-item"),this.item.tabIndex=0,this.item.setAttribute("aria-haspopup","true"),this.updateAriaExpanded("false"),this.submenuIndicator=X(this.item,j("span.submenu-indicator"+Ee.asCSSSelector($.menuSubmenu))),this.submenuIndicator.setAttribute("aria-hidden","true")),this._register(B(this.element,ee.KEY_UP,t=>{let i=new Mt(t);(i.equals(17)||i.equals(3))&&(vt.stop(t,!0),this.createSubmenu(!0))})),this._register(B(this.element,ee.KEY_DOWN,t=>{let i=new Mt(t);Ui()===this.item&&(i.equals(17)||i.equals(3))&&vt.stop(t,!0)})),this._register(B(this.element,ee.MOUSE_OVER,t=>{this.mouseOver||(this.mouseOver=!0,this.showScheduler.schedule())})),this._register(B(this.element,ee.MOUSE_LEAVE,t=>{this.mouseOver=!1})),this._register(B(this.element,ee.FOCUS_OUT,t=>{this.element&&!mn(Ui(),this.element)&&this.hideScheduler.schedule()})),this._register(this.parentData.parent.onScroll(()=>{this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))})))}updateEnabled(){}onClick(e){vt.stop(e,!0),this.cleanupExistingSubmenu(!1),this.createSubmenu(!0)}cleanupExistingSubmenu(e){if(this.parentData.submenu&&(e||this.parentData.submenu!==this.mysubmenu)){try{this.parentData.submenu.dispose()}catch{}this.parentData.submenu=void 0,this.updateAriaExpanded("false"),this.submenuContainer&&(this.submenuDisposables.clear(),this.submenuContainer=void 0)}}calculateSubmenuMenuLayout(e,t,i,n){let s={top:0,left:0};return s.left=py(e.width,t.width,{position:n.horizontal===a6.Right?0:1,offset:i.left,size:i.width}).position,s.left>=i.left&&s.left{new Mt(d).equals(15)&&(vt.stop(d,!0),this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0))})),this.submenuDisposables.add(B(this.submenuContainer,ee.KEY_DOWN,d=>{new Mt(d).equals(15)&&vt.stop(d,!0)})),this.submenuDisposables.add(this.parentData.submenu.onDidCancel(()=>{this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0)})),this.parentData.submenu.focus(e),this.mysubmenu=this.parentData.submenu}}updateAriaExpanded(e){this.item&&this.item?.setAttribute("aria-expanded",e)}applyStyle(){super.applyStyle();let t=this.element&&this.element.classList.contains("focused")&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor;this.submenuIndicator&&(this.submenuIndicator.style.color=t??"")}dispose(){super.dispose(),this.hideScheduler.dispose(),this.mysubmenu&&(this.mysubmenu.dispose(),this.mysubmenu=null),this.submenuContainer&&(this.submenuContainer=void 0)}},d6=class extends sh{constructor(e,t,i,n){super(e,t,i),this.menuStyles=n}render(e){super.render(e),this.label&&(this.label.style.borderBottomColor=this.menuStyles.separatorColor?`${this.menuStyles.separatorColor}`:"")}}});var h6,yke=x(()=>{re();Ya();Cke();ys();Ae();W();kc();h6=class{constructor(e,t,i,n){this.contextViewService=e,this.telemetryService=t,this.notificationService=i,this.keybindingService=n,this.focusToReturn=null,this.lastContainer=null,this.block=null,this.blockDisposable=null,this.options={blockMouse:!0}}configure(e){this.options=e}showContextMenu(e){let t=e.getActions();if(!t.length)return;this.focusToReturn=Ui();let i,n=xt(e.domForShadowRoot)?e.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:()=>e.getAnchor(),canRelayout:!1,anchorAlignment:e.anchorAlignment,anchorAxisAlignment:e.anchorAxisAlignment,layer:e.layer,render:s=>{this.lastContainer=s;let r=e.getMenuClassName?e.getMenuClassName():"";r&&(s.className+=" "+r),this.options.blockMouse&&(this.block=s.appendChild(j(".context-view-block")),this.block.style.position="fixed",this.block.style.cursor="initial",this.block.style.left="0",this.block.style.top="0",this.block.style.width="100%",this.block.style.height="100%",this.block.style.zIndex="-1",this.blockDisposable?.dispose(),this.blockDisposable=B(this.block,ee.MOUSE_DOWN,d=>d.stopPropagation()));let a=new F,l=e.actionRunner||a.add(new hc);l.onWillRun(d=>this.onActionRun(d,!e.skipTelemetry),this,a),l.onDidRun(this.onDidActionRun,this,a),i=new JD(s,t,{actionViewItemProvider:e.getActionViewItem,context:e.getActionsContext?e.getActionsContext():null,actionRunner:l,getKeyBinding:e.getKeyBinding?e.getKeyBinding:d=>this.keybindingService.lookupKeybinding(d.id)},lke),i.onDidCancel(()=>this.contextViewService.hideContextView(!0),null,a),i.onDidBlur(()=>this.contextViewService.hideContextView(!0),null,a);let c=we(s);return a.add(B(c,ee.BLUR,()=>this.contextViewService.hideContextView(!0))),a.add(B(c,ee.MOUSE_DOWN,d=>{if(d.defaultPrevented)return;let h=new so(c,d),u=h.target;if(!h.rightButton){for(;u;){if(u===s)return;u=u.parentElement}this.contextViewService.hideContextView(!0)}})),sa(a,i)},focus:()=>{i?.focus(!!e.autoSelectFirstItem)},onHide:s=>{e.onHide?.(!!s),this.block&&(this.block.remove(),this.block=null),this.blockDisposable?.dispose(),this.blockDisposable=null,this.lastContainer&&(Ui()===this.lastContainer||mn(Ui(),this.lastContainer))&&this.focusToReturn?.focus(),this.lastContainer=null}},n,!!n)}onActionRun(e,t){t&&this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1)}onDidActionRun(e){e.error&&!Io(e.error)&&this.notificationService.error(e.error)}}});var W6e,ak,u6,Yte,Ske=x(()=>{re();ys();ae();W();Ap();yi();je();Oi();Hs();Dl();yke();Kr();W6e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},ak=function(o,e){return function(t,i){e(t,i,o)}},u6=class extends T{get contextMenuHandler(){return this._contextMenuHandler||(this._contextMenuHandler=new h6(this.contextViewService,this.telemetryService,this.notificationService,this.keybindingService)),this._contextMenuHandler}constructor(e,t,i,n,s,r){super(),this.telemetryService=e,this.notificationService=t,this.contextViewService=i,this.keybindingService=n,this.menuService=s,this.contextKeyService=r,this._contextMenuHandler=void 0,this._onDidShowContextMenu=this._store.add(new N),this.onDidShowContextMenu=this._onDidShowContextMenu.event,this._onDidHideContextMenu=this._store.add(new N),this.onDidHideContextMenu=this._onDidHideContextMenu.event}configure(e){this.contextMenuHandler.configure(e)}showContextMenu(e){e=Yte.transform(e,this.menuService,this.contextKeyService),this.contextMenuHandler.showContextMenu({...e,onHide:t=>{e.onHide?.(t),this._onDidHideContextMenu.fire()}}),xu.getInstance().resetKeyStatus(),this._onDidShowContextMenu.fire()}};u6=W6e([ak(0,$n),ak(1,si),ak(2,sl),ak(3,$e),ak(4,Yo),ak(5,Ce)],u6);(function(o){function e(i){return i&&i.menuId instanceof Te}function t(i,n,s){if(!e(i))return i;let{menuId:r,menuActionOptions:a,contextKeyService:l}=i;return{...i,getActions:()=>{let c=[];if(r){let d=n.getMenuActions(r,l??s,a);c=pke(d)}return i.getActions?Wi.join(i.getActions(),c):c}}}o.transform=t})(Yte||(Yte={}))});var H6e,V6e,Zte,f6,xke=x(()=>{OD();W();Cg();re();H6e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},V6e=function(o,e){return function(t,i){e(t,i,o)}},Zte=class extends T{constructor(e){super(),this.layoutService=e,this.contextView=this._register(new P0(this.layoutService.mainContainer,1)),this.layout(),this._register(e.onDidLayoutContainer(()=>this.layout()))}showContextView(e,t,i){let n;t?t===this.layoutService.getContainer(we(t))?n=1:i?n=3:n=2:n=1,this.contextView.setContainer(t??this.layoutService.activeContainer,n),this.contextView.show(e);let s={close:()=>{this.openContextView===s&&this.hideContextView()}};return this.openContextView=s,s}layout(){this.contextView.layout()}hideContextView(e){this.contextView.hide(e),this.openContextView=void 0}};Zte=H6e([V6e(0,Ca)],Zte);f6=class extends Zte{getContextViewElement(){return this.contextView.getViewElement()}}});var lk,g6,m6=x(()=>{Ie();lk=Ne("dataChannelService"),g6=class{getDataChannel(e){return{sendData:()=>{}}}}});var p6,Xte=x(()=>{Ie();p6=Ne("defaultAccountService")});var Qte,eN,kke=x(()=>{Qte=class{constructor(e,t){this.key=e,this.data=t,this.incoming=new Map,this.outgoing=new Map}},eN=class{constructor(e){this._hashFn=e,this._nodes=new Map}roots(){let e=[];for(let t of this._nodes.values())t.outgoing.size===0&&e.push(t);return e}insertEdge(e,t){let i=this.lookupOrInsertNode(e),n=this.lookupOrInsertNode(t);i.outgoing.set(n.key,n),n.incoming.set(i.key,i)}removeNode(e){let t=this._hashFn(e);this._nodes.delete(t);for(let i of this._nodes.values())i.outgoing.delete(t),i.incoming.delete(t)}lookupOrInsertNode(e){let t=this._hashFn(e),i=this._nodes.get(t);return i||(i=new Qte(t,e),this._nodes.set(t,i)),i}isEmpty(){return this._nodes.size===0}toString(){let e=[];for(let[t,i]of this._nodes)e.push(`${t} + (-> incoming)[${[...i.incoming.keys()].join(", ")}] + (outgoing ->)[${[...i.outgoing.keys()].join(",")}] +`);return e.join(` +`)}findCycleSlow(){for(let[e,t]of this._nodes){let i=new Set([e]),n=this._findCycle(t,i);if(n)return n}}_findCycle(e,t){for(let[i,n]of e.outgoing){if(t.has(i))return[...t,i].join(" -> ");t.add(i);let s=this._findCycle(n,t);if(s)return s;t.delete(i)}}}});var z6e,_6,b6,tN,Lke=x(()=>{Ze();Ae();W();xP();kke();Ie();ny();tc();z6e=!1,_6=class extends Error{constructor(e){super("cyclic dependency between services"),this.message=e.findCycleSlow()??`UNABLE to detect cycle, dumping graph: +${e.toString()}`}},b6=class o{constructor(e=new ed,t=!1,i,n=z6e){this._services=e,this._strict=t,this._parent=i,this._enableTracing=n,this._isDisposed=!1,this._servicesToMaybeDispose=new Set,this._children=new Set,this._activeInstantiations=new Set,this._services.set(ie,this),this._globalGraph=n?i?._globalGraph??new eN(s=>s):void 0}dispose(){if(!this._isDisposed){this._isDisposed=!0,Ct(this._children),this._children.clear();for(let e of this._servicesToMaybeDispose)Oc(e)&&e.dispose();this._servicesToMaybeDispose.clear()}}_throwIfDisposed(){if(this._isDisposed)throw new Error("InstantiationService has been disposed")}createChild(e,t){this._throwIfDisposed();let i=this,n=new class extends o{dispose(){i._children.delete(n),super.dispose()}}(e,this._strict,this,this._enableTracing);return this._children.add(n),t?.add(n),n}invokeFunction(e,...t){this._throwIfDisposed();let i=tN.traceInvocation(this._enableTracing,e),n=!1;try{return e({get:r=>{if(n)throw tx("service accessor is only valid during the invocation of its target method");let a=this._getOrCreateServiceInstance(r,i);return a||this._throwIfStrict(`[invokeFunction] unknown service '${r}'`,!1),a}},...t)}finally{n=!0,i.stop()}}createInstance(e,...t){this._throwIfDisposed();let i,n;return e instanceof uc?(i=tN.traceCreation(this._enableTracing,e.ctor),n=this._createInstance(e.ctor,e.staticArguments.concat(t),i)):(i=tN.traceCreation(this._enableTracing,e),n=this._createInstance(e,t,i)),i.stop(),n}_createInstance(e,t=[],i){let n=Dh.getServiceDependencies(e).sort((a,l)=>a.index-l.index),s=[];for(let a of n){let l=this._getOrCreateServiceInstance(a.id,i);l||this._throwIfStrict(`[createInstance] ${e.name} depends on UNKNOWN service ${a.id}.`,!1),s.push(l)}let r=n.length>0?n[0].index:t.length;if(t.length!==r){console.trace(`[createInstance] First service dependency of ${e.name} at position ${r+1} conflicts with ${t.length} static arguments`);let a=r-t.length;a>0?t=t.concat(new Array(a)):t=t.slice(0,r)}return Reflect.construct(e,t.concat(s))}_setCreatedServiceInstance(e,t){if(this._services.get(e)instanceof uc)this._services.set(e,t);else if(this._parent)this._parent._setCreatedServiceInstance(e,t);else throw new Error("illegalState - setting UNKNOWN service instance")}_getServiceInstanceOrDescriptor(e){let t=this._services.get(e);return!t&&this._parent?this._parent._getServiceInstanceOrDescriptor(e):t}_getOrCreateServiceInstance(e,t){this._globalGraph&&this._globalGraphImplicitDependency&&this._globalGraph.insertEdge(this._globalGraphImplicitDependency,String(e));let i=this._getServiceInstanceOrDescriptor(e);return i instanceof uc?this._safeCreateAndCacheServiceInstance(e,i,t.branch(e,!0)):(t.branch(e,!1),i)}_safeCreateAndCacheServiceInstance(e,t,i){if(this._activeInstantiations.has(e))throw new Error(`illegal state - RECURSIVELY instantiating service '${e}'`);this._activeInstantiations.add(e);try{return this._createAndCacheServiceInstance(e,t,i)}finally{this._activeInstantiations.delete(e)}}_createAndCacheServiceInstance(e,t,i){let n=new eN(l=>l.id.toString()),s=0,r=[{id:e,desc:t,_trace:i}],a=new Set;for(;r.length;){let l=r.pop();if(!a.has(String(l.id))){if(a.add(String(l.id)),n.lookupOrInsertNode(l),s++>1e3)throw new _6(n);for(let c of Dh.getServiceDependencies(l.desc.ctor)){let d=this._getServiceInstanceOrDescriptor(c.id);if(d||this._throwIfStrict(`[createInstance] ${e} depends on ${c.id} which is NOT registered.`,!0),this._globalGraph?.insertEdge(String(l.id),String(c.id)),d instanceof uc){let h={id:c.id,desc:d,_trace:l._trace.branch(c.id,!0)};n.insertEdge(l,h),r.push(h)}}}}for(;;){let l=n.roots();if(l.length===0){if(!n.isEmpty())throw new _6(n);break}for(let{data:c}of l){if(this._getServiceInstanceOrDescriptor(c.id)instanceof uc){let h=this._createServiceInstanceWithOwner(c.id,c.desc.ctor,c.desc.staticArguments,c.desc.supportsDelayedInstantiation,c._trace);this._setCreatedServiceInstance(c.id,h)}n.removeNode(c)}}return this._getServiceInstanceOrDescriptor(e)}_createServiceInstanceWithOwner(e,t,i=[],n,s){if(this._services.get(e)instanceof uc)return this._createServiceInstance(e,t,i,n,s,this._servicesToMaybeDispose);if(this._parent)return this._parent._createServiceInstanceWithOwner(e,t,i,n,s);throw new Error(`illegalState - creating UNKNOWN service instance ${t.name}`)}_createServiceInstance(e,t,i=[],n,s,r){if(n){let a=new o(void 0,this._strict,this,this._enableTracing);a._globalGraphImplicitDependency=String(e);let l=new Map,c=new vO(()=>{let d=a._createInstance(t,i,s);for(let[h,u]of l){let f=d[h];if(typeof f=="function")for(let g of u)g.disposable=f.apply(d,g.listener)}return l.clear(),r.add(d),d});return new Proxy(Object.create(null),{get(d,h){if(!c.isInitialized&&typeof h=="string"&&(h.startsWith("onDid")||h.startsWith("onWill"))){let g=l.get(h);return g||(g=new In,l.set(h,g)),(_,b,v)=>{if(c.isInitialized)return c.value[h](_,b,v);{let w={listener:[_,b,v],disposable:void 0},C=g.push(w);return ne(()=>{C(),w.disposable?.dispose()})}}}if(h in d)return d[h];let u=c.value,f=u[h];return typeof f!="function"||(f=f.bind(u),d[h]=f),f},set(d,h,u){return c.value[h]=u,!0},getPrototypeOf(d){return t.prototype}})}else{let a=this._createInstance(t,i,s);return r.add(a),a}}_throwIfStrict(e,t){if(t&&console.warn(e),this._strict)throw new Error(e)}},tN=class o{static{this.all=new Set}static{this._None=new class extends o{constructor(){super(0,null)}stop(){}branch(){return this}}}static traceInvocation(e,t){return e?new o(2,t.name||new Error().stack.split(` +`).slice(3,4).join(` +`)):o._None}static traceCreation(e,t){return e?new o(1,t.name):o._None}static{this._totals=0}constructor(e,t){this.type=e,this.name=t,this._start=Date.now(),this._dep=[]}branch(e,t){let i=new o(3,e.toString());return this._dep.push([e,t,i]),i}stop(){let e=Date.now()-this._start;o._totals+=e;let t=!1;function i(s,r){let a=[],l=new Array(s+1).join(" ");for(let[c,d,h]of r._dep)if(d&&h){t=!0,a.push(`${l}CREATES -> ${c}`);let u=i(s+1,h);u&&a.push(u)}else a.push(`${l}uses -> ${c}`);return a.join(` +`)}let n=[`${this.type===1?"CREATE":"CALL"} ${this.name}`,`${i(1,this)}`,`DONE, took ${e.toFixed(2)}ms (grand total ${o._totals.toFixed(2)}ms)`];(e>2||t)&&o.all.add(n.join(` +`))}}});function $6e(o,e,t){return{kind:2,commandId:o,commandArgs:e,isBubble:t}}function Ike(o){return o?`${o.serialize()}`:"no when condition"}function Eke(o){return o.extensionId?o.isBuiltinExtension?`built-in extension ${o.extensionId}`:`user extension ${o.extensionId}`:o.isDefault?"built-in":"user"}var iN,U6e,v6,Jte=x(()=>{je();iN={kind:0},U6e={kind:1};v6=class o{constructor(e,t,i){this._log=i,this._defaultKeybindings=e,this._defaultBoundCommands=new Map;for(let n of e){let s=n.command;s&&s.charAt(0)!=="-"&&this._defaultBoundCommands.set(s,!0)}this._map=new Map,this._lookupMap=new Map,this._keybindings=o.handleRemovals([].concat(e).concat(t));for(let n=0,s=this._keybindings.length;n"u"){this._map.set(e,[t]),this._addToLookupMap(t);return}for(let n=i.length-1;n>=0;n--){let s=i[n];if(s.command===t.command)continue;let r=!0;for(let a=1;a"u"?(t=[e],this._lookupMap.set(e.command,t)):t.push(e)}_removeFromLookupMap(e){if(!e.command)return;let t=this._lookupMap.get(e.command);if(!(typeof t>"u")){for(let i=0,n=t.length;i"u"||n.length===0)return null;if(n.length===1&&!i)return n[0];for(let s=n.length-1;s>=0;s--){let r=n[s];if(t.contextMatchesRules(r.when))return r}return i?null:n[n.length-1]}resolve(e,t,i){let n=[...t,i];this._log(`| Resolving ${n}`);let s=this._map.get(n[0]);if(s===void 0)return this._log("\\ No keybinding entries."),iN;let r=null;if(n.length<2)r=s;else{r=[];for(let l=0,c=s.length;ld.chords.length)continue;let h=!0;for(let u=1;u=0;i--){let n=t[i];if(o._contextMatchesRules(e,n.when))return n}return null}static _contextMatchesRules(e,t){return t?t.evaluate(e):!0}}});var q6e,w6,ck,Tke=x(()=>{Ze();Ae();ae();G1();W();le();Jte();q6e=/^(cursor|delete|undo|redo|tab|editor\.action\.clipboard)/,w6=class extends T{get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:Q.None}get inChordMode(){return this._currentChords.length>0}constructor(e,t,i,n,s){super(),this._contextKeyService=e,this._commandService=t,this._telemetryService=i,this._notificationService=n,this._logService=s,this._onDidUpdateKeybindings=this._register(new N),this._currentChords=[],this._currentChordChecker=new A_,this._currentChordStatusMessage=null,this._ignoreSingleModifiers=ck.EMPTY,this._currentSingleModifier=null,this._currentSingleModifierClearTimeout=new ro,this._currentlyDispatchingCommandId=null,this._logging=!1}_log(e){this._logging&&this._logService.info(`[KeybindingService]: ${e}`)}getKeybindings(){return this._getResolver().getKeybindings()}lookupKeybinding(e,t,i=!1){let n=this._getResolver().lookupPrimaryKeybinding(e,t||this._contextKeyService,i);if(n)return n.resolvedKeybinding}dispatchEvent(e,t){return this._dispatch(e,t)}softDispatch(e,t){this._log("/ Soft dispatching keyboard event");let i=this.resolveKeyboardEvent(e);if(i.hasMultipleChords())return console.warn("keyboard event should not be mapped to multiple chords"),iN;let[n]=i.getDispatchChords();if(n===null)return this._log("\\ Keyboard event cannot be dispatched"),iN;let s=this._contextKeyService.getContext(t),r=this._currentChords.map((({keypress:a})=>a));return this._getResolver().resolve(s,r,n)}_scheduleLeaveChordMode(){let e=Date.now();this._currentChordChecker.cancelAndSet(()=>{if(!this._documentHasFocus()){this._leaveChordMode();return}Date.now()-e>5e3&&this._leaveChordMode()},500)}_expectAnotherChord(e,t){switch(this._currentChords.push({keypress:e,label:t}),this._currentChords.length){case 0:throw tx("impossible");case 1:this._currentChordStatusMessage=this._notificationService.status(m(1763,"({0}) was pressed. Waiting for second key of chord...",t));break;default:{let i=this._currentChords.map(({label:n})=>n).join(", ");this._currentChordStatusMessage=this._notificationService.status(m(1764,"({0}) was pressed. Waiting for next key of chord...",i))}}this._scheduleLeaveChordMode(),bc.enabled&&bc.disable()}_leaveChordMode(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.close(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChords=[],bc.enable()}_dispatch(e,t){return this._doDispatch(this.resolveKeyboardEvent(e),t,!1)}_singleModifierDispatch(e,t){let i=this.resolveKeyboardEvent(e),[n]=i.getSingleModifierDispatchChords();if(n)return this._ignoreSingleModifiers.has(n)?(this._log(`+ Ignoring single modifier ${n} due to it being pressed together with other keys.`),this._ignoreSingleModifiers=ck.EMPTY,this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1):(this._ignoreSingleModifiers=ck.EMPTY,this._currentSingleModifier===null?(this._log(`+ Storing single modifier for possible chord ${n}.`),this._currentSingleModifier=n,this._currentSingleModifierClearTimeout.cancelAndSet(()=>{this._log("+ Clearing single modifier due to 300ms elapsed."),this._currentSingleModifier=null},300),!1):n===this._currentSingleModifier?(this._log(`/ Dispatching single modifier chord ${n} ${n}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,this._doDispatch(i,t,!0)):(this._log(`+ Clearing single modifier due to modifier mismatch: ${this._currentSingleModifier} ${n}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1));let[s]=i.getChords();return this._ignoreSingleModifiers=new ck(s),this._currentSingleModifier!==null&&this._log("+ Clearing single modifier due to other key up."),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1}_doDispatch(e,t,i=!1){let n=!1;if(e.hasMultipleChords())return console.warn("Unexpected keyboard event mapped to multiple chords"),!1;let s=null,r=null;if(i){let[d]=e.getSingleModifierDispatchChords();s=d,r=d?[d]:[]}else[s]=e.getDispatchChords(),r=this._currentChords.map(({keypress:d})=>d);if(s===null)return this._log("\\ Keyboard event cannot be dispatched in keydown phase."),n;let a=this._contextKeyService.getContext(t),l=e.getLabel(),c=this._getResolver().resolve(a,r,s);switch(c.kind){case 0:{if(this._logService.trace("KeybindingService#dispatch",l,"[ No matching keybinding ]"),this.inChordMode){let d=this._currentChords.map(({label:h})=>h).join(", ");this._log(`+ Leaving multi-chord mode: Nothing bound to "${d}, ${l}".`),this._notificationService.status(m(1765,"The key combination ({0}, {1}) is not a command.",d,l),{hideAfter:10*1e3}),this._leaveChordMode(),n=!0}return n}case 1:return this._logService.trace("KeybindingService#dispatch",l,"[ Several keybindings match - more chords needed ]"),n=!0,this._expectAnotherChord(s,l),this._log(this._currentChords.length===1?"+ Entering multi-chord mode...":"+ Continuing multi-chord mode..."),n;case 2:{if(this._logService.trace("KeybindingService#dispatch",l,`[ Will dispatch command ${c.commandId} ]`),c.commandId===null||c.commandId===""){if(this.inChordMode){let d=this._currentChords.map(({label:h})=>h).join(", ");this._log(`+ Leaving chord mode: Nothing bound to "${d}, ${l}".`),this._notificationService.status(m(1766,"The key combination ({0}, {1}) is not a command.",d,l),{hideAfter:10*1e3}),this._leaveChordMode(),n=!0}}else{this.inChordMode&&this._leaveChordMode(),c.isBubble||(n=!0),this._log(`+ Invoking command ${c.commandId}.`),this._currentlyDispatchingCommandId=c.commandId;try{typeof c.commandArgs>"u"?this._commandService.executeCommand(c.commandId).then(void 0,d=>this._notificationService.warn(d)):this._commandService.executeCommand(c.commandId,c.commandArgs).then(void 0,d=>this._notificationService.warn(d))}finally{this._currentlyDispatchingCommandId=null}q6e.test(c.commandId)||this._telemetryService.publicLog2("workbenchActionExecuted",{id:c.commandId,from:"keybinding",detail:e.getUserSettingsLabel()??void 0})}return n}}}mightProducePrintableCharacter(e){return e.ctrlKey||e.metaKey?!1:e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30}appendKeybinding(e,t,i,n){if(t){let s=this.lookupKeybinding(t,i,n)?.getLabel();if(s)return m(1767,"{0} ({1})",e,s)}return e}},ck=class o{static{this.EMPTY=new o(null)}constructor(e){this._ctrlKey=e?e.ctrlKey:!1,this._shiftKey=e?e.shiftKey:!1,this._altKey=e?e.altKey:!1,this._metaKey=e?e.metaKey:!1}has(e){switch(e){case"ctrl":return this._ctrlKey;case"shift":return this._shiftKey;case"alt":return this._altKey;case"meta":return this._metaKey}}}});function C6(o){let e=[];for(let t=0,i=o.length;t{nN=class{constructor(e,t,i,n,s,r,a){this._resolvedKeybindingItemBrand=void 0,this.resolvedKeybinding=e,this.chords=e?C6(e.getDispatchChords()):[],e&&this.chords.length===0&&(this.chords=C6(e.getSingleModifierDispatchChords())),this.bubble=t?t.charCodeAt(0)===94:!1,this.command=this.bubble?t.substr(1):t,this.commandArgs=i,this.when=n,this.isDefault=s,this.extensionId=r,this.isBuiltinExtension=a}}});var y6,Dke=x(()=>{Ae();e6();vx();y6=class extends mO{constructor(e,t){if(super(),t.length===0)throw Xs("chords");this._os=e,this._chords=t}getLabel(){return ek.toLabel(this._os,this._chords,e=>this._getLabel(e))}getAriaLabel(){return J0e.toLabel(this._os,this._chords,e=>this._getAriaLabel(e))}getElectronAccelerator(){return this._chords.length>1||this._chords[0].isDuplicateModifierCase()?null:eke.toLabel(this._os,this._chords,e=>this._getElectronAccelerator(e))}getUserSettingsLabel(){return tke.toLabel(this._os,this._chords,e=>this._getUserSettingsLabel(e))}hasMultipleChords(){return this._chords.length>1}getChords(){return this._chords.map(e=>this._getChord(e))}_getChord(e){return new gO(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,this._getLabel(e),this._getAriaLabel(e))}getDispatchChords(){return this._chords.map(e=>this._getChordDispatch(e))}getSingleModifierDispatchChords(){return this._chords.map(e=>this._getSingleModifierChordDispatch(e))}}});var oN,Nke=x(()=>{Ta();vx();Dke();eie();oN=class o extends y6{constructor(e,t){super(t,e)}_keyCodeToUILabel(e){if(this._os===2)switch(e){case 15:return"\u2190";case 16:return"\u2191";case 17:return"\u2192";case 18:return"\u2193"}return Ch.toString(e)}_getLabel(e){return e.isDuplicateModifierCase()?"":this._keyCodeToUILabel(e.keyCode)}_getAriaLabel(e){return e.isDuplicateModifierCase()?"":Ch.toString(e.keyCode)}_getElectronAccelerator(e){return Ch.toElectronAccelerator(e.keyCode)}_getUserSettingsLabel(e){if(e.isDuplicateModifierCase())return"";let t=Ch.toUserSettingsUS(e.keyCode);return t&&t.toLowerCase()}_getChordDispatch(e){return o.getDispatchStr(e)}static getDispatchStr(e){if(e.isModifierKey())return null;let t="";return e.ctrlKey&&(t+="ctrl+"),e.shiftKey&&(t+="shift+"),e.altKey&&(t+="alt+"),e.metaKey&&(t+="meta+"),t+=Ch.toString(e.keyCode),t}_getSingleModifierChordDispatch(e){return e.keyCode===5&&!e.shiftKey&&!e.altKey&&!e.metaKey?"ctrl":e.keyCode===4&&!e.ctrlKey&&!e.altKey&&!e.metaKey?"shift":e.keyCode===6&&!e.ctrlKey&&!e.shiftKey&&!e.metaKey?"alt":e.keyCode===57&&!e.ctrlKey&&!e.shiftKey&&!e.altKey?"meta":null}static _scanCodeToKeyCode(e){let t=GM[e];if(t!==-1)return t;switch(e){case 10:return 31;case 11:return 32;case 12:return 33;case 13:return 34;case 14:return 35;case 15:return 36;case 16:return 37;case 17:return 38;case 18:return 39;case 19:return 40;case 20:return 41;case 21:return 42;case 22:return 43;case 23:return 44;case 24:return 45;case 25:return 46;case 26:return 47;case 27:return 48;case 28:return 49;case 29:return 50;case 30:return 51;case 31:return 52;case 32:return 53;case 33:return 54;case 34:return 55;case 35:return 56;case 36:return 22;case 37:return 23;case 38:return 24;case 39:return 25;case 40:return 26;case 41:return 27;case 42:return 28;case 43:return 29;case 44:return 30;case 45:return 21;case 51:return 88;case 52:return 86;case 53:return 92;case 54:return 94;case 55:return 93;case 56:return 0;case 57:return 85;case 58:return 95;case 59:return 91;case 60:return 87;case 61:return 89;case 62:return 90;case 106:return 97}return 0}static _toKeyCodeChord(e){if(!e)return null;if(e instanceof Cf)return e;let t=this._scanCodeToKeyCode(e.scanCode);return t===0?null:new Cf(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,t)}static resolveKeybinding(e,t){let i=C6(e.chords.map(n=>this._toKeyCodeChord(n)));return i.length>0?[new o(i,t)]:[]}}});var Zh,dk=x(()=>{Ie();Zh=Ne("labelService")});function j6e(o,e){return{...e,accessibilityProvider:e.accessibilityProvider&&new iie(o,e.accessibilityProvider)}}var tie,iie,S6,Rke=x(()=>{qe();Vt();ae();W();bte();Rp();tie=class{get templateId(){return this.renderer.templateId}constructor(e,t){this.renderer=e,this.modelProvider=t}renderTemplate(e){return{data:this.renderer.renderTemplate(e),disposable:T.None}}renderElement(e,t,i,n){if(i.disposable?.dispose(),!i.data)return;let s=this.modelProvider();if(s.isResolved(e))return this.renderer.renderElement(s.get(e),e,i.data,n);let r=new Lt,a=s.resolve(e,r.token);i.disposable={dispose:()=>r.cancel()},this.renderer.renderPlaceholder(e,i.data),a.then(l=>this.renderer.renderElement(l,e,i.data,n))}disposeTemplate(e){e.disposable&&(e.disposable.dispose(),e.disposable=void 0),e.data&&(this.renderer.disposeTemplate(e.data),e.data=void 0)}},iie=class{constructor(e,t){this.modelProvider=e,this.accessibilityProvider=t}getWidgetAriaLabel(){return this.accessibilityProvider.getWidgetAriaLabel()}getAriaLabel(e){let t=this.modelProvider();return t.isResolved(e)?this.accessibilityProvider.getAriaLabel(t.get(e)):null}};S6=class{constructor(e,t,i,n,s={}){this.modelDisposables=new F;let r=()=>this.model,a=n.map(l=>new tie(l,r));this.list=new Ts(e,t,i,a,j6e(r,s))}updateOptions(e){this.list.updateOptions(e)}getHTMLElement(){return this.list.getHTMLElement()}get onDidFocus(){return this.list.onDidFocus}get widget(){return this.list}get onDidDispose(){return this.list.onDidDispose}get onMouseDblClick(){return Q.map(this.list.onMouseDblClick,({element:e,index:t,browserEvent:i})=>({element:e===void 0?void 0:this._model.get(e),index:t,browserEvent:i}))}get onPointer(){return Q.map(this.list.onPointer,({element:e,index:t,browserEvent:i})=>({element:e===void 0?void 0:this._model.get(e),index:t,browserEvent:i}))}get onDidChangeSelection(){return Q.map(this.list.onDidChangeSelection,({elements:e,indexes:t,browserEvent:i})=>({elements:e.map(n=>this._model.get(n)),indexes:t,browserEvent:i}))}get model(){return this._model}set model(e){this.modelDisposables.clear(),this._model=e,this.list.splice(0,this.list.length,mr(e.length)),this.modelDisposables.add(e.onDidIncrementLength(t=>this.list.splice(this.list.length,0,mr(this.list.length,t))))}getFocus(){return this.list.getFocus()}getSelection(){return this.list.getSelection()}getSelectedElements(){return this.getSelection().map(e=>this.model.get(e))}style(e){this.list.style(e)}dispose(){this.list.dispose(),this.modelDisposables.dispose()}}});var Ake=x(()=>{});var uk,K6e,sN,G6e,Y6e,Z6e,X6e,rN,aN,hk,Mke,ql,fk=x(()=>{re();qd();Yf();Bl();Ze();np();ae();W();rt();Ake();uk=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},K6e=!1;(function(o){o.North="north",o.South="south",o.East="east",o.West="west"})(sN||(sN={}));G6e=4,Y6e=new N,Z6e=300,X6e=new N,rN=class{constructor(e){this.el=e,this.disposables=new F}get onPointerMove(){return this.disposables.add(new Xt(we(this.el),"mousemove")).event}get onPointerUp(){return this.disposables.add(new Xt(we(this.el),"mouseup")).event}dispose(){this.disposables.dispose()}};uk([_n],rN.prototype,"onPointerMove",null);uk([_n],rN.prototype,"onPointerUp",null);aN=class{get onPointerMove(){return this.disposables.add(new Xt(this.el,vi.Change)).event}get onPointerUp(){return this.disposables.add(new Xt(this.el,vi.End)).event}constructor(e){this.el=e,this.disposables=new F}dispose(){this.disposables.dispose()}};uk([_n],aN.prototype,"onPointerMove",null);uk([_n],aN.prototype,"onPointerUp",null);hk=class{get onPointerMove(){return this.factory.onPointerMove}get onPointerUp(){return this.factory.onPointerUp}constructor(e){this.factory=e}dispose(){}};uk([_n],hk.prototype,"onPointerMove",null);uk([_n],hk.prototype,"onPointerUp",null);Mke="pointer-events-disabled",ql=class o extends T{get state(){return this._state}get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}set state(e){this._state!==e&&(this.el.classList.toggle("disabled",e===0),this.el.classList.toggle("minimum",e===1),this.el.classList.toggle("maximum",e===2),this._state=e,this.onDidEnablementChange.fire(e))}get onDidStart(){return this._onDidStart.event}get onDidChange(){return this._onDidChange.event}get onDidReset(){return this._onDidReset.event}get onDidEnd(){return this._onDidEnd.event}set orthogonalStartSash(e){if(this._orthogonalStartSash!==e){if(this.orthogonalStartDragHandleDisposables.clear(),this.orthogonalStartSashDisposables.clear(),e){let t=i=>{this.orthogonalStartDragHandleDisposables.clear(),i!==0&&(this._orthogonalStartDragHandle=X(this.el,j(".orthogonal-drag-handle.start")),this.orthogonalStartDragHandleDisposables.add(ne(()=>this._orthogonalStartDragHandle.remove())),this.orthogonalStartDragHandleDisposables.add(B(this._orthogonalStartDragHandle,"mouseenter",()=>o.onMouseEnter(e))),this.orthogonalStartDragHandleDisposables.add(B(this._orthogonalStartDragHandle,"mouseleave",()=>o.onMouseLeave(e))))};this.orthogonalStartSashDisposables.add(e.onDidEnablementChange.event(t,this)),t(e.state)}this._orthogonalStartSash=e}}set orthogonalEndSash(e){if(this._orthogonalEndSash!==e){if(this.orthogonalEndDragHandleDisposables.clear(),this.orthogonalEndSashDisposables.clear(),e){let t=i=>{this.orthogonalEndDragHandleDisposables.clear(),i!==0&&(this._orthogonalEndDragHandle=X(this.el,j(".orthogonal-drag-handle.end")),this.orthogonalEndDragHandleDisposables.add(ne(()=>this._orthogonalEndDragHandle.remove())),this.orthogonalEndDragHandleDisposables.add(B(this._orthogonalEndDragHandle,"mouseenter",()=>o.onMouseEnter(e))),this.orthogonalEndDragHandleDisposables.add(B(this._orthogonalEndDragHandle,"mouseleave",()=>o.onMouseLeave(e))))};this.orthogonalEndSashDisposables.add(e.onDidEnablementChange.event(t,this)),t(e.state)}this._orthogonalEndSash=e}}constructor(e,t,i){super(),this.hoverDelay=Z6e,this.hoverDelayer=this._register(new qo(this.hoverDelay)),this._state=3,this.onDidEnablementChange=this._register(new N),this._onDidStart=this._register(new N),this._onDidChange=this._register(new N),this._onDidReset=this._register(new N),this._onDidEnd=this._register(new N),this.orthogonalStartSashDisposables=this._register(new F),this.orthogonalStartDragHandleDisposables=this._register(new F),this.orthogonalEndSashDisposables=this._register(new F),this.orthogonalEndDragHandleDisposables=this._register(new F),this.linkedSash=void 0,this.el=X(e,j(".monaco-sash")),i.orthogonalEdge&&this.el.classList.add(`orthogonal-edge-${i.orthogonalEdge}`),Ye&&this.el.classList.add("mac"),this._register(B(this.el,"mousedown",s=>this.onPointerStart(s,new rN(e)))),this._register(B(this.el,"dblclick",s=>this.onPointerDoublePress(s))),this._register(B(this.el,"mouseenter",()=>o.onMouseEnter(this))),this._register(B(this.el,"mouseleave",()=>o.onMouseLeave(this))),this._register(jn.addTarget(this.el)),this._register(B(this.el,vi.Start,s=>this.onPointerStart(s,new aN(this.el))));let n;this._register(B(this.el,vi.Tap,s=>{if(n){clearTimeout(n),n=void 0,this.onPointerDoublePress(s);return}clearTimeout(n),n=setTimeout(()=>n=void 0,250)})),typeof i.size=="number"?(this.size=i.size,i.orientation===0?this.el.style.width=`${this.size}px`:this.el.style.height=`${this.size}px`):(this.size=G6e,this._register(Y6e.event(s=>{this.size=s,this.layout()}))),this._register(X6e.event(s=>this.hoverDelay=s)),this.layoutProvider=t,this.orthogonalStartSash=i.orthogonalStartSash,this.orthogonalEndSash=i.orthogonalEndSash,this.orientation=i.orientation||0,this.orientation===1?(this.el.classList.add("horizontal"),this.el.classList.remove("vertical")):(this.el.classList.remove("horizontal"),this.el.classList.add("vertical")),this.el.classList.toggle("debug",K6e),this.layout()}onPointerStart(e,t){vt.stop(e);let i=!1;if(!e.__orthogonalSashEvent){let g=this.getOrthogonalSash(e);g&&(i=!0,e.__orthogonalSashEvent=!0,g.onPointerStart(e,new hk(t)))}if(this.linkedSash&&!e.__linkedSashEvent&&(e.__linkedSashEvent=!0,this.linkedSash.onPointerStart(e,new hk(t))),!this.state)return;let n=this.el.ownerDocument.getElementsByTagName("iframe");for(let g of n)g.classList.add(Mke);let s=e.pageX,r=e.pageY,a=e.altKey,l={startX:s,currentX:s,startY:r,currentY:r,altKey:a};this.el.classList.add("active"),this._onDidStart.fire(l);let c=or(this.el),d=()=>{let g="";i?g="all-scroll":this.orientation===1?this.state===1?g="s-resize":this.state===2?g="n-resize":g=Ye?"row-resize":"ns-resize":this.state===1?g="e-resize":this.state===2?g="w-resize":g=Ye?"col-resize":"ew-resize",c.textContent=`* { cursor: ${g} !important; }`},h=new F;d(),i||this.onDidEnablementChange.event(d,null,h);let u=g=>{vt.stop(g,!1);let p={startX:s,currentX:g.pageX,startY:r,currentY:g.pageY,altKey:a};this._onDidChange.fire(p)},f=g=>{vt.stop(g,!1),c.remove(),this.el.classList.remove("active"),this._onDidEnd.fire(),h.dispose();for(let p of n)p.classList.remove(Mke)};t.onPointerMove(u,null,h),t.onPointerUp(f,null,h),h.add(t)}onPointerDoublePress(e){let t=this.getOrthogonalSash(e);t&&t._onDidReset.fire(),this.linkedSash&&this.linkedSash._onDidReset.fire(),this._onDidReset.fire()}static onMouseEnter(e,t=!1){e.el.classList.contains("active")?(e.hoverDelayer.cancel(),e.el.classList.add("hover")):e.hoverDelayer.trigger(()=>e.el.classList.add("hover"),e.hoverDelay).then(void 0,()=>{}),!t&&e.linkedSash&&o.onMouseEnter(e.linkedSash,!0)}static onMouseLeave(e,t=!1){e.hoverDelayer.cancel(),e.el.classList.remove("hover"),!t&&e.linkedSash&&o.onMouseLeave(e.linkedSash,!0)}clearSashHoverState(){o.onMouseLeave(this)}layout(){if(this.orientation===0){let e=this.layoutProvider;this.el.style.left=e.getVerticalSashLeft(this)-this.size/2+"px",e.getVerticalSashTop&&(this.el.style.top=e.getVerticalSashTop(this)+"px"),e.getVerticalSashHeight&&(this.el.style.height=e.getVerticalSashHeight(this)+"px")}else{let e=this.layoutProvider;this.el.style.top=e.getHorizontalSashTop(this)-this.size/2+"px",e.getHorizontalSashLeft&&(this.el.style.left=e.getHorizontalSashLeft(this)+"px"),e.getHorizontalSashWidth&&(this.el.style.width=e.getHorizontalSashWidth(this)+"px")}}getOrthogonalSash(e){let t=e.initialTarget??e.target;if(!(!t||!xt(t))&&t.classList.contains("orthogonal-drag-handle"))return t.classList.contains("start")?this.orthogonalStartSash:this.orthogonalEndSash}dispose(){super.dispose(),this.el.remove()}}});var Oke=x(()=>{});var Q6e,x6,nie,oie,Mp,lN,gk,sie=x(()=>{re();Yf();fk();Gc();qe();Yi();ae();W();nv();C1();Rt();Oke();Q6e={separatorBorder:K.transparent},x6=class{set size(e){this._size=e}get size(){return this._size}get visible(){return typeof this._cachedVisibleSize>"u"}setVisible(e,t){if(e!==this.visible){e?(this.size=ts(this._cachedVisibleSize,this.viewMinimumSize,this.viewMaximumSize),this._cachedVisibleSize=void 0):(this._cachedVisibleSize=typeof t=="number"?t:this.size,this.size=0),this.container.classList.toggle("visible",e);try{this.view.setVisible?.(e)}catch(i){console.error("Splitview: Failed to set visible view"),console.error(i)}}}get minimumSize(){return this.visible?this.view.minimumSize:0}get viewMinimumSize(){return this.view.minimumSize}get maximumSize(){return this.visible?this.view.maximumSize:0}get viewMaximumSize(){return this.view.maximumSize}get priority(){return this.view.priority}get proportionalLayout(){return this.view.proportionalLayout??!0}get snap(){return!!this.view.snap}set enabled(e){this.container.style.pointerEvents=e?"":"none"}constructor(e,t,i,n){this.container=e,this.view=t,this.disposable=n,this._cachedVisibleSize=void 0,typeof i=="number"?(this._size=i,this._cachedVisibleSize=void 0,e.classList.add("visible")):(this._size=0,this._cachedVisibleSize=i.cachedVisibleSize)}layout(e,t){this.layoutContainer(e);try{this.view.layout(this.size,e,t)}catch(i){console.error("Splitview: Failed to layout view"),console.error(i)}}dispose(){this.disposable.dispose()}},nie=class extends x6{layoutContainer(e){this.container.style.top=`${e}px`,this.container.style.height=`${this.size}px`}},oie=class extends x6{layoutContainer(e){this.container.style.left=`${e}px`,this.container.style.width=`${this.size}px`}};(function(o){o[o.Idle=0]="Idle",o[o.Busy=1]="Busy"})(Mp||(Mp={}));(function(o){o.Distribute={type:"distribute"};function e(n){return{type:"split",index:n}}o.Split=e;function t(n){return{type:"auto",index:n}}o.Auto=t;function i(n){return{type:"invisible",cachedVisibleSize:n}}o.Invisible=i})(lN||(lN={}));gk=class extends T{get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}get startSnappingEnabled(){return this._startSnappingEnabled}get endSnappingEnabled(){return this._endSnappingEnabled}set orthogonalStartSash(e){for(let t of this.sashItems)t.sash.orthogonalStartSash=e;this._orthogonalStartSash=e}set orthogonalEndSash(e){for(let t of this.sashItems)t.sash.orthogonalEndSash=e;this._orthogonalEndSash=e}set startSnappingEnabled(e){this._startSnappingEnabled!==e&&(this._startSnappingEnabled=e,this.updateSashEnablement())}set endSnappingEnabled(e){this._endSnappingEnabled!==e&&(this._endSnappingEnabled=e,this.updateSashEnablement())}constructor(e,t={}){super(),this.size=0,this._contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.state=Mp.Idle,this._onDidSashChange=this._register(new N),this._onDidSashReset=this._register(new N),this._startSnappingEnabled=!0,this._endSnappingEnabled=!0,this.onDidSashChange=this._onDidSashChange.event,this.onDidSashReset=this._onDidSashReset.event,this.orientation=t.orientation??0,this.inverseAltBehavior=t.inverseAltBehavior??!1,this.proportionalLayout=t.proportionalLayout??!0,this.getSashOrthogonalSize=t.getSashOrthogonalSize,this.el=document.createElement("div"),this.el.classList.add("monaco-split-view2"),this.el.classList.add(this.orientation===0?"vertical":"horizontal"),e.appendChild(this.el),this.sashContainer=X(this.el,j(".sash-container")),this.viewContainer=j(".split-view-container"),this.scrollable=this._register(new Yd({forceIntegerValues:!0,smoothScrollDuration:125,scheduleAtNextAnimationFrame:n=>ws(we(this.el),n)})),this.scrollableElement=this._register(new Gf(this.viewContainer,{vertical:this.orientation===0?t.scrollbarVisibility??1:2,horizontal:this.orientation===1?t.scrollbarVisibility??1:2},this.scrollable));let i=this._register(new Xt(this.viewContainer,"scroll")).event;this._register(i(n=>{let s=this.scrollableElement.getScrollPosition(),r=Math.abs(this.viewContainer.scrollLeft-s.scrollLeft)<=1?void 0:this.viewContainer.scrollLeft,a=Math.abs(this.viewContainer.scrollTop-s.scrollTop)<=1?void 0:this.viewContainer.scrollTop;(r!==void 0||a!==void 0)&&this.scrollableElement.setScrollPosition({scrollLeft:r,scrollTop:a})})),this.onDidScroll=this.scrollableElement.onScroll,this._register(this.onDidScroll(n=>{n.scrollTopChanged&&(this.viewContainer.scrollTop=n.scrollTop),n.scrollLeftChanged&&(this.viewContainer.scrollLeft=n.scrollLeft)})),X(this.el,this.scrollableElement.getDomNode()),this.style(t.styles||Q6e),t.descriptor&&(this.size=t.descriptor.size,t.descriptor.views.forEach((n,s)=>{let r=ns(n.visible)||n.visible?n.size:{type:"invisible",cachedVisibleSize:n.size},a=n.view;this.doAddView(a,r,s,!0)}),this._contentSize=this.viewItems.reduce((n,s)=>n+s.size,0),this.saveProportions())}style(e){e.separatorBorder.isTransparent()?(this.el.classList.remove("separator-border"),this.el.style.removeProperty("--separator-border")):(this.el.classList.add("separator-border"),this.el.style.setProperty("--separator-border",e.separatorBorder.toString()))}addView(e,t,i=this.viewItems.length,n){this.doAddView(e,t,i,n)}layout(e,t){let i=Math.max(this.size,this._contentSize);if(this.size=e,this.layoutContext=t,this.proportions){let n=0;for(let s=0;s0&&(r.size=ts(Math.round(a*e/n),r.minimumSize,r.maximumSize))}}else{let n=mr(this.viewItems.length),s=n.filter(a=>this.viewItems[a].priority===1),r=n.filter(a=>this.viewItems[a].priority===2);this.resize(this.viewItems.length-1,e-i,void 0,s,r)}this.distributeEmptySpace(),this.layoutViews()}saveProportions(){this.proportionalLayout&&this._contentSize>0&&(this.proportions=this.viewItems.map(e=>e.proportionalLayout&&e.visible?e.size/this._contentSize:void 0))}onSashStart({sash:e,start:t,alt:i}){for(let a of this.viewItems)a.enabled=!1;let n=this.sashItems.findIndex(a=>a.sash===e),s=sa(B(this.el.ownerDocument.body,"keydown",a=>r(this.sashDragState.current,a.altKey)),B(this.el.ownerDocument.body,"keyup",()=>r(this.sashDragState.current,!1))),r=(a,l)=>{let c=this.viewItems.map(g=>g.size),d=Number.NEGATIVE_INFINITY,h=Number.POSITIVE_INFINITY;if(this.inverseAltBehavior&&(l=!l),l)if(n===this.sashItems.length-1){let p=this.viewItems[n];d=(p.minimumSize-p.size)/2,h=(p.maximumSize-p.size)/2}else{let p=this.viewItems[n+1];d=(p.size-p.maximumSize)/2,h=(p.size-p.minimumSize)/2}let u,f;if(!l){let g=mr(n,-1),p=mr(n+1,this.viewItems.length),_=g.reduce((E,D)=>E+(this.viewItems[D].minimumSize-c[D]),0),b=g.reduce((E,D)=>E+(this.viewItems[D].viewMaximumSize-c[D]),0),v=p.length===0?Number.POSITIVE_INFINITY:p.reduce((E,D)=>E+(c[D]-this.viewItems[D].minimumSize),0),w=p.length===0?Number.NEGATIVE_INFINITY:p.reduce((E,D)=>E+(c[D]-this.viewItems[D].viewMaximumSize),0),C=Math.max(_,w),y=Math.min(v,b),k=this.findFirstSnapIndex(g),I=this.findFirstSnapIndex(p);if(typeof k=="number"){let E=this.viewItems[k],D=Math.floor(E.viewMinimumSize/2);u={index:k,limitDelta:E.visible?C-D:C+D,size:E.size}}if(typeof I=="number"){let E=this.viewItems[I],D=Math.floor(E.viewMinimumSize/2);f={index:I,limitDelta:E.visible?y+D:y-D,size:E.size}}}this.sashDragState={start:a,current:a,index:n,sizes:c,minDelta:d,maxDelta:h,alt:l,snapBefore:u,snapAfter:f,disposable:s}};r(t,i)}onSashChange({current:e}){let{index:t,start:i,sizes:n,alt:s,minDelta:r,maxDelta:a,snapBefore:l,snapAfter:c}=this.sashDragState;this.sashDragState.current=e;let d=e-i,h=this.resize(t,d,n,void 0,void 0,r,a,l,c);if(s){let u=t===this.sashItems.length-1,f=this.viewItems.map(w=>w.size),g=u?t:t+1,p=this.viewItems[g],_=p.size-p.maximumSize,b=p.size-p.minimumSize,v=u?t-1:t+1;this.resize(v,-h,f,void 0,void 0,_,b)}this.distributeEmptySpace(),this.layoutViews()}onSashEnd(e){this._onDidSashChange.fire(e),this.sashDragState.disposable.dispose(),this.saveProportions();for(let t of this.viewItems)t.enabled=!0}onViewChange(e,t){let i=this.viewItems.indexOf(e);i<0||i>=this.viewItems.length||(t=typeof t=="number"?t:e.size,t=ts(t,e.minimumSize,e.maximumSize),this.inverseAltBehavior&&i>0?(this.resize(i-1,Math.floor((e.size-t)/2)),this.distributeEmptySpace(),this.layoutViews()):(e.size=t,this.relayout([i],void 0)))}resizeView(e,t){if(!(e<0||e>=this.viewItems.length)){if(this.state!==Mp.Idle)throw new Error("Cant modify splitview");this.state=Mp.Busy;try{let i=mr(this.viewItems.length).filter(a=>a!==e),n=[...i.filter(a=>this.viewItems[a].priority===1),e],s=i.filter(a=>this.viewItems[a].priority===2),r=this.viewItems[e];t=Math.round(t),t=ts(t,r.minimumSize,Math.min(r.maximumSize,this.size)),r.size=t,this.relayout(n,s)}finally{this.state=Mp.Idle}}}distributeViewSizes(){let e=[],t=0;for(let a of this.viewItems)a.maximumSize-a.minimumSize>0&&(e.push(a),t+=a.size);let i=Math.floor(t/e.length);for(let a of e)a.size=ts(i,a.minimumSize,a.maximumSize);let n=mr(this.viewItems.length),s=n.filter(a=>this.viewItems[a].priority===1),r=n.filter(a=>this.viewItems[a].priority===2);this.relayout(s,r)}getViewSize(e){return e<0||e>=this.viewItems.length?-1:this.viewItems[e].size}doAddView(e,t,i=this.viewItems.length,n){if(this.state!==Mp.Idle)throw new Error("Cant modify splitview");this.state=Mp.Busy;try{let s=j(".split-view-view");i===this.viewItems.length?this.viewContainer.appendChild(s):this.viewContainer.insertBefore(s,this.viewContainer.children.item(i));let r=e.onDidChange(u=>this.onViewChange(d,u)),a=ne(()=>s.remove()),l=sa(r,a),c;typeof t=="number"?c=t:(t.type==="auto"&&(this.areViewsDistributed()?t={type:"distribute"}:t={type:"split",index:t.index}),t.type==="split"?c=this.getViewSize(t.index)/2:t.type==="invisible"?c={cachedVisibleSize:t.cachedVisibleSize}:c=e.minimumSize);let d=this.orientation===0?new nie(s,e,c,l):new oie(s,e,c,l);if(this.viewItems.splice(i,0,d),this.viewItems.length>1){let u={orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash},f=this.orientation===0?new ql(this.sashContainer,{getHorizontalSashTop:E=>this.getSashPosition(E),getHorizontalSashWidth:this.getSashOrthogonalSize},{...u,orientation:1}):new ql(this.sashContainer,{getVerticalSashLeft:E=>this.getSashPosition(E),getVerticalSashHeight:this.getSashOrthogonalSize},{...u,orientation:0}),g=this.orientation===0?E=>({sash:f,start:E.startY,current:E.currentY,alt:E.altKey}):E=>({sash:f,start:E.startX,current:E.currentX,alt:E.altKey}),_=Q.map(f.onDidStart,g)(this.onSashStart,this),v=Q.map(f.onDidChange,g)(this.onSashChange,this),C=Q.map(f.onDidEnd,()=>this.sashItems.findIndex(E=>E.sash===f))(this.onSashEnd,this),y=f.onDidReset(()=>{let E=this.sashItems.findIndex(z=>z.sash===f),D=mr(E,-1),O=mr(E+1,this.viewItems.length),P=this.findFirstSnapIndex(D),H=this.findFirstSnapIndex(O);typeof P=="number"&&!this.viewItems[P].visible||typeof H=="number"&&!this.viewItems[H].visible||this._onDidSashReset.fire(E)}),k=sa(_,v,C,y,f),I={sash:f,disposable:k};this.sashItems.splice(i-1,0,I)}s.appendChild(e.element);let h;typeof t!="number"&&t.type==="split"&&(h=[t.index]),n||this.relayout([i],h),!n&&typeof t!="number"&&t.type==="distribute"&&this.distributeViewSizes()}finally{this.state=Mp.Idle}}relayout(e,t){let i=this.viewItems.reduce((n,s)=>n+s.size,0);this.resize(this.viewItems.length-1,this.size-i,void 0,e,t),this.distributeEmptySpace(),this.layoutViews(),this.saveProportions()}resize(e,t,i=this.viewItems.map(d=>d.size),n,s,r=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY,l,c){if(e<0||e>=this.viewItems.length)return 0;let d=mr(e,-1),h=mr(e+1,this.viewItems.length);if(s)for(let I of s)kM(d,I),kM(h,I);if(n)for(let I of n)LI(d,I),LI(h,I);let u=d.map(I=>this.viewItems[I]),f=d.map(I=>i[I]),g=h.map(I=>this.viewItems[I]),p=h.map(I=>i[I]),_=d.reduce((I,E)=>I+(this.viewItems[E].minimumSize-i[E]),0),b=d.reduce((I,E)=>I+(this.viewItems[E].maximumSize-i[E]),0),v=h.length===0?Number.POSITIVE_INFINITY:h.reduce((I,E)=>I+(i[E]-this.viewItems[E].minimumSize),0),w=h.length===0?Number.NEGATIVE_INFINITY:h.reduce((I,E)=>I+(i[E]-this.viewItems[E].maximumSize),0),C=Math.max(_,w,r),y=Math.min(v,b,a),k=!1;if(l){let I=this.viewItems[l.index],E=t>=l.limitDelta;k=E!==I.visible,I.setVisible(E,l.size)}if(!k&&c){let I=this.viewItems[c.index],E=ta+l.size,0),i=this.size-t,n=mr(this.viewItems.length-1,-1),s=n.filter(a=>this.viewItems[a].priority===1),r=n.filter(a=>this.viewItems[a].priority===2);for(let a of r)kM(n,a);for(let a of s)LI(n,a);typeof e=="number"&&LI(n,e);for(let a=0;i!==0&&at+i.size,0);let e=0;for(let t of this.viewItems)t.layout(e,this.layoutContext),e+=t.size;this.sashItems.forEach(t=>t.sash.layout()),this.updateSashEnablement(),this.updateScrollableElement()}updateScrollableElement(){this.orientation===0?this.scrollableElement.setScrollDimensions({height:this.size,scrollHeight:this._contentSize}):this.scrollableElement.setScrollDimensions({width:this.size,scrollWidth:this._contentSize})}updateSashEnablement(){let e=!1,t=this.viewItems.map(l=>e=l.size-l.minimumSize>0||e);e=!1;let i=this.viewItems.map(l=>e=l.maximumSize-l.size>0||e),n=[...this.viewItems].reverse();e=!1;let s=n.map(l=>e=l.size-l.minimumSize>0||e).reverse();e=!1;let r=n.map(l=>e=l.maximumSize-l.size>0||e).reverse(),a=0;for(let l=0;l0||this.startSnappingEnabled)?c.state=1:v&&t[l]&&(a0)return;if(!i.visible&&i.snap)return t}}areViewsDistributed(){let e,t;for(let i of this.viewItems)if(e=e===void 0?i.size:Math.min(e,i.size),t=t===void 0?i.size:Math.max(t,i.size),t-e>2)return!1;return!0}dispose(){this.sashDragState?.disposable.dispose(),Ct(this.viewItems),this.viewItems=[],this.sashItems.forEach(e=>e.disposable.dispose()),this.sashItems=[],super.dispose()}}});var Pke=x(()=>{});function J6e(o){return{getHeight(e){return o.getHeight(e)},getTemplateId(){return k6.TemplateId}}}var k6,rie,L6,Fke=x(()=>{re();qd();rd();xc();Rp();sie();ae();W();Pke();k6=class o{static{this.TemplateId="row"}constructor(e,t,i){this.columns=e,this.getColumnSize=i,this.templateId=o.TemplateId,this.renderedTemplates=new Set;let n=new Map(t.map(s=>[s.templateId,s]));this.renderers=[];for(let s of e){let r=n.get(s.templateId);if(!r)throw new Error(`Table cell renderer for template id ${s.templateId} not found.`);this.renderers.push(r)}}renderTemplate(e){let t=X(e,j(".monaco-table-tr")),i=[],n=[];for(let r=0;rthis.disposables.add(new rie(d,h))),l={size:a.reduce((d,h)=>d+h.column.weight,0),views:a.map(d=>({size:d.column.weight,view:d}))};this.splitview=this.disposables.add(new gk(this.domNode,{orientation:1,scrollbarVisibility:2,getSashOrthogonalSize:()=>this.cachedHeight,descriptor:l})),this.splitview.el.style.height=`${i.headerRowHeight}px`,this.splitview.el.style.lineHeight=`${i.headerRowHeight}px`;let c=new k6(n,s,d=>this.splitview.getViewSize(d));this.list=this.disposables.add(new Ts(e,this.domNode,J6e(i),[c],r)),Q.any(...a.map(d=>d.onDidLayout))(([d,h])=>c.layoutColumn(d,h),null,this.disposables),this.splitview.onDidSashReset(d=>{let h=n.reduce((f,g)=>f+g.weight,0),u=n[d].weight/h*this.cachedWidth;this.splitview.resizeView(d,u)},null,this.disposables),this.styleElement=or(this.domNode),this.style(K0e)}updateOptions(e){this.list.updateOptions(e)}splice(e,t,i=[]){this.list.splice(e,t,i)}getHTMLElement(){return this.domNode}style(e){let t=[];t.push(`.monaco-table.${this.domId} > .monaco-split-view2 .monaco-sash.vertical::before { + top: ${this.virtualDelegate.headerRowHeight+1}px; + height: calc(100% - ${this.virtualDelegate.headerRowHeight}px); + }`),this.styleElement.textContent=t.join(` +`),this.list.style(e)}getSelectedElements(){return this.list.getSelectedElements()}getSelection(){return this.list.getSelection()}getFocus(){return this.list.getFocus()}dispose(){this.disposables.dispose()}}});var Bke=x(()=>{});function Ig(o){return(e,t)=>{if(e.checked!==void 0)return new aie(null,e,{...t,toggleStyles:o})}}var Wke,aie,rh,cN,Iy,mk,Eg=x(()=>{ti();ae();Rr();_g();Li();re();sv();rd();Gd();Bke();Wke={inputActiveOptionBorder:"#007ACC00",inputActiveOptionForeground:"#FFFFFF",inputActiveOptionBackground:"#0E639C50"},aie=class extends ya{constructor(e,t,i){super(e,t,i);let n=this.options.keybinding?`${this._action.label} (${this.options.keybinding})`:this._action.label;this.toggle=this._register(new rh({actionClassName:this._action.class,isChecked:!!this._action.checked,title:n,notFocusable:!0,inputActiveOptionBackground:i.toggleStyles?.inputActiveOptionBackground,inputActiveOptionBorder:i.toggleStyles?.inputActiveOptionBorder,inputActiveOptionForeground:i.toggleStyles?.inputActiveOptionForeground})),this._register(this.toggle.onChange(()=>{this._action.checked=!!this.toggle&&this.toggle.checked}))}render(e){this.element=e,this.element.appendChild(this.toggle.domNode),this.updateChecked(),this.updateEnabled()}updateEnabled(){this.toggle&&(this.isEnabled()?(this.toggle.enable(),this.element?.classList.remove("disabled")):(this.toggle.disable(),this.element?.classList.add("disabled")))}updateChecked(){this.toggle.checked=!!this._action.checked}updateLabel(){let e=this.options.keybinding?`${this._action.label} (${this.options.keybinding})`:this._action.label;this.toggle.setTitle(e)}focus(){this.toggle.domNode.tabIndex=0,this.toggle.focus()}blur(){this.toggle.domNode.tabIndex=-1,this.toggle.domNode.blur()}setFocusable(e){this.toggle.domNode.tabIndex=e?0:-1}},rh=class extends xo{get onChange(){return this._onChange.event}get onKeyDown(){return this._onKeyDown.event}constructor(e){super(),this._onChange=this._register(new N),this._onKeyDown=this._register(new N),this._opts=e,this._title=this._opts.title,this._checked=this._opts.isChecked;let t=["monaco-custom-toggle"];this._opts.icon&&(this._icon=this._opts.icon,t.push(...Ee.asClassNameArray(this._icon))),this._opts.actionClassName&&t.push(...this._opts.actionClassName.split(" ")),this._checked&&t.push("checked"),this.domNode=document.createElement("div"),this._register(ms().setupDelayedHover(this.domNode,()=>({content:!wa(this._title)&&!xt(this._title)?Qb(this._title):this._title,style:1}),this._opts.hoverLifecycleOptions)),this.domNode.classList.add(...t),this._opts.notFocusable||(this.domNode.tabIndex=0),this.domNode.setAttribute("role","checkbox"),this.domNode.setAttribute("aria-checked",String(this._checked)),this.setTitle(this._opts.title),this.applyStyles(),this.onclick(this.domNode,i=>{this.enabled&&(this.checked=!this._checked,this._onChange.fire(!1),i.preventDefault(),i.stopPropagation())}),this._register(this.ignoreGesture(this.domNode)),this.onkeydown(this.domNode,i=>{if(this.enabled){if(i.keyCode===10||i.keyCode===3){this.checked=!this._checked,this._onChange.fire(!0),i.preventDefault(),i.stopPropagation();return}this._onKeyDown.fire(i)}})}get enabled(){return this.domNode.getAttribute("aria-disabled")!=="true"}focus(){this.domNode.focus()}get checked(){return this._checked}set checked(e){this._checked=e,this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.classList.toggle("checked",this._checked),this.applyStyles()}setIcon(e){this._icon&&this.domNode.classList.remove(...Ee.asClassNameArray(this._icon)),this._icon=e,this._icon&&this.domNode.classList.add(...Ee.asClassNameArray(this._icon))}width(){return 22}applyStyles(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder||"",this.domNode.style.color=this._checked&&this._opts.inputActiveOptionForeground||"inherit",this.domNode.style.backgroundColor=this._checked&&this._opts.inputActiveOptionBackground||"")}enable(){this.domNode.setAttribute("aria-disabled",String(!1)),this.domNode.classList.remove("disabled"),this._opts.notFocusable||(this.domNode.tabIndex=0)}disable(){this.domNode.setAttribute("aria-disabled",String(!0)),this.domNode.classList.add("disabled"),this._opts.notFocusable||(this.domNode.tabIndex=-1)}setTitle(e){this._title=e;let t=typeof e=="string"?e:wa(e)?e.value:e.textContent;this.domNode.setAttribute("aria-label",I0(t))}},cN=class extends xo{static{this.CLASS_NAME="monaco-checkbox"}constructor(e,t,i){super(),this.checkbox=e,this.domNode=t,this.styles=i,this._onChange=this._register(new N),this.onChange=this._onChange.event,this.applyStyles()}get enabled(){return this.checkbox.enabled}enable(){this.checkbox.enable(),this.applyStyles(!0)}disable(){this.checkbox.disable(),this.applyStyles(!1)}setTitle(e){this.checkbox.setTitle(e)}applyStyles(e=this.enabled){this.domNode.style.color=(e?this.styles.checkboxForeground:this.styles.checkboxDisabledForeground)||"",this.domNode.style.backgroundColor=(e?this.styles.checkboxBackground:this.styles.checkboxDisabledBackground)||"",this.domNode.style.borderColor=(e?this.styles.checkboxBorder:this.styles.checkboxDisabledBackground)||"";let t=this.styles.size||18;this.domNode.style.width=this.domNode.style.height=this.domNode.style.fontSize=`${t}px`,this.domNode.style.fontSize=`${t-2}px`}},Iy=class extends cN{constructor(e,t,i){let n=new rh({title:e,isChecked:t,icon:$.check,actionClassName:cN.CLASS_NAME,hoverLifecycleOptions:i.hoverLifecycleOptions,...Wke});super(n,n.domNode,i),this._register(n),this._register(this.checkbox.onChange(s=>{this.applyStyles(),this._onChange.fire(s)}))}get checked(){return this.checkbox.checked}set checked(e){this.checkbox.checked=e,this.applyStyles()}applyStyles(e){this.checkbox.checked?this.checkbox.setIcon($.check):this.checkbox.setIcon(void 0),super.applyStyles(e)}},mk=class extends cN{constructor(e,t,i){let n;switch(t){case!0:n=$.check;break;case"mixed":n=$.dash;break;case!1:n=void 0;break}let s=new rh({title:e,isChecked:t===!0,icon:n,actionClassName:Iy.CLASS_NAME,hoverLifecycleOptions:i.hoverLifecycleOptions,...Wke});super(s,s.domNode,i),this._state=t,this._register(s),this._register(this.checkbox.onChange(r=>{this._state=this.checkbox.checked,this.applyStyles(),this._onChange.fire(r)}))}get checked(){return this._state}set checked(e){this._state!==e&&(this._state=e,this.checkbox.checked=e===!0,this.applyStyles())}applyStyles(e){switch(this._state){case!0:this.checkbox.setIcon($.check);break;case"mixed":this.checkbox.setIcon($.dash);break;case!1:this.checkbox.setIcon(void 0);break}super.applyStyles(e)}}});var e9e,t9e,i9e,pk,_k,bk,lie=x(()=>{Eg();ti();le();e9e=m(2,"Match Case"),t9e=m(3,"Match Whole Word"),i9e=m(4,"Use Regular Expression"),pk=class extends rh{constructor(e){super({icon:$.caseSensitive,title:e9e+e.appendTitle,isChecked:e.isChecked,hoverLifecycleOptions:e.hoverLifecycleOptions,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}},_k=class extends rh{constructor(e){super({icon:$.wholeWord,title:t9e+e.appendTitle,isChecked:e.isChecked,hoverLifecycleOptions:e.hoverLifecycleOptions,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}},bk=class extends rh{constructor(e){super({icon:$.regex,title:i9e+e.appendTitle,isChecked:e.isChecked,hoverLifecycleOptions:e.hoverLifecycleOptions,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}});function Hke(o,e,t){let i=t??document.createElement("div");return i.textContent=o,i}function Vke(o,e,t){let i=t??document.createElement("div");return i.textContent="",zke(i,n9e(o),e?.actionHandler,e?.renderCodeSegments),i}function zke(o,e,t,i){let n;if(e.type===2)n=document.createTextNode(e.content||"");else if(e.type===3)n=document.createElement("b");else if(e.type===4)n=document.createElement("i");else if(e.type===7&&i)n=document.createElement("code");else if(e.type===5&&t){let s=document.createElement("a");t.disposables.add(_i(s,"click",r=>{t.callback(String(e.index),r)})),n=s}else e.type===8?n=document.createElement("br"):e.type===1&&(n=o);n&&o!==n&&o.appendChild(n),n&&Array.isArray(e.children)&&e.children.forEach(s=>{zke(n,s,t,i)})}function n9e(o,e){let t={type:1,children:[]},i=0,n=t,s=[],r=new cie(o);for(;!r.eos();){let a=r.next(),l=a==="\\"&&die(r.peek())!==0;if(l&&(a=r.next()),!l&&o9e(a)&&a===r.peek()){r.advance(),n.type===2&&(n=s.pop());let c=die(a);if(n.type===c||n.type===5&&c===6)n=s.pop();else{let d={type:c,children:[]};c===5&&(d.index=i,i++),n.children.push(d),s.push(n),n=d}}else if(a===` +`)n.type===2&&(n=s.pop()),n.children.push({type:8});else if(n.type!==2){let c={type:2,content:a};n.children.push(c),s.push(n),n=c}else n.content+=a}return n.type===2&&(n=s.pop()),t}function o9e(o,e){return die(o)!==0}function die(o,e){switch(o){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return 0;default:return 0}}var cie,Uke=x(()=>{re();cie=class{constructor(e){this.source=e,this.index=0}eos(){return this.index>=this.source.length}next(){let e=this.peek();return this.advance(),e}peek(){return this.source[this.index]}advance(){this.index++}}});var I6,$ke=x(()=>{I6=class{constructor(e,t=0,i=e.length,n=t-1){this.items=e,this.start=t,this.end=i,this.index=n}current(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]}next(){return this.index=Math.min(this.index+1,this.end),this.current()}previous(){return this.index=Math.max(this.index-1,this.start-1),this.current()}first(){return this.index=this.start,this.current()}last(){return this.index=this.end-1,this.current()}}});var E6,qke=x(()=>{$ke();E6=class{constructor(e=new Set,t=10){this._history=e,this._limit=t,this._onChange(),this._history.onDidChange&&(this._disposable=this._history.onDidChange(()=>this._onChange()))}getHistory(){return this._elements}add(e){this._history.delete(e),this._history.add(e),this._onChange()}next(){return this._navigator.next()}previous(){return this._currentPosition()!==0?this._navigator.previous():null}current(){return this._navigator.current()}first(){return this._navigator.first()}last(){return this._navigator.last()}isLast(){return this._currentPosition()>=this._elements.length-1}isNowhere(){return this._navigator.current()===null}has(e){return this._history.has(e)}_onChange(){this._reduceToLimit();let e=this._elements;this._navigator=new I6(e,0,e.length,e.length)}_reduceToLimit(){let e=this._elements;if(e.length>this._limit){let t=e.slice(e.length-this._limit);this._history.replace?this._history.replace(t):this._history=new Set(t)}}_currentPosition(){let e=this._navigator.current();return e?this._elements.indexOf(e):-1}get _elements(){let e=[];return this._history.forEach(t=>e.push(t)),e}dispose(){this._disposable&&(this._disposable.dispose(),this._disposable=void 0)}}});var hie=x(()=>{});var vk,uie,wk,fie=x(()=>{re();ju();Yf();Uke();Yh();hs();rd();Gc();Gd();ae();qke();$a();hie();le();W();vk=j,uie=class extends xo{get onDidChange(){return this._onDidChange.event}get onDidHeightChange(){return this._onDidHeightChange.event}constructor(e,t,i){super(),this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this.hover=this._register(new Qe),this._onDidChange=this._register(new N),this._onDidHeightChange=this._register(new N),this.contextViewProvider=t,this.options=i,this.message=null,this.placeholder=this.options.placeholder||"",this.tooltip=this.options.tooltip??(this.placeholder||""),this.ariaLabel=this.options.ariaLabel||"",this.options.validationOptions&&(this.validation=this.options.validationOptions.validation),this.element=X(e,vk(".monaco-inputbox.idle"));let n=this.options.flexibleHeight?"textarea":"input",s=X(this.element,vk(".ibwrapper"));if(this.input=X(s,vk(n+".input.empty")),this.input.setAttribute("autocorrect","off"),this.input.setAttribute("autocapitalize","off"),this.input.setAttribute("spellcheck","false"),this.onfocus(this.input,()=>this.element.classList.add("synthetic-focus")),this.onblur(this.input,()=>this.element.classList.remove("synthetic-focus")),this.options.flexibleHeight){this.maxHeight=typeof this.options.flexibleMaxHeight=="number"?this.options.flexibleMaxHeight:Number.POSITIVE_INFINITY,this.mirror=X(s,vk("div.mirror")),this.mirror.innerText="\xA0",this.scrollableElement=new y1(this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),X(e,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll(l=>this.input.scrollTop=l.scrollTop));let r=this._register(new Xt(e.ownerDocument,"selectionchange")),a=Q.filter(r.event,()=>e.ownerDocument.getSelection()?.anchorNode===s);this._register(a(this.updateScrollDimensions,this)),this._register(this.onDidHeightChange(this.updateScrollDimensions,this))}else this.input.type=this.options.type||"text",this.input.setAttribute("wrap","off");this.ariaLabel&&this.input.setAttribute("aria-label",this.ariaLabel),this.placeholder&&!this.options.showPlaceholderOnFocus&&this.setPlaceHolder(this.placeholder),this.tooltip&&this.setTooltip(this.tooltip),this.oninput(this.input,()=>this.onValueChange()),this.onblur(this.input,()=>this.onBlur()),this.onfocus(this.input,()=>this.onFocus()),this._register(this.ignoreGesture(this.input)),setTimeout(()=>this.updateMirror(),0),this.options.actions&&(this.actionbar=this._register(new Vo(this.element,{actionViewItemProvider:this.options.actionViewItemProvider})),this.actionbar.push(this.options.actions,{icon:!0,label:!1})),this.applyStyles()}setActions(e,t){this.actionbar?(this.actionbar.clear(),e&&this.actionbar.push(e,{icon:!0,label:!1})):e&&(this.actionbar=this._register(new Vo(this.element,{actionViewItemProvider:t??this.options.actionViewItemProvider})),this.actionbar.push(e,{icon:!0,label:!1}))}get actionsWidth(){return this.actionbar?.getContainer().offsetWidth??0}onBlur(){this._hideMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder","")}onFocus(){this._showMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder",this.placeholder||"")}setPlaceHolder(e){this.placeholder=e,this.input.setAttribute("placeholder",e)}setTooltip(e){this.tooltip=e,this.hover.value||(this.hover.value=this._register(ms().setupDelayedHoverAtMouse(this.input,()=>({content:this.tooltip,appearance:{compact:!0}}))))}setAriaLabel(e){this.ariaLabel=e,e?this.input.setAttribute("aria-label",this.ariaLabel):this.input.removeAttribute("aria-label")}get inputElement(){return this.input}get value(){return this.input.value}set value(e){this.input.value!==e&&(this.input.value=e,this.onValueChange())}get height(){return typeof this.cachedHeight=="number"?this.cachedHeight:Bd(this.element)}focus(){this.input.focus()}blur(){this.input.blur()}hasFocus(){return Bc(this.input)}select(e=null){this.input.select(),e&&(this.input.setSelectionRange(e.start,e.end),e.end===this.input.value.length&&(this.input.scrollLeft=this.input.scrollWidth))}isSelectionAtEnd(){return this.input.selectionEnd===this.input.value.length&&this.input.selectionStart===this.input.selectionEnd}getSelection(){let e=this.input.selectionStart;if(e===null)return null;let t=this.input.selectionEnd??e;return{start:e,end:t}}enable(){this.input.removeAttribute("disabled")}disable(){this.blur(),this.input.disabled=!0,this._hideMessage()}set paddingRight(e){this.input.style.width=`calc(100% - ${e}px)`,this.mirror&&(this.mirror.style.paddingRight=e+"px")}updateScrollDimensions(){if(typeof this.cachedContentHeight!="number"||typeof this.cachedHeight!="number"||!this.scrollableElement)return;let e=this.cachedContentHeight,t=this.cachedHeight,i=this.input.scrollTop;this.scrollableElement.setScrollDimensions({scrollHeight:e,height:t}),this.scrollableElement.setScrollPosition({scrollTop:i})}showMessage(e,t){if(this.state==="open"&&os(this.message,e))return;this.message=e,this.element.classList.remove("idle"),this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add(this.classForType(e.type));let i=this.stylesForType(this.message.type);this.element.style.border=`1px solid ${nh(i.border,"transparent")}`,this.message.content&&(this.hasFocus()||t)&&this._showMessage()}hideMessage(){this.message=null,this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add("idle"),this._hideMessage(),this.applyStyles()}validate(){let e=null;return this.validation&&(e=this.validation(this.value),e?(this.inputElement.setAttribute("aria-invalid","true"),this.showMessage(e)):this.inputElement.hasAttribute("aria-invalid")&&(this.inputElement.removeAttribute("aria-invalid"),this.hideMessage())),e?.type}stylesForType(e){let t=this.options.inputBoxStyles;switch(e){case 1:return{border:t.inputValidationInfoBorder,background:t.inputValidationInfoBackground,foreground:t.inputValidationInfoForeground};case 2:return{border:t.inputValidationWarningBorder,background:t.inputValidationWarningBackground,foreground:t.inputValidationWarningForeground};default:return{border:t.inputValidationErrorBorder,background:t.inputValidationErrorBackground,foreground:t.inputValidationErrorForeground}}}classForType(e){switch(e){case 1:return"info";case 2:return"warning";default:return"error"}}_showMessage(){if(!this.contextViewProvider||!this.message)return;let e,t=()=>e.style.width=yr(this.element)+"px";this.contextViewProvider.showContextView({getAnchor:()=>this.element,anchorAlignment:1,render:n=>{if(!this.message)return null;e=X(n,vk(".monaco-inputbox-container")),t();let s=vk("span.monaco-inputbox-message");this.message.formatContent?Vke(this.message.content,void 0,s):Hke(this.message.content,void 0,s),s.classList.add(this.classForType(this.message.type));let r=this.stylesForType(this.message.type);return s.style.backgroundColor=r.background??"",s.style.color=r.foreground??"",s.style.border=r.border?`1px solid ${r.border}`:"",X(e,s),null},onHide:()=>{this.state="closed"},layout:t});let i;this.message.type===3?i=m(9,"Error: {0}",this.message.content):this.message.type===2?i=m(10,"Warning: {0}",this.message.content):i=m(11,"Info: {0}",this.message.content),qn(i),this.state="open"}_hideMessage(){this.contextViewProvider&&(this.state==="open"&&this.contextViewProvider.hideContextView(),this.state="idle")}layoutMessage(){this.state==="open"&&this.contextViewProvider&&this.contextViewProvider.layout()}onValueChange(){this._onDidChange.fire(this.value),this.validate(),this.updateMirror(),this.input.classList.toggle("empty",!this.value),this.state==="open"&&this.contextViewProvider&&this.contextViewProvider.layout(),this.options.hideHoverOnValueChange&&ms().hideHover()}updateMirror(){if(!this.mirror)return;let e=this.value,i=e.charCodeAt(e.length-1)===10?" ":"";(e+i).replace(/\u000c/g,"")?this.mirror.textContent=e+i:this.mirror.innerText="\xA0",this.layout()}applyStyles(){let e=this.options.inputBoxStyles,t=e.inputBackground??"",i=e.inputForeground??"",n=e.inputBorder??"";this.element.style.backgroundColor=t,this.element.style.color=i,this.input.style.backgroundColor="inherit",this.input.style.color=i,this.element.style.border=`1px solid ${nh(n,"transparent")}`}layout(){if(!this.mirror){this.layoutMessage();return}let e=this.cachedContentHeight;this.cachedContentHeight=Bd(this.mirror),e!==this.cachedContentHeight&&(this.cachedHeight=Math.min(this.cachedContentHeight,this.maxHeight),this.input.style.height=this.cachedHeight+"px",this._onDidHeightChange.fire(this.cachedContentHeight)),this.layoutMessage()}insertAtCursor(e){let t=this.inputElement,i=t.selectionStart,n=t.selectionEnd,s=t.value;i!==null&&n!==null&&(this.value=s.substr(0,i)+e+s.substr(n),t.setSelectionRange(i+1,i+1),this.layout())}dispose(){this._hideMessage(),this.message=null,this.actionbar?.dispose(),super.dispose()}},wk=class extends uie{constructor(e,t,i){let n=m(12," or {0} for history","\u21C5"),s=m(13," ({0} for history)","\u21C5");super(e,t,i),this._onDidFocus=this._register(new N),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new N),this.onDidBlur=this._onDidBlur.event,this.history=this._register(new E6(i.history,100));let r=()=>{if(i.showHistoryHint&&i.showHistoryHint()&&!this.placeholder.endsWith(n)&&!this.placeholder.endsWith(s)&&this.history.getHistory().length){let a=this.placeholder.endsWith(")")?n:s,l=this.placeholder+a;i.showPlaceholderOnFocus&&!Bc(this.input)?this.placeholder=l:this.setPlaceHolder(l)}};this.observer=new MutationObserver((a,l)=>{a.forEach(c=>{c.target.textContent||r()})}),this.observer.observe(this.input,{attributeFilter:["class"]}),this.onfocus(this.input,()=>r()),this.onblur(this.input,()=>{let a=l=>{if(this.placeholder.endsWith(l)){let c=this.placeholder.slice(0,this.placeholder.length-l.length);return i.showPlaceholderOnFocus?this.placeholder=c:this.setPlaceHolder(c),!0}else return!1};a(s)||a(n)})}dispose(){super.dispose(),this.observer&&(this.observer.disconnect(),this.observer=void 0)}addToHistory(e){this.value&&(e||this.value!==this.getCurrentValue())&&this.history.add(this.value)}isAtLastInHistory(){return this.history.isLast()}isNowhereInHistory(){return this.history.isNowhere()}showNextValue(){this.history.has(this.value)||this.addToHistory();let e=this.getNextValue();e&&(e=e===this.value?this.getNextValue():e),this.value=e??"",nr(this.value?this.value:m(14,"Cleared Input"))}showPreviousValue(){this.history.has(this.value)||this.addToHistory();let e=this.getPreviousValue();e&&(e=e===this.value?this.getPreviousValue():e),e&&(this.value=e,nr(this.value))}setPlaceHolder(e){super.setPlaceHolder(e),this.setTooltip(e)}onBlur(){super.onBlur(),this._onDidBlur.fire()}onFocus(){super.onFocus(),this._onDidFocus.fire()}getCurrentValue(){let e=this.history.current();return e||(e=this.history.last(),this.history.next()),e}getPreviousValue(){return this.history.previous()||this.history.first()}getNextValue(){return this.history.next()}}});var gie=x(()=>{});var s9e,Ck,T6=x(()=>{re();lie();fie();Gd();ae();gie();le();W();s9e=m(1,"input"),Ck=class extends xo{get onDidOptionChange(){return this._onDidOptionChange.event}get onKeyDown(){return this._onKeyDown.event}get onMouseDown(){return this._onMouseDown.event}get onCaseSensitiveKeyDown(){return this._onCaseSensitiveKeyDown.event}get onRegexKeyDown(){return this._onRegexKeyDown.event}constructor(e,t,i){super(),this.fixFocusOnOptionClickEnabled=!0,this.imeSessionInProgress=!1,this.additionalTogglesDisposables=this._register(new Qe),this.additionalToggles=[],this._onDidOptionChange=this._register(new N),this._onKeyDown=this._register(new N),this._onMouseDown=this._register(new N),this._onInput=this._register(new N),this._onKeyUp=this._register(new N),this._onCaseSensitiveKeyDown=this._register(new N),this._onRegexKeyDown=this._register(new N),this._lastHighlightFindOptions=0,this.placeholder=i.placeholder||"",this.validation=i.validation,this.label=i.label||s9e,this.showCommonFindToggles=!!i.showCommonFindToggles;let n=i.appendCaseSensitiveLabel||"",s=i.appendWholeWordsLabel||"",r=i.appendRegexLabel||"",a=!!i.flexibleHeight,l=!!i.flexibleWidth,c=i.flexibleMaxHeight;if(this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new wk(this.domNode,t,{placeholder:this.placeholder||"",ariaLabel:this.label||"",validationOptions:{validation:this.validation},showHistoryHint:i.showHistoryHint,flexibleHeight:a,flexibleWidth:l,flexibleMaxHeight:c,inputBoxStyles:i.inputBoxStyles,history:i.history,actions:i.actions,actionViewItemProvider:i.actionViewItemProvider,hideHoverOnValueChange:i.hideHoverOnValueChange})),this.showCommonFindToggles){let d=i?.hoverLifecycleOptions||{groupId:"find-input"};this.regex=this._register(new bk({appendTitle:r,isChecked:!1,hoverLifecycleOptions:d,...i.toggleStyles})),this._register(this.regex.onChange(h=>{this._onDidOptionChange.fire(h),!h&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.regex.onKeyDown(h=>{this._onRegexKeyDown.fire(h)})),this.wholeWords=this._register(new _k({appendTitle:s,isChecked:!1,hoverLifecycleOptions:d,...i.toggleStyles})),this._register(this.wholeWords.onChange(h=>{this._onDidOptionChange.fire(h),!h&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this.caseSensitive=this._register(new pk({appendTitle:n,isChecked:!1,hoverLifecycleOptions:d,...i.toggleStyles})),this._register(this.caseSensitive.onChange(h=>{this._onDidOptionChange.fire(h),!h&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.caseSensitive.onKeyDown(h=>{this._onCaseSensitiveKeyDown.fire(h)})),this.onkeydown(this.domNode,h=>{if(h.equals(15)||h.equals(17)||h.equals(9)){let u=this.getToggleDomNodes(),f=u.indexOf(this.domNode.ownerDocument.activeElement);if(f>=0){let g=-1;h.equals(17)?g=(f+1)%u.length:h.equals(15)&&(f===0?g=u.length-1:g=f-1),h.equals(9)?(u[f].blur(),this.inputBox.focus()):g>=0&&u[g].focus(),vt.stop(h,!0)}}})}this.controls=document.createElement("div"),this.controls.className="controls",this.controls.style.display=this.showCommonFindToggles?"":"none",this.caseSensitive&&this.controls.append(this.caseSensitive.domNode),this.wholeWords&&this.controls.appendChild(this.wholeWords.domNode),this.regex&&this.controls.appendChild(this.regex.domNode),this.setAdditionalToggles(i?.additionalToggles),this.controls&&this.domNode.appendChild(this.controls),e?.appendChild(this.domNode),this._register(B(this.inputBox.inputElement,"compositionstart",d=>{this.imeSessionInProgress=!0})),this._register(B(this.inputBox.inputElement,"compositionend",d=>{this.imeSessionInProgress=!1,this._onInput.fire()})),this.onkeydown(this.inputBox.inputElement,d=>this._onKeyDown.fire(d)),this.onkeyup(this.inputBox.inputElement,d=>this._onKeyUp.fire(d)),this.oninput(this.inputBox.inputElement,d=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,d=>this._onMouseDown.fire(d))}get onDidChange(){return this.inputBox.onDidChange}layout(e){this.inputBox.layout(),this.updateInputBoxPadding(e.collapsedFindWidget)}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.regex?.enable(),this.wholeWords?.enable(),this.caseSensitive?.enable();for(let e of this.additionalToggles)e.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.regex?.disable(),this.wholeWords?.disable(),this.caseSensitive?.disable();for(let e of this.additionalToggles)e.disable()}setFocusInputOnOptionClick(e){this.fixFocusOnOptionClickEnabled=e}setEnabled(e){e?this.enable():this.disable()}setAdditionalToggles(e){for(let t of this.additionalToggles)t.domNode.remove();this.additionalToggles=[],this.additionalTogglesDisposables.value=new F;for(let t of e??[])this.additionalTogglesDisposables.value.add(t),this.controls.appendChild(t.domNode),this.additionalTogglesDisposables.value.add(t.onChange(i=>{this._onDidOptionChange.fire(i),!i&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus()})),this.additionalToggles.push(t);this.additionalToggles.length>0&&(this.controls.style.display=""),this.updateInputBoxPadding()}getToggleDomNodes(){let e=[];this.caseSensitive&&e.push(this.caseSensitive.domNode),this.wholeWords&&e.push(this.wholeWords.domNode),this.regex&&e.push(this.regex.domNode);for(let t of this.additionalToggles)e.push(t.domNode);return e}setActions(e,t){this.inputBox.setActions(e,t),this.updateInputBoxPadding()}updateInputBoxPadding(e=!1){let t=e?0:(this.caseSensitive?.width()??0)+(this.wholeWords?.width()??0)+(this.regex?.width()??0)+this.additionalToggles.reduce((i,n)=>i+n.width(),0);this.inputBox.paddingRight=t+this.inputBox.actionsWidth}getValue(){return this.inputBox.value}setValue(e){this.inputBox.value!==e&&(this.inputBox.value=e)}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getCaseSensitive(){return this.caseSensitive?.checked??!1}setCaseSensitive(e){this.caseSensitive&&(this.caseSensitive.checked=e)}getWholeWords(){return this.wholeWords?.checked??!1}setWholeWords(e){this.wholeWords&&(this.wholeWords.checked=e)}getRegex(){return this.regex?.checked??!1}setRegex(e){this.regex&&(this.regex.checked=e,this.validate())}focusOnCaseSensitive(){this.caseSensitive?.focus()}highlightFindOptions(){this.domNode.classList.remove("highlight-"+this._lastHighlightFindOptions),this._lastHighlightFindOptions=1-this._lastHighlightFindOptions,this.domNode.classList.add("highlight-"+this._lastHighlightFindOptions)}validate(){this.inputBox.validate()}showMessage(e){this.inputBox.showMessage(e)}clearMessage(){this.inputBox.hideMessage()}}});var Sa,lv,Zr,Ey,Ty=x(()=>{(function(o){o[o.Expanded=0]="Expanded",o[o.Collapsed=1]="Collapsed",o[o.PreserveOrExpanded=2]="PreserveOrExpanded",o[o.PreserveOrCollapsed=3]="PreserveOrCollapsed"})(Sa||(Sa={}));(function(o){o[o.Unknown=0]="Unknown",o[o.Twistie=1]="Twistie",o[o.Element=2]="Element",o[o.Filter=3]="Filter"})(lv||(lv={}));Zr=class extends Error{constructor(e,t){super(`TreeError [${e}] ${t}`)}},Ey=class{constructor(e){this.fn=e,this._map=new WeakMap}map(e){let t=this._map.get(e);return t||(t=this.fn(e),this._map.set(e,t)),t}}});function cv(o){return!!o&&o.visibility!==void 0}function Tg(o){switch(o){case!0:return 1;case!1:return 0;default:return o}}function mie(o){return"collapsible"in o}var D6,dN=x(()=>{Ty();qe();Ze();dK();Mx();ae();oa();D6=class{constructor(e,t,i={}){this.user=e,this.rootRef=[],this.eventBufferer=new wh,this._onDidSpliceModel=new N,this.onDidSpliceModel=this._onDidSpliceModel.event,this._onDidSpliceRenderedNodes=new N,this.onDidSpliceRenderedNodes=this._onDidSpliceRenderedNodes.event,this._onDidChangeCollapseState=new N,this.onDidChangeCollapseState=this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event),this._onDidChangeRenderNodeCount=new N,this.onDidChangeRenderNodeCount=this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event),this.refilterDelayer=new qo(_O),this.collapseByDefault=typeof i.collapseByDefault>"u"?!1:i.collapseByDefault,this.allowNonCollapsibleParents=i.allowNonCollapsibleParents??!1,this.filter=i.filter,this.autoExpandSingleChildren=typeof i.autoExpandSingleChildren>"u"?!1:i.autoExpandSingleChildren,this.root={parent:void 0,element:t,children:[],depth:0,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:!1,collapsed:!1,renderNodeCount:0,visibility:1,visible:!0,filterData:void 0}}splice(e,t,i=ut.empty(),n={}){if(e.length===0)throw new Zr(this.user,"Invalid tree location");n.diffIdentityProvider?this.spliceSmart(n.diffIdentityProvider,e,t,i,n):this.spliceSimple(e,t,i,n)}spliceSmart(e,t,i,n=ut.empty(),s,r=s.diffDepth??0){let{parentNode:a}=this.getParentNodeWithListIndex(t);if(!a.lastDiffIds)return this.spliceSimple(t,i,n,s);let l=[...n],c=t[t.length-1],d=new Tu({getElements:()=>a.lastDiffIds},{getElements:()=>[...a.children.slice(0,c),...l,...a.children.slice(c+i)].map(p=>e.getId(p.element).toString())}).ComputeDiff(!1);if(d.quitEarly)return a.lastDiffIds=void 0,this.spliceSimple(t,i,l,s);let h=t.slice(0,-1),u=(p,_,b)=>{if(r>0)for(let v=0;vb.originalStart-_.originalStart))u(f,g,f-(p.originalStart+p.originalLength)),f=p.originalStart,g=p.modifiedStart-c,this.spliceSimple([...h,f],p.originalLength,ut.slice(l,g,g+p.modifiedLength),s);u(f,g,f)}spliceSimple(e,t,i=ut.empty(),{onDidCreateNode:n,onDidDeleteNode:s,diffIdentityProvider:r}){let{parentNode:a,listIndex:l,revealed:c,visible:d}=this.getParentNodeWithListIndex(e),h=[],u=ut.map(i,y=>this.createTreeNode(y,a,a.visible?1:0,c,h,n)),f=e[e.length-1],g=0;for(let y=f;y>=0&&yr.getId(y.element).toString())):a.lastDiffIds=a.children.map(y=>r.getId(y.element).toString()):a.lastDiffIds=void 0;let w=0;for(let y of v)y.visible&&w++;if(w!==0)for(let y=f+p.length;y0&&s){let y=k=>{s(k),k.children.forEach(y)};v.forEach(y)}if(c&&d){let y=v.reduce((k,I)=>k+(I.visible?I.renderNodeCount:0),0);this._updateAncestorsRenderNodeCount(a,b-y),this._onDidSpliceRenderedNodes.fire({start:l,deleteCount:y,elements:h})}this._onDidSpliceModel.fire({insertedNodes:p,deletedNodes:v});let C=a;for(;C;){if(C.visibility===2){this.refilterDelayer.trigger(()=>this.refilter());break}C=C.parent}}rerender(e){if(e.length===0)throw new Zr(this.user,"Invalid tree location");let{node:t,listIndex:i,revealed:n}=this.getTreeNodeWithListIndex(e);t.visible&&n&&this._onDidSpliceRenderedNodes.fire({start:i,deleteCount:1,elements:[t]})}has(e){return this.hasTreeNode(e)}getListIndex(e){let{listIndex:t,visible:i,revealed:n}=this.getTreeNodeWithListIndex(e);return i&&n?t:-1}getListRenderCount(e){return this.getTreeNode(e).renderNodeCount}isCollapsible(e){return this.getTreeNode(e).collapsible}setCollapsible(e,t){let i=this.getTreeNode(e);typeof t>"u"&&(t=!i.collapsible);let n={collapsible:t};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(e,n))}isCollapsed(e){return this.getTreeNode(e).collapsed}setCollapsed(e,t,i){let n=this.getTreeNode(e);typeof t>"u"&&(t=!n.collapsed);let s={collapsed:t,recursive:i||!1};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(e,s))}_setCollapseState(e,t){let{node:i,listIndex:n,revealed:s}=this.getTreeNodeWithListIndex(e),r=this._setListNodeCollapseState(i,n,s,t);if(i!==this.root&&this.autoExpandSingleChildren&&r&&!mie(t)&&i.collapsible&&!i.collapsed&&!t.recursive){let a=-1;for(let l=0;l-1){a=-1;break}else a=l;a>-1&&this._setCollapseState([...e,a],t)}return r}_setListNodeCollapseState(e,t,i,n){let s=this._setNodeCollapseState(e,n,!1);if(!i||!e.visible||!s)return s;let r=e.renderNodeCount,a=this.updateNodeAfterCollapseChange(e),l=r-(t===-1?0:1);return this._onDidSpliceRenderedNodes.fire({start:t+1,deleteCount:l,elements:a.slice(1)}),s}_setNodeCollapseState(e,t,i){let n;if(e===this.root?n=!1:(mie(t)?(n=e.collapsible!==t.collapsible,e.collapsible=t.collapsible):e.collapsible?(n=e.collapsed!==t.collapsed,e.collapsed=t.collapsed):n=!1,n&&this._onDidChangeCollapseState.fire({node:e,deep:i})),!mie(t)&&t.recursive)for(let s of e.children)n=this._setNodeCollapseState(s,t,!0)||n;return n}expandTo(e){this.eventBufferer.bufferEvents(()=>{let t=this.getTreeNode(e);for(;t.parent;)t=t.parent,e=e.slice(0,e.length-1),t.collapsed&&this._setCollapseState(e,{collapsed:!1,recursive:!1})})}refilter(){let e=this.root.renderNodeCount,t=this.updateNodeAfterFilterChange(this.root);this._onDidSpliceRenderedNodes.fire({start:0,deleteCount:e,elements:t}),this.refilterDelayer.cancel()}createTreeNode(e,t,i,n,s,r){let a={parent:t,element:e.element,children:[],depth:t.depth+1,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:typeof e.collapsible=="boolean"?e.collapsible:typeof e.collapsed<"u",collapsed:typeof e.collapsed>"u"?this.collapseByDefault:e.collapsed,renderNodeCount:1,visibility:1,visible:!0,filterData:void 0},l=this._filterNode(a,i);a.visibility=l,n&&s.push(a);let c=e.children||ut.empty(),d=n&&l!==0&&!a.collapsed,h=0,u=1;for(let f of c){let g=this.createTreeNode(f,a,l,d,s,r);a.children.push(g),u+=g.renderNodeCount,g.visible&&(g.visibleChildIndex=h++)}return this.allowNonCollapsibleParents||(a.collapsible=a.collapsible||a.children.length>0),a.visibleChildrenCount=h,a.visible=l===2?h>0:l===1,a.visible?a.collapsed||(a.renderNodeCount=u):(a.renderNodeCount=0,n&&s.pop()),r?.(a),a}updateNodeAfterCollapseChange(e){let t=e.renderNodeCount,i=[];return this._updateNodeAfterCollapseChange(e,i),this._updateAncestorsRenderNodeCount(e.parent,i.length-t),i}_updateNodeAfterCollapseChange(e,t){if(e.visible===!1)return 0;if(t.push(e),e.renderNodeCount=1,!e.collapsed)for(let i of e.children)e.renderNodeCount+=this._updateNodeAfterCollapseChange(i,t);return this._onDidChangeRenderNodeCount.fire(e),e.renderNodeCount}updateNodeAfterFilterChange(e){let t=e.renderNodeCount,i=[];return this._updateNodeAfterFilterChange(e,e.visible?1:0,i),this._updateAncestorsRenderNodeCount(e.parent,i.length-t),i}_updateNodeAfterFilterChange(e,t,i,n=!0){let s;if(e!==this.root){if(s=this._filterNode(e,t),s===0)return e.visible=!1,e.renderNodeCount=0,!1;n&&i.push(e)}let r=i.length;e.renderNodeCount=e===this.root?0:1;let a=!1;if(!e.collapsed||s!==0){let l=0;for(let c of e.children)a=this._updateNodeAfterFilterChange(c,s,i,n&&!e.collapsed)||a,c.visible&&(c.visibleChildIndex=l++);e.visibleChildrenCount=l}else e.visibleChildrenCount=0;return e!==this.root&&(e.visible=s===2?a:s===1,e.visibility=s),e.visible?e.collapsed||(e.renderNodeCount+=i.length-r):(e.renderNodeCount=0,n&&i.pop()),this._onDidChangeRenderNodeCount.fire(e),e.visible}_updateAncestorsRenderNodeCount(e,t){if(t!==0)for(;e;)e.renderNodeCount+=t,this._onDidChangeRenderNodeCount.fire(e),e=e.parent}_filterNode(e,t){let i=this.filter?this.filter.filter(e.element,t):1;return typeof i=="boolean"?(e.filterData=void 0,i?1:0):cv(i)?(e.filterData=i.data,Tg(i.visibility)):(e.filterData=void 0,Tg(i))}hasTreeNode(e,t=this.root){if(!e||e.length===0)return!0;let[i,...n]=e;return i<0||i>t.children.length?!1:this.hasTreeNode(n,t.children[i])}getTreeNode(e,t=this.root){if(!e||e.length===0)return t;let[i,...n]=e;if(i<0||i>t.children.length)throw new Zr(this.user,"Invalid tree location");return this.getTreeNode(n,t.children[i])}getTreeNodeWithListIndex(e){if(e.length===0)return{node:this.root,listIndex:-1,revealed:!0,visible:!1};let{parentNode:t,listIndex:i,revealed:n,visible:s}=this.getParentNodeWithListIndex(e),r=e[e.length-1];if(r<0||r>t.children.length)throw new Zr(this.user,"Invalid tree location");let a=t.children[r];return{node:a,listIndex:i,revealed:n,visible:s&&a.visible}}getParentNodeWithListIndex(e,t=this.root,i=0,n=!0,s=!0){let[r,...a]=e;if(r<0||r>t.children.length)throw new Zr(this.user,"Invalid tree location");for(let l=0;l{});function pie(o){return o instanceof Dp?new _ie(o):o}function r9e(o,e,t){return t&&{...t,identityProvider:t.identityProvider&&{getId(i){return t.identityProvider.getId(i.element)},getGroupId:t.identityProvider.getGroupId?i=>t.identityProvider.getGroupId(i.element):void 0},dnd:t.dnd&&e.add(new bie(o,t.dnd)),multipleSelectionController:t.multipleSelectionController&&{isSelectionSingleChangeEvent(i){return t.multipleSelectionController.isSelectionSingleChangeEvent({...i,element:i.element})},isSelectionRangeChangeEvent(i){return t.multipleSelectionController.isSelectionRangeChangeEvent({...i,element:i.element})}},accessibilityProvider:t.accessibilityProvider&&{...t.accessibilityProvider,getSetSize(i){let n=o(),s=n.getNodeLocation(i),r=n.getParentNodeLocation(s);return n.getNode(r).visibleChildrenCount},getPosInSet(i){return i.visibleChildIndex+1},isChecked:t.accessibilityProvider&&t.accessibilityProvider.isChecked?i=>t.accessibilityProvider.isChecked(i.element):void 0,getRole:t.accessibilityProvider&&t.accessibilityProvider.getRole?i=>t.accessibilityProvider.getRole(i.element):()=>"treeitem",getAriaLabel(i){return t.accessibilityProvider.getAriaLabel(i.element)},getWidgetAriaLabel(){return t.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:t.accessibilityProvider&&t.accessibilityProvider.getWidgetRole?()=>t.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:t.accessibilityProvider&&t.accessibilityProvider.getAriaLevel?i=>t.accessibilityProvider.getAriaLevel(i.element):i=>i.depth,getActiveDescendantId:t.accessibilityProvider.getActiveDescendantId&&(i=>t.accessibilityProvider.getActiveDescendantId(i.element))},keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&{...t.keyboardNavigationLabelProvider,getKeyboardNavigationLabel(i){return t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(i.element)}}}}function a9e(o,e){let t=e.toLowerCase().indexOf(o),i;if(t>-1){i=[Number.MAX_SAFE_INTEGER,0];for(let n=o.length;n>0;n--)i.push(t+n-1)}return i}function l9e(o,e){return o.position===e.position&&Kke(o,e)}function Kke(o,e){return o.node.element===e.node.element&&o.startIndex===e.startIndex&&o.height===e.height&&o.endIndex===e.endIndex}function N6(o){let e=lv.Unknown;return BO(o.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?e=lv.Twistie:BO(o.browserEvent.target,"monaco-tl-contents","monaco-tl-row")?e=lv.Element:BO(o.browserEvent.target,"monaco-tree-type-filter","monaco-list")&&(e=lv.Filter),{browserEvent:o.browserEvent,element:o.element?o.element.element:null,target:e}}function c9e(o){let e=Q0(o.browserEvent.target);return{element:o.element?o.element.element:null,browserEvent:o.browserEvent,anchor:o.anchor,isStickyScroll:e}}function R6(o,e){e(o),o.children.forEach(t=>R6(t,e))}var _ie,bie,yk,Op,vie,wie,uN,Cie,jl,Xh,dv,yie,fN,Sie,xie,A6,kie,Lie,hN,Iie,Eie,Sk,Dy=x(()=>{re();qd();ju();ae();wr();Ns();x1();Bl();xc();rt();W();_te();Pte();qe();ys();X8();le();T6();hs();Gc();hie();j8();Rp();Eg();dN();Ty();Ze();ti();Li();yo();id();nv();jke();et();Es();Jt();_ie=class extends Dp{constructor(e){super(e.elements.map(t=>t.element)),this.data=e}};bie=class{constructor(e,t){this.modelProvider=e,this.dnd=t,this.autoExpandDisposable=T.None,this.disposables=new F}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map(i=>i.element),t)}onDragStart(e,t){this.dnd.onDragStart?.(pie(e),t)}onDragOver(e,t,i,n,s,r=!0){let a=this.dnd.onDragOver(pie(e),t&&t.element,i,n,s),l=this.autoExpandNode!==t;if(l&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=t),typeof t>"u")return a;if(l&&typeof a!="boolean"&&a.autoExpand&&(this.autoExpandDisposable=er(()=>{let f=this.modelProvider(),g=f.getNodeLocation(t);f.isCollapsed(g)&&f.setCollapsed(g,!1),this.autoExpandNode=void 0},500,this.disposables)),typeof a=="boolean"||!a.accept||typeof a.bubble>"u"||a.feedback){if(!r){let f=typeof a=="boolean"?a:a.accept,g=typeof a=="boolean"?void 0:a.effect;return{accept:f,effect:g,feedback:[i]}}return a}if(a.bubble===1){let f=this.modelProvider(),g=f.getNodeLocation(t),p=f.getParentNodeLocation(g),_=f.getNode(p),b=p&&f.getListIndex(p);return this.onDragOver(e,_,b,n,s,!1)}let c=this.modelProvider(),d=c.getNodeLocation(t),h=c.getListIndex(d),u=c.getListRenderCount(d);return{...a,feedback:mr(h,h+u)}}drop(e,t,i,n,s){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(pie(e),t&&t.element,i,n,s)}onDragEnd(e){this.dnd.onDragEnd?.(e)}dispose(){this.disposables.dispose(),this.dnd.dispose()}};yk=class{constructor(e){this.delegate=e}getHeight(e){return this.delegate.getHeight(e.element)}getTemplateId(e){return this.delegate.getTemplateId(e.element)}hasDynamicHeight(e){return!!this.delegate.hasDynamicHeight&&this.delegate.hasDynamicHeight(e.element)}setDynamicHeight(e,t){this.delegate.setDynamicHeight?.(e.element,t)}};(function(o){o.None="none",o.OnHover="onHover",o.Always="always"})(Op||(Op={}));vie=class{get elements(){return this._elements}constructor(e,t=[]){this._elements=t,this.disposables=new F,this.onDidChange=Q.forEach(e,i=>this._elements=i,this.disposables)}dispose(){this.disposables.dispose()}},wie=class o{static{this.DefaultIndent=8}constructor(e,t,i,n,s,r={}){this.renderer=e,this.model=t,this.activeNodes=n,this.renderedIndentGuides=s,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=o.DefaultIndent,this.defaultIndent=o.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.activeIndentNodes=new Set,this.indentGuidesDisposable=T.None,this.disposables=new F,this.templateId=e.templateId,this.updateOptions(r),Q.map(i,a=>a.node)(this.onDidChangeNodeTwistieState,this,this.disposables),e.onDidChangeTwistieState?.(this.onDidChangeTwistieState,this,this.disposables)}updateOptions(e={}){if(typeof e.defaultIndent<"u"&&(this.defaultIndent=e.defaultIndent),typeof e.indent<"u"||typeof e.defaultIndent<"u"){let t=typeof e.indent<"u"?ts(e.indent,0,40):this.indent;if(t!==this.indent||typeof e.defaultIndent<"u"){this.indent=t;for(let[n,s]of this.renderedNodes)s.indentSize=this.defaultIndent+(n.depth-1)*this.indent,this.renderTreeElement(n,s)}}if(typeof e.renderIndentGuides<"u"){let t=e.renderIndentGuides!==Op.None;if(t!==this.shouldRenderIndentGuides){this.shouldRenderIndentGuides=t;for(let[i,n]of this.renderedNodes)this._renderIndentGuides(i,n);if(this.indentGuidesDisposable.dispose(),t){let i=new F;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,i),this.indentGuidesDisposable=i,this._onDidChangeActiveNodes(this.activeNodes.elements)}}}typeof e.hideTwistiesOfChildlessElements<"u"&&(this.hideTwistiesOfChildlessElements=e.hideTwistiesOfChildlessElements),typeof e.twistieAdditionalCssClass<"u"&&(this.twistieAdditionalCssClass=e.twistieAdditionalCssClass)}renderTemplate(e){let t=X(e,j(".monaco-tl-row")),i=X(t,j(".monaco-tl-indent")),n=X(t,j(".monaco-tl-twistie")),s=X(t,j(".monaco-tl-contents")),r=this.renderer.renderTemplate(s);return{container:e,indent:i,twistie:n,indentGuidesDisposable:T.None,indentSize:0,templateData:r}}renderElement(e,t,i,n){i.indentSize=this.defaultIndent+(e.depth-1)*this.indent,this.renderedNodes.set(e,i),this.renderedElements.set(e.element,e),this.renderTreeElement(e,i),this.renderer.renderElement(e,t,i.templateData,{...n,indent:i.indentSize})}disposeElement(e,t,i,n){i.indentGuidesDisposable.dispose(),this.renderer.disposeElement?.(e,t,i.templateData,{...n,indent:i.indentSize}),typeof n?.height=="number"&&(this.renderedNodes.delete(e),this.renderedElements.delete(e.element))}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}onDidChangeTwistieState(e){let t=this.renderedElements.get(e);t&&this.onDidChangeNodeTwistieState(t)}onDidChangeNodeTwistieState(e){let t=this.renderedNodes.get(e);t&&(this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderTreeElement(e,t))}renderTreeElement(e,t){t.twistie.className=t.twistie.classList.item(0),t.twistie.style.paddingLeft=`${t.indentSize}px`,t.indent.style.width=`${t.indentSize+this.indent-16}px`,e.collapsible?t.container.setAttribute("aria-expanded",String(!e.collapsed)):t.container.removeAttribute("aria-expanded"),t.twistie.classList.remove(...Ee.asClassNameArray($.treeItemExpanded));let i=!1;if(this.renderer.renderTwistie&&(i=this.renderer.renderTwistie(e.element,t.twistie)),e.collapsible&&(!this.hideTwistiesOfChildlessElements||e.visibleChildrenCount>0)?(i||t.twistie.classList.add(...Ee.asClassNameArray($.treeItemExpanded)),t.twistie.classList.add("collapsible"),t.twistie.classList.toggle("collapsed",e.collapsed)):t.twistie.classList.remove("collapsible","collapsed"),this.twistieAdditionalCssClass){let n=this.twistieAdditionalCssClass(e.element);n&&t.twistie.classList.add(n)}this._renderIndentGuides(e,t)}_renderIndentGuides(e,t){if(pn(t.indent),t.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;let i=new F;for(;;){let n=this.model.getNodeLocation(e),s=this.model.getParentNodeLocation(n);if(!s)break;let r=this.model.getNode(s),a=j(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(r)&&a.classList.add("active"),t.indent.childElementCount===0?t.indent.appendChild(a):t.indent.insertBefore(a,t.indent.firstElementChild),this.renderedIndentGuides.add(r,a),i.add(ne(()=>this.renderedIndentGuides.delete(r,a))),e=r}t.indentGuidesDisposable=i}_onDidChangeActiveNodes(e){if(!this.shouldRenderIndentGuides)return;let t=new Set;e.forEach(i=>{let n=this.model.getNodeLocation(i);try{let s=this.model.getParentNodeLocation(n);i.collapsible&&i.children.length>0&&!i.collapsed?t.add(i):s&&t.add(this.model.getNode(s))}catch{}}),this.activeIndentNodes.forEach(i=>{t.has(i)||this.renderedIndentGuides.forEach(i,n=>n.classList.remove("active"))}),t.forEach(i=>{this.activeIndentNodes.has(i)||this.renderedIndentGuides.forEach(i,n=>n.classList.add("active"))}),this.activeIndentNodes=t}dispose(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),Ct(this.disposables)}};uN=class{get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}set findMatchType(e){this._findMatchType=e}get findMatchType(){return this._findMatchType}set findMode(e){this._findMode=e}get findMode(){return this._findMode}constructor(e,t,i){this._keyboardNavigationLabelProvider=e,this._filter=t,this._defaultFindVisibility=i,this._totalCount=0,this._matchCount=0,this._findMatchType=Xh.Fuzzy,this._findMode=jl.Highlight,this._pattern="",this._lowercasePattern="",this.disposables=new F}filter(e,t){let i=1;if(this._filter){let r=this._filter.filter(e,t);if(typeof r=="boolean"?i=r?1:0:cv(r)?i=Tg(r.visibility):i=r,i===0)return!1}if(this._totalCount++,!this._pattern)return this._matchCount++,{data:Ha.Default,visibility:i};let n=this._keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e),s=Array.isArray(n)?n:[n];for(let r of s){let a=r&&r.toString();if(typeof a>"u")return{data:Ha.Default,visibility:i};let l;if(this._findMatchType===Xh.Contiguous?l=a9e(this._lowercasePattern,a.toLowerCase()):l=pg(this._pattern,this._lowercasePattern,0,a,a.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0}),l)return this._matchCount++,s.length===1?{data:l,visibility:i}:{data:{label:a,score:l},visibility:i}}return this._findMode===jl.Filter?typeof this._defaultFindVisibility=="number"?this._defaultFindVisibility:this._defaultFindVisibility?this._defaultFindVisibility(e):2:{data:Ha.Default,visibility:i}}reset(){this._totalCount=0,this._matchCount=0}dispose(){Ct(this.disposables)}},Cie=class{constructor(e){this.stateMap=new Map(e.map(t=>[t.id,{...t}]))}get(e){let t=this.stateMap.get(e);if(t===void 0)throw new Error(`No state found for toggle id ${e}`);return t.isChecked}set(e,t){let i=this.stateMap.get(e);if(i===void 0)throw new Error(`No state found for toggle id ${e}`);return i.isChecked===t?!1:(i.isChecked=t,!0)}};(function(o){o[o.Highlight=0]="Highlight",o[o.Filter=1]="Filter"})(jl||(jl={}));(function(o){o[o.Fuzzy=0]="Fuzzy",o[o.Contiguous=1]="Contiguous"})(Xh||(Xh={}));(function(o){o.Mode="mode",o.MatchType="matchType"})(dv||(dv={}));yie=class{get pattern(){return this._pattern}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.widget?.setPlaceHolder(e)}constructor(e,t,i,n={}){this.tree=e,this.filter=t,this.contextViewProvider=i,this.options=n,this._pattern="",this._onDidChangePattern=new N,this._onDidChangeOpenState=new N,this.onDidChangeOpenState=this._onDidChangeOpenState.event,this.enabledDisposables=new F,this.disposables=new F,this.toggles=new Cie(n.toggles??[]),this._placeholder=n.placeholder??m(22,"Type to search")}isOpened(){return!!this.widget}updateToggleState(e,t){this.toggles.set(e,t),this.widget?.setToggleState(e,t)}renderMessage(e,t){e?this.tree.options.showNotFoundMessage??!0?this.widget?.showMessage({type:2,content:t??m(23,"No results found.")}):this.widget?.showMessage({type:2}):this.widget?.clearMessage()}alertResults(e){e?qn(m(25,"{0} results",e)):qn(m(24,"No results"))}dispose(){this._history=void 0,this._onDidChangePattern.dispose(),this.enabledDisposables.dispose(),this.disposables.dispose()}},fN=class extends yie{get mode(){return this.toggles.get(dv.Mode)?jl.Filter:jl.Highlight}set mode(e){if(e===this.mode)return;let t=e===jl.Filter;this.updateToggleState(dv.Mode,t),this.placeholder=t?m(26,"Type to filter"):m(27,"Type to search"),this.filter.findMode=e,this.tree.refilter(),this.render(),this._onDidChangeMode.fire(e)}get matchType(){return this.toggles.get(dv.MatchType)?Xh.Fuzzy:Xh.Contiguous}set matchType(e){e!==this.matchType&&(this.updateToggleState(dv.MatchType,e===Xh.Fuzzy),this.filter.findMatchType=e,this.tree.refilter(),this.render(),this._onDidChangeMatchType.fire(e))}constructor(e,t,i,n={}){let s=n.defaultFindMode??jl.Highlight,r=n.defaultFindMatchType??Xh.Fuzzy,a=[{id:dv.Mode,icon:$.listFilter,title:m(28,"Filter"),isChecked:s===jl.Filter},{id:dv.MatchType,icon:$.searchFuzzy,title:m(29,"Fuzzy Match"),isChecked:r===Xh.Fuzzy}];t.findMatchType=r,t.findMode=s,super(e,t,i,{...n,toggles:a}),this.filter=t,this._onDidChangeMode=new N,this.onDidChangeMode=this._onDidChangeMode.event,this._onDidChangeMatchType=new N,this.onDidChangeMatchType=this._onDidChangeMatchType.event,this.disposables.add(this.tree.onDidChangeModel(()=>{this.isOpened()&&(this.pattern.length!==0&&this.tree.refilter(),this.render())})),this.disposables.add(this.tree.onWillRefilter(()=>this.filter.reset()))}updateOptions(e={}){e.defaultFindMode!==void 0&&(this.mode=e.defaultFindMode),e.defaultFindMatchType!==void 0&&(this.matchType=e.defaultFindMatchType)}shouldAllowFocus(e){return!this.isOpened()||!this.pattern||this.filter.totalCount>0&&this.filter.matchCount<=1?!0:!Ha.isDefault(e.filterData)}render(){let t=this.filter.matchCount===0&&this.filter.totalCount>0&&this.pattern.length>0;this.renderMessage(t),this.pattern.length&&this.alertResults(this.filter.matchCount)}};Sie=class{constructor(e=[]){this.stickyNodes=e}get count(){return this.stickyNodes.length}equal(e){return Bt(this.stickyNodes,e.stickyNodes,l9e)}contains(e){return this.stickyNodes.some(t=>t.node.element===e.element)}lastNodePartiallyVisible(){if(this.count===0)return!1;let e=this.stickyNodes[this.count-1];if(this.count===1)return e.position!==0;let t=this.stickyNodes[this.count-2];return t.position+t.height!==e.position}animationStateChanged(e){if(!Bt(this.stickyNodes,e.stickyNodes,Kke)||this.count===0)return!1;let t=this.stickyNodes[this.count-1],i=e.stickyNodes[e.count-1];return t.position!==i.position}},xie=class{constrainStickyScrollNodes(e,t,i){for(let n=0;ni||n>=t)return e.slice(0,n)}return e}},A6=class extends T{constructor(e,t,i,n,s,r={}){super(),this.tree=e,this.model=t,this.view=i,this.treeDelegate=s,this.maxWidgetViewRatio=.4;let a=this.validateStickySettings(r);this.stickyScrollMaxItemCount=a.stickyScrollMaxItemCount,this.stickyScrollDelegate=r.stickyScrollDelegate??new xie,this.paddingTop=r.paddingTop??0,this._widget=this._register(new kie(i.getScrollableElement(),i,e,n,s,r.accessibilityProvider)),this.onDidChangeHasFocus=this._widget.onDidChangeHasFocus,this.onContextMenu=this._widget.onContextMenu,this._register(i.onDidScroll(()=>this.update())),this._register(i.onDidChangeContentHeight(()=>this.update())),this._register(e.onDidChangeCollapseState(()=>this.update())),this._register(t.onDidSpliceRenderedNodes(l=>{let c=this._widget.state;if(!c)return;if(l.deleteCount>0&&c.stickyNodes.some(u=>!this.model.has(this.model.getNodeLocation(u.node)))){this.update();return}c.stickyNodes.some(u=>{let f=this.model.getListIndex(this.model.getNodeLocation(u.node));return f>=l.start&&f=this.view.length))return this.view.element(t)}update(){let e=this.getNodeAtHeight(this.paddingTop);if(!e||this.tree.scrollTop<=this.paddingTop||this.view.renderHeight===0){this._widget.setState(void 0);return}let t=this.findStickyState(e);this._widget.setState(t)}findStickyState(e){let t=[],i=e,n=0,s=this.getNextStickyNode(i,void 0,n);for(;s&&(t.push(s),n+=s.height,!(t.length<=this.stickyScrollMaxItemCount&&(i=this.getNextVisibleNode(s),!i)));)s=this.getNextStickyNode(i,s.node,n);let r=this.constrainStickyNodes(t);return r.length?new Sie(r):void 0}getNextVisibleNode(e){return this.getNodeAtHeight(e.position+e.height)}getNextStickyNode(e,t,i){let n=this.getAncestorUnderPrevious(e,t);if(n&&!(n===e&&(!this.nodeIsUncollapsedParent(e)||this.nodeTopAlignsWithStickyNodesBottom(e,i))))return this.createStickyScrollNode(n,i)}nodeTopAlignsWithStickyNodesBottom(e,t){let i=this.getNodeIndex(e),n=this.view.getElementTop(i),s=t;return this.view.scrollTop===n-s}createStickyScrollNode(e,t){let i=this.treeDelegate.getHeight(e),{startIndex:n,endIndex:s}=this.getNodeRange(e),r=this.calculateStickyNodePosition(s,t,i);return{node:e,position:r,height:i,startIndex:n,endIndex:s}}getAncestorUnderPrevious(e,t=void 0){let i=e,n=this.getParentNode(i);for(;n;){if(n===t)return i;i=n,n=this.getParentNode(i)}if(t===void 0)return i}calculateStickyNodePosition(e,t,i){let n=this.view.getRelativeTop(e);if(n===null&&this.view.firstVisibleIndex===e&&e+1l&&t<=l?l-i:t}constrainStickyNodes(e){if(e.length===0)return[];let t=this.view.renderHeight*this.maxWidgetViewRatio,i=e[e.length-1];if(e.length<=this.stickyScrollMaxItemCount&&i.position+i.height<=t)return e;let n=this.stickyScrollDelegate.constrainStickyScrollNodes(e,this.stickyScrollMaxItemCount,t);if(!n.length)return[];let s=n[n.length-1];if(n.length>this.stickyScrollMaxItemCount||s.position+s.height>t)throw new Error("stickyScrollDelegate violates constraints");return n}getParentNode(e){let t=this.model.getNodeLocation(e),i=this.model.getParentNodeLocation(t);return i?this.model.getNode(i):void 0}nodeIsUncollapsedParent(e){let t=this.model.getNodeLocation(e);return this.model.getListRenderCount(t)>1}getNodeIndex(e){let t=this.model.getNodeLocation(e);return this.model.getListIndex(t)}getNodeRange(e){let t=this.model.getNodeLocation(e),i=this.model.getListIndex(t);if(i<0)throw new Error("Node not found in tree");let n=this.model.getListRenderCount(t),s=i+n-1;return{startIndex:i,endIndex:s}}nodePositionTopBelowWidget(e){let t=[],i=this.getParentNode(e);for(;i;)t.push(i),i=this.getParentNode(i);let n=0;for(let s=0;s0,i=!!e&&e.count>0;if(!t&&!i||t&&i&&this._previousState.equal(e))return;if(t!==i&&this.setVisible(i),!i){this._previousState=void 0,this._previousElements=[],this._previousStateDisposables.clear();return}let n=e.stickyNodes[e.count-1];this._previousState&&e.animationStateChanged(this._previousState)?this._previousElements[this._previousState.count-1].style.top=`${n.position}px`:this.renderState(e),this._previousState=e,this._rootDomNode.style.height=`${n.position+n.height}px`}renderState(e){this._previousStateDisposables.clear();let t=Array(e.count);for(let i=e.count-1;i>=0;i--){let n=e.stickyNodes[i],{element:s,disposable:r}=this.createElement(n,i,e.count);t[i]=s,this._rootDomNode.appendChild(s),this._previousStateDisposables.add(r)}this.stickyScrollFocus.updateElements(t,e),this._previousElements=t}rerender(){this._previousState&&this.renderState(this._previousState)}createElement(e,t,i){let n=e.startIndex,s=document.createElement("div");s.style.top=`${e.position}px`,this.tree.options.setRowHeight!==!1&&(s.style.height=`${e.height}px`),this.tree.options.setRowLineHeight!==!1&&(s.style.lineHeight=`${e.height}px`),s.classList.add("monaco-tree-sticky-row"),s.classList.add("monaco-list-row"),s.setAttribute("data-index",`${n}`),s.setAttribute("data-parity",n%2===0?"even":"odd"),s.setAttribute("id",this.view.getElementID(n));let r=this.setAccessibilityAttributes(s,e.node.element,t,i),a=this.treeDelegate.getTemplateId(e.node),l=this.treeRenderers.find(u=>u.templateId===a);if(!l)throw new Error(`No renderer found for template id ${a}`);let c=e.node;c===this.tree.getNode(this.tree.getNodeLocation(e.node))&&(c=new Proxy(e.node,{}));let d=l.renderTemplate(s);l.renderElement(c,e.startIndex,d,{height:e.height});let h=ne(()=>{r.dispose(),l.disposeElement(c,e.startIndex,d,{height:e.height}),l.disposeTemplate(d),s.remove()});return{element:s,disposable:h}}setAccessibilityAttributes(e,t,i,n){if(!this.accessibilityProvider)return T.None;this.accessibilityProvider.getSetSize&&e.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(t,i,n))),this.accessibilityProvider.getPosInSet&&e.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(t,i))),this.accessibilityProvider.getRole&&e.setAttribute("role",this.accessibilityProvider.getRole(t)??"treeitem");let s=this.accessibilityProvider.getAriaLabel(t),r=s&&typeof s!="string"?s:ht(s),a=Se(c=>{let d=c.readObservable(r);d?e.setAttribute("aria-label",d):e.removeAttribute("aria-label")});typeof s=="string"||s&&e.setAttribute("aria-label",s.get());let l=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(t);return typeof l=="number"&&e.setAttribute("aria-level",`${l}`),e.setAttribute("aria-selected",String(!1)),a}setVisible(e){this._rootDomNode.classList.toggle("empty",!e),e||this.stickyScrollFocus.updateElements([],void 0)}domFocus(){this.stickyScrollFocus.domFocus()}focusedLast(){return this.stickyScrollFocus.focusedLast()}dispose(){this.stickyScrollFocus.dispose(),this._previousStateDisposables.dispose(),this._rootDomNode.remove()}},Lie=class extends T{get domHasFocus(){return this._domHasFocus}set domHasFocus(e){e!==this._domHasFocus&&(this._onDidChangeHasFocus.fire(e),this._domHasFocus=e)}constructor(e,t){super(),this.container=e,this.view=t,this.focusedIndex=-1,this.elements=[],this._onDidChangeHasFocus=this._register(new N),this.onDidChangeHasFocus=this._onDidChangeHasFocus.event,this._onContextMenu=this._register(new N),this.onContextMenu=this._onContextMenu.event,this._domHasFocus=!1,this._register(B(this.container,"focus",()=>this.onFocus())),this._register(B(this.container,"blur",()=>this.onBlur())),this._register(this.view.onDidFocus(()=>this.toggleStickyScrollFocused(!1))),this._register(this.view.onKeyDown(i=>this.onKeyDown(i))),this._register(this.view.onMouseDown(i=>this.onMouseDown(i))),this._register(this.view.onContextMenu(i=>this.handleContextMenu(i)))}handleContextMenu(e){let t=e.browserEvent.target;if(!Q0(t)&&!X0(t)){this.focusedLast()&&this.view.domFocus();return}if(!Th(e.browserEvent)){if(!this.state)throw new Error("Context menu should not be triggered when state is undefined");let r=this.state.stickyNodes.findIndex(a=>a.node.element===e.element?.element);if(r===-1)throw new Error("Context menu should not be triggered when element is not in sticky scroll widget");this.container.focus(),this.setFocus(r);return}if(!this.state||this.focusedIndex<0)throw new Error("Context menu key should not be triggered when focus is not in sticky scroll widget");let n=this.state.stickyNodes[this.focusedIndex].node.element,s=this.elements[this.focusedIndex];this._onContextMenu.fire({element:n,anchor:s,browserEvent:e.browserEvent,isStickyScroll:!0})}onKeyDown(e){if(this.domHasFocus&&this.state){if(e.key==="ArrowUp")this.setFocusedElement(Math.max(0,this.focusedIndex-1)),e.preventDefault(),e.stopPropagation();else if(e.key==="ArrowDown"||e.key==="ArrowRight"){if(this.focusedIndex>=this.state.count-1){let t=this.state.stickyNodes[this.state.count-1].startIndex+1;this.view.domFocus(),this.view.setFocus([t]),this.scrollNodeUnderWidget(t,this.state)}else this.setFocusedElement(this.focusedIndex+1);e.preventDefault(),e.stopPropagation()}}}onMouseDown(e){let t=e.browserEvent.target;!Q0(t)&&!X0(t)||(e.browserEvent.preventDefault(),e.browserEvent.stopPropagation())}updateElements(e,t){if(t&&t.count===0)throw new Error("Sticky scroll state must be undefined when there are no sticky nodes");if(t&&t.count!==e.length)throw new Error("Sticky scroll focus received illigel state");let i=this.focusedIndex;if(this.removeFocus(),this.elements=e,this.state=t,t){let n=ts(i,0,t.count-1);this.setFocus(n)}else this.domHasFocus&&this.view.domFocus();this.container.tabIndex=t?0:-1}setFocusedElement(e){let t=this.state;if(!t)throw new Error("Cannot set focus when state is undefined");if(this.setFocus(e),!(e1?t.stickyNodes[t.count-2]:void 0,s=this.view.getElementTop(e),r=n?n.position+n.height+i.height:i.height;this.view.scrollTop=s-r}domFocus(){if(!this.state)throw new Error("Cannot focus when state is undefined");this.container.focus()}focusedLast(){return this.state?this.view.getHTMLElement().classList.contains("sticky-scroll-focused"):!1}removeFocus(){this.focusedIndex!==-1&&(this.toggleElementFocus(this.elements[this.focusedIndex],!1),this.focusedIndex=-1)}setFocus(e){if(0>e)throw new Error("addFocus() can not remove focus");if(!this.state&&e>=0)throw new Error("Cannot set focus index when state is undefined");if(this.state&&e>=this.state.count)throw new Error("Cannot set focus index to an index that does not exist");let t=this.focusedIndex;t>=0&&this.toggleElementFocus(this.elements[t],!1),e>=0&&this.toggleElementFocus(this.elements[e],!0),this.focusedIndex=e}toggleElementFocus(e,t){this.toggleElementActiveFocus(e,t&&this.domHasFocus),this.toggleElementPassiveFocus(e,t)}toggleCurrentElementActiveFocus(e){this.focusedIndex!==-1&&this.toggleElementActiveFocus(this.elements[this.focusedIndex],e)}toggleElementActiveFocus(e,t){e.classList.toggle("focused",t)}toggleElementPassiveFocus(e,t){e.classList.toggle("passive-focused",t)}toggleStickyScrollFocused(e){this.view.getHTMLElement().classList.toggle("sticky-scroll-focused",e)}onFocus(){if(!this.state||this.elements.length===0)throw new Error("Cannot focus when state is undefined or elements are empty");this.domHasFocus=!0,this.toggleStickyScrollFocused(!0),this.toggleCurrentElementActiveFocus(!0),this.focusedIndex===-1&&this.setFocus(0)}onBlur(){this.domHasFocus=!1,this.toggleCurrentElementActiveFocus(!1)}dispose(){this.toggleStickyScrollFocused(!1),this._onDidChangeHasFocus.fire(!1),super.dispose()}};hN=class{get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}constructor(e,t){this.getFirstViewElementWithTrait=e,this.identityProvider=t,this.nodes=[],this._onDidChange=new N,this.onDidChange=this._onDidChange.event}set(e,t){!t?.__forceEvent&&Bt(this.nodes,e)||this._set(e,!1,t)}_set(e,t,i){if(this.nodes=[...e],this.elements=void 0,this._nodeSet=void 0,!t){let n=this;this._onDidChange.fire({get elements(){return n.get()},browserEvent:i})}}get(){return this.elements||(this.elements=this.nodes.map(e=>e.element)),[...this.elements]}getNodes(){return this.nodes}has(e){return this.nodeSet.has(e)}onDidModelSplice({insertedNodes:e,deletedNodes:t}){if(!this.identityProvider){let l=this.createNodeSet(),c=d=>l.delete(d);t.forEach(d=>R6(d,c)),this.set([...l.values()]);return}let i=new Set,n=l=>i.add(this.identityProvider.getId(l.element).toString());t.forEach(l=>R6(l,n));let s=new Map,r=l=>s.set(this.identityProvider.getId(l.element).toString(),l);e.forEach(l=>R6(l,r));let a=[];for(let l of this.nodes){let c=this.identityProvider.getId(l.element).toString();if(!i.has(c))a.push(l);else{let h=s.get(c);h&&h.visible&&a.push(h)}}if(this.nodes.length>0&&a.length===0){let l=this.getFirstViewElementWithTrait();l&&a.push(l)}this._set(a,!0)}createNodeSet(){let e=new Set;for(let t of this.nodes)e.add(t);return e}},Iie=class extends ZD{constructor(e,t,i){super(e),this.tree=t,this.stickyScrollProvider=i}onViewPointer(e){if(Rte(e.browserEvent.target)||Ll(e.browserEvent.target)||G0(e.browserEvent.target)||e.browserEvent.isHandledByList)return;let t=e.element;if(!t)return super.onViewPointer(e);if(this.isSelectionRangeChangeEvent(e)||this.isSelectionSingleChangeEvent(e))return super.onViewPointer(e);let i=e.browserEvent.target,n=i.classList.contains("monaco-tl-twistie")||i.classList.contains("monaco-icon-label")&&i.classList.contains("folder-icon")&&e.browserEvent.offsetX<16,s=X0(e.browserEvent.target),r=!1;if(s?r=!0:typeof this.tree.expandOnlyOnTwistieClick=="function"?r=this.tree.expandOnlyOnTwistieClick(t.element):r=!!this.tree.expandOnlyOnTwistieClick,s)this.handleStickyScrollMouseEvent(e,t);else{if(r&&!n&&e.browserEvent.detail!==2)return super.onViewPointer(e);if(!this.tree.expandOnDoubleClick&&e.browserEvent.detail===2)return super.onViewPointer(e)}if(t.collapsible&&(!s||n)){let a=this.tree.getNodeLocation(t),l=e.browserEvent.altKey;if(this.tree.setFocus([a]),this.tree.toggleCollapsed(a,l),n){e.browserEvent.isHandledByList=!0;return}}s||super.onViewPointer(e)}handleStickyScrollMouseEvent(e,t){if(q0e(e.browserEvent.target)||j0e(e.browserEvent.target))return;let i=this.stickyScrollProvider();if(!i)throw new Error("Sticky scroll controller not found");let n=this.list.indexOf(t),s=this.list.getElementTop(n),r=i.nodePositionTopBelowWidget(t);this.tree.scrollTop=s-r,this.list.domFocus(),this.list.setFocus([n]),this.list.setSelection([n])}onDoubleClick(e){e.browserEvent.target.classList.contains("monaco-tl-twistie")||!this.tree.expandOnDoubleClick||e.browserEvent.isHandledByList||super.onDoubleClick(e)}onMouseDown(e){let t=e.browserEvent.target;if(!Q0(t)&&!X0(t)){super.onMouseDown(e);return}}onContextMenu(e){let t=e.browserEvent.target;if(!Q0(t)&&!X0(t)){super.onContextMenu(e);return}}},Eie=class extends Ts{constructor(e,t,i,n,s,r,a,l){super(e,t,i,n,l),this.focusTrait=s,this.selectionTrait=r,this.anchorTrait=a}createMouseController(e){return new Iie(this,e.tree,e.stickyScrollProvider)}splice(e,t,i=[]){if(super.splice(e,t,i),i.length===0)return;let n=[],s=[],r;i.forEach((a,l)=>{this.focusTrait.has(a)&&n.push(e+l),this.selectionTrait.has(a)&&s.push(e+l),this.anchorTrait.has(a)&&(r=e+l)}),n.length>0&&super.setFocus(vl([...super.getFocus(),...n])),s.length>0&&super.setSelection(vl([...super.getSelection(),...s])),typeof r=="number"&&super.setAnchor(r)}setFocus(e,t,i=!1){super.setFocus(e,t),i||this.focusTrait.set(e.map(n=>this.element(n)),t)}setSelection(e,t,i=!1){super.setSelection(e,t),i||this.selectionTrait.set(e.map(n=>this.element(n)),t)}setAnchor(e,t=!1){super.setAnchor(e),t||(typeof e>"u"?this.anchorTrait.set([]):this.anchorTrait.set([this.element(e)]))}},Sk=class{get onDidScroll(){return this.view.onDidScroll}get onDidChangeFocus(){return this.eventBufferer.wrapEvent(this.focus.onDidChange)}get onDidChangeSelection(){return this.eventBufferer.wrapEvent(this.selection.onDidChange)}get onMouseDblClick(){return Q.filter(Q.map(this.view.onMouseDblClick,N6),e=>e.target!==lv.Filter)}get onMouseOver(){return Q.map(this.view.onMouseOver,N6)}get onMouseOut(){return Q.map(this.view.onMouseOut,N6)}get onContextMenu(){return Q.any(Q.filter(Q.map(this.view.onContextMenu,c9e),e=>!e.isStickyScroll),this.stickyScrollController?.onContextMenu??Q.None)}get onPointer(){return Q.map(this.view.onPointer,N6)}get onDidFocus(){return this.view.onDidFocus}get onDidChangeModel(){return Q.any(this.onDidChangeModelRelay.event,this.onDidSwapModel.event)}get onDidChangeCollapseState(){return this.onDidChangeCollapseStateRelay.event}get expandOnDoubleClick(){return typeof this._options.expandOnDoubleClick>"u"?!0:this._options.expandOnDoubleClick}get expandOnlyOnTwistieClick(){return typeof this._options.expandOnlyOnTwistieClick>"u"?!0:this._options.expandOnlyOnTwistieClick}get onDidDispose(){return this.view.onDidDispose}constructor(e,t,i,n,s={}){this._user=e,this._options=s,this.eventBufferer=new wh,this.onDidChangeFindOpenState=Q.None,this.onDidChangeStickyScrollFocused=Q.None,this.disposables=new F,this.onDidSwapModel=this.disposables.add(new N),this.onDidChangeModelRelay=this.disposables.add(new w_),this.onDidSpliceModelRelay=this.disposables.add(new w_),this.onDidChangeCollapseStateRelay=this.disposables.add(new w_),this.onDidChangeRenderNodeCountRelay=this.disposables.add(new w_),this.onDidChangeActiveNodesRelay=this.disposables.add(new w_),this._onWillRefilter=new N,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new N,this.modelDisposables=new F,s.keyboardNavigationLabelProvider&&(s.findWidgetEnabled??!0)&&(this.findFilter=new uN(s.keyboardNavigationLabelProvider,s.filter,s.defaultFindVisibility),s={...s,filter:this.findFilter},this.disposables.add(this.findFilter)),this.model=this.createModel(e,s),this.treeDelegate=new yk(i);let r=this.disposables.add(new vie(this.onDidChangeActiveNodesRelay.event)),a=new Ex;this.renderers=n.map(l=>new wie(l,this.model,this.onDidChangeCollapseStateRelay.event,r,a,s));for(let l of this.renderers)this.disposables.add(l);if(this.focus=new hN(()=>this.view.getFocusedElements()[0],s.identityProvider),this.selection=new hN(()=>this.view.getSelectedElements()[0],s.identityProvider),this.anchor=new hN(()=>this.view.getAnchorElement(),s.identityProvider),this.view=new Eie(e,t,this.treeDelegate,this.renderers,this.focus,this.selection,this.anchor,{...r9e(()=>this.model,this.disposables,s),tree:this,stickyScrollProvider:()=>this.stickyScrollController}),this.setupModel(this.model),s.keyboardSupport!==!1){let l=Q.chain(this.view.onKeyDown,c=>c.filter(d=>!Ll(d.target)).map(d=>new Mt(d)));Q.chain(l,c=>c.filter(d=>d.keyCode===15))(this.onLeftArrow,this,this.disposables),Q.chain(l,c=>c.filter(d=>d.keyCode===17))(this.onRightArrow,this,this.disposables),Q.chain(l,c=>c.filter(d=>d.keyCode===10))(this.onSpace,this,this.disposables)}if((s.findWidgetEnabled??!0)&&s.keyboardNavigationLabelProvider&&s.contextViewProvider){let l={styles:s.findWidgetStyles,defaultFindMode:s.defaultFindMode,defaultFindMatchType:s.defaultFindMatchType,showNotFoundMessage:s.showNotFoundMessage,findWidgetContainer:s.findWidgetContainer};this.findController=this.disposables.add(new fN(this,this.findFilter,s.contextViewProvider,l)),this.focusNavigationFilter=c=>this.findController.shouldAllowFocus(c),this.onDidChangeFindOpenState=this.findController.onDidChangeOpenState,this.onDidChangeFindMode=this.findController.onDidChangeMode,this.onDidChangeFindMatchType=this.findController.onDidChangeMatchType}else this.onDidChangeFindMode=Q.None,this.onDidChangeFindMatchType=Q.None;s.enableStickyScroll&&(this.stickyScrollController=new A6(this,this.model,this.view,this.renderers,this.treeDelegate,s),this.onDidChangeStickyScrollFocused=this.stickyScrollController.onDidChangeHasFocus),this.styleElement=or(this.view.getHTMLElement()),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===Op.Always)}updateOptions(e={}){this._options={...this._options,...e};for(let t of this.renderers)t.updateOptions(e);this.view.updateOptions(e),this.findController?.updateOptions(e),this.updateStickyScroll(e),this._onDidUpdateOptions.fire(this._options),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===Op.Always)}get options(){return this._options}updateStickyScroll(e){!this.stickyScrollController&&this._options.enableStickyScroll?(this.stickyScrollController=new A6(this,this.model,this.view,this.renderers,this.treeDelegate,this._options),this.onDidChangeStickyScrollFocused=this.stickyScrollController.onDidChangeHasFocus):this.stickyScrollController&&!this._options.enableStickyScroll&&(this.onDidChangeStickyScrollFocused=Q.None,this.stickyScrollController.dispose(),this.stickyScrollController=void 0),this.stickyScrollController?.updateOptions(e)}getHTMLElement(){return this.view.getHTMLElement()}get onDidChangeContentHeight(){return this.view.onDidChangeContentHeight}get scrollTop(){return this.view.scrollTop}set scrollTop(e){this.view.scrollTop=e}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}get ariaLabel(){return this.view.ariaLabel}set ariaLabel(e){this.view.ariaLabel=e}domFocus(){this.stickyScrollController?.focusedLast()?this.stickyScrollController.domFocus():this.view.domFocus()}isDOMFocused(){return Bc(this.getHTMLElement())}layout(e,t){this.view.layout(e,t)}style(e){let t=`.${this.view.domId}`,i=[];e.treeIndentGuidesStroke&&(i.push(`.monaco-list${t}:hover .monaco-tl-indent > .indent-guide, .monaco-list${t}.always .monaco-tl-indent > .indent-guide { opacity: 1; border-color: ${e.treeInactiveIndentGuidesStroke}; }`),i.push(`.monaco-list${t} .monaco-tl-indent > .indent-guide.active { opacity: 1; border-color: ${e.treeIndentGuidesStroke}; }`));let n=e.treeStickyScrollBackground??e.listBackground;n&&(i.push(`.monaco-list${t} .monaco-scrollable-element .monaco-tree-sticky-container { background-color: ${n}; }`),i.push(`.monaco-list${t} .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-row { background-color: ${n}; }`)),e.treeStickyScrollBorder&&i.push(`.monaco-list${t} .monaco-scrollable-element .monaco-tree-sticky-container { border-bottom: 1px solid ${e.treeStickyScrollBorder}; }`),e.treeStickyScrollShadow&&i.push(`.monaco-list${t} .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-container-shadow { box-shadow: ${e.treeStickyScrollShadow} 0 6px 6px -6px inset; height: 3px; }`),e.listFocusForeground&&(i.push(`.monaco-list${t}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused { color: ${e.listFocusForeground}; }`),i.push(`.monaco-list${t}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused { color: inherit; }`));let s=nh(e.listFocusAndSelectionOutline,nh(e.listSelectionOutline,e.listFocusOutline??""));s&&(i.push(`.monaco-list${t}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused.selected { outline: 1px solid ${s}; outline-offset: -1px;}`),i.push(`.monaco-list${t}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused.selected { outline: inherit;}`)),e.listFocusOutline&&(i.push(`.monaco-list${t}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }`),i.push(`.monaco-list${t}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused { outline: inherit; }`),i.push(`.context-menu-visible .monaco-list${t}.last-focused.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.passive-focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }`),i.push(`.context-menu-visible .monaco-list${t}.last-focused.sticky-scroll-focused .monaco-list-rows .monaco-list-row.focused { outline: inherit; }`),i.push(`.context-menu-visible .monaco-list${t}.last-focused:not(.sticky-scroll-focused) .monaco-tree-sticky-container .monaco-list-rows .monaco-list-row.focused { outline: inherit; }`)),this.styleElement.textContent=i.join(` +`),this.view.style(e)}getParentElement(e){let t=this.model.getParentNodeLocation(e);return this.model.getNode(t).element}getFirstElementChild(e){return this.model.getFirstElementChild(e)}getNode(e){return this.model.getNode(e)}getNodeLocation(e){return this.model.getNodeLocation(e)}collapse(e,t=!1){return this.model.setCollapsed(e,!0,t)}expand(e,t=!1){return this.model.setCollapsed(e,!1,t)}toggleCollapsed(e,t=!1){return this.model.setCollapsed(e,void 0,t)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setSelection(e,t){this.eventBufferer.bufferEvents(()=>{let i=e.map(s=>this.model.getNode(s));this.selection.set(i,t);let n=e.map(s=>this.model.getListIndex(s)).filter(s=>s>-1);this.view.setSelection(n,t,!0)})}getSelection(){return this.selection.get()}setFocus(e,t){this.eventBufferer.bufferEvents(()=>{let i=e.map(s=>this.model.getNode(s));this.focus.set(i,t);let n=e.map(s=>this.model.getListIndex(s)).filter(s=>s>-1);this.view.setFocus(n,t,!0)})}focusNext(e=1,t=!1,i,n=Th(i)&&i.altKey?void 0:this.focusNavigationFilter){this.view.focusNext(e,t,i,n)}focusPrevious(e=1,t=!1,i,n=Th(i)&&i.altKey?void 0:this.focusNavigationFilter){this.view.focusPrevious(e,t,i,n)}focusNextPage(e,t=Th(e)&&e.altKey?void 0:this.focusNavigationFilter){return this.view.focusNextPage(e,t)}focusPreviousPage(e,t=Th(e)&&e.altKey?void 0:this.focusNavigationFilter){return this.view.focusPreviousPage(e,t,()=>this.stickyScrollController?.height??0)}focusLast(e,t=Th(e)&&e.altKey?void 0:this.focusNavigationFilter){this.view.focusLast(e,t)}focusFirst(e,t=Th(e)&&e.altKey?void 0:this.focusNavigationFilter){this.view.focusFirst(e,t)}getFocus(){return this.focus.get()}reveal(e,t){this.model.expandTo(e);let i=this.model.getListIndex(e);if(i!==-1)if(!this.stickyScrollController)this.view.reveal(i,t);else{let n=this.stickyScrollController.nodePositionTopBelowWidget(this.getNode(e));this.view.reveal(i,t,n)}}onLeftArrow(e){e.preventDefault(),e.stopPropagation();let t=this.view.getFocusedElements();if(t.length===0)return;let i=t[0],n=this.model.getNodeLocation(i);if(!this.model.setCollapsed(n,!0)){let r=this.model.getParentNodeLocation(n);if(!r)return;let a=this.model.getListIndex(r);this.view.reveal(a),this.view.setFocus([a])}}onRightArrow(e){e.preventDefault(),e.stopPropagation();let t=this.view.getFocusedElements();if(t.length===0)return;let i=t[0],n=this.model.getNodeLocation(i);if(!this.model.setCollapsed(n,!1)){if(!i.children.some(l=>l.visible))return;let[r]=this.view.getFocus(),a=r+1;this.view.reveal(a),this.view.setFocus([a])}}onSpace(e){e.preventDefault(),e.stopPropagation();let t=this.view.getFocusedElements();if(t.length===0)return;let i=t[0],n=this.model.getNodeLocation(i),s=e.browserEvent.altKey;this.model.setCollapsed(n,void 0,s)}setupModel(e){this.modelDisposables.clear(),this.modelDisposables.add(e.onDidSpliceRenderedNodes(({start:s,deleteCount:r,elements:a})=>this.view.splice(s,r,a)));let t=Q.forEach(e.onDidSpliceModel,s=>{this.eventBufferer.bufferEvents(()=>{this.focus.onDidModelSplice(s),this.selection.onDidModelSplice(s)})},this.modelDisposables);t(()=>null,null,this.modelDisposables);let i=this.modelDisposables.add(new N),n=this.modelDisposables.add(new qo(0));this.modelDisposables.add(Q.any(t,this.focus.onDidChange,this.selection.onDidChange)(()=>{n.trigger(()=>{let s=new Set;for(let r of this.focus.getNodes())s.add(r);for(let r of this.selection.getNodes())s.add(r);i.fire([...s.values()])})})),this.onDidChangeActiveNodesRelay.input=i.event,this.onDidChangeModelRelay.input=Q.signal(e.onDidSpliceModel),this.onDidChangeCollapseStateRelay.input=e.onDidChangeCollapseState,this.onDidChangeRenderNodeCountRelay.input=e.onDidChangeRenderNodeCount,this.onDidSpliceModelRelay.input=e.onDidSpliceModel,Ye&&this.modelDisposables.add(e.onDidChangeCollapseState(s=>{let{node:r,deep:a}=s;r.collapsible&&!a&&this.isDOMFocused()&&qn(r.collapsed?m(30,"collapsed"):m(31,"expanded"))}))}dispose(){Ct(this.disposables),this.stickyScrollController?.dispose(),this.view.dispose(),this.modelDisposables.dispose()}}});var hv,M6=x(()=>{dN();Ty();oa();hv=class{constructor(e,t={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new D6(e,null,t),this.onDidSpliceModel=this.model.onDidSpliceModel,this.onDidSpliceRenderedNodes=this.model.onDidSpliceRenderedNodes,this.onDidChangeCollapseState=this.model.onDidChangeCollapseState,this.onDidChangeRenderNodeCount=this.model.onDidChangeRenderNodeCount,t.sorter&&(this.sorter={compare(i,n){return t.sorter.compare(i.element,n.element)}}),this.identityProvider=t.identityProvider}setChildren(e,t=ut.empty(),i={}){let n=this.getElementLocation(e);this._setChildren(n,this.preserveCollapseState(t),i)}_setChildren(e,t=ut.empty(),i){let n=new Set,s=new Set,r=l=>{if(l.element===null)return;let c=l;if(n.add(c.element),this.nodes.set(c.element,c),this.identityProvider){let d=this.identityProvider.getId(c.element).toString();s.add(d),this.nodesByIdentity.set(d,c)}i.onDidCreateNode?.(c)},a=l=>{if(l.element===null)return;let c=l;if(n.has(c.element)||this.nodes.delete(c.element),this.identityProvider){let d=this.identityProvider.getId(c.element).toString();s.has(d)||this.nodesByIdentity.delete(d)}i.onDidDeleteNode?.(c)};this.model.splice([...e,0],Number.MAX_VALUE,t,{...i,onDidCreateNode:r,onDidDeleteNode:a})}preserveCollapseState(e=ut.empty()){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),ut.map(e,t=>{let i=this.nodes.get(t.element);if(!i&&this.identityProvider){let r=this.identityProvider.getId(t.element).toString();i=this.nodesByIdentity.get(r)}if(!i){let r;return typeof t.collapsed>"u"?r=void 0:t.collapsed===Sa.Collapsed||t.collapsed===Sa.PreserveOrCollapsed?r=!0:t.collapsed===Sa.Expanded||t.collapsed===Sa.PreserveOrExpanded?r=!1:r=!!t.collapsed,{...t,children:this.preserveCollapseState(t.children),collapsed:r}}let n=typeof t.collapsible=="boolean"?t.collapsible:i.collapsible,s;return typeof t.collapsed>"u"||t.collapsed===Sa.PreserveOrCollapsed||t.collapsed===Sa.PreserveOrExpanded?s=i.collapsed:t.collapsed===Sa.Collapsed?s=!0:t.collapsed===Sa.Expanded?s=!1:s=!!t.collapsed,{...t,collapsible:n,collapsed:s,children:this.preserveCollapseState(t.children)}})}rerender(e){let t=this.getElementLocation(e);this.model.rerender(t)}resort(e=null,t=!0){if(!this.sorter)return;let i=this.getElementLocation(e),n=this.model.getNode(i);this._setChildren(i,this.resortChildren(n,t),{})}resortChildren(e,t,i=!0){let n=[...e.children];return(t||i)&&(n=n.sort(this.sorter.compare.bind(this.sorter))),ut.map(n,s=>({element:s.element,collapsible:s.collapsible,collapsed:s.collapsed,children:this.resortChildren(s,t,!1)}))}getFirstElementChild(e=null){let t=this.getElementLocation(e);return this.model.getFirstElementChild(t)}has(e){return this.nodes.has(e)}getListIndex(e){let t=this.getElementLocation(e);return this.model.getListIndex(t)}getListRenderCount(e){let t=this.getElementLocation(e);return this.model.getListRenderCount(t)}isCollapsible(e){let t=this.getElementLocation(e);return this.model.isCollapsible(t)}setCollapsible(e,t){let i=this.getElementLocation(e);return this.model.setCollapsible(i,t)}isCollapsed(e){let t=this.getElementLocation(e);return this.model.isCollapsed(t)}setCollapsed(e,t,i){let n=this.getElementLocation(e);return this.model.setCollapsed(n,t,i)}expandTo(e){let t=this.getElementLocation(e);this.model.expandTo(t)}refilter(){this.model.refilter()}getNode(e=null){if(e===null)return this.model.getNode(this.model.rootRef);let t=this.nodes.get(e);if(!t)throw new Zr(this.user,`Tree element not found: ${e}`);return t}getNodeLocation(e){return e.element}getParentNodeLocation(e){if(e===null)throw new Zr(this.user,"Invalid getParentNodeLocation call");let t=this.nodes.get(e);if(!t)throw new Zr(this.user,`Tree element not found: ${e}`);let i=this.model.getNodeLocation(t),n=this.model.getParentNodeLocation(i);return this.model.getNode(n).element}getElementLocation(e){if(e===null)return[];let t=this.nodes.get(e);if(!t)throw new Zr(this.user,`Tree element not found: ${e}`);return this.model.getNodeLocation(t)}}});function O6(o){let e=[o.element],t=o.incompressible||!1;return{element:{elements:e,incompressible:t},children:ut.map(ut.from(o.children),O6),collapsible:o.collapsible,collapsed:o.collapsed}}function P6(o){let e=[o.element],t=o.incompressible||!1,i,n;for(;[n,i]=ut.consume(ut.from(o.children),2),!(n.length!==1||n[0].incompressible);)o=n[0],e.push(o.element);return{element:{elements:e,incompressible:t},children:ut.map(ut.concat(n,i),P6),collapsible:o.collapsible,collapsed:o.collapsed}}function Tie(o,e=0){let t;return eTie(i,0)),e===0&&o.element.incompressible?{element:o.element.elements[e],children:t,incompressible:!0,collapsible:o.collapsible,collapsed:o.collapsed}:{element:o.element.elements[e],children:t,collapsible:o.collapsible,collapsed:o.collapsed}}function Gke(o){return Tie(o,0)}function Yke(o,e,t){return o.element===e?{...o,children:t}:{...o,children:ut.map(ut.from(o.children),i=>Yke(i,e,t))}}function u9e(o,e){return{...e,identityProvider:e.identityProvider&&{getId(t){return e.identityProvider.getId(o(t))},getGroupId:e.identityProvider.getGroupId?t=>e.identityProvider.getGroupId(o(t)):void 0},sorter:e.sorter&&{compare(t,i){return e.sorter.compare(t.elements[0],i.elements[0])}},filter:e.filter&&{filter(t,i){let n=t.elements;for(let s=0;s{dN();M6();Ty();qe();ae();oa();d9e=o=>({getId(e){return e.elements.map(t=>o.getId(t).toString()).join("\0")},getGroupId:o.getGroupId?e=>o.getGroupId(e.elements[e.elements.length-1]):void 0}),Die=class{get onDidSpliceRenderedNodes(){return this.model.onDidSpliceRenderedNodes}get onDidSpliceModel(){return this.model.onDidSpliceModel}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}constructor(e,t={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.model=new hv(e,t),this.enabled=typeof t.compressionEnabled>"u"?!0:t.compressionEnabled,this.identityProvider=t.identityProvider}setChildren(e,t=ut.empty(),i){let n=i.diffIdentityProvider&&d9e(i.diffIdentityProvider);if(e===null){let g=ut.map(t,this.enabled?P6:O6);this._setChildren(null,g,{diffIdentityProvider:n,diffDepth:1/0});return}let s=this.nodes.get(e);if(!s)throw new Zr(this.user,"Unknown compressed tree node");let r=this.model.getNode(s),a=this.model.getParentNodeLocation(s),l=this.model.getNode(a),c=Gke(r),d=Yke(c,e,t),h=(this.enabled?P6:O6)(d),u=i.diffIdentityProvider?((g,p)=>i.diffIdentityProvider.getId(g)===i.diffIdentityProvider.getId(p)):void 0;if(Bt(h.element.elements,r.element.elements,u)){this._setChildren(s,h.children||ut.empty(),{diffIdentityProvider:n,diffDepth:1});return}let f=l.children.map(g=>g===r?h:g);this._setChildren(l.element,f,{diffIdentityProvider:n,diffDepth:r.depth-l.depth})}isCompressionEnabled(){return this.enabled}setCompressionEnabled(e){if(e===this.enabled)return;this.enabled=e;let i=this.model.getNode().children,n=ut.map(i,Gke),s=ut.map(n,e?P6:O6);this._setChildren(null,s,{diffIdentityProvider:this.identityProvider,diffDepth:1/0})}_setChildren(e,t,i){let n=new Set,s=a=>{for(let l of a.element.elements)n.add(l),this.nodes.set(l,a.element)},r=a=>{for(let l of a.element.elements)n.has(l)||this.nodes.delete(l)};this.model.setChildren(e,t,{...i,onDidCreateNode:s,onDidDeleteNode:r})}has(e){return this.nodes.has(e)}getListIndex(e){let t=this.getCompressedNode(e);return this.model.getListIndex(t)}getListRenderCount(e){let t=this.getCompressedNode(e);return this.model.getListRenderCount(t)}getNode(e){if(typeof e>"u")return this.model.getNode();let t=this.getCompressedNode(e);return this.model.getNode(t)}getNodeLocation(e){let t=this.model.getNodeLocation(e);return t===null?null:t.elements[t.elements.length-1]}getParentNodeLocation(e){let t=this.getCompressedNode(e),i=this.model.getParentNodeLocation(t);return i===null?null:i.elements[i.elements.length-1]}getFirstElementChild(e){let t=this.getCompressedNode(e);return this.model.getFirstElementChild(t)}isCollapsible(e){let t=this.getCompressedNode(e);return this.model.isCollapsible(t)}setCollapsible(e,t){let i=this.getCompressedNode(e);return this.model.setCollapsible(i,t)}isCollapsed(e){let t=this.getCompressedNode(e);return this.model.isCollapsed(t)}setCollapsed(e,t,i){let n=this.getCompressedNode(e);return this.model.setCollapsed(n,t,i)}expandTo(e){let t=this.getCompressedNode(e);this.model.expandTo(t)}rerender(e){let t=this.getCompressedNode(e);this.model.rerender(t)}refilter(){this.model.refilter()}resort(e=null,t=!0){let i=this.getCompressedNode(e);this.model.resort(i,t)}getCompressedNode(e){if(e===null)return null;let t=this.nodes.get(e);if(!t)throw new Zr(this.user,`Tree element not found: ${e}`);return t}},h9e=o=>o[o.length-1],Nie=class o{get element(){return this.node.element===null?null:this.unwrapper(this.node.element)}get children(){return this.node.children.map(e=>new o(this.unwrapper,e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e,t){this.unwrapper=e,this.node=t}};F6=class{get onDidSpliceModel(){return Q.map(this.model.onDidSpliceModel,({insertedNodes:e,deletedNodes:t})=>({insertedNodes:e.map(i=>this.nodeMapper.map(i)),deletedNodes:t.map(i=>this.nodeMapper.map(i))}))}get onDidSpliceRenderedNodes(){return Q.map(this.model.onDidSpliceRenderedNodes,({start:e,deleteCount:t,elements:i})=>({start:e,deleteCount:t,elements:i.map(n=>this.nodeMapper.map(n))}))}get onDidChangeCollapseState(){return Q.map(this.model.onDidChangeCollapseState,({node:e,deep:t})=>({node:this.nodeMapper.map(e),deep:t}))}get onDidChangeRenderNodeCount(){return Q.map(this.model.onDidChangeRenderNodeCount,e=>this.nodeMapper.map(e))}constructor(e,t={}){this.rootRef=null,this.elementMapper=t.elementMapper||h9e;let i=n=>this.elementMapper(n.elements);this.nodeMapper=new Ey(n=>new Nie(i,n)),this.model=new Die(e,u9e(i,t))}setChildren(e,t=ut.empty(),i={}){this.model.setChildren(e,t,i)}isCompressionEnabled(){return this.model.isCompressionEnabled()}setCompressionEnabled(e){this.model.setCompressionEnabled(e)}has(e){return this.model.has(e)}getListIndex(e){return this.model.getListIndex(e)}getListRenderCount(e){return this.model.getListRenderCount(e)}getNode(e){return this.nodeMapper.map(this.model.getNode(e))}getNodeLocation(e){return e.element}getParentNodeLocation(e){return this.model.getParentNodeLocation(e)}getFirstElementChild(e){let t=this.model.getFirstElementChild(e);return t===null||typeof t>"u"?t:this.elementMapper(t.elements)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}setCollapsed(e,t,i){return this.model.setCollapsed(e,t,i)}expandTo(e){return this.model.expandTo(e)}rerender(e){return this.model.rerender(e)}refilter(){return this.model.refilter()}resort(e=null,t=!0){return this.model.resort(e,t)}getCompressedTreeNode(e=null){return this.model.getNode(e)}}});function g9e(o,e){return e&&{...e,keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&{getKeyboardNavigationLabel(t){let i;try{i=o().getCompressedTreeNode(t)}catch{return e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t)}return i.element.elements.length===1?e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t):e.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(i.element.elements)}}}}var f9e,Ny,B6,Rie,xk,Aie=x(()=>{Dy();Zke();M6();np();oa();f9e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ny=class extends Sk{get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}constructor(e,t,i,n,s={}){super(e,t,i,n,s),this.user=e}setChildren(e,t=ut.empty(),i){this.model.setChildren(e,t,i)}rerender(e){if(e===void 0){this.view.rerender();return}this.model.rerender(e)}resort(e,t=!0){this.model.resort(e,t)}hasElement(e){return this.model.has(e)}createModel(e,t){return new hv(e,t)}},B6=class{get compressedTreeNodeProvider(){return this._compressedTreeNodeProvider()}constructor(e,t,i){this._compressedTreeNodeProvider=e,this.stickyScrollDelegate=t,this.renderer=i,this.templateId=i.templateId,i.onDidChangeTwistieState&&(this.onDidChangeTwistieState=i.onDidChangeTwistieState)}renderTemplate(e){return{compressedTreeNode:void 0,data:this.renderer.renderTemplate(e)}}renderElement(e,t,i,n){let s=this.stickyScrollDelegate.getCompressedNode(e);s||(s=this.compressedTreeNodeProvider.getCompressedTreeNode(e.element)),s.element.elements.length===1?(i.compressedTreeNode=void 0,this.renderer.renderElement(e,t,i.data,n)):(i.compressedTreeNode=s,this.renderer.renderCompressedElements(s,t,i.data,n))}disposeElement(e,t,i,n){i.compressedTreeNode?this.renderer.disposeCompressedElements?.(i.compressedTreeNode,t,i.data,n):this.renderer.disposeElement?.(e,t,i.data,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.data)}renderTwistie(e,t){return this.renderer.renderTwistie?.(e,t)??!1}};f9e([_n],B6.prototype,"compressedTreeNodeProvider",null);Rie=class{constructor(e){this.modelProvider=e,this.compressedStickyNodes=new Map}getCompressedNode(e){return this.compressedStickyNodes.get(e)}constrainStickyScrollNodes(e,t,i){if(this.compressedStickyNodes.clear(),e.length===0)return[];for(let n=0;ni||n>=t-1&&tthis,a=new Rie(()=>this.model),l=n.map(c=>new B6(r,a,c));super(e,t,i,l,{...g9e(r,s),stickyScrollDelegate:a})}setChildren(e,t=ut.empty(),i){this.model.setChildren(e,t,i)}createModel(e,t){return new F6(e,t)}updateOptions(e={}){super.updateOptions(e),typeof e.compressionEnabled<"u"&&this.model.setCompressionEnabled(e.compressionEnabled)}getCompressedTreeNode(e=null){return this.model.getCompressedTreeNode(e)}}});function Mie(o){return{...o,children:[],refreshPromise:void 0,stale:!0,slow:!1,forceExpanded:!1}}function Pie(o,e){return e.parent?e.parent===o?!0:Pie(o,e.parent):!1}function m9e(o,e){return o===e||Pie(o,e)||Pie(e,o)}function Xke(o){return{browserEvent:o.browserEvent,elements:o.elements.map(e=>e.element)}}function Qke(o){return{browserEvent:o.browserEvent,element:o.element&&o.element.element,target:o.target}}function Oie(o){return o instanceof Dp?new Wie(o):o}function Jke(o){return o&&{...o,collapseByDefault:!0,identityProvider:o.identityProvider&&{getId(e){return o.identityProvider.getId(e.element)},getGroupId:o.identityProvider.getGroupId?e=>o.identityProvider.getGroupId(e.element):void 0},dnd:o.dnd&&new Hie(o.dnd),multipleSelectionController:o.multipleSelectionController&&{isSelectionSingleChangeEvent(e){return o.multipleSelectionController.isSelectionSingleChangeEvent({...e,element:e.element})},isSelectionRangeChangeEvent(e){return o.multipleSelectionController.isSelectionRangeChangeEvent({...e,element:e.element})}},accessibilityProvider:o.accessibilityProvider&&{...o.accessibilityProvider,getPosInSet:void 0,getSetSize:void 0,getRole:o.accessibilityProvider.getRole?e=>o.accessibilityProvider.getRole(e.element):()=>"treeitem",isChecked:o.accessibilityProvider.isChecked?e=>!!o.accessibilityProvider?.isChecked(e.element):void 0,getAriaLabel(e){return o.accessibilityProvider.getAriaLabel(e.element)},getWidgetAriaLabel(){return o.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:o.accessibilityProvider.getWidgetRole?()=>o.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:o.accessibilityProvider.getAriaLevel&&(e=>o.accessibilityProvider.getAriaLevel(e.element)),getActiveDescendantId:o.accessibilityProvider.getActiveDescendantId&&(e=>o.accessibilityProvider.getActiveDescendantId(e.element))},filter:o.filter&&{filter(e,t){return o.filter.filter(e.element,t)}},keyboardNavigationLabelProvider:o.keyboardNavigationLabelProvider&&{...o.keyboardNavigationLabelProvider,getKeyboardNavigationLabel(e){return o.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e.element)}},sorter:void 0,expandOnlyOnTwistieClick:typeof o.expandOnlyOnTwistieClick>"u"?void 0:typeof o.expandOnlyOnTwistieClick!="function"?o.expandOnlyOnTwistieClick:(e=>o.expandOnlyOnTwistieClick(e.element)),twistieAdditionalCssClass:typeof o.twistieAdditionalCssClass>"u"?void 0:(e=>o.twistieAdditionalCssClass(e.element)),defaultFindVisibility:e=>e.hasChildren&&e.stale?1:typeof o.defaultFindVisibility=="number"?o.defaultFindVisibility:typeof o.defaultFindVisibility>"u"?2:o.defaultFindVisibility(e.element),stickyScrollDelegate:o.stickyScrollDelegate}}function Uie(o,e){e(o),o.children.forEach(t=>Uie(t,e))}function p9e(o){let e=o&&Jke(o);return e&&{...e,keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&{...e.keyboardNavigationLabelProvider,getCompressedNodeKeyboardNavigationLabel(t){return o.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(t.map(i=>i.element))}},stickyScrollDelegate:e.stickyScrollDelegate}}function _9e(o){return typeof o=="boolean"?o?1:0:cv(o)?Tg(o.visibility):Tg(o)}var Fie,Bie,Wie,Hie,Vie,zie,gN,$ie,qie,W6,eLe=x(()=>{j8();Dy();dN();Aie();Ty();Ze();ti();Li();Ae();ae();oa();W();Rt();id();qe();Fie=class o{get element(){return this.node.element.element}get children(){return this.node.children.map(e=>new o(e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e){this.node=e}},Bie=class{constructor(e,t,i){this.renderer=e,this.nodeMapper=t,this.onDidChangeTwistieState=i,this.renderedNodes=new Map,this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,t,i,n){this.renderer.renderElement(this.nodeMapper.map(e),t,i.templateData,n)}renderTwistie(e,t){return e.slow?(t.classList.add(...Ee.asClassNameArray($.treeItemLoading)),!0):(t.classList.remove(...Ee.asClassNameArray($.treeItemLoading)),!1)}disposeElement(e,t,i,n){this.renderer.disposeElement?.(this.nodeMapper.map(e),t,i.templateData,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear()}};Wie=class extends Dp{constructor(e){super(e.elements.map(t=>t.element)),this.data=e}};Hie=class{constructor(e){this.dnd=e}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map(i=>i.element),t)}onDragStart(e,t){this.dnd.onDragStart?.(Oie(e),t)}onDragOver(e,t,i,n,s,r=!0){return this.dnd.onDragOver(Oie(e),t&&t.element,i,n,s)}drop(e,t,i,n,s){this.dnd.drop(Oie(e),t&&t.element,i,n,s)}onDragEnd(e){this.dnd.onDragEnd?.(e)}dispose(){this.dnd.dispose()}},Vie=class extends uN{constructor(e,t,i){super(t,i),this.findProvider=e,this.isFindSessionActive=!1}filter(e,t){let i=super.filter(e,t);if(!this.isFindSessionActive||this.findMode===jl.Highlight||!this.findProvider.isVisible)return i;let n=cv(i)?i.visibility:i;return Tg(n)===0?0:this.findProvider.isVisible(e)?i:0}},zie=class extends fN{constructor(e,t,i,n,s){super(e,i,n,s),this.findProvider=t,this.filter=i,this.activeSession=!1,this.asyncWorkInProgress=!1,this.disposables.add(ne(async()=>{this.activeSession&&await this.findProvider.endSession?.()}))}render(){if(this.asyncWorkInProgress||!this.activeFindMetadata)return;let e=this.activeFindMetadata.matchCount===0&&this.pattern.length>0;this.renderMessage(e),this.pattern.length&&this.alertResults(this.activeFindMetadata.matchCount)}shouldAllowFocus(e){return this.shouldFocusWhenNavigating(e)}shouldFocusWhenNavigating(e){if(!this.activeSession||!this.activeFindMetadata)return!0;let t=e.element?.element;return t&&this.activeFindMetadata.isMatch(t)?!0:!Ha.isDefault(e.filterData)}};gN=class{get onDidScroll(){return this.tree.onDidScroll}get onDidChangeFocus(){return Q.map(this.tree.onDidChangeFocus,Xke)}get onDidChangeSelection(){return Q.map(this.tree.onDidChangeSelection,Xke)}get onMouseDblClick(){return Q.map(this.tree.onMouseDblClick,Qke)}get onPointer(){return Q.map(this.tree.onPointer,Qke)}get onDidFocus(){return this.tree.onDidFocus}get onDidChangeModel(){return this.tree.onDidChangeModel}get onDidChangeCollapseState(){return this.tree.onDidChangeCollapseState}get onDidChangeStickyScrollFocused(){return this.tree.onDidChangeStickyScrollFocused}get onDidDispose(){return this.tree.onDidDispose}constructor(e,t,i,n,s,r={}){this.user=e,this.dataSource=s,this.nodes=new Map,this.subTreeRefreshPromises=new Map,this.refreshPromises=new Map,this._onDidRender=new N,this._onDidChangeNodeSlowState=new N,this.nodeMapper=new Ey(c=>new Fie(c)),this.disposables=new F,this.identityProvider=r.identityProvider,this.autoExpandSingleChildren=typeof r.autoExpandSingleChildren>"u"?!1:r.autoExpandSingleChildren,this.sorter=r.sorter,this.getDefaultCollapseState=c=>r.collapseByDefault?r.collapseByDefault(c)?Sa.PreserveOrCollapsed:Sa.PreserveOrExpanded:void 0;let a=!1,l;if(r.findProvider&&(r.findWidgetEnabled??!0)&&r.keyboardNavigationLabelProvider&&r.contextViewProvider&&(a=!0,l=new Vie(r.findProvider,r.keyboardNavigationLabelProvider,r.filter)),this.tree=this.createTree(e,t,i,n,{...r,findWidgetEnabled:!a,filter:l??r.filter}),this.root=Mie({element:void 0,parent:null,hasChildren:!0,defaultCollapseState:void 0}),this.identityProvider&&(this.root={...this.root,id:null}),this.nodes.set(null,this.root),this.tree.onDidChangeCollapseState(this._onDidChangeCollapseState,this,this.disposables),a){let c={styles:r.findWidgetStyles,showNotFoundMessage:r.showNotFoundMessage,defaultFindMatchType:r.defaultFindMatchType,defaultFindMode:r.defaultFindMode};this.findController=this.disposables.add(new zie(this.tree,r.findProvider,l,this.tree.options.contextViewProvider,c)),this.focusNavigationFilter=d=>this.findController.shouldFocusWhenNavigating(d),this.onDidChangeFindOpenState=this.findController.onDidChangeOpenState,this.onDidChangeFindMode=this.findController.onDidChangeMode,this.onDidChangeFindMatchType=this.findController.onDidChangeMatchType}else this.onDidChangeFindOpenState=this.tree.onDidChangeFindOpenState,this.onDidChangeFindMode=this.tree.onDidChangeFindMode,this.onDidChangeFindMatchType=this.tree.onDidChangeFindMatchType}createTree(e,t,i,n,s){let r=new yk(i),a=n.map(c=>new Bie(c,this.nodeMapper,this._onDidChangeNodeSlowState.event)),l=Jke(s)||{};return new Ny(e,t,r,a,l)}updateOptions(e={}){this.findController&&(e.defaultFindMode!==void 0&&(this.findController.mode=e.defaultFindMode),e.defaultFindMatchType!==void 0&&(this.findController.matchType=e.defaultFindMatchType)),this.tree.updateOptions(e)}getHTMLElement(){return this.tree.getHTMLElement()}get scrollTop(){return this.tree.scrollTop}set scrollTop(e){this.tree.scrollTop=e}get scrollHeight(){return this.tree.scrollHeight}get renderHeight(){return this.tree.renderHeight}domFocus(){this.tree.domFocus()}layout(e,t){this.tree.layout(e,t)}style(e){this.tree.style(e)}getInput(){return this.root.element}async setInput(e,t){this.cancelAllRefreshPromises(),this.root.element=e;let i=t&&{viewState:t,focus:[],selection:[]};await this._updateChildren(e,!0,!1,i),i&&(this.tree.setFocus(i.focus),this.tree.setSelection(i.selection)),t&&typeof t.scrollTop=="number"&&(this.scrollTop=t.scrollTop)}cancelAllRefreshPromises(e=!1){this.refreshPromises.forEach(t=>t.cancel()),this.refreshPromises.clear(),e&&(this.subTreeRefreshPromises.forEach(t=>t.cancel()),this.subTreeRefreshPromises.clear())}async _updateChildren(e=this.root.element,t=!0,i=!1,n,s){if(typeof this.root.element>"u")throw new Zr(this.user,"Tree input not set");this.root.refreshPromise&&(await this.root.refreshPromise,await Q.toPromise(this._onDidRender.event));let r=this.getDataNode(e);if(await this.refreshAndRenderNode(r,t,n,s),i)try{this.tree.rerender(r)}catch{}}rerender(e){if(e===void 0||e===this.root.element){this.tree.rerender();return}let t=this.getDataNode(e);this.tree.rerender(t)}getNode(e=this.root.element){let t=this.getDataNode(e),i=this.tree.getNode(t===this.root?null:t);return this.nodeMapper.map(i)}collapse(e,t=!1){let i=this.getDataNode(e);return this.tree.collapse(i===this.root?null:i,t)}async expand(e,t=!1){if(typeof this.root.element>"u")throw new Zr(this.user,"Tree input not set");this.root.refreshPromise&&(await this.root.refreshPromise,await Q.toPromise(this._onDidRender.event));let i=this.getDataNode(e);if(this.tree.hasElement(i)&&!this.tree.isCollapsible(i)||(i.refreshPromise&&(await i.refreshPromise,await Q.toPromise(this._onDidRender.event)),i!==this.root&&!i.refreshPromise&&!this.tree.isCollapsed(i)))return!1;let n=this.tree.expand(i===this.root?null:i,t);return i.refreshPromise&&(await i.refreshPromise,await Q.toPromise(this._onDidRender.event)),n}setSelection(e,t){let i=e.map(n=>this.getDataNode(n));this.tree.setSelection(i,t)}getSelection(){return this.tree.getSelection().map(t=>t.element)}setFocus(e,t){let i=e.map(n=>this.getDataNode(n));this.tree.setFocus(i,t)}getFocus(){return this.tree.getFocus().map(t=>t.element)}reveal(e,t){this.tree.reveal(this.getDataNode(e),t)}getParentElement(e){let t=this.tree.getParentElement(this.getDataNode(e));return t&&t.element}getFirstElementChild(e=this.root.element){let t=this.getDataNode(e),i=this.tree.getFirstElementChild(t===this.root?null:t);return i&&i.element}getDataNode(e){let t=this.nodes.get(e===this.root.element?null:e);if(!t){let i=this.identityProvider?.getId(e).toString();throw new Zr(this.user,`Data tree node not found${i?`: ${i}`:""}`)}return t}async refreshAndRenderNode(e,t,i,n){this.disposables.isDisposed||(await this.refreshNode(e,t,i),!this.disposables.isDisposed&&this.render(e,i,n))}async refreshNode(e,t,i){let n;if(this.subTreeRefreshPromises.forEach((s,r)=>{!n&&m9e(r,e)&&(n=s.then(()=>this.refreshNode(e,t,i)))}),n)return n;if(e!==this.root&&this.tree.getNode(e).collapsed){e.hasChildren=!!this.dataSource.hasChildren(e.element),e.stale=!0,this.setChildren(e,[],t,i);return}return this.doRefreshSubTree(e,t,i)}async doRefreshSubTree(e,t,i){let n=Bi(async()=>{let s=await this.doRefreshNode(e,t,i);e.stale=!1,await Nw.settled(s.map(r=>this.doRefreshSubTree(r,t,i)))});return e.refreshPromise=n,this.subTreeRefreshPromises.set(e,n),n.finally(()=>{e.refreshPromise=void 0,this.subTreeRefreshPromises.delete(e)}),n}async doRefreshNode(e,t,i){e.hasChildren=!!this.dataSource.hasChildren(e.element);let n;if(!e.hasChildren)n=Promise.resolve(ut.empty());else{let s=this.doGetChildren(e);if(TI(s))n=Promise.resolve(s);else{let r=Na(800);r.then(()=>{e.slow=!0,this._onDidChangeNodeSlowState.fire(e)},a=>null),n=s.finally(()=>r.cancel())}}try{let s=await n;return this.setChildren(e,s,t,i)}catch(s){if(e!==this.root&&this.tree.hasElement(e)&&this.tree.collapse(e),Io(s))return[];throw s}finally{e.slow&&(e.slow=!1,this._onDidChangeNodeSlowState.fire(e))}}doGetChildren(e){let t=this.refreshPromises.get(e);if(t)return t;let i=this.dataSource.getChildren(e.element);return TI(i)?this.processChildren(i):(t=Bi(async()=>this.processChildren(await i)),this.refreshPromises.set(e,t),t.finally(()=>{this.refreshPromises.delete(e)}))}_onDidChangeCollapseState({node:e,deep:t}){e.element!==null&&!e.collapsed&&e.element.stale&&(t?this.collapse(e.element.element):this.refreshAndRenderNode(e.element,!1).catch(De))}setChildren(e,t,i,n){let s=[...t];if(e.children.length===0&&s.length===0)return[];let r=new Map,a=new Map;for(let d of e.children)r.set(d.element,d),this.identityProvider&&a.set(d.id,{node:d,collapsed:this.tree.hasElement(d)&&this.tree.isCollapsed(d)});let l=[],c=s.map(d=>{let h=!!this.dataSource.hasChildren(d);if(!this.identityProvider){let p=Mie({element:d,parent:e,hasChildren:h,defaultCollapseState:this.getDefaultCollapseState(d)});return h&&p.defaultCollapseState===Sa.PreserveOrExpanded&&l.push(p),p}let u=this.identityProvider.getId(d).toString(),f=a.get(u);if(f){let p=f.node;return r.delete(p.element),this.nodes.delete(p.element),this.nodes.set(d,p),p.element=d,p.hasChildren=h,i?f.collapsed?(p.children.forEach(_=>Uie(_,b=>this.nodes.delete(b.element))),p.children.splice(0,p.children.length),p.stale=!0):l.push(p):h&&!f.collapsed&&l.push(p),p}let g=Mie({element:d,parent:e,id:u,hasChildren:h,defaultCollapseState:this.getDefaultCollapseState(d)});return n&&n.viewState.focus&&n.viewState.focus.indexOf(u)>-1&&n.focus.push(g),n&&n.viewState.selection&&n.viewState.selection.indexOf(u)>-1&&n.selection.push(g),(n&&n.viewState.expanded&&n.viewState.expanded.indexOf(u)>-1||h&&g.defaultCollapseState===Sa.PreserveOrExpanded)&&l.push(g),g});for(let d of r.values())Uie(d,h=>this.nodes.delete(h.element));for(let d of c)this.nodes.set(d.element,d);return fw(e.children,0,e.children.length,c),e!==this.root&&this.autoExpandSingleChildren&&c.length===1&&l.length===0&&(c[0].forceExpanded=!0,l.push(c[0])),l}render(e,t,i){let n=e.children.map(r=>this.asTreeElement(r,t)),s=i&&{...i,diffIdentityProvider:i.diffIdentityProvider&&{getId(r){return i.diffIdentityProvider.getId(r.element)},getGroupId:i.diffIdentityProvider.getGroupId?r=>i.diffIdentityProvider.getGroupId(r.element):void 0}};this.tree.setChildren(e===this.root?null:e,n,s),e!==this.root&&this.tree.setCollapsible(e,e.hasChildren),this._onDidRender.fire()}asTreeElement(e,t){if(e.stale)return{element:e,collapsible:e.hasChildren,collapsed:!0};let i;return t&&t.viewState.expanded&&e.id&&t.viewState.expanded.indexOf(e.id)>-1?i=!1:e.forceExpanded?(i=!1,e.forceExpanded=!1):i=e.defaultCollapseState,{element:e,children:e.hasChildren?ut.map(e.children,n=>this.asTreeElement(n,t)):[],collapsible:e.hasChildren,collapsed:i}}processChildren(e){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),e}dispose(){this._onDidRender.dispose(),this._onDidChangeNodeSlowState.dispose(),this.disposables.dispose(),this.tree.dispose()}},$ie=class o{get element(){return{elements:this.node.element.elements.map(e=>e.element),incompressible:this.node.element.incompressible}}get children(){return this.node.children.map(e=>new o(e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e){this.node=e}},qie=class{constructor(e,t,i,n){this.renderer=e,this.nodeMapper=t,this.compressibleNodeMapperProvider=i,this.onDidChangeTwistieState=n,this.renderedNodes=new Map,this.disposables=[],this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,t,i,n){this.renderer.renderElement(this.nodeMapper.map(e),t,i.templateData,n)}renderCompressedElements(e,t,i,n){this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(e),t,i.templateData,n)}renderTwistie(e,t){return e.slow?(t.classList.add(...Ee.asClassNameArray($.treeItemLoading)),!0):(t.classList.remove(...Ee.asClassNameArray($.treeItemLoading)),!1)}disposeElement(e,t,i,n){this.renderer.disposeElement?.(this.nodeMapper.map(e),t,i.templateData,n)}disposeCompressedElements(e,t,i,n){this.renderer.disposeCompressedElements?.(this.compressibleNodeMapperProvider().map(e),t,i.templateData,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear(),this.disposables=Ct(this.disposables)}};W6=class extends gN{constructor(e,t,i,n,s,r,a={}){super(e,t,i,s,r,a),this.compressionDelegate=n,this.compressibleNodeMapper=new Ey(l=>new $ie(l)),this.filter=a.filter}createTree(e,t,i,n,s){let r=new yk(i),a=n.map(c=>new qie(c,this.nodeMapper,()=>this.compressibleNodeMapper,this._onDidChangeNodeSlowState.event)),l=p9e(s)||{};return new xk(e,t,r,a,l)}asTreeElement(e,t){return{incompressible:this.compressionDelegate.isIncompressible(e.element),...super.asTreeElement(e,t)}}render(e,t,i){if(!this.identityProvider)return super.render(e,t);let n=f=>this.identityProvider.getId(f).toString(),s=f=>{let g=new Set;for(let p of f){let _=this.tree.getCompressedTreeNode(p===this.root?null:p);if(_.element)for(let b of _.element.elements)g.add(n(b.element))}return g},r=s(this.tree.getSelection()),a=s(this.tree.getFocus());super.render(e,t,i);let l=this.getSelection(),c=!1,d=this.getFocus(),h=!1,u=f=>{let g=f.element;if(g)for(let p=0;p{let i=this.filter.filter(t,1),n=_9e(i);if(n===2)throw new Error("Recursive tree visibility not supported in async data compressed trees");return n===1})),super.processChildren(e)}}});var H6,tLe=x(()=>{Dy();M6();H6=class extends Sk{constructor(e,t,i,n,s,r={}){super(e,t,i,n,r),this.user=e,this.dataSource=s,this.identityProvider=r.identityProvider}createModel(e,t){return new hv(e,t)}}});function e9(o,e){let t=o.createScoped(e.getHTMLElement());return lLe.bindTo(t),t}function t9(o,e){let t=mN.bindTo(o),i=()=>{let n=e.scrollTop===0,s=e.scrollHeight-e.renderHeight-e.scrollTop<1;n&&s?t.set("both"):n?t.set("top"):s?t.set("bottom"):t.set("none")};return i(),e.onDidScroll(i)}function Rg(o){return o.getValue(Ay)==="alt"}function i9(o,e){let t=o.get(Me),i=o.get($e),n=new F;return[{...e,keyboardNavigationDelegate:{mightProducePrintableCharacter(r){return i.mightProducePrintableCharacter(r)}},smoothScrolling:!!t.getValue(Zu),mouseWheelScrollSensitivity:t.getValue(Dg),fastScrollSensitivity:t.getValue(Ng),multipleSelectionController:e.multipleSelectionController??n.add(new jie(t)),keyboardNavigationEventFilter:y9e(i),scrollByPage:!!t.getValue(Yu)},n]}function y9e(o){let e=!1;return t=>{if(t.toKeyCodeChord().isModifierKey())return!1;if(e)return e=!1,!1;let i=o.softDispatch(t,t.target);return i.kind===1?(e=!0,!1):(e=!1,i.kind===0)}}function uLe(o){let e=o.getValue(Jie);if(e==="highlight")return jl.Highlight;if(e==="filter")return jl.Filter;let t=o.getValue(U6);if(t==="simple"||t==="highlight")return jl.Highlight;if(t==="filter")return jl.Filter}function fLe(o){let e=o.getValue(tne);if(e==="fuzzy")return Xh.Fuzzy;if(e==="contiguous")return Xh.Contiguous}function bN(o,e){let t=o.get(Me),i=o.get(sl),n=o.get(Ce),s=o.get(ie),r=()=>{let u=n.getContextKeyValue(dLe);if(u==="automatic")return Ku.Automatic;if(u==="trigger")return Ku.Trigger;if(n.getContextKeyValue(hLe)===!1)return Ku.Trigger;let g=t.getValue(ene);if(g==="automatic")return Ku.Automatic;if(g==="trigger")return Ku.Trigger},a=e.horizontalScrolling!==void 0?e.horizontalScrolling:!!t.getValue(ah),[l,c]=s.invokeFunction(i9,e),d=e.paddingBottom,h=e.renderIndentGuides!==void 0?e.renderIndentGuides:t.getValue($6);return{getTypeNavigationMode:r,disposable:c,options:{keyboardSupport:!1,...l,indent:typeof t.getValue(pN)=="number"?t.getValue(pN):void 0,renderIndentGuides:h,smoothScrolling:!!t.getValue(Zu),defaultFindMode:e.defaultFindMode??uLe(t),defaultFindMatchType:e.defaultFindMatchType??fLe(t),horizontalScrolling:a,scrollByPage:!!t.getValue(Yu),paddingBottom:d,hideTwistiesOfChildlessElements:e.hideTwistiesOfChildlessElements,expandOnlyOnTwistieClick:e.expandOnlyOnTwistieClick??t.getValue(q6)==="doubleClick",contextViewProvider:i,findWidgetStyles:rke,enableStickyScroll:!!t.getValue(j6),stickyScrollMaxItemCount:Number(t.getValue(K6))}}}var Pp,On,Lc,z6,mN,lLe,cLe,Z6,Yie,Zie,Xie,Qie,X6,b9e,Q6,v9e,J6,w9e,C9e,dLe,hLe,Ay,V6,ah,Jie,ene,U6,Yu,tne,pN,$6,Zu,Dg,Ng,q6,j6,K6,jie,iLe,nLe,oLe,_N,G6,Kie,Gie,kk,sLe,rLe,Y6,aLe,Ry,S9e,Lk=x(()=>{re();Rke();Rp();Fke();Dy();eLe();tLe();Aie();ae();W();le();oi();Hm();je();xy();Kr();Ie();Oi();ls();kc();Pp=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},On=function(o,e){return function(t,i){e(t,i,o)}},Lc=Ne("listService"),z6=class{get lastFocusedList(){return this._lastFocusedWidget}constructor(){this.disposables=new F,this.lists=[],this._lastFocusedWidget=void 0}setLastFocusedList(e){e!==this._lastFocusedWidget&&(this._lastFocusedWidget?.getHTMLElement().classList.remove("last-focused"),this._lastFocusedWidget=e,this._lastFocusedWidget?.getHTMLElement().classList.add("last-focused"))}register(e,t){if(this.lists.some(n=>n.widget===e))throw new Error("Cannot register the same widget multiple times");let i={widget:e,extraContextKeys:t};return this.lists.push(i),Bc(e.getHTMLElement())&&this.setLastFocusedList(e),sa(e.onDidFocus(()=>this.setLastFocusedList(e)),ne(()=>this.lists.splice(this.lists.indexOf(i),1)),e.onDidDispose(()=>{this.lists=this.lists.filter(n=>n!==i),this._lastFocusedWidget===e&&this.setLastFocusedList(void 0)}))}dispose(){this.disposables.dispose()}},mN=new fe("listScrollAtBoundary","none");G.or(mN.isEqualTo("top"),mN.isEqualTo("both"));G.or(mN.isEqualTo("bottom"),mN.isEqualTo("both"));lLe=new fe("listFocus",!0),cLe=new fe("treestickyScrollFocused",!1),Z6=new fe("listSupportsMultiselect",!0),Yie=G.and(lLe,G.not(hte),cLe.negate()),Zie=new fe("listHasSelectionOrFocus",!1),Xie=new fe("listDoubleSelection",!1),Qie=new fe("listMultiSelection",!1),X6=new fe("listSelectionNavigation",!1),b9e=new fe("listSupportsFind",!0),Q6=new fe("treeElementCanCollapse",!1),v9e=new fe("treeElementHasParent",!1),J6=new fe("treeElementCanExpand",!1),w9e=new fe("treeElementHasChild",!1),C9e=new fe("treeFindOpen",!1),dLe="listTypeNavigationMode",hLe="listAutomaticKeyboardNavigation";Ay="workbench.list.multiSelectModifier",V6="workbench.list.openMode",ah="workbench.list.horizontalScrolling",Jie="workbench.list.defaultFindMode",ene="workbench.list.typeNavigationMode",U6="workbench.list.keyboardNavigation",Yu="workbench.list.scrollByPage",tne="workbench.list.defaultFindMatchType",pN="workbench.tree.indent",$6="workbench.tree.renderIndentGuides",Zu="workbench.list.smoothScrolling",Dg="workbench.list.mouseWheelScrollSensitivity",Ng="workbench.list.fastScrollSensitivity",q6="workbench.tree.expandMode",j6="workbench.tree.enableStickyScroll",K6="workbench.tree.stickyScrollMaxItemCount";jie=class extends T{constructor(e){super(),this.configurationService=e,this.useAltAsMultipleSelectionModifier=Rg(e),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(e=>{e.affectsConfiguration(Ay)&&(this.useAltAsMultipleSelectionModifier=Rg(this.configurationService))}))}isSelectionSingleChangeEvent(e){return this.useAltAsMultipleSelectionModifier?e.browserEvent.altKey:Ate(e)}isSelectionRangeChangeEvent(e){return Mte(e)}};iLe=class extends Ts{constructor(e,t,i,n,s,r,a,l,c){let d=typeof s.horizontalScrolling<"u"?s.horizontalScrolling:!!l.getValue(ah),[h,u]=c.invokeFunction(i9,s);super(e,t,i,n,{keyboardSupport:!1,...h,horizontalScrolling:d}),this.disposables.add(u),this.contextKeyService=e9(r,this),this.disposables.add(t9(this.contextKeyService,this)),this.listSupportsMultiSelect=Z6.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(s.multipleSelectionSupport!==!1),X6.bindTo(this.contextKeyService).set(!!s.selectionNavigation),this.listHasSelectionOrFocus=Zie.bindTo(this.contextKeyService),this.listDoubleSelection=Xie.bindTo(this.contextKeyService),this.listMultiSelection=Qie.bindTo(this.contextKeyService),this.horizontalScrolling=s.horizontalScrolling,this._useAltAsMultipleSelectionModifier=Rg(l),this.disposables.add(this.contextKeyService),this.disposables.add(a.register(this)),this.updateStyles(s.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{let g=this.getSelection(),p=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(g.length>0||p.length>0),this.listMultiSelection.set(g.length>1),this.listDoubleSelection.set(g.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{let g=this.getSelection(),p=this.getFocus();this.listHasSelectionOrFocus.set(g.length>0||p.length>0)})),this.disposables.add(l.onDidChangeConfiguration(g=>{g.affectsConfiguration(Ay)&&(this._useAltAsMultipleSelectionModifier=Rg(l));let p={};if(g.affectsConfiguration(ah)&&this.horizontalScrolling===void 0){let _=!!l.getValue(ah);p={...p,horizontalScrolling:_}}if(g.affectsConfiguration(Yu)){let _=!!l.getValue(Yu);p={...p,scrollByPage:_}}if(g.affectsConfiguration(Zu)){let _=!!l.getValue(Zu);p={...p,smoothScrolling:_}}if(g.affectsConfiguration(Dg)){let _=l.getValue(Dg);p={...p,mouseWheelScrollSensitivity:_}}if(g.affectsConfiguration(Ng)){let _=l.getValue(Ng);p={...p,fastScrollSensitivity:_}}Object.keys(p).length>0&&this.updateOptions(p)})),this.navigator=new G6(this,{configurationService:l,...s}),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles!==void 0&&this.updateStyles(e.overrideStyles),e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?Gu(e):av)}};iLe=Pp([On(5,Ce),On(6,Lc),On(7,Me),On(8,ie)],iLe);nLe=class extends S6{constructor(e,t,i,n,s,r,a,l,c){let d=typeof s.horizontalScrolling<"u"?s.horizontalScrolling:!!l.getValue(ah),[h,u]=c.invokeFunction(i9,s);super(e,t,i,n,{keyboardSupport:!1,...h,horizontalScrolling:d}),this.disposables=new F,this.disposables.add(u),this.contextKeyService=e9(r,this),this.disposables.add(t9(this.contextKeyService,this.widget)),this.horizontalScrolling=s.horizontalScrolling,this.listSupportsMultiSelect=Z6.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(s.multipleSelectionSupport!==!1),X6.bindTo(this.contextKeyService).set(!!s.selectionNavigation),this._useAltAsMultipleSelectionModifier=Rg(l),this.disposables.add(this.contextKeyService),this.disposables.add(a.register(this)),this.updateStyles(s.overrideStyles),this.disposables.add(l.onDidChangeConfiguration(g=>{g.affectsConfiguration(Ay)&&(this._useAltAsMultipleSelectionModifier=Rg(l));let p={};if(g.affectsConfiguration(ah)&&this.horizontalScrolling===void 0){let _=!!l.getValue(ah);p={...p,horizontalScrolling:_}}if(g.affectsConfiguration(Yu)){let _=!!l.getValue(Yu);p={...p,scrollByPage:_}}if(g.affectsConfiguration(Zu)){let _=!!l.getValue(Zu);p={...p,smoothScrolling:_}}if(g.affectsConfiguration(Dg)){let _=l.getValue(Dg);p={...p,mouseWheelScrollSensitivity:_}}if(g.affectsConfiguration(Ng)){let _=l.getValue(Ng);p={...p,fastScrollSensitivity:_}}Object.keys(p).length>0&&this.updateOptions(p)})),this.navigator=new G6(this,{configurationService:l,...s}),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles!==void 0&&this.updateStyles(e.overrideStyles),e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?Gu(e):av)}dispose(){this.disposables.dispose(),super.dispose()}};nLe=Pp([On(5,Ce),On(6,Lc),On(7,Me),On(8,ie)],nLe);oLe=class extends L6{constructor(e,t,i,n,s,r,a,l,c,d){let h=typeof r.horizontalScrolling<"u"?r.horizontalScrolling:!!c.getValue(ah),[u,f]=d.invokeFunction(i9,r);super(e,t,i,n,s,{keyboardSupport:!1,...u,horizontalScrolling:h}),this.disposables.add(f),this.contextKeyService=e9(a,this),this.disposables.add(t9(this.contextKeyService,this)),this.listSupportsMultiSelect=Z6.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(r.multipleSelectionSupport!==!1),X6.bindTo(this.contextKeyService).set(!!r.selectionNavigation),this.listHasSelectionOrFocus=Zie.bindTo(this.contextKeyService),this.listDoubleSelection=Xie.bindTo(this.contextKeyService),this.listMultiSelection=Qie.bindTo(this.contextKeyService),this.horizontalScrolling=r.horizontalScrolling,this._useAltAsMultipleSelectionModifier=Rg(c),this.disposables.add(this.contextKeyService),this.disposables.add(l.register(this)),this.updateStyles(r.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{let p=this.getSelection(),_=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(p.length>0||_.length>0),this.listMultiSelection.set(p.length>1),this.listDoubleSelection.set(p.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{let p=this.getSelection(),_=this.getFocus();this.listHasSelectionOrFocus.set(p.length>0||_.length>0)})),this.disposables.add(c.onDidChangeConfiguration(p=>{p.affectsConfiguration(Ay)&&(this._useAltAsMultipleSelectionModifier=Rg(c));let _={};if(p.affectsConfiguration(ah)&&this.horizontalScrolling===void 0){let b=!!c.getValue(ah);_={..._,horizontalScrolling:b}}if(p.affectsConfiguration(Yu)){let b=!!c.getValue(Yu);_={..._,scrollByPage:b}}if(p.affectsConfiguration(Zu)){let b=!!c.getValue(Zu);_={..._,smoothScrolling:b}}if(p.affectsConfiguration(Dg)){let b=c.getValue(Dg);_={..._,mouseWheelScrollSensitivity:b}}if(p.affectsConfiguration(Ng)){let b=c.getValue(Ng);_={..._,fastScrollSensitivity:b}}Object.keys(_).length>0&&this.updateOptions(_)})),this.navigator=new Kie(this,{configurationService:c,...r}),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles!==void 0&&this.updateStyles(e.overrideStyles),e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?Gu(e):av)}dispose(){this.disposables.dispose(),super.dispose()}};oLe=Pp([On(6,Ce),On(7,Lc),On(8,Me),On(9,ie)],oLe);_N=class extends T{constructor(e,t){super(),this.widget=e,this._onDidOpen=this._register(new N),this.onDidOpen=this._onDidOpen.event,this._register(Q.filter(this.widget.onDidChangeSelection,i=>Th(i.browserEvent))(i=>this.onSelectionFromKeyboard(i))),this._register(this.widget.onPointer(i=>this.onPointer(i.element,i.browserEvent))),this._register(this.widget.onMouseDblClick(i=>this.onMouseDblClick(i.element,i.browserEvent))),typeof t?.openOnSingleClick!="boolean"&&t?.configurationService?(this.openOnSingleClick=t?.configurationService.getValue(V6)!=="doubleClick",this._register(t?.configurationService.onDidChangeConfiguration(i=>{i.affectsConfiguration(V6)&&(this.openOnSingleClick=t?.configurationService.getValue(V6)!=="doubleClick")}))):this.openOnSingleClick=t?.openOnSingleClick??!0}onSelectionFromKeyboard(e){if(e.elements.length!==1)return;let t=e.browserEvent,i=typeof t.preserveFocus=="boolean"?t.preserveFocus:!0,n=typeof t.pinned=="boolean"?t.pinned:!i;this._open(this.getSelectedElement(),i,n,!1,e.browserEvent)}onPointer(e,t){if(!this.openOnSingleClick||t.detail===2)return;let n=t.button===1,s=!0,r=n,a=t.ctrlKey||t.metaKey||t.altKey;this._open(e,s,r,a,t)}onMouseDblClick(e,t){if(!t)return;let i=t.target;if(i.classList.contains("monaco-tl-twistie")||i.classList.contains("monaco-icon-label")&&i.classList.contains("folder-icon")&&t.offsetX<16)return;let s=!1,r=!0,a=t.ctrlKey||t.metaKey||t.altKey;this._open(e,s,r,a,t)}_open(e,t,i,n,s){e&&this._onDidOpen.fire({editorOptions:{preserveFocus:t,pinned:i,revealIfVisible:!0},sideBySide:n,element:e,browserEvent:s})}},G6=class extends _N{constructor(e,t){super(e,t),this.widget=e}getSelectedElement(){return this.widget.getSelectedElements()[0]}},Kie=class extends _N{constructor(e,t){super(e,t)}getSelectedElement(){return this.widget.getSelectedElements()[0]}},Gie=class extends _N{constructor(e,t){super(e,t)}getSelectedElement(){return this.widget.getSelection()[0]??void 0}};kk=class extends Ny{get onDidOpen(){return this.internals.onDidOpen}constructor(e,t,i,n,s,r,a,l,c){let{options:d,getTypeNavigationMode:h,disposable:u}=r.invokeFunction(bN,s);super(e,t,i,n,d),this.disposables.add(u),this.internals=new Ry(this,s,h,s.overrideStyles,a,l,c),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};kk=Pp([On(5,ie),On(6,Ce),On(7,Lc),On(8,Me)],kk);sLe=class extends xk{constructor(e,t,i,n,s,r,a,l,c){let{options:d,getTypeNavigationMode:h,disposable:u}=r.invokeFunction(bN,s);super(e,t,i,n,d),this.disposables.add(u),this.internals=new Ry(this,s,h,s.overrideStyles,a,l,c),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};sLe=Pp([On(5,ie),On(6,Ce),On(7,Lc),On(8,Me)],sLe);rLe=class extends H6{constructor(e,t,i,n,s,r,a,l,c,d){let{options:h,getTypeNavigationMode:u,disposable:f}=a.invokeFunction(bN,r);super(e,t,i,n,s,h),this.disposables.add(f),this.internals=new Ry(this,r,u,r.overrideStyles,l,c,d),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles!==void 0&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};rLe=Pp([On(6,ie),On(7,Ce),On(8,Lc),On(9,Me)],rLe);Y6=class extends gN{get onDidOpen(){return this.internals.onDidOpen}constructor(e,t,i,n,s,r,a,l,c,d){let{options:h,getTypeNavigationMode:u,disposable:f}=a.invokeFunction(bN,r);super(e,t,i,n,s,h),this.disposables.add(f),this.internals=new Ry(this,r,u,r.overrideStyles,l,c,d),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};Y6=Pp([On(6,ie),On(7,Ce),On(8,Lc),On(9,Me)],Y6);aLe=class extends W6{constructor(e,t,i,n,s,r,a,l,c,d,h){let{options:u,getTypeNavigationMode:f,disposable:g}=l.invokeFunction(bN,a);super(e,t,i,n,s,r,u),this.disposables.add(g),this.internals=new Ry(this,a,f,a.overrideStyles,c,d,h),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};aLe=Pp([On(7,ie),On(8,Ce),On(9,Lc),On(10,Me)],aLe);Ry=class{get onDidOpen(){return this.navigator.onDidOpen}constructor(e,t,i,n,s,r,a){this.tree=e,this.disposables=[],this.contextKeyService=e9(s,e),this.disposables.push(t9(this.contextKeyService,e)),this.listSupportsMultiSelect=Z6.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(t.multipleSelectionSupport!==!1),X6.bindTo(this.contextKeyService).set(!!t.selectionNavigation),this.listSupportFindWidget=b9e.bindTo(this.contextKeyService),this.listSupportFindWidget.set(t.findWidgetEnabled??!0),this.hasSelectionOrFocus=Zie.bindTo(this.contextKeyService),this.hasDoubleSelection=Xie.bindTo(this.contextKeyService),this.hasMultiSelection=Qie.bindTo(this.contextKeyService),this.treeElementCanCollapse=Q6.bindTo(this.contextKeyService),this.treeElementHasParent=v9e.bindTo(this.contextKeyService),this.treeElementCanExpand=J6.bindTo(this.contextKeyService),this.treeElementHasChild=w9e.bindTo(this.contextKeyService),this.treeFindOpen=C9e.bindTo(this.contextKeyService),this.treeStickyScrollFocused=cLe.bindTo(this.contextKeyService),this._useAltAsMultipleSelectionModifier=Rg(a),this.updateStyleOverrides(n);let c=()=>{let h=e.getFocus()[0];if(!h)return;let u=e.getNode(h);this.treeElementCanCollapse.set(u.collapsible&&!u.collapsed),this.treeElementHasParent.set(!!e.getParentElement(h)),this.treeElementCanExpand.set(u.collapsible&&u.collapsed),this.treeElementHasChild.set(!!e.getFirstElementChild(h))},d=new Set;d.add(dLe),d.add(hLe),this.disposables.push(this.contextKeyService,r.register(e),e.onDidChangeSelection(()=>{let h=e.getSelection(),u=e.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.hasSelectionOrFocus.set(h.length>0||u.length>0),this.hasMultiSelection.set(h.length>1),this.hasDoubleSelection.set(h.length===2)})}),e.onDidChangeFocus(()=>{let h=e.getSelection(),u=e.getFocus();this.hasSelectionOrFocus.set(h.length>0||u.length>0),c()}),e.onDidChangeCollapseState(c),e.onDidChangeModel(c),e.onDidChangeFindOpenState(h=>this.treeFindOpen.set(h)),e.onDidChangeStickyScrollFocused(h=>this.treeStickyScrollFocused.set(h)),a.onDidChangeConfiguration(h=>{let u={};if(h.affectsConfiguration(Ay)&&(this._useAltAsMultipleSelectionModifier=Rg(a)),h.affectsConfiguration(pN)){let f=a.getValue(pN);u={...u,indent:f}}if(h.affectsConfiguration($6)&&t.renderIndentGuides===void 0){let f=a.getValue($6);u={...u,renderIndentGuides:f}}if(h.affectsConfiguration(Zu)){let f=!!a.getValue(Zu);u={...u,smoothScrolling:f}}if(h.affectsConfiguration(Jie)||h.affectsConfiguration(U6)){let f=uLe(a);u={...u,defaultFindMode:f}}if(h.affectsConfiguration(ene)||h.affectsConfiguration(U6)){let f=i();u={...u,typeNavigationMode:f}}if(h.affectsConfiguration(tne)){let f=fLe(a);u={...u,defaultFindMatchType:f}}if(h.affectsConfiguration(ah)&&t.horizontalScrolling===void 0){let f=!!a.getValue(ah);u={...u,horizontalScrolling:f}}if(h.affectsConfiguration(Yu)){let f=!!a.getValue(Yu);u={...u,scrollByPage:f}}if(h.affectsConfiguration(q6)&&t.expandOnlyOnTwistieClick===void 0&&(u={...u,expandOnlyOnTwistieClick:a.getValue(q6)==="doubleClick"}),h.affectsConfiguration(j6)){let f=a.getValue(j6);u={...u,enableStickyScroll:f}}if(h.affectsConfiguration(K6)){let f=Math.max(1,a.getValue(K6));u={...u,stickyScrollMaxItemCount:f}}if(h.affectsConfiguration(Dg)){let f=a.getValue(Dg);u={...u,mouseWheelScrollSensitivity:f}}if(h.affectsConfiguration(Ng)){let f=a.getValue(Ng);u={...u,fastScrollSensitivity:f}}Object.keys(u).length>0&&e.updateOptions(u)}),this.contextKeyService.onDidChangeContext(h=>{h.affectsSome(d)&&e.updateOptions({typeNavigationMode:i()})})),this.navigator=new Gie(e,{configurationService:a,...t}),this.disposables.push(this.navigator)}updateOptions(e){e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyleOverrides(e){this.tree.style(e?Gu(e):av)}dispose(){this.disposables=Ct(this.disposables)}};Ry=Pp([On(4,Ce),On(5,Lc),On(6,Me)],Ry);S9e=jt.as(da.Configuration);S9e.registerConfiguration({id:"workbench",order:7,title:m(1768,"Workbench"),type:"object",properties:{[Ay]:{type:"string",enum:["ctrlCmd","alt"],markdownEnumDescriptions:[m(1769,"Maps to `Control` on Windows and Linux and to `Command` on macOS."),m(1770,"Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],default:"ctrlCmd",description:m(1771,"The modifier to be used to add an item in trees and lists to a multi-selection with the mouse (for example in the explorer, open editors and scm view). The 'Open to Side' mouse gestures - if supported - will adapt such that they do not conflict with the multiselect modifier.")},[V6]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:m(1772,"Controls how to open items in trees and lists using the mouse (if supported). Note that some trees and lists might choose to ignore this setting if it is not applicable.")},[ah]:{type:"boolean",default:!1,description:m(1773,"Controls whether lists and trees support horizontal scrolling in the workbench. Warning: turning on this setting has a performance implication.")},[Yu]:{type:"boolean",default:!1,description:m(1774,"Controls whether clicks in the scrollbar scroll page by page.")},[pN]:{type:"number",default:8,minimum:4,maximum:40,description:m(1775,"Controls tree indentation in pixels.")},[$6]:{type:"string",enum:["none","onHover","always"],default:"onHover",description:m(1776,"Controls whether the tree should render indent guides.")},[Zu]:{type:"boolean",default:!1,description:m(1777,"Controls whether lists and trees have smooth scrolling.")},[Dg]:{type:"number",default:1,markdownDescription:m(1778,"A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")},[Ng]:{type:"number",default:5,markdownDescription:m(1779,"Scrolling speed multiplier when pressing `Alt`.")},[Jie]:{type:"string",enum:["highlight","filter"],enumDescriptions:[m(1780,"Highlight elements when searching. Further up and down navigation will traverse only the highlighted elements."),m(1781,"Filter elements when searching.")],default:"highlight",description:m(1782,"Controls the default find mode for lists and trees in the workbench.")},[U6]:{type:"string",enum:["simple","highlight","filter"],enumDescriptions:[m(1783,"Simple keyboard navigation focuses elements which match the keyboard input. Matching is done only on prefixes."),m(1784,"Highlight keyboard navigation highlights elements which match the keyboard input. Further up and down navigation will traverse only the highlighted elements."),m(1785,"Filter keyboard navigation will filter out and hide all the elements which do not match the keyboard input.")],default:"highlight",description:m(1786,"Controls the keyboard navigation style for lists and trees in the workbench. Can be simple, highlight and filter."),deprecated:!0,deprecationMessage:m(1787,"Please use 'workbench.list.defaultFindMode' and 'workbench.list.typeNavigationMode' instead.")},[tne]:{type:"string",enum:["fuzzy","contiguous"],enumDescriptions:[m(1788,"Use fuzzy matching when searching."),m(1789,"Use contiguous matching when searching.")],default:"fuzzy",description:m(1790,"Controls the type of matching used when searching lists and trees in the workbench.")},[q6]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:m(1791,"Controls how tree folders are expanded when clicking the folder names. Note that some trees and lists might choose to ignore this setting if it is not applicable.")},[j6]:{type:"boolean",default:!0,description:m(1792,"Controls whether sticky scrolling is enabled in trees.")},[K6]:{type:"number",minimum:1,default:7,markdownDescription:m(1793,"Controls the number of sticky elements displayed in the tree when {0} is enabled.","`#workbench.tree.enableStickyScroll#`")},[ene]:{type:"string",enum:["automatic","trigger"],default:"automatic",markdownDescription:m(1794,"Controls how type navigation works in lists and trees in the workbench. When set to `trigger`, type navigation begins once the `list.triggerTypeNavigation` command is run.")}}})});var n9,gLe=x(()=>{W();So();n9=class extends T{constructor(e,t=[]){super(),this.logger=new rP([e,...t]),this._register(e.onDidChangeLogLevel(i=>this.setLevel(i)))}get onDidChangeLogLevel(){return this.logger.onDidChangeLogLevel}setLevel(e){this.logger.setLevel(e)}getLevel(){return this.logger.getLevel()}trace(e,...t){this.logger.trace(e,...t)}debug(e,...t){this.logger.debug(e,...t)}info(e,...t){this.logger.info(e,...t)}warn(e,...t){this.logger.warn(e,...t)}error(e,...t){this.logger.error(e,...t)}}});var tn,vN,za,Xu=x(()=>{fp();le();Ie();(function(o){o[o.Hint=1]="Hint",o[o.Info=2]="Info",o[o.Warning=4]="Warning",o[o.Error=8]="Error"})(tn||(tn={}));(function(o){function e(l,c){return c-l}o.compare=e;let t=Object.create(null);t[o.Error]=m(1795,"Error"),t[o.Warning]=m(1796,"Warning"),t[o.Info]=m(1797,"Info");function i(l){return t[l]||""}o.toString=i;let n=Object.create(null);n[o.Error]=m(1798,"Errors"),n[o.Warning]=m(1799,"Warnings"),n[o.Info]=m(1800,"Infos");function s(l){return n[l]||""}o.toStringPlural=s;function r(l){switch(l){case rn.Error:return o.Error;case rn.Warning:return o.Warning;case rn.Info:return o.Info;case rn.Ignore:return o.Hint}}o.fromSeverity=r;function a(l){switch(l){case o.Error:return rn.Error;case o.Warning:return rn.Warning;case o.Info:return rn.Info;case o.Hint:return rn.Ignore}}o.toSeverity=a})(tn||(tn={}));(function(o){function t(n){return i(n,!0)}o.makeKey=t;function i(n,s){let r=[""];return n.source?r.push(n.source.replace("\xA6","\\\xA6")):r.push(""),n.code?typeof n.code=="string"?r.push(n.code.replace("\xA6","\\\xA6")):r.push(n.code.value.replace("\xA6","\\\xA6")):r.push(""),n.severity!==void 0&&n.severity!==null?r.push(tn.toString(n.severity)):r.push(""),n.message&&s?r.push(n.message.replace("\xA6","\\\xA6")):r.push(""),n.startLineNumber!==void 0&&n.startLineNumber!==null?r.push(n.startLineNumber.toString()):r.push(""),n.startColumn!==void 0&&n.startColumn!==null?r.push(n.startColumn.toString()):r.push(""),n.endLineNumber!==void 0&&n.endLineNumber!==null?r.push(n.endLineNumber.toString()):r.push(""),n.endColumn!==void 0&&n.endColumn!==null?r.push(n.endColumn.toString()):r.push(""),r.push(""),r.join("\xA6")}o.makeKeyOptionalMessage=i})(vN||(vN={}));za=Ne("markerService")});var x9e,ine,nne,o9,mLe=x(()=>{qe();ae();oa();yo();jo();ai();le();Xu();x9e=new Set([Fe.inMemory,Fe.vscodeSourceControl,Fe.walkThrough,Fe.walkThroughSnippet,Fe.vscodeChatCodeBlock,Fe.vscodeTerminal]),ine=class{constructor(){this._byResource=new un,this._byOwner=new Map}set(e,t,i){let n=this._byResource.get(e);n||(n=new Map,this._byResource.set(e,n)),n.set(t,i);let s=this._byOwner.get(t);s||(s=new un,this._byOwner.set(t,s)),s.set(e,i)}get(e,t){return this._byResource.get(e)?.get(t)}delete(e,t){let i=!1,n=!1,s=this._byResource.get(e);s&&(i=s.delete(t));let r=this._byOwner.get(t);if(r&&(n=r.delete(e)),i!==n)throw new Error("illegal state");return i&&n}values(e){return typeof e=="string"?this._byOwner.get(e)?.values()??ut.empty():Le.isUri(e)?this._byResource.get(e)?.values()??ut.empty():ut.map(ut.concat(...this._byOwner.values()),t=>t[1])}},nne=class{constructor(e){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=new un,this._service=e,this._subscription=e.onMarkerChanged(this._update,this)}dispose(){this._subscription.dispose()}_update(e){for(let t of e){let i=this._data.get(t);i&&this._substract(i);let n=this._resourceStats(t);this._add(n),this._data.set(t,n)}}_resourceStats(e){let t={errors:0,warnings:0,infos:0,unknowns:0};if(x9e.has(e.scheme))return t;for(let{severity:i}of this._service.read({resource:e}))i===tn.Error?t.errors+=1:i===tn.Warning?t.warnings+=1:i===tn.Info?t.infos+=1:t.unknowns+=1;return t}_substract(e){this.errors-=e.errors,this.warnings-=e.warnings,this.infos-=e.infos,this.unknowns-=e.unknowns}_add(e){this.errors+=e.errors,this.warnings+=e.warnings,this.infos+=e.infos,this.unknowns+=e.unknowns}},o9=class o{constructor(){this._onMarkerChanged=new ox({merge:o._merge}),this.onMarkerChanged=this._onMarkerChanged.event,this._data=new ine,this._stats=new nne(this),this._filteredResources=new un}dispose(){this._stats.dispose(),this._onMarkerChanged.dispose()}remove(e,t){for(let i of t||[])this.changeOne(e,i,[])}changeOne(e,t,i){if(xM(i))this._data.delete(t,e)&&this._onMarkerChanged.fire([t]);else{let n=[];for(let s of i){let r=o._toMarker(e,t,s);r&&n.push(r)}this._data.set(t,e,n),this._onMarkerChanged.fire([t])}}static _toMarker(e,t,i){let{code:n,severity:s,message:r,source:a,startLineNumber:l,startColumn:c,endLineNumber:d,endColumn:h,relatedInformation:u,modelVersionId:f,tags:g,origin:p}=i;if(r)return l=l>0?l:1,c=c>0?c:1,d=d>=l?d:l,h=h>0?h:c,{resource:t,owner:e,code:n,severity:s,message:r,source:a,startLineNumber:l,startColumn:c,endLineNumber:d,endColumn:h,relatedInformation:u,modelVersionId:f,tags:g,origin:p}}changeAll(e,t){let i=[],n=this._data.values(e);if(n)for(let s of n){let r=ut.first(s);r&&(i.push(r.resource),this._data.delete(r.resource,e))}if(no(t)){let s=new un;for(let{resource:r,marker:a}of t){let l=o._toMarker(e,r,a);if(!l)continue;let c=s.get(r);c?c.push(l):(s.set(r,[l]),i.push(r))}for(let[r,a]of s)this._data.set(r,e,a)}i.length>0&&this._onMarkerChanged.fire(i)}_createFilteredMarker(e,t){let i=t.length===1?m(1801,'Problems are paused because: "{0}"',t[0]):m(1802,'Problems are paused because: "{0}" and {1} more',t[0],t.length-1);return{owner:"markersFilter",resource:e,severity:tn.Info,message:i,startLineNumber:1,startColumn:1,endLineNumber:1,endColumn:1}}read(e=Object.create(null)){let{owner:t,resource:i,severities:n,take:s}=e;if((!s||s<0)&&(s=-1),t&&i){let r=e.ignoreResourceFilters?void 0:this._filteredResources.get(i);if(r?.length)return[this._createFilteredMarker(i,r)];let a=this._data.get(i,t);if(!a)return[];let l=[];for(let c of a){if(s>0&&l.length===s)break;let d=e.ignoreResourceFilters?void 0:this._filteredResources.get(i);d?.length?l.push(this._createFilteredMarker(i,d)):o._accept(c,n)&&l.push(c)}return l}else{let r=!t&&!i?this._data.values():this._data.values(i??t),a=[],l=new eP;for(let c of r)for(let d of c){if(l.has(d.resource))continue;if(s>0&&a.length===s)break;let h=e.ignoreResourceFilters?void 0:this._filteredResources.get(d.resource);h?.length?(a.push(this._createFilteredMarker(d.resource,h)),l.add(d.resource)):o._accept(d,n)&&a.push(d)}return a}}static _accept(e,t){return t===void 0||(t&e.severity)===e.severity}static _merge(e){let t=new un;for(let i of e)for(let n of i)t.set(n,!0);return Array.from(t.keys())}}});var s9,Ic,Kl,Qh=x(()=>{Ie();s9=Ne("progressService"),Ic=class{static{this.None=Object.freeze({report(){}})}constructor(e){this.callback=e}report(e){this._value=e,this.callback(this._value)}},Kl=Ne("editorProgressService")});var wN,pLe=x(()=>{re();et();Qo();eg();Xn();ei();wN=class{constructor(){this._modifierObservables=new WeakMap}readModifierKeyStatus(e,t){let i=e instanceof Window?e:we(e),n=this._modifierObservables.get(i);if(!n){let s=xu.getInstance();n=pt(this,s.event,()=>({ctrlKey:s.keyStatus.ctrlKey,shiftKey:s.keyStatus.shiftKey,altKey:s.keyStatus.altKey,metaKey:s.keyStatus.metaKey})),this._modifierObservables.set(i,n)}return n.read(t)}createFocusTracker(e,t){let i=t.add(as(e)),s=_e("isFocused",(r=>{if(r instanceof Window)return r.document.hasFocus();let a=r.getRootNode()instanceof ShadowRoot?r.getRootNode():null,l=a?a.activeElement:r.ownerDocument.activeElement;return r.contains(l)})(e));return t.add(i.onDidFocus(()=>s.set(!0,void 0))),t.add(i.onDidBlur(()=>s.set(!1,void 0))),s}createHoverTracker(e,t){let i=_e("isHovered",!1),n=()=>i.set(!0,void 0),s=()=>i.set(!1,void 0);return e.addEventListener("mouseenter",n),e.addEventListener("mouseleave",s),t.add({dispose:()=>{e.removeEventListener("mouseenter",n),e.removeEventListener("mouseleave",s)}}),i}createDomFocusTracker(e){return as(e)}};Je(ba,wN,1)});function a9(o){let e=o;return typeof e?.id=="string"&&Le.isUri(e.uri)}function _Le(o){return typeof o?.id=="string"&&!a9(o)&&!L9e(o)}function bLe(o,e){if(typeof o=="string"||typeof o>"u")return typeof o=="string"?{id:Td(o)}:k9e;let t=o;return t.configuration?{id:t.id,configPath:t.configuration}:t.folders.length===1?{id:t.id,uri:t.folders[0].uri}:{id:t.id}}function L9e(o){let e=o;return typeof e?.id=="string"&&Le.isUri(e.configPath)}function vLe(o){return o.id===one}var ad,k9e,r9,l9,one,My=x(()=>{le();yh();O8();ai();Ie();ad=Ne("contextService");k9e={id:"empty-window"};r9=class{constructor(e,t){this.raw=t,this.uri=e.uri,this.index=e.index,this.name=e.name}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}},l9="code-workspace";m(2119,"Code Workspace");one="4064f6ec-cb38-4ad0-af64-ee6467e63c82"});var c9,sne=x(()=>{Ie();c9=Ne("workspaceTrustManagementService")});var Jh,Ik,Ag,d9,uv=x(()=>{Ie();ai();Rt();Jh=Ne("IWorkspaceEditService"),Ik=class{constructor(e){this.metadata=e}static convert(e){return e.edits.map(t=>{if(Ag.is(t))return Ag.lift(t);if(d9.is(t))return d9.lift(t);throw new Error("Unsupported edit")})}},Ag=class o extends Ik{static is(e){return e instanceof o?!0:ln(e)&&Le.isUri(e.resource)&&ln(e.textEdit)}static lift(e){return e instanceof o?e:new o(e.resource,e.textEdit,e.versionId,e.metadata)}constructor(e,t,i=void 0,n){super(n),this.resource=e,this.textEdit=t,this.versionId=i}},d9=class o extends Ik{static is(e){return e instanceof o?!0:ln(e)&&(!!e.newResource||!!e.oldResource)}static lift(e){return e instanceof o?e:new o(e.oldResource,e.newResource,e.options,e.metadata)}constructor(e,t,i={},n){super(n),this.oldResource=e,this.newResource=t,this.options=i}}});var CN,wLe=x(()=>{(function(o){o[o.API=0]="API",o[o.USER=1]="USER"})(CN||(CN={}))});var lne,h9,rne,ane,u9,CLe=x(()=>{re();br();Vt();tc();yo();qW();jo();Xo();ai();ao();Ii();wLe();eh();lne=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},h9=function(o,e){return function(t,i){e(t,i,o)}},rne=class{constructor(e){this._commandService=e}async open(e,t){if(!Rw(e,Fe.command))return!1;if(!t?.allowCommands||(typeof e=="string"&&(e=Le.parse(e)),Array.isArray(t.allowCommands)&&!t.allowCommands.includes(e.path)))return!0;let i=[];try{i=TD(decodeURIComponent(e.query))}catch{try{i=TD(e.query)}catch{}}return Array.isArray(i)||(i=[i]),await this._commandService.executeCommand(e.path,...i),!0}};rne=lne([h9(0,Et)],rne);ane=class{constructor(e){this._editorService=e}async open(e,t){typeof e=="string"&&(e=Le.parse(e));let{selection:i,uri:n}=z1e(e);return e=n,e.scheme===Fe.file&&(e=Kme(e)),await this._editorService.openCodeEditor({resource:e,options:{selection:i,source:t?.fromUserGesture?CN.USER:CN.API,...t?.editorOptions}},this._editorService.getFocusedCodeEditor(),t?.openToSide),!0}};ane=lne([h9(0,ot)],ane);u9=class{constructor(e,t){this._openers=new In,this._validators=new In,this._resolvers=new In,this._resolvedUriTargets=new un(i=>i.with({path:null,fragment:null,query:null}).toString()),this._externalOpeners=new In,this._defaultExternalOpener={openExternal:async i=>(rE(i,Fe.http,Fe.https)?WO(i):Tt.location.href=i,!0)},this._openers.push({open:async(i,n)=>n?.openExternal||rE(i,Fe.mailto,Fe.http,Fe.https,Fe.vsls)?(await this._doOpenExternal(i,n),!0):!1}),this._openers.push(new rne(t)),this._openers.push(new ane(e))}registerOpener(e){return{dispose:this._openers.unshift(e)}}async open(e,t){let i=typeof e=="string"?Le.parse(e):e;if(i.scheme===Fe.internal)return!1;if(!t?.skipValidation){let n=this._resolvedUriTargets.get(i)??e;for(let s of this._validators)if(!await s.shouldOpen(n,t))return!1}for(let n of this._openers)if(await n.open(e,t))return!0;return!1}async resolveExternalUri(e,t){for(let i of this._resolvers)try{let n=await i.resolveExternalUri(e,t);if(n)return this._resolvedUriTargets.has(n.resolved)||this._resolvedUriTargets.set(n.resolved,e),n}catch{}throw new Error("Could not resolve external URI: "+e.toString())}async _doOpenExternal(e,t){let i=typeof e=="string"?Le.parse(e):e,n;try{n=(await this.resolveExternalUri(i,t)).resolved}catch{n=i}let s;if(typeof e=="string"&&i.toString()===n.toString()?s=e:s=encodeURI(n.toString(!0)),t?.allowContributedOpeners){let r=typeof t?.allowContributedOpeners=="string"?t?.allowContributedOpeners:void 0;for(let a of this._externalOpeners)if(await a.openExternal(s,{sourceUri:i,preferredOpenerId:r},Xe.None))return!0}return this._defaultExternalOpener.openExternal(s,{sourceUri:i},Xe.None)}dispose(){this._validators.clear()}};u9=lne([h9(0,ot),h9(1,Et)],u9)});var g9,f9,cne=x(()=>{et();Ie();ei();g9=Ne("renameSymbolTrackerService"),f9=class{constructor(){this._trackedWord=_e(this,void 0),this.trackedWord=this._trackedWord,this._trackedWord.set(void 0,void 0)}}});var lr,dne=x(()=>{lr={enableSplitViewResizing:!0,renderSideBySide:!0,renderMarginRevertIcon:!0,renderGutterMenu:!0,maxComputationTime:5e3,maxFileSize:50,ignoreTrimWhitespace:!0,renderIndicators:!0,originalEditable:!1,diffCodeLens:!1,renderOverviewRuler:!0,diffWordWrap:"inherit",diffAlgorithm:"advanced",accessibilityVerbose:!1,experimental:{showMoves:!1,showEmptyDecorations:!0,useTrueInlineView:!1},hideUnchangedRegions:{enabled:!1,contextLineCount:3,minimumLineCount:3,revealLineCount:20},isInEmbeddedEditor:!1,onlyShowAccessibleDiffViewer:!1,renderSideBySideInlineBreakpoint:900,useInlineViewWhenSpaceIsLimited:!0,compactMode:!1}});function I9e(o){return typeof o.type<"u"||typeof o.anyOf<"u"}function yLe(){return m9===null&&(m9=Object.create(null),Object.keys(p9.properties).forEach(o=>{m9[o]=!0})),m9}function SLe(o){return yLe()[`editor.${o}`]||!1}function xLe(o){return yLe()[`diffEditor.${o}`]||!1}var yN,p9,m9,E9e,hne=x(()=>{dne();Uo();WI();le();Hm();ls();yN=Object.freeze({id:"editor",order:5,type:"object",title:m(163,"Editor"),scope:6}),p9={...yN,properties:{"editor.tabSize":{type:"number",default:_s.tabSize,minimum:1,maximum:100,markdownDescription:m(164,"The number of spaces a tab is equal to. This setting is overridden based on the file contents when {0} is on.","`#editor.detectIndentation#`")},"editor.indentSize":{anyOf:[{type:"string",enum:["tabSize"]},{type:"number",minimum:1}],default:"tabSize",markdownDescription:m(165,'The number of spaces used for indentation or `"tabSize"` to use the value from `#editor.tabSize#`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.')},"editor.insertSpaces":{type:"boolean",default:_s.insertSpaces,markdownDescription:m(166,"Insert spaces when pressing `Tab`. This setting is overridden based on the file contents when {0} is on.","`#editor.detectIndentation#`")},"editor.detectIndentation":{type:"boolean",default:_s.detectIndentation,markdownDescription:m(167,"Controls whether {0} and {1} will be automatically detected when a file is opened based on the file contents.","`#editor.tabSize#`","`#editor.insertSpaces#`")},"editor.trimAutoWhitespace":{type:"boolean",default:_s.trimAutoWhitespace,description:m(168,"Remove trailing auto inserted whitespace.")},"editor.largeFileOptimizations":{type:"boolean",default:_s.largeFileOptimizations,description:m(169,"Special handling for large files to disable certain memory intensive features.")},"editor.wordBasedSuggestions":{enum:["off","offWithInlineSuggestions","currentDocument","matchingDocuments","allDocuments"],default:"offWithInlineSuggestions",enumDescriptions:[m(170,"Turn off Word Based Suggestions."),m(171,"Turn off Word Based Suggestions when Inline Suggestions are present."),m(172,"Only suggest words from the active document."),m(173,"Suggest words from all open documents of the same language."),m(174,"Suggest words from all open documents.")],description:m(175,"Controls whether completions should be computed based on words in the document and from which documents they are computed."),experiment:{mode:"auto"}},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[m(176,"Semantic highlighting enabled for all color themes."),m(177,"Semantic highlighting disabled for all color themes."),m(178,"Semantic highlighting is configured by the current color theme's `semanticHighlighting` setting.")],default:"configuredByTheme",description:m(179,"Controls whether the semanticHighlighting is shown for the languages that support it.")},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:m(180,"Keep peek editors open even when double-clicking their content or when hitting `Escape`.")},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:m(181,"Lines above this length will not be tokenized for performance reasons")},"editor.experimental.asyncTokenization":{type:"boolean",default:!0,description:m(182,"Controls whether the tokenization should happen asynchronously on a web worker."),tags:["experimental"]},"editor.experimental.asyncTokenizationLogging":{type:"boolean",default:!1,description:m(183,"Controls whether async tokenization should be logged. For debugging only.")},"editor.experimental.asyncTokenizationVerification":{type:"boolean",default:!1,description:m(184,"Controls whether async tokenization should be verified against legacy background tokenization. Might slow down tokenization. For debugging only."),tags:["experimental"]},"editor.experimental.treeSitterTelemetry":{type:"boolean",default:!1,markdownDescription:m(185,"Controls whether tree sitter parsing should be turned on and telemetry collected. Setting `#editor.experimental.preferTreeSitter#` for specific languages will take precedence."),tags:["experimental"],experiment:{mode:"auto"}},"editor.experimental.preferTreeSitter.css":{type:"boolean",default:!1,markdownDescription:m(186,"Controls whether tree sitter parsing should be turned on for css. This will take precedence over `#editor.experimental.treeSitterTelemetry#` for css."),tags:["experimental"],experiment:{mode:"auto"}},"editor.experimental.preferTreeSitter.typescript":{type:"boolean",default:!1,markdownDescription:m(187,"Controls whether tree sitter parsing should be turned on for typescript. This will take precedence over `#editor.experimental.treeSitterTelemetry#` for typescript."),tags:["experimental"],experiment:{mode:"auto"}},"editor.experimental.preferTreeSitter.ini":{type:"boolean",default:!1,markdownDescription:m(188,"Controls whether tree sitter parsing should be turned on for ini. This will take precedence over `#editor.experimental.treeSitterTelemetry#` for ini."),tags:["experimental"],experiment:{mode:"auto"}},"editor.experimental.preferTreeSitter.regex":{type:"boolean",default:!1,markdownDescription:m(189,"Controls whether tree sitter parsing should be turned on for regex. This will take precedence over `#editor.experimental.treeSitterTelemetry#` for regex."),tags:["experimental"],experiment:{mode:"auto"}},"editor.language.brackets":{type:["array","null"],default:null,description:m(190,"Defines the bracket symbols that increase or decrease the indentation."),items:{type:"array",items:[{type:"string",description:m(191,"The opening bracket character or string sequence.")},{type:"string",description:m(192,"The closing bracket character or string sequence.")}]}},"editor.language.colorizedBracketPairs":{type:["array","null"],default:null,description:m(193,"Defines the bracket pairs that are colorized by their nesting level if bracket pair colorization is enabled."),items:{type:"array",items:[{type:"string",description:m(194,"The opening bracket character or string sequence.")},{type:"string",description:m(195,"The closing bracket character or string sequence.")}]}},"diffEditor.maxComputationTime":{type:"number",default:lr.maxComputationTime,description:m(196,"Timeout in milliseconds after which diff computation is cancelled. Use 0 for no timeout.")},"diffEditor.maxFileSize":{type:"number",default:lr.maxFileSize,description:m(197,"Maximum file size in MB for which to compute diffs. Use 0 for no limit.")},"diffEditor.renderSideBySide":{type:"boolean",default:lr.renderSideBySide,description:m(198,"Controls whether the diff editor shows the diff side by side or inline."),agentsWindow:{default:!0}},"diffEditor.renderSideBySideInlineBreakpoint":{type:"number",default:lr.renderSideBySideInlineBreakpoint,description:m(199,"If the diff editor width is smaller than this value, the inline view is used.")},"diffEditor.useInlineViewWhenSpaceIsLimited":{type:"boolean",default:lr.useInlineViewWhenSpaceIsLimited,description:m(200,"If enabled and the editor width is too small, the inline view is used."),agentsWindow:{default:!0}},"diffEditor.renderMarginRevertIcon":{type:"boolean",default:lr.renderMarginRevertIcon,description:m(201,"When enabled, the diff editor shows arrows in its glyph margin to revert changes."),agentsWindow:{default:!1}},"diffEditor.renderGutterMenu":{type:"boolean",default:lr.renderGutterMenu,description:m(202,"When enabled, the diff editor shows a special gutter for revert and stage actions."),agentsWindow:{default:!1}},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:lr.ignoreTrimWhitespace,description:m(203,"When enabled, the diff editor ignores changes in leading or trailing whitespace.")},"diffEditor.renderIndicators":{type:"boolean",default:lr.renderIndicators,description:m(204,"Controls whether the diff editor shows +/- indicators for added/removed changes."),agentsWindow:{default:!1}},"diffEditor.codeLens":{type:"boolean",default:lr.diffCodeLens,description:m(205,"Controls whether the editor shows CodeLens.")},"diffEditor.wordWrap":{type:"string",enum:["off","on","inherit"],default:lr.diffWordWrap,markdownEnumDescriptions:[m(206,"Lines will never wrap."),m(207,"Lines will wrap at the viewport width."),m(208,"Lines will wrap according to the {0} setting.","`#editor.wordWrap#`")]},"diffEditor.diffAlgorithm":{type:"string",enum:["legacy","advanced","advanced-external","advanced-wasm"],default:lr.diffAlgorithm,markdownEnumDescriptions:[m(209,"Uses the legacy diffing algorithm."),m(210,"Uses the advanced diffing algorithm."),m(211,"Uses the advanced diffing algorithm from the external `@vscode/diff` package (pure JavaScript)."),m(212,"Uses the advanced diffing algorithm from the external `@vscode/diff` package (WebAssembly).")]},"diffEditor.hideUnchangedRegions.enabled":{type:"boolean",default:lr.hideUnchangedRegions.enabled,markdownDescription:m(213,"Controls whether the diff editor shows unchanged regions."),agentsWindow:{default:!0}},"diffEditor.hideUnchangedRegions.revealLineCount":{type:"integer",default:lr.hideUnchangedRegions.revealLineCount,markdownDescription:m(214,"Controls how many lines are used for unchanged regions."),minimum:1},"diffEditor.hideUnchangedRegions.minimumLineCount":{type:"integer",default:lr.hideUnchangedRegions.minimumLineCount,markdownDescription:m(215,"Controls how many lines are used as a minimum for unchanged regions."),minimum:1},"diffEditor.hideUnchangedRegions.contextLineCount":{type:"integer",default:lr.hideUnchangedRegions.contextLineCount,markdownDescription:m(216,"Controls how many lines are used as context when comparing unchanged regions."),minimum:1},"diffEditor.experimental.showMoves":{type:"boolean",default:lr.experimental.showMoves,markdownDescription:m(217,"Controls whether the diff editor should show detected code moves.")},"diffEditor.experimental.showEmptyDecorations":{type:"boolean",default:lr.experimental.showEmptyDecorations,description:m(218,"Controls whether the diff editor shows empty decorations to see where characters got inserted or deleted.")},"diffEditor.experimental.useTrueInlineView":{type:"boolean",default:lr.experimental.useTrueInlineView,description:m(219,"If enabled and the editor uses the inline view, word changes are rendered inline.")}}};for(let o of k_){let e=o.schema;if(typeof e<"u")if(I9e(e))p9.properties[`editor.${o.name}`]=e;else for(let t in e)Object.hasOwnProperty.call(e,t)&&(p9.properties[t]=e[t])}m9=null;E9e=jt.as(da.Configuration);E9e.registerConfiguration(p9)});var Ni,lh=x(()=>{ue();Ni=class{static insert(e,t){return{range:new S(e.lineNumber,e.column,e.lineNumber,e.column),text:t,forceMoveMarkers:!0}}static delete(e){return{range:e,text:null}}static replace(e,t){return{range:e,text:t}}static replaceMove(e,t){return{range:e,text:t,forceMoveMarkers:!0}}}});function eu(o){kLe.push(o)}function LLe(){return kLe.slice(0)}var kLe,fv=x(()=>{kLe=[]});function SN(o,e=!1){T9e(o,!1,e)}function T9e(o,e,t){let i=D9e(o,e);Ek.push(i),i.userConfigured?ELe.push(i):une.push(i),t&&!i.userConfigured&&Ek.forEach(n=>{n.mime===i.mime||n.userConfigured||(i.extension&&n.extension===i.extension&&console.warn(`Overwriting extension <<${i.extension}>> to now point to mime <<${i.mime}>>`),i.filename&&n.filename===i.filename&&console.warn(`Overwriting filename <<${i.filename}>> to now point to mime <<${i.mime}>>`),i.filepattern&&n.filepattern===i.filepattern&&console.warn(`Overwriting filepattern <<${i.filepattern}>> to now point to mime <<${i.mime}>>`),i.firstline&&n.firstline===i.firstline&&console.warn(`Overwriting firstline <<${i.firstline}>> to now point to mime <<${i.mime}>>`))})}function D9e(o,e){return{id:o.id,mime:o.mime,filename:o.filename,extension:o.extension,filepattern:o.filepattern,firstline:o.firstline,userConfigured:e,filepatternParsed:o.filepattern?Fee(o.filepattern,{ignoreCase:!0}):void 0,filepatternOnPath:o.filepattern?o.filepattern.indexOf(vn.sep)>=0:!1}}function TLe(){Ek=Ek.filter(o=>o.userConfigured),une=[]}function DLe(o,e){return N9e(o,e).map(t=>t.id)}function N9e(o,e){let t;if(o)switch(o.scheme){case Fe.file:t=o.fsPath;break;case Fe.data:{t=Ef.parseMetaData(o).get(Ef.META_DATA_LABEL);break}case Fe.vscodeNotebookCell:t=void 0;break;default:t=o.path}if(!t)return[{id:"unknown",mime:yn.unknown}];t=t.toLowerCase();let i=Td(t),n=ILe(t,i,ELe);if(n)return[n,{id:cs,mime:yn.text}];let s=ILe(t,i,une);if(s)return[s,{id:cs,mime:yn.text}];if(e){let r=R9e(e);if(r)return[r,{id:cs,mime:yn.text}]}return[{id:"unknown",mime:yn.unknown}]}function ILe(o,e,t){let i,n,s;for(let r=t.length-1;r>=0;r--){let a=t[r];if(Sge(e,a.filename)){i=a;break}if(a.filepattern&&(!n||a.filepattern.length>n.filepattern.length)){let l=a.filepatternOnPath?o:e;a.filepatternParsed?.(l)&&(n=a)}a.extension&&(!s||a.extension.length>s.extension.length)&&rO(e,a.extension)&&(s=a)}if(i)return i;if(n)return n;if(s)return s}function R9e(o){if(_x(o)&&(o=o.substring(1)),o.length>0)for(let e=Ek.length-1;e>=0;e--){let t=Ek[e];if(!t.firstline)continue;let i=o.match(t.firstline);if(i&&i.length>0)return t}}var Ek,une,ELe,NLe=x(()=>{Bee();Q_();jo();yh();Xo();He();zd();Ek=[],une=[],ELe=[]});var _9,RLe,fne,b9,ALe=x(()=>{ae();W();He();NLe();zd();Hm();ls();_9=Object.prototype.hasOwnProperty,RLe="vs.editor.nullLanguage",fne=class{constructor(){this._languageIdToLanguage=[],this._languageToLanguageId=new Map,this._register(RLe,0),this._register(cs,1),this._nextLanguageId=2}_register(e,t){this._languageIdToLanguage[t]=e,this._languageToLanguageId.set(e,t)}register(e){if(this._languageToLanguageId.has(e))return;let t=this._nextLanguageId++;this._register(e,t)}encodeLanguageId(e){return this._languageToLanguageId.get(e)||0}decodeLanguageId(e){return this._languageIdToLanguage[e]||RLe}},b9=class o extends T{static{this.instanceCount=0}constructor(e=!0,t=!1){super(),this._onDidChange=this._register(new N),this.onDidChange=this._onDidChange.event,o.instanceCount++,this._warnOnOverwrite=t,this.languageIdCodec=new fne,this._dynamicLanguages=[],this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},e&&(this._initializeFromRegistry(),this._register(eb.onDidChangeLanguages(i=>{this._initializeFromRegistry()})))}dispose(){o.instanceCount--,super.dispose()}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},TLe();let e=[].concat(eb.getLanguages()).concat(this._dynamicLanguages);this._registerLanguages(e)}_registerLanguages(e){for(let t of e)this._registerLanguage(t);this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach(t=>{let i=this._languages[t];i.name&&(this._nameMap[i.name]=i.identifier),i.aliases.forEach(n=>{this._lowercaseNameMap[n.toLowerCase()]=i.identifier}),i.mimetypes.forEach(n=>{this._mimeTypesMap[n]=i.identifier})}),jt.as(da.Configuration).registerOverrideIdentifiers(this.getRegisteredLanguageIds()),this._onDidChange.fire()}_registerLanguage(e){let t=e.id,i;_9.call(this._languages,t)?i=this._languages[t]:(this.languageIdCodec.register(t),i={identifier:t,name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[],icons:[]},this._languages[t]=i),this._mergeLanguage(i,e)}_mergeLanguage(e,t){let i=t.id,n=null;if(Array.isArray(t.mimetypes)&&t.mimetypes.length>0&&(e.mimetypes.push(...t.mimetypes),n=t.mimetypes[0]),n||(n=`text/x-${i}`,e.mimetypes.push(n)),Array.isArray(t.extensions)){t.configuration?e.extensions=t.extensions.concat(e.extensions):e.extensions=e.extensions.concat(t.extensions);for(let a of t.extensions)SN({id:i,mime:n,extension:a},this._warnOnOverwrite)}if(Array.isArray(t.filenames))for(let a of t.filenames)SN({id:i,mime:n,filename:a},this._warnOnOverwrite),e.filenames.push(a);if(Array.isArray(t.filenamePatterns))for(let a of t.filenamePatterns)SN({id:i,mime:n,filepattern:a},this._warnOnOverwrite);if(typeof t.firstLine=="string"&&t.firstLine.length>0){let a=t.firstLine;a.charAt(0)!=="^"&&(a="^"+a);try{let l=new RegExp(a);oO(l)||SN({id:i,mime:n,firstline:l},this._warnOnOverwrite)}catch(l){console.warn(`[${t.id}]: Invalid regular expression \`${a}\`: `,l)}}e.aliases.push(i);let s=null;if(typeof t.aliases<"u"&&Array.isArray(t.aliases)&&(t.aliases.length===0?s=[null]:s=t.aliases),s!==null)for(let a of s)!a||a.length===0||e.aliases.push(a);let r=s!==null&&s.length>0;if(!(r&&s[0]===null)){let a=(r?s[0]:null)||i;(r||!e.name)&&(e.name=a)}t.configuration&&e.configurationFiles.push(t.configuration),t.icon&&e.icons.push(t.icon)}isRegisteredLanguageId(e){return e?_9.call(this._languages,e):!1}getRegisteredLanguageIds(){return Object.keys(this._languages)}getLanguageIdByLanguageName(e){let t=e.toLowerCase();return _9.call(this._lowercaseNameMap,t)?this._lowercaseNameMap[t]:null}getLanguageIdByMimeType(e){return e&&_9.call(this._mimeTypesMap,e)?this._mimeTypesMap[e]:null}guessLanguageIdByFilepathOrFirstLine(e,t){return!e&&!t?[]:DLe(e,t)}}});var v9,w9,MLe=x(()=>{ae();W();ALe();Ci();zd();et();Xn();v9=class o extends T{static{this.instanceCount=0}constructor(e=!1){super(),this._onDidRequestBasicLanguageFeatures=this._register(new N),this.onDidRequestBasicLanguageFeatures=this._onDidRequestBasicLanguageFeatures.event,this._onDidRequestRichLanguageFeatures=this._register(new N),this.onDidRequestRichLanguageFeatures=this._onDidRequestRichLanguageFeatures.event,this._onDidChange=this._register(new N({leakWarningThreshold:200,leakWarningName:"LanguageService._onDidChange"})),this.onDidChange=this._onDidChange.event,this._requestedBasicLanguages=new Set,this._requestedRichLanguages=new Set,o.instanceCount++,this._registry=this._register(new b9(!0,e)),this.languageIdCodec=this._registry.languageIdCodec,this._register(this._registry.onDidChange(()=>this._onDidChange.fire()))}dispose(){o.instanceCount--,super.dispose()}isRegisteredLanguageId(e){return this._registry.isRegisteredLanguageId(e)}getLanguageIdByLanguageName(e){return this._registry.getLanguageIdByLanguageName(e)}getLanguageIdByMimeType(e){return this._registry.getLanguageIdByMimeType(e)}guessLanguageIdByFilepathOrFirstLine(e,t){return this._registry.guessLanguageIdByFilepathOrFirstLine(e,t).at(0)??null}createById(e){return new w9(this.onDidChange,()=>this._createAndGetLanguageIdentifier(e))}createByFilepathOrFirstLine(e,t){return new w9(this.onDidChange,()=>{let i=this.guessLanguageIdByFilepathOrFirstLine(e,t);return this._createAndGetLanguageIdentifier(i)})}_createAndGetLanguageIdentifier(e){return(!e||!this.isRegisteredLanguageId(e))&&(e=cs),e}requestBasicLanguageFeatures(e){this._requestedBasicLanguages.has(e)||(this._requestedBasicLanguages.add(e),this._onDidRequestBasicLanguageFeatures.fire(e))}requestRichLanguageFeatures(e){this._requestedRichLanguages.has(e)||(this._requestedRichLanguages.add(e),this.requestBasicLanguageFeatures(e),Ti.getOrCreate(e),this._onDidRequestRichLanguageFeatures.fire(e))}},w9=class{constructor(e,t){this._value=pt(this,e,()=>t()),this.onDidChange=Q.fromObservable(this._value)}get languageId(){return this._value.get()}}});var A9e,OLe,C9,gne,PLe=x(()=>{Xu();W();ho();Kt();Wl();Ra();ue();jo();ae();$t();bi();Zi();xi();qi();Mi();Xi();$i();Vi();Qi();Ji();yo();n0();oa();A9e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},OLe=function(o,e){return function(t,i){e(t,i,o)}},C9=class extends T{constructor(e,t){super(),this._markerService=t,this._onDidChangeMarker=this._register(new N),this._suppressedRanges=new un,this._markerDecorations=new un,e.getModels().forEach(i=>this._onModelAdded(i)),this._register(e.onModelAdded(this._onModelAdded,this)),this._register(e.onModelRemoved(this._onModelRemoved,this)),this._register(this._markerService.onMarkerChanged(this._handleMarkerChange,this))}dispose(){super.dispose(),this._markerDecorations.forEach(e=>e.dispose()),this._markerDecorations.clear()}getMarker(e,t){let i=this._markerDecorations.get(e);return i&&i.getMarker(t)||null}_handleMarkerChange(e){e.forEach(t=>{let i=this._markerDecorations.get(t);i&&this._updateDecorations(i)})}_onModelAdded(e){let t=new gne(e);this._markerDecorations.set(e.uri,t),this._updateDecorations(t)}_onModelRemoved(e){let t=this._markerDecorations.get(e.uri);t&&(t.dispose(),this._markerDecorations.delete(e.uri)),(e.uri.scheme===Fe.inMemory||e.uri.scheme===Fe.internal||e.uri.scheme===Fe.vscode)&&this._markerService?.read({resource:e.uri}).map(i=>i.owner).forEach(i=>this._markerService.remove(i,[e.uri]))}_updateDecorations(e){let t=this._markerService.read({resource:e.model.uri,take:500}),i=this._suppressedRanges.get(e.model.uri);i&&(t=t.filter(n=>!ut.some(i,s=>S.areIntersectingOrTouching(s,n)))),e.update(t)&&this._onDidChangeMarker.fire(e.model)}};C9=A9e([OLe(0,ui),OLe(1,za)],C9);gne=class extends T{constructor(e){super(),this.model=e,this._map=new tP,this._register(ne(()=>{this.model.deltaDecorations([...this._map.values()],[]),this._map.clear()}))}update(e){let{added:t,removed:i}=Pye(new Set(this._map.keys()),new Set(e));if(t.length===0&&i.length===0)return!1;let n=i.map(a=>this._map.get(a)),s=t.map(a=>({range:this._createDecorationRange(this.model,a),options:this._createDecorationOption(a)})),r=this.model.deltaDecorations(n,s);for(let a of i)this._map.delete(a);for(let a=0;a=n)return i;let s=e.getWordAtPosition(i.getStartPosition());s&&(i=new S(i.startLineNumber,s.startColumn,i.endLineNumber,s.endColumn))}else if(t.endColumn===Number.MAX_VALUE&&t.startColumn===1&&i.startLineNumber===i.endLineNumber){let n=e.getLineFirstNonWhitespaceColumn(t.startLineNumber);n=0:!1}}});function Oy(o){return o.toString()}var M9e,y9,Tk,mne,O9e,pne,S9,_ne,FLe=x(()=>{ae();Nm();W();jo();$a();rt();oi();Ie();H3();Uo();WI();zd();IQ();Kn();zE();M9e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},y9=function(o,e){return function(t,i){e(t,i,o)}};mne=class{constructor(e,t,i){this.model=e,this._modelEventListeners=new F,this.model=e,this._modelEventListeners.add(e.onWillDispose(()=>t(e))),this._modelEventListeners.add(e.onDidChangeLanguage(n=>i(e,n)))}dispose(){this._modelEventListeners.dispose()}},O9e=po||Ye?1:2,pne=class{constructor(e,t,i,n,s,r,a,l){this.uri=e,this.initialUndoRedoSnapshot=t,this.time=i,this.sharesUndoRedoStack=n,this.heapSize=s,this.sha1=r,this.versionId=a,this.alternativeVersionId=l}},S9=class extends T{static{Tk=this}static{this.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20*1024*1024}constructor(e,t,i,n){super(),this._configurationService=e,this._resourcePropertiesService=t,this._undoRedoService=i,this._instantiationService=n,this._onModelAdded=this._register(new N),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new N),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new N),this.onModelLanguageChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._register(this._configurationService.onDidChangeConfiguration(s=>this._updateModelOptions(s))),this._updateModelOptions(void 0)}static _readModelOptions(e,t){let i=_s.tabSize;e.editor&&typeof e.editor.tabSize<"u"&&(i=mu(e.editor.tabSize,_s.tabSize,1,100));let n="tabSize";e.editor&&typeof e.editor.indentSize<"u"&&e.editor.indentSize!=="tabSize"&&(n=mu(e.editor.indentSize,"tabSize",1,100));let s=_s.insertSpaces;e.editor&&typeof e.editor.insertSpaces<"u"&&(s=e.editor.insertSpaces==="false"?!1:!!e.editor.insertSpaces);let r=O9e,a=e.eol;a===`\r +`?r=2:a===` +`&&(r=1);let l=_s.trimAutoWhitespace;e.editor&&typeof e.editor.trimAutoWhitespace<"u"&&(l=e.editor.trimAutoWhitespace==="false"?!1:!!e.editor.trimAutoWhitespace);let c=_s.detectIndentation;e.editor&&typeof e.editor.detectIndentation<"u"&&(c=e.editor.detectIndentation==="false"?!1:!!e.editor.detectIndentation);let d=_s.largeFileOptimizations;e.editor&&typeof e.editor.largeFileOptimizations<"u"&&(d=e.editor.largeFileOptimizations==="false"?!1:!!e.editor.largeFileOptimizations);let h=_s.bracketPairColorizationOptions;if(e.editor?.bracketPairColorization&&typeof e.editor.bracketPairColorization=="object"){let u=e.editor.bracketPairColorization;h={enabled:!!u.enabled,independentColorPoolPerBracketType:!!u.independentColorPoolPerBracketType}}return{isForSimpleWidget:t,tabSize:i,indentSize:n,insertSpaces:s,detectIndentation:c,defaultEOL:r,trimAutoWhitespace:l,largeFileOptimizations:d,bracketPairColorizationOptions:h}}_getEOL(e,t){if(e)return this._resourcePropertiesService.getEOL(e,t);let i=this._configurationService.getValue("files.eol",{overrideIdentifier:t});return i&&typeof i=="string"&&i!=="auto"?i:Po===3||Po===2?` +`:`\r +`}_shouldRestoreUndoStack(){let e=this._configurationService.getValue("files.restoreUndoStack");return typeof e=="boolean"?e:!0}getCreationOptions(e,t,i){let n=typeof e=="string"?e:e.languageId,s=this._modelCreationOptionsByLanguageAndResource[n+t];if(!s){let r=this._configurationService.getValue("editor",{overrideIdentifier:n,resource:t}),a=this._getEOL(t,n);s=Tk._readModelOptions({editor:r,eol:a},i),this._modelCreationOptionsByLanguageAndResource[n+t]=s}return s}_updateModelOptions(e){let t=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);let i=Object.keys(this._models);for(let n=0,s=i.length;ne){let t=[];for(this._disposedModels.forEach(i=>{i.sharesUndoRedoStack||t.push(i)}),t.sort((i,n)=>i.time-n.time);t.length>0&&this._disposedModelsHeapSize>e;){let i=t.shift();this._removeDisposedModel(i.uri),i.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(i.initialUndoRedoSnapshot)}}}_createModelData(e,t,i,n){let s=this.getCreationOptions(t,i,n),r=this._instantiationService.createInstance(dg,e,t,s,i);if(i&&this._disposedModels.has(Oy(i))){let c=this._removeDisposedModel(i),d=this._undoRedoService.getElements(i),h=this._getSHA1Computer(),u=h.canComputeSHA1(r)?h.computeSHA1(r)===c.sha1:!1;if(u||c.sharesUndoRedoStack){for(let f of d.past)ig(f)&&f.matchesResource(i)&&f.setModel(r);for(let f of d.future)ig(f)&&f.matchesResource(i)&&f.setModel(r);this._undoRedoService.setElementsValidFlag(i,!0,f=>ig(f)&&f.matchesResource(i)),u&&(r._overwriteVersionId(c.versionId),r._overwriteAlternativeVersionId(c.alternativeVersionId),r._overwriteInitialUndoRedoSnapshot(c.initialUndoRedoSnapshot))}else c.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(c.initialUndoRedoSnapshot)}let a=Oy(r.uri);if(this._models[a])throw new Error("ModelService: Cannot add model because it already exists!");let l=new mne(r,c=>this._onWillDispose(c),(c,d)=>this._onDidChangeLanguage(c,d));return this._models[a]=l,l}createModel(e,t,i,n=!1){let s;return t?s=this._createModelData(e,t,i,n):s=this._createModelData(e,cs,i,n),this._onModelAdded.fire(s.model),s.model}getModels(){let e=[],t=Object.keys(this._models);for(let i=0,n=t.length;i0||c.future.length>0){for(let d of c.past)ig(d)&&d.matchesResource(e.uri)&&(s=!0,r+=d.heapSize(e.uri),d.setModel(e.uri));for(let d of c.future)ig(d)&&d.matchesResource(e.uri)&&(s=!0,r+=d.heapSize(e.uri),d.setModel(e.uri))}}let a=Tk.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK,l=this._getSHA1Computer();if(s)if(!n&&(r>a||!l.canComputeSHA1(e))){let c=i.model.getInitialUndoRedoSnapshot();c!==null&&this._undoRedoService.restoreSnapshot(c)}else this._ensureDisposedModelsHeapSize(a-r),this._undoRedoService.setElementsValidFlag(e.uri,!1,c=>ig(c)&&c.matchesResource(e.uri)),this._insertDisposedModel(new pne(e.uri,i.model.getInitialUndoRedoSnapshot(),Date.now(),n,r,l.computeSHA1(e),e.getVersionId(),e.getAlternativeVersionId()));else if(!n){let c=i.model.getInitialUndoRedoSnapshot();c!==null&&this._undoRedoService.restoreSnapshot(c)}delete this._models[t],i.dispose(),delete this._modelCreationOptionsByLanguageAndResource[e.getLanguageId()+e.uri],this._onModelRemoved.fire(e)}_onDidChangeLanguage(e,t){let i=t.oldLanguage,n=e.getLanguageId(),s=this.getCreationOptions(i,e.uri,e.isForSimpleWidget),r=this.getCreationOptions(n,e.uri,e.isForSimpleWidget);Tk._setModelOptionsForModel(e,r,s),this._onModelModeChanged.fire({model:e,oldLanguageId:i})}_getSHA1Computer(){return new _ne}};S9=Tk=M9e([y9(0,Me),y9(1,rF),y9(2,o0),y9(3,ie)],S9);_ne=class o{static{this.MAX_MODEL_SIZE=10*1024*1024}canComputeSHA1(e){return e.getValueLength()<=o.MAX_MODEL_SIZE}computeSHA1(e){let t=new yO,i=e.createSnapshot(),n;for(;n=i.read();)t.update(n);return t.digest()}}});var x9,Py,k9,xN,Dk,L9,I9,E9,Mg=x(()=>{le();(function(o){o.inspectTokensAction=m(821,"Developer: Inspect Tokens")})(x9||(x9={}));(function(o){o.gotoLineActionLabel=m(822,"Go to Line/Column..."),o.gotoOffsetActionLabel=m(823,"Go to Offset...")})(Py||(Py={}));(function(o){o.helpQuickAccessActionLabel=m(824,"Show all Quick Access Providers")})(k9||(k9={}));(function(o){o.quickCommandActionLabel=m(825,"Command Palette"),o.quickCommandHelp=m(826,"Show And Run Commands")})(xN||(xN={}));(function(o){o.quickOutlineActionLabel=m(827,"Go to Symbol..."),o.quickOutlineByCategoryActionLabel=m(828,"Go to Symbol by Category...")})(Dk||(Dk={}));(function(o){o.editorViewAccessibleLabel=m(829,"Editor content")})(L9||(L9={}));(function(o){o.toggleHighContrast=m(830,"Toggle High Contrast Theme")})(I9||(I9={}));(function(o){o.bulkEditServiceSummary=m(831,"Made {0} edits in {1} files")})(E9||(E9={}))});var cr,gv=x(()=>{Ie();cr=Ne("themeService")});var BLe=x(()=>{});var T9,ld,bne,Fy=x(()=>{qe();W();ls();(function(o){o[o.PRESERVE=0]="PRESERVE",o[o.LAST=1]="LAST"})(T9||(T9={}));ld={Quickaccess:"workbench.contributions.quickaccess"},bne=class{constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(e){return e.prefix.length===0?this.defaultProvider=e:this.providers.push(e),this.providers.sort((t,i)=>i.prefix.length-t.prefix.length),ne(()=>{this.providers.splice(this.providers.indexOf(e),1),this.defaultProvider===e&&(this.defaultProvider=void 0)})}getQuickAccessProviders(e){return Zs([this.defaultProvider,...this.providers]).filter(t=>!t.when||e.contextMatchesRules(t.when))}getQuickAccessProvider(e,t){return(e?this.providers.find(n=>e.startsWith(n.prefix)&&(!n.when||t.contextMatchesRules(n.when))):void 0)||this.defaultProvider}};jt.add(ld.Quickaccess,new bne)});var P9e,vne,D9,WLe=x(()=>{Ze();Vt();ae();W();je();Ie();Fy();Mr();ls();P9e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},vne=function(o,e){return function(t,i){e(t,i,o)}},D9=class extends T{constructor(e,t,i){super(),this.quickInputService=e,this.instantiationService=t,this.contextKeyService=i,this.registry=jt.as(ld.Quickaccess),this.mapProviderToDescriptor=new Map,this.lastAcceptedPickerValues=new Map,this.visibleQuickAccess=void 0,this._register(ne(()=>{for(let n of this.mapProviderToDescriptor.values())Oc(n)&&n.dispose();this.visibleQuickAccess?.picker.dispose()}))}show(e="",t){this.doShowOrPick(e,!1,t)}doShowOrPick(e,t,i){let[n,s]=this.getOrInstantiateProvider(e,i?.enabledProviderPrefixes),r=this.visibleQuickAccess,a=r?.descriptor;if(r&&s&&a===s){e!==s.prefix&&!i?.preserveValue&&(r.picker.value=e),this.adjustValueSelection(r.picker,s,i);return}if(s&&!i?.preserveValue){let g;if(r&&a&&a!==s){let p=r.value.substr(a.prefix.length);p&&(g=`${s.prefix}${p}`)}if(!g){let p=n?.defaultFilterValue;p===T9.LAST?g=this.lastAcceptedPickerValues.get(s):typeof p=="string"&&(g=`${s.prefix}${p}`)}typeof g=="string"&&(e=g)}let l=r?.picker?.valueSelection,c=r?.picker?.value,d=new F,h=d.add(this.quickInputService.createQuickPick({useSeparators:!0}));h.value=e,this.adjustValueSelection(h,s,i),h.placeholder=i?.placeholder??s?.placeholder,h.quickNavigate=i?.quickNavigateConfiguration,h.hideInput=!!h.quickNavigate&&!r,(typeof i?.itemActivation=="number"||i?.quickNavigateConfiguration)&&(h.itemActivation=i?.itemActivation??sd.SECOND),h.contextKey=s?.contextKey,h.filterValue=g=>g.substring(s?s.prefix.length:0);let u;t&&(u=new lc,d.add(Q.once(h.onWillAccept)(g=>{g.veto(),h.hide()}))),d.add(this.registerPickerListeners(h,n,s,e,i));let f=d.add(new Lt);if(n&&d.add(n.provide(h,f.token,i?.providerOptions)),Q.once(h.onDidHide)(()=>{h.selectedItems.length===0&&f.cancel(),d.dispose(),u?.complete(h.selectedItems.slice(0))}),h.show(),l&&c===e&&(h.valueSelection=l),t)return u?.p}adjustValueSelection(e,t,i){let n;i?.preserveValue?n=[e.value.length,e.value.length]:n=[t?.prefix.length??0,e.value.length],e.valueSelection=n}registerPickerListeners(e,t,i,n,s){let r=new F,a=this.visibleQuickAccess={picker:e,descriptor:i,value:n};return r.add(ne(()=>{a===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)})),r.add(e.onDidChangeValue(l=>{let[c]=this.getOrInstantiateProvider(l,s?.enabledProviderPrefixes);c!==t?this.show(l,{enabledProviderPrefixes:s?.enabledProviderPrefixes,preserveValue:!0,providerOptions:s?.providerOptions}):a.value=l})),i&&r.add(e.onDidAccept(()=>{this.lastAcceptedPickerValues.set(i,e.value)})),r}getOrInstantiateProvider(e,t){let i=this.registry.getQuickAccessProvider(e,this.contextKeyService);if(!i||t&&!t?.includes(i.prefix))return[void 0,void 0];let n=this.mapProviderToDescriptor.get(i);return n||(n=this.instantiationService.createInstance(i.ctor),this.mapProviderToDescriptor.set(i,n)),[n,i]}};D9=P9e([vne(0,Mn),vne(1,ie),vne(2,Ce)],D9)});var N9=x(()=>{});function HLe(o){let e=[],t=0,i;for(;i=B9e.exec(o);){i.index-t>0&&e.push(o.substring(t,i.index));let[,n,s,,r]=i;r?e.push({label:n,href:s,title:r}):e.push({label:n,href:s}),t=i.index+i[0].length}return t{np();F9e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},R9=class{constructor(e){this.nodes=e}toString(){return this.nodes.map(e=>typeof e=="string"?e:e.label).join("")}};F9e([_n],R9.prototype,"toString",null);B9e=/\[([^\]]+)\]\(((?:https?:\/\/|command:|file:)[^\)\s]+)(?: (["'])(.+?)(\3))?\)/gi});function H9e(o){if(!o)return;let e,t=o.dark.toString();return wne[t]?e=wne[t]:(e=W9e.nextId(),e1(`.${e}, .hc-light .${e}`,`background-image: ${Ul(o.light||o.dark)}`),e1(`.vs-dark .${e}, .hc-black .${e}`,`background-image: ${Ul(o.dark)}`),wne[t]=e),e}function yne(o,e,t){let i=o.iconClass||H9e(o.iconPath);o.alwaysVisible&&(i=i?`${i} always-visible`:"always-visible");let n=()=>(o.toggle&&(o.toggle.checked=!o.toggle.checked),t());return o.toggle?new Cne(e,o.tooltip||"","",i,!0,o.toggle.checked,n):{id:e,label:"",tooltip:o.tooltip||"",class:i,enabled:!0,run:n}}function Fp(o,e,t){let i=[],n=[];return o.forEach((s,r)=>{let a=yne(s,`${e}-${r}`,async()=>t(s));s.label&&(a.label=s.label),s.secondary?n.push(a):i.push(a)}),{primary:i,secondary:n}}function zLe(o,e,t){Wn(e);let i=HLe(o),n=0;for(let s of i.nodes)if(typeof s=="string")e.append(...nd(s));else{let r=s.title;!r&&s.href.startsWith("command:")?r=m(1835,"Click to execute command '{0}'",s.href.substring(8)):r||(r=s.href);let a=j("a",{href:s.href,title:r,tabIndex:n++},s.label);a.style.textDecoration="underline";let l=f=>{_me(f)&&vt.stop(f,!0),t.callback(s.href)},c=t.disposables.add(new Xt(a,ee.CLICK)).event,d=t.disposables.add(new Xt(a,ee.KEY_DOWN)).event,h=Q.chain(d,f=>f.filter(g=>{let p=new Mt(g);return p.equals(10)||p.equals(3)}));t.disposables.add(jn.addTarget(a));let u=t.disposables.add(new Xt(a,vi.Tap)).event;Q.any(c,u,h)(l,null,t.disposables),e.appendChild(a)}}var wne,W9e,Cne,A9=x(()=>{re();qd();ju();Yf();ae();wr();Bl();od();CD();VLe();N9();le();wne={},W9e=new dy("quick-input-button-icon-");Cne=class{constructor(e,t,i,n,s,r,a){this.id=e,this.label=t,this.tooltip=i,this.enabled=s,this._checked=r,this._run=a,this.class=n}get checked(){return this._checked}set checked(e){this._checked=e,this._run()}run(){return this._checked=!this._checked,this._run()}}});var V9e,ULe,$Le,qLe,Nk,z9e,jLe,mv,KLe,GLe,YLe,ZLe,Sne,By,Wy,M9,O9,kN=x(()=>{re();wr();qe();Ze();ti();ae();W();rt();fp();Li();N9();le();Mr();A9();oi();ol();je();et();ei();V9e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},ULe=function(o,e){return function(t,i){e(t,i,o)}},$Le="inQuickInput",qLe=new fe($Le,!1,m(1812,"Whether keyboard focus is inside the quick input control")),Nk=G.has($Le),z9e="quickInputAlignment",jLe=new fe(z9e,"top",m(1813,"The alignment of the quick input")),mv="quickInputType",KLe=new fe(mv,void 0,m(1814,"The type of the currently visible quick input")),GLe="cursorAtEndOfQuickInputBox",YLe=new fe(GLe,!1,m(1815,"Whether the cursor in the quick input is at the end of the input box")),ZLe=G.has(GLe),Sne={iconClass:Ee.asClassName($.quickInputBack),tooltip:m(1816,"Back")},By=class o extends T{static{this.noPromptMessage=m(1817,"Press 'Enter' to confirm your input or 'Escape' to cancel")}constructor(e){super(),this.ui=e,this._visible=_e("visible",!1),this._enabled=!0,this._busy=!1,this._ignoreFocusOut=!1,this._leftButtons=[],this._rightButtons=[],this._inlineButtons=[],this._inputButtons=[],this.buttonsUpdated=!1,this.noValidationMessage=o.noPromptMessage,this._severity=rn.Ignore,this.onDidTriggerButtonEmitter=this._register(new N),this.onDidHideEmitter=this._register(new N),this.onWillHideEmitter=this._register(new N),this.onDisposeEmitter=this._register(new N),this.visibleDisposables=this._register(new F),this.onDidTriggerButton=this.onDidTriggerButtonEmitter.event,this.onDidHide=this.onDidHideEmitter.event}get visible(){return this._visible.get()}get title(){return this._title}set title(e){this._title=e,this.update()}get description(){return this._description}set description(e){this._description=e,this.update()}get step(){return this._steps}set step(e){this._steps=e,this.update()}get totalSteps(){return this._totalSteps}set totalSteps(e){this._totalSteps=e,this.update()}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this.update()}get contextKey(){return this._contextKey}set contextKey(e){this._contextKey=e,this.update()}get busy(){return this._busy}set busy(e){this._busy=e,this.update()}get ignoreFocusOut(){return this._ignoreFocusOut}set ignoreFocusOut(e){let t=this._ignoreFocusOut!==e&&!pr;this._ignoreFocusOut=e&&!pr,t&&this.update()}get titleButtons(){return this._leftButtons.length?[...this._leftButtons,this._rightButtons]:this._rightButtons}get buttons(){return[...this._leftButtons,...this._rightButtons,...this._inlineButtons,...this._inputButtons]}set buttons(e){let t=[],i=[],n=[],s=[];for(let r of e)if(r===Sne)t.push(r);else switch(r.location){case by.Inline:n.push(r);break;case by.Input:s.push(r);break;default:i.push(r);break}this._leftButtons=t,this._rightButtons=i,this._inlineButtons=n,this._inputButtons=s,this.buttonsUpdated=!0,this.update()}get validationMessage(){return this._validationMessage}set validationMessage(e){this._validationMessage=e,this.update()}get severity(){return this._severity}set severity(e){this._severity=e,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.onDidTriggerButton(e=>{this.buttons.indexOf(e)!==-1&&this.onDidTriggerButtonEmitter.fire(e)})),this.ui.show(this),this._visible.set(!0,void 0),this._lastValidationMessage=void 0,this._lastSeverity=void 0,this.buttons.length&&(this.buttonsUpdated=!0),this.update())}hide(){this.visible&&this.ui.hide()}didHide(e=_y.Other){this._visible.set(!1,void 0),this.visibleDisposables.clear(),this.onDidHideEmitter.fire({reason:e})}willHide(e=_y.Other){this.onWillHideEmitter.fire({reason:e})}update(){if(!this.visible)return;let e=this.getTitle();e&&this.ui.title.textContent!==e?this.ui.title.textContent=e:!e&&this.ui.title.innerHTML!==" "&&(this.ui.title.innerText="\xA0");let t=this.getDescription();if(this.ui.description1.textContent!==t&&(this.ui.description1.textContent=t),this.ui.description2.textContent!==t&&(this.ui.description2.textContent=t),this.busy&&!this.busyDelay&&(this.busyDelay=new ro,this.busyDelay.setIfNotSet(()=>{this.visible&&(this.ui.progressBar.infinite(),this.ui.progressBar.getContainer().removeAttribute("aria-hidden"))},800)),!this.busy&&this.busyDelay&&(this.ui.progressBar.stop(),this.ui.progressBar.getContainer().setAttribute("aria-hidden","true"),this.busyDelay.cancel(),this.busyDelay=void 0),this.buttonsUpdated){this.buttonsUpdated=!1;let n=Fp(this._leftButtons,"left-button",l=>this.onDidTriggerButtonEmitter.fire(l));this.ui.leftActionBar.setActions(n.primary,n.secondary);let s=Fp(this._rightButtons,"right-button",l=>this.onDidTriggerButtonEmitter.fire(l));this.ui.rightActionBar.setActions(s.primary,s.secondary);let r=Fp(this._inlineButtons,"inline-button",l=>this.onDidTriggerButtonEmitter.fire(l));this.ui.inlineActionBar.setActions(r.primary,r.secondary);let a=this._inputButtons.length*22;this.ui.countContainer.style.right=a>0?`${4+a}px`:"4px",this.ui.inputBox.actions=this._inputButtons.map((l,c)=>yne(l,`id-${c}`,async()=>this.onDidTriggerButtonEmitter.fire(l)))}this.ui.ignoreFocusOut=this.ignoreFocusOut,this.ui.setEnabled(this.enabled),this.ui.setContextKey(this.contextKey);let i=this.validationMessage||this.noValidationMessage;this._lastValidationMessage!==i&&(this._lastValidationMessage=i,Wn(this.ui.message),i&&zLe(i,this.ui.message,{callback:n=>{this.ui.linkOpenerDelegate(n)},disposables:this.visibleDisposables})),this._lastSeverity!==this.severity&&(this._lastSeverity=this.severity,this.showMessageDecoration(this.severity))}getTitle(){return this.title&&this.step?`${this.title} (${this.getSteps()})`:this.title?this.title:this.step?this.getSteps():""}getDescription(){return this.description||""}getSteps(){return this.step&&this.totalSteps?m(1818,"{0}/{1}",this.step,this.totalSteps):this.step?String(this.step):""}showMessageDecoration(e){if(this.ui.inputBox.showDecoration(e),e!==rn.Ignore){let t=this.ui.inputBox.stylesForType(e);this.ui.message.style.color=t.foreground?`${t.foreground}`:"",this.ui.message.style.backgroundColor=t.background?`${t.background}`:"",this.ui.message.style.border=t.border?`1px solid ${t.border}`:"",this.ui.message.style.marginBottom="-2px"}else this.ui.message.style.color="",this.ui.message.style.backgroundColor="",this.ui.message.style.border="",this.ui.message.style.marginBottom=""}dispose(){this.hide(),this.onDisposeEmitter.fire(),super.dispose()}},Wy=class o extends By{static{this.DEFAULT_ARIA_LABEL=m(1819,"Type to narrow down results.")}constructor(e){super(e),this._value="",this.onDidChangeValueEmitter=this._register(new N),this.onWillAcceptEmitter=this._register(new N),this.onDidAcceptEmitter=this._register(new N),this.onDidCustomEmitter=this._register(new N),this._items=[],this.itemsUpdated=!1,this._canSelectMany=!1,this._canAcceptInBackground=!1,this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._matchOnLabelMode="fuzzy",this._sortByLabel=!0,this._keepScrollPosition=!1,this._itemActivation=sd.FIRST,this._activeItems=[],this.activeItemsUpdated=!1,this.activeItemsToConfirm=[],this.onDidChangeActiveEmitter=this._register(new N),this._selectedItems=[],this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=[],this.onDidChangeSelectionEmitter=this._register(new N),this.onDidTriggerItemButtonEmitter=this._register(new N),this.onDidTriggerSeparatorButtonEmitter=this._register(new N),this.valueSelectionUpdated=!0,this._ok="default",this._customButton=!1,this._customButtonSecondary=!1,this._focusEventBufferer=new wh,this.type="quickPick",this.filterValue=t=>t,this.onDidChangeValue=this.onDidChangeValueEmitter.event,this.onWillAccept=this.onWillAcceptEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event,this.onDidChangeActive=this.onDidChangeActiveEmitter.event,this.onDidChangeSelection=this.onDidChangeSelectionEmitter.event,this.onDidTriggerItemButton=this.onDidTriggerItemButtonEmitter.event,this.onDidTriggerSeparatorButton=this.onDidTriggerSeparatorButtonEmitter.event,this.noValidationMessage=void 0}get quickNavigate(){return this._quickNavigate}set quickNavigate(e){this._quickNavigate=e,this.update()}get value(){return this._value}set value(e){this.doSetValue(e)}doSetValue(e,t){this._value!==e&&(this._value=e,t||this.update(),this.visible&&this.ui.list.filter(this.filterValue(this._value))&&this.trySelectFirst(),this.onDidChangeValueEmitter.fire(this._value))}set ariaLabel(e){this._ariaLabel=e,this.update()}get ariaLabel(){return this._ariaLabel}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get prompt(){return this.noValidationMessage}set prompt(e){this.noValidationMessage=e,this.update()}get items(){return this._items}get scrollTop(){return this.ui.list.scrollTop}set scrollTop(e){this.ui.list.scrollTop=e}set items(e){this._items=e,this.itemsUpdated=!0,this.update()}get canSelectMany(){return this._canSelectMany}set canSelectMany(e){this._canSelectMany=e,this.update()}get canAcceptInBackground(){return this._canAcceptInBackground}set canAcceptInBackground(e){this._canAcceptInBackground=e}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(e){this._matchOnDescription=e,this.update()}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(e){this._matchOnDetail=e,this.update()}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(e){this._matchOnLabel=e,this.update()}get matchOnLabelMode(){return this._matchOnLabelMode}set matchOnLabelMode(e){this._matchOnLabelMode=e,this.update()}get sortByLabel(){return this._sortByLabel}set sortByLabel(e){this._sortByLabel=e,this.update()}get keepScrollPosition(){return this._keepScrollPosition}set keepScrollPosition(e){this._keepScrollPosition=e}get itemActivation(){return this._itemActivation}set itemActivation(e){this._itemActivation=e}get activeItems(){return this._activeItems}set activeItems(e){this._activeItems=e,this.activeItemsUpdated=!0,this.update()}get selectedItems(){return this._selectedItems}set selectedItems(e){this._selectedItems=e,this.selectedItemsUpdated=!0,this.update()}get keyMods(){return this._quickNavigate?t0e:this.ui.keyMods}get valueSelection(){let e=this.ui.inputBox.getSelection();if(e)return[e.start,e.end]}set valueSelection(e){this._valueSelection=e,this.valueSelectionUpdated=!0,this.update()}get customButton(){return this._customButton}set customButton(e){this._customButton=e,this.update()}get customLabel(){return this._customButtonLabel}set customLabel(e){this._customButtonLabel=e,this.update()}get customHover(){return this._customButtonHover}set customHover(e){this._customButtonHover=e,this.update()}get customButtonSecondary(){return this._customButtonSecondary}set customButtonSecondary(e){this._customButtonSecondary=e??!1,this.update()}get ok(){return this._ok}set ok(e){this._ok=e,this.update()}get okLabel(){return this._okLabel??m(1820,"OK")}set okLabel(e){this._okLabel=e,this.update()}get hideInput(){return!!this._hideInput}set hideInput(e){this._hideInput=e,this.update()}trySelectFirst(){this.canSelectMany||this.ui.list.focus(pi.First)}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(e=>{this.doSetValue(e,!0)})),this.visibleDisposables.add(this.ui.onDidAccept(()=>{this.canSelectMany?this.ui.list.getCheckedElements().length||(this._selectedItems=[],this.onDidChangeSelectionEmitter.fire(this.selectedItems)):this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems)),this.handleAccept(!1)})),this.visibleDisposables.add(this.ui.onDidCustom(()=>{this.onDidCustomEmitter.fire()})),this.visibleDisposables.add(this._focusEventBufferer.wrapEvent(this.ui.list.onDidChangeFocus,(e,t)=>t)(e=>{this.activeItemsUpdated||this.activeItemsToConfirm!==this._activeItems&&Bt(e,this._activeItems,(t,i)=>t===i)||(this._activeItems=e,this.onDidChangeActiveEmitter.fire(e))})),this.visibleDisposables.add(this.ui.list.onDidChangeSelection(({items:e,event:t})=>{if(this.canSelectMany&&!e.some(i=>i.pickable===!1)){e.length&&this.ui.list.setSelectedElements([]);return}this.selectedItemsToConfirm!==this._selectedItems&&Bt(e,this._selectedItems,(i,n)=>i===n)||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e),e.length&&this.handleAccept(V_(t)&&t.button===1))})),this.visibleDisposables.add(this.ui.list.onChangedCheckedElements(e=>{!this.canSelectMany||!this.visible||this.selectedItemsToConfirm!==this._selectedItems&&Bt(e,this._selectedItems,(t,i)=>t===i)||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e))})),this.visibleDisposables.add(this.ui.list.onButtonTriggered(e=>this.onDidTriggerItemButtonEmitter.fire(e))),this.visibleDisposables.add(this.ui.list.onSeparatorButtonTriggered(e=>this.onDidTriggerSeparatorButtonEmitter.fire(e))),this.visibleDisposables.add(this.registerQuickNavigation()),this.valueSelectionUpdated=!0),super.show()}handleAccept(e){let t=!1;this.onWillAcceptEmitter.fire({veto:()=>t=!0}),t||this.onDidAcceptEmitter.fire({inBackground:e})}registerQuickNavigation(){return B(this.ui.container,ee.KEY_UP,e=>{if(this.canSelectMany||!this._quickNavigate)return;let t=new Mt(e),i=t.keyCode;this._quickNavigate.keybindings.some(r=>{let a=r.getChords();return a.length>1?!1:a[0].shiftKey&&i===4?!(t.ctrlKey||t.altKey||t.metaKey):!!(a[0].altKey&&i===6||a[0].ctrlKey&&i===5||a[0].metaKey&&i===57)})&&(this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!1)),this._quickNavigate=void 0)})}update(){if(!this.visible)return;let e=this.keepScrollPosition?this.scrollTop:0,t=!!this.description,i={title:!!this.title||!!this.step||!!this.titleButtons.length,description:t,checkAll:this.canSelectMany&&!this._hideCheckAll,checkBox:this.canSelectMany,inputBox:!this._hideInput,progressBar:!this._hideInput||t,visibleCount:!0,count:this.canSelectMany&&!this._hideCountBadge,ok:this.ok==="default"?this.canSelectMany:this.ok,list:!0,message:!!this.validationMessage||!!this.prompt,customButton:this.customButton};this.ui.setVisibilities(i),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||"");let n=this.ariaLabel;!n&&i.inputBox&&(n=this.placeholder,this.title&&(n=n?`${n} - ${this.title}`:this.title),n||(n=o.DEFAULT_ARIA_LABEL)),this.ui.list.ariaLabel!==n&&(this.ui.list.ariaLabel=n??null),this.ui.inputBox.ariaLabel!==n&&(this.ui.inputBox.ariaLabel=n??"input"),this.ui.list.matchOnDescription=this.matchOnDescription,this.ui.list.matchOnDetail=this.matchOnDetail,this.ui.list.matchOnLabel=this.matchOnLabel,this.ui.list.matchOnLabelMode=this.matchOnLabelMode,this.ui.list.sortByLabel=this.sortByLabel,this.itemsUpdated&&(this.itemsUpdated=!1,this._focusEventBufferer.bufferEvents(()=>{switch(this.ui.list.setElements(this.items),this.ui.list.shouldLoop=!this.canSelectMany,this.ui.list.filter(this.filterValue(this.ui.inputBox.value)),this._itemActivation){case sd.NONE:this._itemActivation=sd.FIRST;break;case sd.SECOND:this.ui.list.focus(pi.Second),this._itemActivation=sd.FIRST;break;case sd.LAST:this.ui.list.focus(pi.Last),this._itemActivation=sd.FIRST;break;default:this.trySelectFirst();break}})),this.ui.container.classList.contains("show-checkboxes")!==!!this.canSelectMany&&(this.canSelectMany?this.ui.list.clearFocus():this.trySelectFirst()),this.activeItemsUpdated&&(this.activeItemsUpdated=!1,this.activeItemsToConfirm=this._activeItems,this.ui.list.setFocusedElements(this.activeItems),this.activeItemsToConfirm===this._activeItems&&(this.activeItemsToConfirm=null)),this.selectedItemsUpdated&&(this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=this._selectedItems,this.canSelectMany?this.ui.list.setCheckedElements(this.selectedItems):this.ui.list.setSelectedElements(this.selectedItems),this.selectedItemsToConfirm===this._selectedItems&&(this.selectedItemsToConfirm=null)),this.ui.ok.label=this.okLabel||"",this.ui.customButton.label=this.customLabel||"",this.ui.customButton.element.title=this.customHover||"",this.ui.customButton.secondary=this.customButtonSecondary||!1,i.inputBox||(this.ui.list.domFocus(),this.canSelectMany&&this.ui.list.focus(pi.First)),this.keepScrollPosition&&(this.scrollTop=e)}focus(e){this.ui.list.focus(e),this.canSelectMany&&this.ui.list.domFocus()}accept(e){e&&!this._canAcceptInBackground||(this.activeItems[0]&&!this._canSelectMany&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems)),this.handleAccept(e??!1))}},M9=class extends By{constructor(){super(...arguments),this._value="",this.valueSelectionUpdated=!0,this._password=!1,this.onDidValueChangeEmitter=this._register(new N),this.onDidAcceptEmitter=this._register(new N),this.type="inputBox",this.onDidChangeValue=this.onDidValueChangeEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event}get value(){return this._value}set value(e){this._value=e||"",this.update()}get valueSelection(){let e=this.ui.inputBox.getSelection();if(e)return[e.start,e.end]}set valueSelection(e){this._valueSelection=e,this.valueSelectionUpdated=!0,this.update()}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get ariaLabel(){return this._ariaLabel}set ariaLabel(e){this._ariaLabel=e,this.update()}get password(){return this._password}set password(e){this._password=e,this.update()}get prompt(){return this._prompt}set prompt(e){this._prompt=e,this.noValidationMessage=e?m(1821,"{0} (Press 'Enter' to confirm or 'Escape' to cancel)",e):By.noPromptMessage,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(e=>{e!==this.value&&(this._value=e,this.onDidValueChangeEmitter.fire(e))})),this.visibleDisposables.add(this.ui.onDidAccept(()=>this.onDidAcceptEmitter.fire())),this.valueSelectionUpdated=!0),super.show()}accept(){this.onDidAcceptEmitter.fire()}update(){if(!this.visible)return;this.ui.container.classList.remove("hidden-input");let e={title:!!this.title||!!this.step||!!this.titleButtons.length,description:!!this.description||!!this.step,inputBox:!0,message:!0,progressBar:!0};this.ui.setVisibilities(e),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||""),this.ui.inputBox.password!==this.password&&(this.ui.inputBox.password=this.password);let t=this.ariaLabel;!t&&e.inputBox&&(t=this.placeholder?this.title?`${this.placeholder} - ${this.title}`:this.placeholder:this.title?this.title:"input"),this.ui.inputBox.ariaLabel!==t&&(this.ui.inputBox.ariaLabel=t||"input")}},O9=class extends gg{constructor(e,t){super("mouse",void 0,i=>this.getOverrideOptions(i),e,t)}getOverrideOptions(e){let t=(xt(e.content)?e.content.textContent??"":typeof e.content=="string"?e.content:e.content.value).includes(` +`);return{persistence:{hideOnKeyDown:!1},appearance:{showHoverHint:t,skipFadeInAnimation:!0}}}};O9=V9e([ULe(0,Me),ULe(1,Jn)],O9)});var XLe=x(()=>{});var Rk,Ak,xne,tu,Hy,LN=x(()=>{re();Yh();Hte();ys();ti();Li();ae();W();XLe();le();xc();Rk=20,Ak=4,xne="--vscode-toolbar-action-min-width",tu=class extends T{get onDidChangeDropdownVisibility(){return this._onDidChangeDropdownVisibility.event}constructor(e,t,i={orientation:0}){if(super(),this.container=e,this.submenuActionViewItems=[],this.hasSecondaryActions=!1,this._onDidChangeDropdownVisibility=this._register(new qM),this.originalPrimaryActions=[],this.originalSecondaryActions=[],this.hiddenActions=[],this.disposables=this._register(new F),i.hoverDelegate=i.hoverDelegate??this._register(V8()),this.options=i,this.toggleMenuAction=this._register(new Hy(()=>this.toggleMenuActionViewItem?.show(),i.toggleMenuTitle)),this.element=document.createElement("div"),this.element.className="monaco-toolbar",e.appendChild(this.element),this.actionBar=this._register(new Vo(this.element,{orientation:i.orientation,ariaLabel:i.ariaLabel,actionRunner:i.actionRunner,allowContextMenu:i.allowContextMenu,highlightToggledItems:i.highlightToggledItems,hoverDelegate:i.hoverDelegate,actionViewItemProvider:(n,s)=>{if(n.id===Hy.ID)return this.toggleMenuActionViewItem=new rv(n,{getActions:()=>this.toggleMenuAction.menuActions},t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:Ee.asClassNameArray(i.moreIcon??$.toolBarMore),anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry,isMenu:!0,hoverDelegate:this.options.hoverDelegate}),this.toggleMenuActionViewItem.setActionContext(this.actionBar.context),this.disposables.add(this._onDidChangeDropdownVisibility.add(this.toggleMenuActionViewItem.onDidChangeVisibility)),this.toggleMenuActionViewItem;if(i.actionViewItemProvider){let r=i.actionViewItemProvider(n,s);if(r)return r}if(n instanceof El){let r=new rv(n,n.actions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:n.class,anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry,hoverDelegate:this.options.hoverDelegate});return r.setActionContext(this.actionBar.context),this.submenuActionViewItems.push(r),this.disposables.add(this._onDidChangeDropdownVisibility.add(r.onDidChangeVisibility)),r}}})),this.options.responsiveBehavior?.enabled){this.element.classList.toggle("responsive",!0),this.element.classList.toggle("responsive-all",this.options.responsiveBehavior.kind==="all"),this.element.classList.toggle("responsive-last",this.options.responsiveBehavior.kind==="last"),this.element.style.setProperty(xne,`${this.getConfiguredActionMinWidth()}px`);let n=new ResizeObserver(()=>{this.updateActions(this.getAvailableWidth())});n.observe(this.options.responsiveBehavior?.observedElement??this.element),this._store.add(ne(()=>n.disconnect()))}}set actionRunner(e){this.actionBar.actionRunner=e}get actionRunner(){return this.actionBar.actionRunner}set context(e){this.actionBar.context=e,this.toggleMenuActionViewItem?.setActionContext(e);for(let t of this.submenuActionViewItems)t.setActionContext(e)}getElement(){return this.element}getItemAction(e){return this.actionBar.getAction(e)}getItemWidth(e){return this.actionBar.getWidth(e)}getItemsLength(){return this.actionBar.length()}setActions(e,t){this.clear(),this.originalPrimaryActions=e?e.slice(0):[],this.originalSecondaryActions=t?t.slice(0):[];let i=e?e.slice(0):[];if(this.hasSecondaryActions=!!(t&&t.length>0),this.hasSecondaryActions&&t&&(this.toggleMenuAction.menuActions=t.slice(0),i.push(this.toggleMenuAction)),i.length>0&&this.options.trailingSeparator&&i.push(new Wi),i.forEach(n=>{this.actionBar.push(n,{icon:this.options.icon??!0,label:this.options.label??!1,keybinding:this.getKeybindingLabel(n)})}),this.updateOverflowClassName(),this.applyResponsiveActionMinWidths(),this.options.responsiveBehavior?.enabled){if(this.hiddenActions.length=0,this.options.responsiveBehavior?.minItems!==void 0){let n=this.options.responsiveBehavior.minItems,s=this.originalPrimaryActions.slice(0,n).reduce((a,l)=>a+this.getActionMinWidth(l),0),r=0;(this.originalSecondaryActions.length>0||n0?this.getActionMinWidth(this.originalPrimaryActions[0]):Rk+Ak;this.container.style.minWidth=`${n}px`,this.element.style.minWidth=`${n}px`}this.updateActions(this.getAvailableWidth())}}getKeybindingLabel(e){return this.options.getKeyBinding?.(e)?.getLabel()??void 0}getConfiguredActionMinWidth(e){return e?.id===Hy.ID?Rk:this.options.responsiveBehavior?.getActionMinWidth?.(e??this.toggleMenuAction)??this.options.responsiveBehavior?.actionMinWidth??Rk}getActionMinWidth(e){return this.getConfiguredActionMinWidth(e)+Ak}getAvailableWidth(){return this.options.responsiveBehavior?.getAvailableWidth?this.options.responsiveBehavior.getAvailableWidth():this.element.getBoundingClientRect().width}applyResponsiveActionMinWidths(){if(!this.options.responsiveBehavior?.enabled)return;if(this.options.responsiveBehavior.kind==="last"){let i=this.actionBar.hasAction(this.toggleMenuAction)?this.actionBar.length()-2:this.actionBar.length()-1,n=i>=0?this.actionBar.getAction(i):void 0,s=`${this.getConfiguredActionMinWidth(n)}px`;this.element.style.getPropertyValue(xne)!==s&&this.element.style.setProperty(xne,s);return}let e=this.actionBar.getContainer().firstElementChild;if(xt(e))for(let t=0;t{if(this.options.responsiveBehavior?.kind==="last"){let a=this.actionBar.hasAction(this.toggleMenuAction),l=a?this.actionBar.length()-1:this.actionBar.length();if(l===0)return a?Rk+Ak:0;let c=0;for(let h=0;he){if(this.options.responsiveBehavior?.minItems!==void 0&&(this.actionBar.hasAction(this.toggleMenuAction)?this.actionBar.length()-1:this.actionBar.length())<=this.options.responsiveBehavior.minItems)return;for(;i(!1)>e&&this.actionBar.length()>0;){let r=this.originalPrimaryActions.length-this.hiddenActions.length-1;if(r<0)break;let a=this.originalPrimaryActions[r],l=Math.min(this.getActionMinWidth(a),this.getItemWidth(r));this.hiddenActions.unshift({action:a,size:l}),this.actionBar.pull(r),this.originalSecondaryActions.length===0&&this.hiddenActions.length===1&&(this.actionBar.push(this.toggleMenuAction,{icon:this.options.icon??!0,label:this.options.label??!1,keybinding:this.getKeybindingLabel(this.toggleMenuAction)}),this.updateOverflowClassName()),this.applyResponsiveActionMinWidths()}}else for(;this.hiddenActions.length>0;){let r=this.hiddenActions.shift();if(i(!0)+r.size>e){this.hiddenActions.unshift(r);break}this.actionBar.push(r.action,{icon:this.options.icon??!0,label:this.options.label??!1,keybinding:this.getKeybindingLabel(r.action),index:this.originalPrimaryActions.length-this.hiddenActions.length-1}),this.originalSecondaryActions.length===0&&this.hiddenActions.length===0&&(this.toggleMenuAction.menuActions=[],this.actionBar.pull(this.actionBar.length()-1),this.updateOverflowClassName()),this.applyResponsiveActionMinWidths()}let s=this.hiddenActions.map(r=>r.action);if(this.originalSecondaryActions.length>0||s.length>0){let r=this.originalSecondaryActions.slice(0);this.toggleMenuAction.menuActions=Wi.join(s,r)}this.updateOverflowClassName(),this.applyResponsiveActionMinWidths()}updateOverflowClassName(){this.actionBar.domNode.classList.toggle("has-overflow",this.actionBar.hasAction(this.toggleMenuAction))}clear(){this.submenuActionViewItems=[],this.disposables.clear(),this.actionBar.clear()}dispose(){this.clear(),this.disposables.dispose(),this.element.remove(),super.dispose()}},Hy=class o extends Cs{static{this.ID="toolbar.toggle.more"}constructor(e,t){t=t||m(19,"More Actions..."),super(o.ID,t,void 0,!0),this._menuActions=[],this.toggleDropdownMenu=e}async run(){this.toggleDropdownMenu()}get menuActions(){return this._menuActions}set menuActions(e){this._menuActions=e}}});var QLe=x(()=>{});var U9e,$9e,Bp,P9=x(()=>{re();wr();my();Bl();xc();od();Yi();ae();Rr();W();Li();QLe();rd();_ee();K.white.toString(),K.white.toString();U9e=Object.freeze({allowedTags:{override:["b","i","u","code","span"]},allowedAttributes:{override:["class"]}}),$9e=Object.freeze({sanitizerConfig:{allowedAttributes:{override:["class"]}}}),Bp=class extends T{get onDidClick(){return this._onDidClick.event}constructor(e,t){super(),this._label="",this._onDidClick=this._register(new N),this._onDidEscape=this._register(new N),this.options=t,this._element=document.createElement("a"),this._element.classList.add("monaco-button"),this._element.tabIndex=0,this._element.setAttribute("role","button"),this._element.classList.toggle("secondary",!!t.secondary),this._element.classList.toggle("small",!!t.small);let i=t.secondary?t.buttonSecondaryBackground:t.buttonBackground,n=t.secondary?t.buttonSecondaryForeground:t.buttonForeground,s=t.secondary?t.buttonSecondaryBorder:t.buttonBorder;this._element.style.color=n||"",this._element.style.backgroundColor=i||"",s&&(this._element.style.border=`1px solid ${s}`),t.supportShortLabel&&(this._labelShortElement=document.createElement("div"),this._labelShortElement.classList.add("monaco-button-label-short"),this._element.appendChild(this._labelShortElement),this._labelElement=document.createElement("div"),this._labelElement.classList.add("monaco-button-label"),this._element.appendChild(this._labelElement),this._element.classList.add("monaco-text-button-with-short-label")),typeof t.title=="string"&&this.setTitle(t.title),typeof t.ariaLabel=="string"&&this._element.setAttribute("aria-label",t.ariaLabel),e.appendChild(this._element),this.enabled=!t.disabled,this._register(jn.addTarget(this._element)),[ee.CLICK,vi.Tap].forEach(r=>{this._register(B(this._element,r,a=>{if(!this.enabled){vt.stop(a);return}this._onDidClick.fire(a)}))}),this._register(B(this._element,ee.KEY_DOWN,r=>{let a=new Mt(r),l=!1;this.enabled&&(a.equals(3)||a.equals(10))?(this._onDidClick.fire(r),l=!0):a.equals(9)&&(this._onDidEscape.fire(r),this._element.blur(),l=!0),l&&vt.stop(a,!0)})),this._register(B(this._element,ee.MOUSE_OVER,r=>{this._element.classList.contains("disabled")||this.updateStyles(!0)})),this._register(B(this._element,ee.MOUSE_OUT,r=>{this.updateStyles(!1)})),this.focusTracker=this._register(as(this._element)),this._register(this.focusTracker.onDidFocus(()=>{this.enabled&&this.updateStyles(!0)})),this._register(this.focusTracker.onDidBlur(()=>{this.enabled&&this.updateStyles(!1)}))}dispose(){super.dispose(),this._element.remove()}getContentElements(e){let t=[];for(let i of nd(e))if(typeof i=="string"){if(i=i.trim(),i==="")continue;let n=document.createElement("span");n.textContent=i,t.push(n)}else t.push(i);return t}updateStyles(e){let t,i,n;this.options.secondary?(t=e?this.options.buttonSecondaryHoverBackground:this.options.buttonSecondaryBackground,i=this.options.buttonSecondaryForeground,n=this.options.buttonSecondaryBorder):(t=e?this.options.buttonHoverBackground:this.options.buttonBackground,i=this.options.buttonForeground,n=this.options.buttonBorder),this._element.style.backgroundColor=t||"",this._element.style.color=i||"",this._element.style.border=n?`1px solid ${n}`:""}get element(){return this._element}set label(e){if(this._label===e||wa(this._label)&&wa(e)&&Gxe(this._label,e))return;this._element.classList.add("monaco-text-button");let t=this.options.supportShortLabel?this._labelElement:this._element;if(wa(e)){let n=Jd(e,$9e,document.createElement("span"));n.dispose();let s=n.element.querySelector("p")?.innerHTML;s?KW(t,s,U9e):Wn(t)}else this.options.supportIcons?Wn(t,...this.getContentElements(e)):t.textContent=e;let i="";typeof this.options.title=="string"?i=this.options.title:this.options.title&&(i=W1e(e)),this.setTitle(i),this._setAriaLabel(),this._label=e}get label(){return this._label}_setAriaLabel(){typeof this.options.ariaLabel=="string"?this._element.setAttribute("aria-label",this.options.ariaLabel):typeof this.options.title=="string"&&this._element.setAttribute("aria-label",this.options.title)}set icon(e){this._setAriaLabel();let t=Array.from(this._element.classList).filter(i=>i.startsWith("codicon-"));this._element.classList.remove(...t),this._element.classList.add(...Ee.asClassNameArray(e))}set enabled(e){e?(this._element.classList.remove("disabled"),this._element.setAttribute("aria-disabled",String(!1)),this._element.tabIndex=0):(this._element.classList.add("disabled"),this._element.setAttribute("aria-disabled",String(!0)))}get enabled(){return!this._element.classList.contains("disabled")}set secondary(e){this._element.classList.toggle("secondary",e),this.options.secondary=e,this.updateStyles(!1)}setTitle(e){!this._hover&&e!==""?this._hover=this._register(ms().setupManagedHover(this.options.hoverDelegate??Yr("element"),this._element,e)):this._hover&&this._hover.update(e)}}});var JLe=x(()=>{});var Vy,kne=x(()=>{re();He();JLe();W();rd();Vy=class extends T{constructor(e,t,i){super(),this.options=t,this.styles=i,this.count=0,this.hover=this._register(new Qe),this.element=X(e,j(".monaco-count-badge")),this._register(ne(()=>e.removeChild(this.element))),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0),this.updateHover()}setCount(e){this.count=e,this.render()}setTitleFormat(e){this.titleFormat=e,this.updateHover(),this.render()}updateHover(){this.titleFormat!==""&&!this.hover.value?this.hover.value=ms().setupDelayedHoverAtMouse(this.element,()=>({content:Rd(this.titleFormat,this.count),appearance:{compact:!0}})):this.titleFormat===""&&this.hover.value&&(this.hover.value=void 0)}render(){this.element.textContent=Rd(this.countFormat,this.count),this.element.style.backgroundColor=this.styles.badgeBackground??"",this.element.style.color=this.styles.badgeForeground??"",this.styles.badgeBorder&&(this.element.style.border=`1px solid ${this.styles.badgeBorder}`)}}});var eIe=x(()=>{});var tIe,iIe,Lne,Ine,nIe,q9e,F9,oIe=x(()=>{re();Ze();W();le();eIe();tIe="done",iIe="active",Lne="infinite",Ine="infinite-long-running",nIe="discrete",q9e=m(16,"Progress"),F9=class o extends T{static{this.LONG_RUNNING_INFINITE_THRESHOLD=1e4}constructor(e,t){super(),this.progressSignal=this._register(new Qe),this.workedVal=0,this.showDelayedScheduler=this._register(new at(()=>tr(this.element),0)),this.longRunningScheduler=this._register(new at(()=>this.infiniteLongRunning(),o.LONG_RUNNING_INFINITE_THRESHOLD)),this.create(e,t)}create(e,t){this.element=document.createElement("div"),this.element.classList.add("monaco-progress-container"),this.element.setAttribute("role","progressbar"),this.element.setAttribute("aria-valuemin","0"),this.element.setAttribute("aria-label",t?.ariaLabel&&t.ariaLabel.trim()?t.ariaLabel:q9e),e.appendChild(this.element),this.bit=document.createElement("div"),this.bit.classList.add("progress-bit"),this.bit.style.backgroundColor=t?.progressBarBackground||"#0E70C0",this.element.appendChild(this.bit)}off(){this.bit.style.width="inherit",this.bit.style.opacity="1",this.element.classList.remove(iIe,Lne,Ine,nIe),this.workedVal=0,this.totalWork=void 0,this.longRunningScheduler.cancel(),this.progressSignal.clear()}stop(){return this.doDone(!1)}doDone(e){return this.element.classList.add(tIe),this.element.classList.contains(Lne)?(this.bit.style.opacity="0",e?setTimeout(()=>this.off(),200):this.off()):(this.bit.style.width="inherit",e?setTimeout(()=>this.off(),200):this.off()),this}infinite(){return this.bit.style.width="2%",this.bit.style.opacity="1",this.element.classList.remove(nIe,tIe,Ine),this.element.classList.add(iIe,Lne),this.longRunningScheduler.schedule(),this}infiniteLongRunning(){this.element.classList.add(Ine)}getContainer(){return this.element}}});var j9e,B9,sIe=x(()=>{re();T6();Eg();W();fp();N9();j9e=j,B9=class extends T{constructor(e,t,i){super(),this.parent=e,this._listFocusMode=!1,this.onDidChange=n=>this.findInput.onDidChange(n),this.container=X(this.parent,j9e(".quick-input-box")),this.findInput=this._register(new Ck(this.container,void 0,{label:"",inputBoxStyles:t,toggleStyles:i,actionViewItemProvider:Ig(i),hideHoverOnValueChange:!0}))}get onKeyDown(){return this.findInput.onKeyDown}get value(){return this.findInput.getValue()}set value(e){this.findInput.setValue(e)}select(e=null){this.findInput.inputBox.select(e)}getSelection(){return this.findInput.inputBox.getSelection()}isSelectionAtEnd(){return this.findInput.inputBox.isSelectionAtEnd()}get placeholder(){return this.findInput.inputBox.inputElement.getAttribute("placeholder")||""}set placeholder(e){this.findInput.inputBox.setPlaceHolder(e)}get password(){return this.findInput.inputBox.inputElement.type==="password"}set password(e){this.findInput.inputBox.inputElement.type=e?"password":"text"}set enabled(e){this.findInput.inputBox.inputElement.toggleAttribute("readonly",!e)}set toggles(e){this.findInput.setAdditionalToggles(e)}set actions(e){this.setActions(e)}setActions(e,t){this.findInput.setActions(e,t)}get ariaLabel(){return this.findInput.inputBox.inputElement.getAttribute("aria-label")||""}set ariaLabel(e){this.findInput.inputBox.inputElement.setAttribute("aria-label",e)}hasFocus(){return this.findInput.inputBox.hasFocus()}setAttribute(e,t){this.findInput.inputBox.inputElement.setAttribute(e,t)}removeAttribute(e){this.findInput.inputBox.inputElement.removeAttribute(e)}setListFocusMode(e){if(this._listFocusMode===e)return;this._listFocusMode=e;let t=this.findInput.inputBox.inputElement;e?(t.setAttribute("aria-haspopup","listbox"),t.setAttribute("aria-autocomplete","list")):(t.removeAttribute("aria-haspopup"),t.removeAttribute("aria-autocomplete"))}showDecoration(e){e===rn.Ignore?this.findInput.clearMessage():this.findInput.showMessage({type:e===rn.Info?1:e===rn.Warning?2:3,content:""})}stylesForType(e){return this.findInput.inputBox.stylesForType(e===rn.Info?1:e===rn.Warning?2:3)}setFocus(){this.findInput.focus()}layout(){this.findInput.inputBox.layout()}}});var rIe=x(()=>{});var Og,Ene=x(()=>{re();rd();xc();od();W();$a();Og=class o extends T{constructor(e,t){super(),this.options=t,this.text="",this.title="",this.highlights=[],this.didEverRender=!1,this.domNode=X(e,j("span.monaco-highlighted-label"))}get element(){return this.domNode}set(e,t=[],i="",n,s){e||(e=""),n&&(e=o.escapeNewLines(e,t)),!(this.didEverRender&&this.text===e&&this.title===i&&os(this.highlights,t))&&(this.text=e,this.title=i,this.highlights=t,this.render(s))}render(e){let t=[],i=0;for(let n of this.highlights){if(n.end===n.start)continue;if(i{n=s===`\r +`?-1:0,r+=i;for(let a of t)a.end<=r||(a.start>=r&&(a.start+=n),a.end>=r&&(a.end+=n));return i+=n,"\u23CE"})}}});function K9e(o,e,t){if(!t)return;let i=0;return o.map(n=>{let s={start:i,end:i+n.length},r=t.map(a=>$s.intersect(s,a)).filter(a=>!$s.isEmpty(a)).map(({start:a,end:l})=>({start:a-i,end:l-i}));return i=s.end+e.length,r})}var zy,Qu,Tne,Dne,IN=x(()=>{rIe();re();ju();Ene();W();$a();AD();xc();rd();Li();zy=class{constructor(e){this._element=e}get element(){return this._element}set textContent(e){this.disposed||e===this._textContent||(this._textContent=e,this._element.textContent=e)}set classNames(e){this.disposed||os(e,this._classNames)||(this._classNames=e,this._element.classList.value="",this._element.classList.add(...e))}set empty(e){this.disposed||e===this._empty||(this._empty=e,this._element.style.marginLeft=e?"0":"")}dispose(){this.disposed=!0}},Qu=class extends T{constructor(e,t){super(),this.customHovers=new Map,this.creationOptions=t,this.domNode=this._register(new zy(X(e,j(".monaco-icon-label")))),this.labelContainer=X(this.domNode.element,j(".monaco-icon-label-container")),this.nameContainer=X(this.labelContainer,j("span.monaco-icon-name-container")),t?.supportHighlights||t?.supportIcons?this.nameNode=this._register(new Dne(this.nameContainer,!!t.supportIcons)):this.nameNode=new Tne(this.nameContainer),this.hoverDelegate=t?.hoverDelegate??Yr("mouse")}get element(){return this.domNode.element}setLabel(e,t,i){let n=["monaco-icon-label"],s=["monaco-icon-label-container"],r="";i&&(i.extraClasses&&n.push(...i.extraClasses),i.bold&&n.push("bold"),i.italic&&n.push("italic"),i.strikethrough&&n.push("strikethrough"),i.disabledCommand&&s.push("disabled"),i.title&&(typeof i.title=="string"?r+=i.title:r+=e));let a=this.domNode.element.querySelector(".monaco-icon-label-iconpath");if(i?.iconPath){let l;if(!a||!xt(a)?(l=j(".monaco-icon-label-iconpath"),this.domNode.element.prepend(l)):l=a,Ee.isThemeIcon(i.iconPath)){let c=Ee.asClassName(i.iconPath);l.className=`monaco-icon-label-iconpath ${c}`,l.style.backgroundImage=""}else l.style.backgroundImage=Ul(i?.iconPath);l.style.backgroundRepeat="no-repeat",l.style.backgroundPosition="center",l.style.backgroundSize="contain"}else a&&a.remove();if(this.domNode.classNames=n,this.domNode.element.setAttribute("aria-label",r),this.labelContainer.classList.value="",this.labelContainer.classList.add(...s),this.setupHover(i?.descriptionTitle?this.labelContainer:this.element,i?.title),this.nameNode.setLabel(e,i),t||this.descriptionNode){let l=this.getOrCreateDescriptionNode();if(l instanceof Og){let c=i?.supportIcons??this.creationOptions?.supportIcons;l.set(t||"",i?i.descriptionMatches:void 0,void 0,i?.labelEscapeNewLines,c),this.setupHover(l.element,i?.descriptionTitle)}else l.textContent=t&&i?.labelEscapeNewLines?Og.escapeNewLines(t,[]):t||"",this.setupHover(l.element,i?.descriptionTitle||""),l.empty=!t}if(i?.suffix||this.suffixNode){let l=this.getOrCreateSuffixNode();l.textContent=i?.suffix??""}}setupHover(e,t){let i=this.customHovers.get(e);if(i&&(i.dispose(),this.customHovers.delete(e)),!t){e.removeAttribute("title");return}let n=e;if(this.creationOptions?.hoverTargetOverride){if(!mn(e,this.creationOptions.hoverTargetOverride))throw new Error("hoverTargetOverrride must be an ancestor of the htmlElement");n=this.creationOptions.hoverTargetOverride}let s=ms().setupManagedHover(this.hoverDelegate,n,t);s&&this.customHovers.set(e,s)}dispose(){super.dispose();for(let e of this.customHovers.values())e.dispose();this.customHovers.clear()}getOrCreateSuffixNode(){if(!this.suffixNode){let e=this._register(new zy(wme(this.nameContainer,j("span.monaco-icon-suffix-container"))));this.suffixNode=this._register(new zy(X(e.element,j("span.label-suffix"))))}return this.suffixNode}getOrCreateDescriptionNode(){if(!this.descriptionNode){let e=this._register(new zy(X(this.labelContainer,j("span.monaco-icon-description-container"))));this.creationOptions?.supportDescriptionHighlights?this.descriptionNode=this._register(new Og(X(e.element,j("span.label-description")))):this.descriptionNode=this._register(new zy(X(e.element,j("span.label-description"))))}return this.descriptionNode}},Tne=class{constructor(e){this.container=e,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(!(this.label===e&&os(this.options,t)))if(this.label=e,this.options=t,typeof e=="string")this.singleLabel||(this.container.textContent="",this.container.classList.remove("multiple"),this.singleLabel=X(this.container,j("a.label-name",{id:t?.domId}))),this.singleLabel.textContent=e;else{this.container.textContent="",this.container.classList.add("multiple"),this.singleLabel=void 0;for(let i=0;i{});var W9,H9,cd,Uy=x(()=>{re();rd();xc();e6();W();$a();aIe();le();W9=j,H9={keybindingLabelBackground:void 0,keybindingLabelForeground:void 0,keybindingLabelBorder:void 0,keybindingLabelBottomBorder:void 0,keybindingLabelShadow:void 0},cd=class o extends T{constructor(e,t,i){super(),this.os=t,this.keyElements=new Set,this.options=i||Object.create(null);let n=this.options.keybindingLabelForeground;this.domNode=X(e,W9(".monaco-keybinding")),n&&(this.domNode.style.color=n),this.hover=this._register(ms().setupManagedHover(Yr("mouse"),this.domNode,"")),this.didEverRender=!1,e.appendChild(this.domNode)}set(e,t){this.didEverRender&&this.keybinding===e&&o.areSame(this.matches,t)||(this.keybinding=e,this.matches=t,this.render())}render(){if(this.clear(),this.keybinding){let e=this.keybinding.getChords();e[0]&&this.renderChord(this.domNode,e[0],this.matches?this.matches.firstPart:null);for(let i=1;in.length)return 1}return 0}var lIe,dIe=x(()=>{Ox();vu();lIe=new _o(()=>{let o=Mh.Collator(void 0,{numeric:!0,sensitivity:"base"}).value;return{collator:o,collatorIsNumeric:o.resolvedOptions().numeric}});new _o(()=>({collator:Mh.Collator(void 0,{numeric:!0}).value}));new _o(()=>({collator:Mh.Collator(void 0,{numeric:!0,sensitivity:"accent"}).value}))});function Z9e(o,e){let{text:t,iconOffsets:i}=e;if(!i||i.length===0)return hIe(o,t);let n=Tm(t," "),s=t.length-n.length,r=hIe(o,n);if(r)for(let a of r){let l=i[a.start+s]+s;a.start+=l,a.end+=l}return r}function hIe(o,e){let t=e.toLowerCase().indexOf(o.toLowerCase());return t!==-1?[{start:t,end:t+o.length}]:null}function X9e(o,e,t){let i=o.labelHighlights||[],n=e.labelHighlights||[];return i.length&&!n.length?-1:!i.length&&n.length?1:i.length===0&&n.length===0?0:cIe(o.saneSortLabel,e.saneSortLabel,t)}var TN,EN,Nne,Rne,Pg,V9,dr,Fg,Wp,Ane,Mne,z9,U9,$9,Mk,uIe=x(()=>{ju();re();LN();IN();Uy();Eg();Dy();qe();Ze();dIe();np();Ae();ae();_g();vu();W();et();rt();He();ai();le();us();Kr();Ie();Lk();kc();Kc();Kt();Mr();A9();ei();aB();vs();TN=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},EN=function(o,e){return function(t,i){e(t,i,o)}},Pg=j,V9=class{constructor(e,t,i){this.index=e,this.hasCheckbox=t,this._hidden=!1,this._init=new _o(()=>{let n=i.label??"",s=Sp(n).text.trim(),r=i.ariaLabel||[n,this.saneDescription,this.saneDetail].map(a=>I0(a)).filter(a=>!!a).join(", ");return{saneLabel:n,saneSortLabel:s,saneAriaLabel:r}}),this._saneDescription=i.description,this._saneTooltip=i.tooltip}get saneLabel(){return this._init.value.saneLabel}get saneSortLabel(){return this._init.value.saneSortLabel}get saneAriaLabel(){return this._init.value.saneAriaLabel}get element(){return this._element}set element(e){this._element=e}get hidden(){return this._hidden}set hidden(e){this._hidden=e}get saneDescription(){return this._saneDescription}set saneDescription(e){this._saneDescription=e}get saneDetail(){return this._saneDetail}set saneDetail(e){this._saneDetail=e}get saneTooltip(){return this._saneTooltip}set saneTooltip(e){this._saneTooltip=e}get labelHighlights(){return this._labelHighlights}set labelHighlights(e){this._labelHighlights=e}get descriptionHighlights(){return this._descriptionHighlights}set descriptionHighlights(e){this._descriptionHighlights=e}get detailHighlights(){return this._detailHighlights}set detailHighlights(e){this._detailHighlights=e}},dr=class extends V9{constructor(e,t,i,n,s,r,a){super(e,i,r),this.childIndex=t,this.fireButtonTriggered=n,this._onChecked=s,this.item=r,this._separator=a,this._checked=!1,this.onChecked=i?Q.map(Q.filter(this._onChecked.event,l=>l.element===this),l=>l.checked):Q.None,this._saneDetail=r.detail,this._labelHighlights=r.highlights?.label,this._descriptionHighlights=r.highlights?.description,this._detailHighlights=r.highlights?.detail}get separator(){return this._separator}set separator(e){this._separator=e}get checked(){return this._checked}set checked(e){e!==this._checked&&(this._checked=e,this._onChecked.fire({element:this,checked:e}))}get checkboxDisabled(){return!!this.item.disabled}};(function(o){o[o.NONE=0]="NONE",o[o.MOUSE_HOVER=1]="MOUSE_HOVER",o[o.ACTIVE_ITEM=2]="ACTIVE_ITEM"})(Fg||(Fg={}));Wp=class extends V9{constructor(e,t,i){super(e,!1,i),this.fireSeparatorButtonTriggered=t,this.separator=i,this.children=new Array,this.focusInsideSeparator=Fg.NONE}},Ane=class{getHeight(e){return e instanceof Wp?30:e.saneDetail?44:22}getTemplateId(e){return e instanceof dr?U9.ID:$9.ID}},Mne=class{getWidgetAriaLabel(){return m(1834,"Quick Input")}getAriaLabel(e){return e.separator?.label?`${e.saneAriaLabel}, ${e.separator.label}`:e.saneAriaLabel}getWidgetRole(){return"listbox"}getRole(e){return e.hasCheckbox?"checkbox":"option"}isChecked(e){if(!(!e.hasCheckbox||!(e instanceof dr)))return{get value(){return e.checked},onDidChange:t=>e.onChecked(()=>t())}}},z9=class extends T{constructor(e,t,i){super(),this.hoverDelegate=e,this.toggleStyles=t,this.contextMenuService=i,this._onDidDisposeFocusedElement=this._register(new N),this.onDidDisposeFocusedElement=this._onDidDisposeFocusedElement.event}renderTemplate(e){let t=Object.create(null);t.toDisposeElement=new F,t.toDisposeTemplate=new F,t.entry=X(e,Pg(".quick-input-list-entry"));let i=X(t.entry,Pg("label.quick-input-list-label"));t.outerLabel=i,t.checkbox=t.toDisposeTemplate.add(new Qe),t.toDisposeTemplate.add(_i(i,ee.CLICK,c=>{if(t.checkbox.value&&!c.defaultPrevented&&t.checkbox.value.enabled){let d=!t.checkbox.value.checked;t.checkbox.value.checked=d,t.element.checked=d}}));let n=X(i,Pg(".quick-input-list-rows")),s=X(n,Pg(".quick-input-list-row")),r=X(n,Pg(".quick-input-list-row"));t.label=new Qu(s,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0,hoverDelegate:this.hoverDelegate}),t.toDisposeTemplate.add(t.label),t.icon=z_(t.label.element,Pg(".quick-input-list-icon"));let a=X(s,Pg(".quick-input-list-entry-keybinding"));t.keybinding=new cd(a,Po),t.toDisposeTemplate.add(t.keybinding);let l=X(r,Pg(".quick-input-list-label-meta"));return t.detail=new Qu(l,{supportHighlights:!0,supportIcons:!0,hoverDelegate:this.hoverDelegate}),t.toDisposeTemplate.add(t.detail),t.separator=X(t.entry,Pg(".quick-input-list-separator")),t.toolBar=new tu(t.entry,this.contextMenuService,{...this.hoverDelegate?{hoverDelegate:this.hoverDelegate}:void 0,actionViewItemProvider:Ig(this.toggleStyles),icon:!0,label:!1}),t.toolBar.getElement().classList.add("quick-input-list-entry-action-bar"),t.toDisposeTemplate.add(t.toolBar),t}disposeTemplate(e){e.toDisposeElement.dispose(),e.toDisposeTemplate.dispose()}disposeElement(e,t,i){W_(i.entry)&&this._onDidDisposeFocusedElement.fire(),i.toDisposeElement.clear(),i.toolBar.setActions([])}},U9=class extends z9{static{Nne=this}static{this.ID="quickpickitem"}constructor(e,t,i,n){super(e,t,i),this.themeService=n,this._itemsWithSeparatorsFrequency=new Map}get templateId(){return Nne.ID}ensureCheckbox(e,t){if(!e.hasCheckbox){t.checkbox.value?.domNode.remove(),t.checkbox.clear();return}let i=t.checkbox.value;i?i.setTitle(e.saneLabel):(i=new Iy(e.saneLabel,e.checked,{...nk,size:15}),t.checkbox.value=i,t.outerLabel.prepend(i.domNode),i.domNode.tabIndex=-1),e.checkboxDisabled?i.disable():i.enable(),i.checked=e.checked,t.toDisposeElement.add(e.onChecked(n=>i.checked=n)),t.toDisposeElement.add(i.onChange(()=>e.checked=i.checked))}renderElement(e,t,i){let n=e.element;i.element=n,n.element=i.entry??void 0;let s=n.item;n.element.classList.toggle("not-pickable",n.item.pickable===!1),this.ensureCheckbox(n,i);let{labelHighlights:r,descriptionHighlights:a,detailHighlights:l}=n;if(s.iconPath){let u=_c(this.themeService.getColorTheme().type)?s.iconPath.dark:s.iconPath.light??s.iconPath.dark,f=Le.revive(u);i.icon.className="quick-input-list-icon",i.icon.style.backgroundImage=Ul(f)}else i.icon.style.backgroundImage="",i.icon.className=s.iconClass?`quick-input-list-icon ${s.iconClass}`:"";let c;!n.saneTooltip&&n.saneDescription&&(c={markdown:{value:sc(n.saneDescription),supportThemeIcons:!0},markdownNotSupportedFallback:n.saneDescription});let d={matches:r||[],descriptionTitle:c,descriptionMatches:a||[],labelEscapeNewLines:!0};if(d.extraClasses=s.iconClasses,d.italic=s.italic,d.strikethrough=s.strikethrough,i.entry.classList.remove("quick-input-list-separator-as-item"),i.label.setLabel(n.saneLabel,n.saneDescription,d),i.keybinding.set(s.keybinding),n.saneDetail){let u;n.saneTooltip||(u={markdown:{value:sc(n.saneDetail),supportThemeIcons:!0},markdownNotSupportedFallback:n.saneDetail}),i.detail.element.style.display="",i.detail.setLabel(n.saneDetail,void 0,{matches:l,title:u,labelEscapeNewLines:!0})}else i.detail.element.style.display="none";n.separator?.label?(i.separator.textContent=n.separator.label,i.separator.style.display="",this.addItemWithSeparator(n)):i.separator.style.display="none",i.entry.classList.toggle("quick-input-list-separator-border",!!n.separator&&n.childIndex!==0);let h=s.buttons;if(h&&h.length){let{primary:u,secondary:f}=Fp(h,"quick-input-item",g=>n.fireButtonTriggered({button:g,item:n.item}));i.toolBar.setActions(u,f),i.entry.classList.add("has-actions")}else i.toolBar.setActions([]),i.entry.classList.remove("has-actions")}disposeElement(e,t,i){this.removeItemWithSeparator(e.element),super.disposeElement(e,t,i)}isItemWithSeparatorVisible(e){return this._itemsWithSeparatorsFrequency.has(e)}addItemWithSeparator(e){this._itemsWithSeparatorsFrequency.set(e,(this._itemsWithSeparatorsFrequency.get(e)||0)+1)}removeItemWithSeparator(e){let t=this._itemsWithSeparatorsFrequency.get(e)||0;t>1?this._itemsWithSeparatorsFrequency.set(e,t-1):this._itemsWithSeparatorsFrequency.delete(e)}};U9=Nne=TN([EN(2,eo),EN(3,yt)],U9);$9=class extends z9{static{Rne=this}static{this.ID="quickpickseparator"}constructor(e,t,i){super(e,t,i),this._visibleSeparatorsFrequency=new Map}get templateId(){return Rne.ID}get visibleSeparators(){return[...this._visibleSeparatorsFrequency.keys()]}isSeparatorVisible(e){return this._visibleSeparatorsFrequency.has(e)}renderElement(e,t,i){let n=e.element;i.element=n,n.element=i.entry??void 0,n.element.classList.toggle("focus-inside",!!n.focusInsideSeparator);let s=n.separator,{labelHighlights:r,descriptionHighlights:a}=n;i.icon.style.backgroundImage="",i.icon.className="";let l;!n.saneTooltip&&n.saneDescription&&(l={markdown:{value:sc(n.saneDescription),supportThemeIcons:!0},markdownNotSupportedFallback:n.saneDescription});let c={matches:r||[],descriptionTitle:l,descriptionMatches:a||[],labelEscapeNewLines:!0};i.entry.classList.add("quick-input-list-separator-as-item"),i.label.setLabel(n.saneLabel,n.saneDescription,c),i.separator.style.display="none",i.entry.classList.add("quick-input-list-separator-border");let d=s.buttons;if(d&&d.length){let{primary:h,secondary:u}=Fp(d,"quick-input-separator",f=>n.fireSeparatorButtonTriggered({button:f,separator:n.separator}));i.toolBar.setActions(h,u),i.entry.classList.add("has-actions")}else i.toolBar.setActions([]),i.entry.classList.remove("has-actions");this.addSeparator(n)}disposeElement(e,t,i){this.removeSeparator(e.element),this.isSeparatorVisible(e.element)||e.element.element?.classList.remove("focus-inside"),super.disposeElement(e,t,i)}addSeparator(e){this._visibleSeparatorsFrequency.set(e,(this._visibleSeparatorsFrequency.get(e)||0)+1)}removeSeparator(e){let t=this._visibleSeparatorsFrequency.get(e)||0;t>1?this._visibleSeparatorsFrequency.set(e,t-1):this._visibleSeparatorsFrequency.delete(e)}};$9=Rne=TN([EN(2,eo)],$9);Mk=class extends T{constructor(e,t,i,n,s,r,a){super(),this.parent=e,this.hoverDelegate=t,this.linkOpenerDelegate=i,this.styles=s,this.accessibilityService=a,this._onLeave=this._register(new N),this.onLeave=this._onLeave.event,this._visibleCountObservable=_e("VisibleCount",0),this.onChangedVisibleCount=Q.fromObservable(this._visibleCountObservable,this._store),this._allVisibleCheckedObservable=_e("AllVisibleChecked",!1),this.onChangedAllVisibleChecked=Q.fromObservable(this._allVisibleCheckedObservable,this._store),this._checkedCountObservable=_e("CheckedCount",0),this.onChangedCheckedCount=Q.fromObservable(this._checkedCountObservable,this._store),this._checkedElementsObservable=Kb({equalsFn:Bt},new Array),this.onChangedCheckedElements=Q.fromObservable(this._checkedElementsObservable,this._store),this._onButtonTriggered=this._register(new N),this.onButtonTriggered=this._onButtonTriggered.event,this._onSeparatorButtonTriggered=this._register(new N),this.onSeparatorButtonTriggered=this._onSeparatorButtonTriggered.event,this._elementChecked=this._register(new N),this._elementCheckedEventBufferer=new wh,this._hasCheckboxes=!1,this._inputElements=new Array,this._elementTree=new Array,this._itemElements=new Array,this._elementDisposable=this._register(new F),this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._matchOnLabelMode="fuzzy",this._sortByLabel=!0,this._shouldLoop=!0,this._container=X(this.parent,Pg(".quick-input-list")),this._separatorRenderer=this._register(r.createInstance($9,t,this.styles.toggle)),this._itemRenderer=this._register(r.createInstance(U9,t,this.styles.toggle)),this._tree=this._register(r.createInstance(kk,"QuickInput",this._container,new Ane,[this._itemRenderer,this._separatorRenderer],{filter:{filter(l){return l.hidden?0:l instanceof Wp?2:1}},sorter:{compare:(l,c)=>{if(!this.sortByLabel||!this._lastQueryString)return 0;let d=this._lastQueryString.toLowerCase();return X9e(l,c,d)}},accessibilityProvider:new Mne,setRowLineHeight:!1,multipleSelectionSupport:!1,hideTwistiesOfChildlessElements:!0,renderIndentGuides:Op.None,findWidgetEnabled:!1,indent:0,horizontalScrolling:!1,allowNonCollapsibleParents:!0,alwaysConsumeMouseWheel:!0})),this._tree.getHTMLElement().id=n,this._register(this._itemRenderer.onDidDisposeFocusedElement(()=>this._tree.domFocus())),this._register(this._separatorRenderer.onDidDisposeFocusedElement(()=>this._tree.domFocus())),this._registerListeners()}get onDidChangeFocus(){return Q.map(this._tree.onDidChangeFocus,e=>e.elements.filter(t=>t instanceof dr).map(t=>t.item),this._store)}get onDidChangeSelection(){return Q.map(this._tree.onDidChangeSelection,e=>({items:e.elements.filter(t=>t instanceof dr).map(t=>t.item),event:e.browserEvent}),this._store)}get displayed(){return this._container.style.display!=="none"}set displayed(e){this._container.style.display=e?"":"none"}get scrollTop(){return this._tree.scrollTop}set scrollTop(e){this._tree.scrollTop=e}get ariaLabel(){return this._tree.ariaLabel}set ariaLabel(e){this._tree.ariaLabel=e??""}set enabled(e){this._tree.getHTMLElement().style.pointerEvents=e?"":"none"}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(e){this._matchOnDescription=e}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(e){this._matchOnDetail=e}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(e){this._matchOnLabel=e}get matchOnLabelMode(){return this._matchOnLabelMode}set matchOnLabelMode(e){this._matchOnLabelMode=e}get sortByLabel(){return this._sortByLabel}set sortByLabel(e){this._sortByLabel=e}get shouldLoop(){return this._shouldLoop}set shouldLoop(e){this._shouldLoop=e}_registerListeners(){this._registerOnContainerClick(),this._registerOnMouseMiddleClick(),this._registerOnTreeModelChanged(),this._registerOnElementChecked(),this._registerOnContextMenu(),this._registerHoverListeners(),this._registerSelectionChangeListener(),this._registerSeparatorActionShowingListeners()}_registerOnContainerClick(){this._register(B(this._container,ee.CLICK,e=>{(e.x||e.y)&&this._onLeave.fire()}))}_registerOnMouseMiddleClick(){this._register(B(this._container,ee.AUXCLICK,e=>{e.button===1&&this._onLeave.fire()}))}_registerOnTreeModelChanged(){this._register(this._tree.onDidChangeModel(()=>{let e=this._itemElements.filter(t=>!t.hidden).length;this._visibleCountObservable.set(e,void 0),this._hasCheckboxes&&this._updateCheckedObservables()}))}_registerOnElementChecked(){this._register(this._elementCheckedEventBufferer.wrapEvent(this._elementChecked.event,(e,t)=>t)(e=>this._updateCheckedObservables()))}_registerOnContextMenu(){this._register(this._tree.onContextMenu(e=>{e.element&&(e.browserEvent.preventDefault(),this._tree.setSelection([e.element]))}))}_registerHoverListeners(){let e=this._register(new Cx(typeof this.hoverDelegate.delay=="function"?this.hoverDelegate.delay():this.hoverDelegate.delay));this._register(this._tree.onMouseOver(async t=>{if($K(t.browserEvent.target)){e.cancel();return}if(!(!$K(t.browserEvent.relatedTarget)&&mn(t.browserEvent.relatedTarget,t.element?.element)))try{await e.trigger(async()=>{t.element instanceof dr&&this.showHover(t.element)})}catch(i){if(!Io(i))throw i}})),this._register(this._tree.onMouseOut(t=>{mn(t.browserEvent.relatedTarget,t.element?.element)||e.cancel()}))}_registerSeparatorActionShowingListeners(){this._register(this._tree.onDidChangeFocus(e=>{let t=e.elements[0]?this._tree.getParentElement(e.elements[0]):null;for(let i of this._separatorRenderer.visibleSeparators){let n=i===t;!!(i.focusInsideSeparator&Fg.ACTIVE_ITEM)!==n&&(n?i.focusInsideSeparator|=Fg.ACTIVE_ITEM:i.focusInsideSeparator&=~Fg.ACTIVE_ITEM,this._tree.rerender(i))}})),this._register(this._tree.onMouseOver(e=>{let t=e.element?this._tree.getParentElement(e.element):null;for(let i of this._separatorRenderer.visibleSeparators){if(i!==t)continue;i.focusInsideSeparator&Fg.MOUSE_HOVER||(i.focusInsideSeparator|=Fg.MOUSE_HOVER,this._tree.rerender(i))}})),this._register(this._tree.onMouseOut(e=>{let t=e.element?this._tree.getParentElement(e.element):null;for(let i of this._separatorRenderer.visibleSeparators){if(i!==t)continue;i.focusInsideSeparator&Fg.MOUSE_HOVER&&(i.focusInsideSeparator&=~Fg.MOUSE_HOVER,this._tree.rerender(i))}}))}_registerSelectionChangeListener(){this._register(this._tree.onDidChangeSelection(e=>{let t=e.elements.filter(i=>i instanceof dr);t.length!==e.elements.length&&(e.elements.length===1&&e.elements[0]instanceof Wp&&(this._tree.setFocus([e.elements[0].children[0]]),this._tree.reveal(e.elements[0],0)),this._tree.setSelection(t))}))}setAllVisibleChecked(e){this._elementCheckedEventBufferer.bufferEvents(()=>{this._itemElements.forEach(t=>{!t.hidden&&!t.checkboxDisabled&&t.item.pickable!==!1&&(t.checked=e)})})}setElements(e){this._elementDisposable.clear(),this._lastQueryString=void 0,this._inputElements=e,this._hasCheckboxes=this.parent.classList.contains("show-checkboxes");let t;this._itemElements=new Array,this._elementTree=e.reduce((i,n,s)=>{let r;if(n.type==="separator"){if(!n.buttons)return i;t=new Wp(s,a=>this._onSeparatorButtonTriggered.fire(a),n),r=t}else{let a=s>0?e[s-1]:void 0,l;a&&a.type==="separator"&&!a.buttons&&(l=a);let c=new dr(s,t?.children?t.children.length:s,this._hasCheckboxes&&n.pickable!==!1,d=>this._onButtonTriggered.fire(d),this._elementChecked,n,l);if(this._itemElements.push(c),t)return t.children.push(c),i;r=c}return i.push(r),i},new Array),this._setElementsToTree(this._elementTree),this.accessibilityService.isScreenReaderOptimized()&&er(()=>{let i=this._tree.getHTMLElement().querySelector(".monaco-list-row.focused"),n=i?.parentNode;if(i&&n){let s=i.nextSibling;i.remove(),n.insertBefore(i,s)}},0,this._elementDisposable)}setFocusedElements(e){let t=e.map(i=>this._itemElements.find(n=>n.item===i)).filter(i=>!!i).filter(i=>!i.hidden);if(this._tree.setFocus(t),e.length>0){let i=this._tree.getFocus()[0];i&&this._tree.reveal(i)}}getActiveDescendant(){return this._tree.getHTMLElement().getAttribute("aria-activedescendant")}setSelectedElements(e){let t=e.map(i=>this._itemElements.find(n=>n.item===i)).filter(i=>!!i);this._tree.setSelection(t)}getCheckedElements(){return this._itemElements.filter(e=>e.checked).map(e=>e.item)}setCheckedElements(e){this._elementCheckedEventBufferer.bufferEvents(()=>{let t=new Set;for(let i of e)t.add(i);for(let i of this._itemElements)i.checked=t.has(i.item)})}focus(e){if(this._itemElements.length)switch(e===pi.Second&&this._itemElements.length<2&&(e=pi.First),e){case pi.First:this._tree.scrollTop=0,this._tree.focusFirst(void 0,t=>t.element instanceof dr);break;case pi.Second:{this._tree.scrollTop=0;let t=!1;this._tree.focusFirst(void 0,i=>i.element instanceof dr?t?!0:(t=!t,!1):!1);break}case pi.Last:this._tree.scrollTop=this._tree.scrollHeight,this._tree.focusLast(void 0,t=>t.element instanceof dr);break;case pi.Next:{let t=this._tree.getFocus();this._tree.focusNext(void 0,this._shouldLoop,void 0,n=>n.element instanceof dr?(this._tree.reveal(n.element),!0):!1);let i=this._tree.getFocus();t.length&&t[0]===i[0]&&this._onLeave.fire();break}case pi.Previous:{let t=this._tree.getFocus();this._tree.focusPrevious(void 0,this._shouldLoop,void 0,n=>{if(!(n.element instanceof dr))return!1;let s=this._tree.getParentElement(n.element);return s===null||s.children[0]!==n.element?this._tree.reveal(n.element):this._tree.reveal(s),!0});let i=this._tree.getFocus();t.length&&t[0]===i[0]&&this._onLeave.fire();break}case pi.NextPage:this._tree.focusNextPage(void 0,t=>t.element instanceof dr?(this._tree.reveal(t.element),!0):!1);break;case pi.PreviousPage:this._tree.focusPreviousPage(void 0,t=>{if(!(t.element instanceof dr))return!1;let i=this._tree.getParentElement(t.element);return i===null||i.children[0]!==t.element?this._tree.reveal(t.element):this._tree.reveal(i),!0});break;case pi.NextSeparator:{let t=!1,i=this._tree.getFocus()[0];this._tree.focusNext(void 0,!0,void 0,s=>{if(t)return!0;if(s.element instanceof Wp)t=!0,this._separatorRenderer.isSeparatorVisible(s.element)?this._tree.reveal(s.element.children[0]):this._tree.reveal(s.element,0);else if(s.element instanceof dr){if(s.element.separator)return this._itemRenderer.isItemWithSeparatorVisible(s.element)?this._tree.reveal(s.element):this._tree.reveal(s.element,0),!0;if(s.element===this._elementTree[0])return this._tree.reveal(s.element,0),!0}return!1});let n=this._tree.getFocus()[0];i===n&&(this._tree.scrollTop=this._tree.scrollHeight,this._tree.focusLast(void 0,s=>s.element instanceof dr));break}case pi.PreviousSeparator:{let t,i=!!this._tree.getFocus()[0]?.separator;this._tree.focusPrevious(void 0,!0,void 0,n=>{if(n.element instanceof Wp)i?t||(this._separatorRenderer.isSeparatorVisible(n.element)?this._tree.reveal(n.element):this._tree.reveal(n.element,0),t=n.element.children[0]):i=!0;else if(n.element instanceof dr&&!t){if(n.element.separator)this._itemRenderer.isItemWithSeparatorVisible(n.element)?this._tree.reveal(n.element):this._tree.reveal(n.element,0),t=n.element;else if(n.element===this._elementTree[0])return this._tree.reveal(n.element,0),!0}return!1}),t&&this._tree.setFocus([t]);break}}}clearFocus(){this._tree.setFocus([])}domFocus(){this._tree.domFocus()}layout(e){this._tree.getHTMLElement().style.maxHeight=e?`${Math.floor(e/44)*44+6}px`:"",this._tree.layout()}filter(e){if(this._lastQueryString=e,!(this._sortByLabel||this._matchOnLabel||this._matchOnDescription||this._matchOnDetail))return this._tree.layout(),!1;let t=e;if(e=e.trim(),!e||!(this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))this._itemElements.forEach(i=>{i.labelHighlights=void 0,i.descriptionHighlights=void 0,i.detailHighlights=void 0,i.hidden=!1;let n=i.index&&this._inputElements[i.index-1];i.item&&(i.separator=n&&n.type==="separator"&&!n.buttons?n:void 0)});else{let i;this._itemElements.forEach(n=>{let s;this.matchOnLabelMode==="fuzzy"?s=this.matchOnLabel?cy(e,Sp(n.saneLabel))??void 0:void 0:s=this.matchOnLabel?Z9e(t,Sp(n.saneLabel))??void 0:void 0;let r=this.matchOnDescription?cy(e,Sp(n.saneDescription||""))??void 0:void 0,a=this.matchOnDetail?cy(e,Sp(n.saneDetail||""))??void 0:void 0;if(s||r||a?(n.labelHighlights=s,n.descriptionHighlights=r,n.detailHighlights=a,n.hidden=!1):(n.labelHighlights=void 0,n.descriptionHighlights=void 0,n.detailHighlights=void 0,n.hidden=n.item?!n.item.alwaysShow:!0),n.item?n.separator=void 0:n.separator&&(n.hidden=!0),!this.sortByLabel){let l=n.index&&this._inputElements[n.index-1]||void 0;l?.type==="separator"&&!l.buttons&&(i=l),i&&!n.hidden&&(n.separator=i,i=void 0)}})}return this._setElementsToTree(this._sortByLabel&&e?this._itemElements:this._elementTree),this._tree.layout(),!0}toggleCheckbox(){this._elementCheckedEventBufferer.bufferEvents(()=>{let e=this._tree.getFocus().filter(i=>i instanceof dr),t=this._allVisibleChecked(e);for(let i of e)i.checkboxDisabled||(i.checked=!t)})}style(e){this._tree.style(e)}toggleHover(){let e=this._tree.getFocus()[0];if(!e?.saneTooltip||!(e instanceof dr))return;if(this._lastHover&&!this._lastHover.isDisposed){this._lastHover.dispose();return}this.showHover(e);let t=new F;t.add(this._tree.onDidChangeFocus(i=>{i.elements[0]instanceof dr&&this.showHover(i.elements[0])})),this._lastHover&&t.add(this._lastHover),this._elementDisposable.add(t)}_setElementsToTree(e){let t=new Array;for(let i of e)i instanceof Wp?t.push({element:i,collapsible:!1,collapsed:!1,children:i.children.map(n=>({element:n,collapsible:!1,collapsed:!1}))}):t.push({element:i,collapsible:!1,collapsed:!1});this._tree.setChildren(null,t)}_allVisibleChecked(e,t=!0){for(let i=0,n=e.length;i{this._allVisibleCheckedObservable.set(this._allVisibleChecked(this._itemElements,!1),e);let t=this._itemElements.filter(i=>i.checked).length;this._checkedCountObservable.set(t,e),this._checkedElementsObservable.set(this.getCheckedElements(),e)})}showHover(e){this._lastHover&&!this._lastHover.isDisposed&&(this.hoverDelegate.onDidHideHover?.(),this._lastHover?.dispose()),!(!e.element||!e.saneTooltip)&&(this._lastHover=this.hoverDelegate.showHover({content:e.saneTooltip,target:e.element,linkHandler:t=>{this.linkOpenerDelegate(t)},appearance:{showPointer:!0},container:this._container,position:{hoverPosition:1}},!1))}};TN([_n],Mk.prototype,"onDidChangeFocus",null);TN([_n],Mk.prototype,"onDidChangeSelection",null);Mk=TN([EN(5,ie),EN(6,Ri)],Mk)});function Q9e(o,e={}){Nn.registerCommandAndKeybindingRule({weight:200,when:Nk,metadata:{description:m(1822,"Used while in the context of any kind of quick input. If you change one keybinding for this command, you should change all of the other keybindings (modifier variants) of this command as well.")},...o,secondary:One(o.primary,o.secondary??[],e)})}function dl(o,e={}){Nn.registerCommandAndKeybindingRule({weight:200,when:G.and(G.or(G.equals(mv,"quickPick"),G.equals(mv,"quickTree")),Nk),metadata:{description:m(1823,"Used while in the context of the quick pick. If you change one keybinding for this command, you should change all of the other keybindings (modifier variants) of this command as well.")},...o,secondary:One(o.primary,o.secondary??[],e)})}function One(o,e,t={}){return t.withAltMod&&e.push(512+o),t.withCtrlMod&&(e.push($y+o),t.withAltMod&&e.push(512+$y+o)),t.withShiftMod&&(e.push(1024+o),t.withAltMod&&e.push(1536+o),t.withCtrlMod&&(e.push($y+1024+o),t.withAltMod&&e.push(512+$y+1024+o))),t.withCmdMod&&Ye&&(e.push(2048+o),t.withCtrlMod&&e.push(2304+o),t.withAltMod&&(e.push(2560+o),t.withCtrlMod&&e.push(2816+o))),e}function dd(o,e){return t=>{let i=t.get(Mn).currentQuickInput;if(i)return e&&i.quickNavigate?i.focus(e):i.focus(o)}}var $y,fIe,gIe,mIe=x(()=>{rt();le();je();xy();Rh();kN();Mr();$y=Ye?256:2048;dl({id:"quickInput.pageNext",primary:12,handler:dd(pi.NextPage)},{withAltMod:!0,withCtrlMod:!0,withCmdMod:!0});dl({id:"quickInput.pagePrevious",primary:11,handler:dd(pi.PreviousPage)},{withAltMod:!0,withCtrlMod:!0,withCmdMod:!0});dl({id:"quickInput.first",primary:$y+14,handler:dd(pi.First)},{withAltMod:!0,withCmdMod:!0});dl({id:"quickInput.last",primary:$y+13,handler:dd(pi.Last)},{withAltMod:!0,withCmdMod:!0});dl({id:"quickInput.next",primary:18,handler:dd(pi.Next)},{withCtrlMod:!0});dl({id:"quickInput.previous",primary:16,handler:dd(pi.Previous)},{withCtrlMod:!0});fIe=m(1824,"If we're in quick access mode, this will navigate to the next item. If we are not in quick access mode, this will navigate to the next separator."),gIe=m(1825,"If we're in quick access mode, this will navigate to the previous item. If we are not in quick access mode, this will navigate to the previous separator.");Ye?(dl({id:"quickInput.nextSeparatorWithQuickAccessFallback",primary:2066,handler:dd(pi.NextSeparator,pi.Next),metadata:{description:fIe}}),dl({id:"quickInput.nextSeparator",primary:2578,secondary:[2322],handler:dd(pi.NextSeparator)},{withCtrlMod:!0}),dl({id:"quickInput.previousSeparatorWithQuickAccessFallback",primary:2064,handler:dd(pi.PreviousSeparator,pi.Previous),metadata:{description:gIe}}),dl({id:"quickInput.previousSeparator",primary:2576,secondary:[2320],handler:dd(pi.PreviousSeparator)},{withCtrlMod:!0})):(dl({id:"quickInput.nextSeparatorWithQuickAccessFallback",primary:530,handler:dd(pi.NextSeparator,pi.Next),metadata:{description:fIe}}),dl({id:"quickInput.nextSeparator",primary:2578,handler:dd(pi.NextSeparator)}),dl({id:"quickInput.previousSeparatorWithQuickAccessFallback",primary:528,handler:dd(pi.PreviousSeparator,pi.Previous),metadata:{description:gIe}}),dl({id:"quickInput.previousSeparator",primary:2576,handler:dd(pi.PreviousSeparator)}));Nn.registerCommandAndKeybindingRule({id:"quickInput.accept",primary:3,weight:200,when:G.and(G.notEquals(mv,"quickWidget"),Nk,G.not("isComposing")),metadata:{description:m(1826,"Used while in the context of some quick input. If you change one keybinding for this command, you should change all of the other keybindings (modifier variants) of this command as well.")},handler:o=>{o.get(Mn).currentQuickInput?.accept()},secondary:One(3,[],{withAltMod:!0,withCtrlMod:!0,withCmdMod:!0,withShiftMod:!0})});dl({id:"quickInput.acceptInBackground",when:G.and(Nk,G.equals(mv,"quickPick"),G.or(Sy.negate(),ZLe)),primary:17,weight:250,handler:o=>{o.get(Mn).currentQuickInput?.accept(!0)}},{withAltMod:!0,withCtrlMod:!0,withCmdMod:!0});Q9e({id:"quickInput.hide",primary:9,handler:o=>{o.get(Mn).currentQuickInput?.hide()}},{withAltMod:!0,withCtrlMod:!0,withCmdMod:!0});dl({id:"quickInput.toggleCheckbox",when:G.and(Nk,G.or(G.equals(mv,"quickPick"),G.equals(mv,"quickTree")),Sy.negate()),primary:10,handler:o=>{o.get(Mn).toggle()}});dl({id:"quickInput.toggleHover",primary:$y|10,handler:o=>{o.get(Mn).toggleHover()}})});var J9e,pIe,Pne,DN,q9,Ok,Fne=x(()=>{ju();re();LN();IN();Eg();ae();W();ai();Kr();kc();Kc();He();Kt();A9();J9e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},pIe=function(o,e){return function(t,i){e(t,i,o)}},DN=j,q9=class extends T{constructor(){super(...arguments),this._onDidChangeCheckboxState=this._register(new N),this.onDidChangeCheckboxState=this._onDidChangeCheckboxState.event}setCheckboxState(e,t){this._onDidChangeCheckboxState.fire({item:e,checked:t})}},Ok=class extends T{static{Pne=this}static{this.ID="quickInputTreeElement"}constructor(e,t,i,n,s,r,a){super(),this._hoverDelegate=e,this._buttonTriggeredEmitter=t,this.onCheckedEvent=i,this._checkboxStateHandler=n,this._toggleStyles=s,this._contextMenuService=r,this._themeService=a,this.templateId=Pne.ID,this._onDidDisposeFocusedElement=this._register(new N),this.onDidDisposeFocusedElement=this._onDidDisposeFocusedElement.event}renderTemplate(e){let t=new F,i=X(e,DN(".quick-input-tree-entry")),n=t.add(new mk("",!1,{...nk,size:15}));i.appendChild(n.domNode);let s=X(i,DN("label.quick-input-tree-label")),r=X(s,DN(".quick-input-tree-rows")),a=X(r,DN(".quick-input-tree-row")),l=z_(a,DN(".quick-input-tree-icon")),c=t.add(new Qu(a,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0,hoverDelegate:this._hoverDelegate})),d=t.add(new tu(i,this._contextMenuService,{actionViewItemProvider:Ig(this._toggleStyles),hoverDelegate:this._hoverDelegate,icon:!0,label:!1}));return d.getElement().classList.add("quick-input-tree-entry-action-bar"),{toDisposeTemplate:t,entry:i,checkbox:n,icon:l,label:c,actionBar:d,toDisposeElement:new F}}renderElement(e,t,i,n){let s=i.toDisposeElement,r=e.element;if(r.pickable===!1)i.checkbox.domNode.style.display="none";else{let h=i.checkbox;h.domNode.style.display="",h.checked=r.checked??!1,s.add(Q.filter(this.onCheckedEvent,u=>u.item===r)(u=>h.checked=u.checked)),r.disabled&&h.disable(),s.add(h.onChange(u=>this._checkboxStateHandler.setCheckboxState(r,h.checked)))}if(r.iconPath){let h=_c(this._themeService.getColorTheme().type)?r.iconPath.dark:r.iconPath.light??r.iconPath.dark,u=Le.revive(h);i.icon.className="quick-input-tree-icon",i.icon.style.backgroundImage=Ul(u)}else i.icon.style.backgroundImage="",i.icon.className=r.iconClass?`quick-input-tree-icon ${r.iconClass}`:"";let{labelHighlights:a,descriptionHighlights:l}=e.filterData||{},c;r.description&&(c={markdown:{value:sc(r.description),supportThemeIcons:!0},markdownNotSupportedFallback:r.description}),i.label.setLabel(r.label,r.description,{matches:a,descriptionMatches:l,extraClasses:r.iconClasses,italic:r.italic,strikethrough:r.strikethrough,labelEscapeNewLines:!0,descriptionTitle:c});let d=r.buttons;if(d&&d.length){let{primary:h,secondary:u}=Fp(d,"quick-input-tree",f=>this._buttonTriggeredEmitter.fire({item:r,button:f}));i.actionBar.setActions(h,u),i.entry.classList.add("has-actions")}else i.actionBar.setActions([]),i.entry.classList.remove("has-actions")}disposeElement(e,t,i,n){W_(i.entry)&&this._onDidDisposeFocusedElement.fire(),i.toDisposeElement.clear(),i.actionBar.setActions([])}disposeTemplate(e){e.toDisposeElement.dispose(),e.toDisposeTemplate.dispose()}};Ok=Pne=J9e([pIe(5,eo),pIe(6,yt)],Ok)});var j9,_Ie=x(()=>{Fne();j9=class{getHeight(e){return 22}getTemplateId(e){return Ok.ID}}});function Pk(o){let e=!1,t=!1,i=!1;for(let s of o){switch(s.element?.checked){case"mixed":i=!0;break;case!0:e=!0;break;default:t=!0;break}if(e&&t&&i)break}return t?i||e?"mixed":!1:i?"mixed":e}var Bne=x(()=>{});var K9,bIe=x(()=>{ae();_g();le();K9=class{constructor(e){this.onCheckedEvent=e}getWidgetAriaLabel(){return m(1836,"Quick Tree")}getAriaLabel(e){return e.ariaLabel||[e.label,e.description].map(t=>I0(t)).filter(t=>!!t).join(", ")}getWidgetRole(){return"tree"}getRole(e){return"checkbox"}isChecked(e){return{get value(){return e.checked==="mixed"?"mixed":!!e.checked},onDidChange:t=>Q.filter(this.onCheckedEvent,i=>i.item===e)(i=>t())}}}});var G9,vIe=x(()=>{_g();G9=class{constructor(){this.filterValue="",this.matchOnLabel=!0,this.matchOnDescription=!1}filter(e,t){if(!this.filterValue||!(this.matchOnLabel||this.matchOnDescription))return e.children?{visibility:2,data:{}}:{visibility:1,data:{}};let i=this.matchOnLabel?cy(this.filterValue,Sp(e.label))??void 0:void 0,n=this.matchOnDescription?cy(this.filterValue,Sp(e.description||""))??void 0:void 0;return{visibility:t===1||i||n?1:e.children?2:0,data:{labelHighlights:i,descriptionHighlights:n}}}}});var Y9,wIe=x(()=>{W();Y9=class extends T{constructor(){super(...arguments),this._sortByLabel=!0}get sortByLabel(){return this._sortByLabel}set sortByLabel(e){this._sortByLabel=e}compare(e,t){if(!this._sortByLabel)return 0;if(e.labelt.label)return 1;if(e.description&&t.description){if(e.descriptiont.description)return 1}else{if(e.description)return-1;if(t.description)return 1}return 0}}});var eHe,tHe,iHe,nHe,Wne,Z9,CIe=x(()=>{re();Dy();Ty();ae();W();Ie();Lk();Mr();_Ie();Bne();bIe();vIe();Fne();wIe();Eg();eHe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},tHe=function(o,e){return function(t,i){e(t,i,o)}},iHe=j,nHe="quick-input-tree-flat",Wne=class{constructor(){this._elementIds=new WeakMap,this._counter=0}getId(e){let t=e.id;return t!==void 0||(t=this._elementIds.get(e),t!==void 0)||(t=`__generated_${this._counter++}`,this._elementIds.set(e,t)),t}},Z9=class extends T{constructor(e,t,i,n){super(),this.instantiationService=n,this._onDidTriggerButton=this._register(new N),this._onDidChangeCheckboxState=this._register(new N),this.onDidChangeCheckboxState=this._onDidChangeCheckboxState.event,this._onDidCheckedLeafItemsChange=this._register(new N),this.onDidChangeCheckedLeafItems=this._onDidCheckedLeafItemsChange.event,this._onLeave=this._register(new N),this.onLeave=this._onLeave.event,this._onDidAccept=this._register(new N),this.onDidAccept=this._onDidAccept.event,this._container=X(e,iHe(".quick-input-tree")),this._checkboxStateHandler=this._register(new q9),this._renderer=this._register(this.instantiationService.createInstance(Ok,t,this._onDidTriggerButton,this.onDidChangeCheckboxState,this._checkboxStateHandler,i.toggle)),this._filter=this.instantiationService.createInstance(G9),this._sorter=this._register(new Y9),this._tree=this._register(this.instantiationService.createInstance(kk,"QuickInputTree",this._container,new j9,[this._renderer],{accessibilityProvider:new K9(this.onDidChangeCheckboxState),horizontalScrolling:!1,multipleSelectionSupport:!1,findWidgetEnabled:!1,alwaysConsumeMouseWheel:!0,hideTwistiesOfChildlessElements:!0,renderIndentGuides:Op.None,expandOnDoubleClick:!0,expandOnlyOnTwistieClick:!0,disableExpandOnSpacebar:!0,sorter:this._sorter,filter:this._filter,identityProvider:new Wne})),this._register(this._renderer.onDidDisposeFocusedElement(()=>{this._tree.domFocus()})),this.registerCheckboxStateListeners(),this.registerOnDidChangeFocus()}get tree(){return this._tree}get displayed(){return this._container.style.display!=="none"}set displayed(e){this._container.style.display=e?"":"none"}get sortByLabel(){return this._sorter.sortByLabel}set sortByLabel(e){this._sorter.sortByLabel=e,this._tree.resort(null,!0)}getActiveDescendant(){return this._tree.getHTMLElement().getAttribute("aria-activedescendant")}filter(e){this._filter.filterValue=e,this._tree.refilter()}updateFilterOptions(e){e.matchOnLabel!==void 0&&(this._filter.matchOnLabel=e.matchOnLabel),e.matchOnDescription!==void 0&&(this._filter.matchOnDescription=e.matchOnDescription),this._tree.refilter()}setTreeData(e){let t=!1,i=s=>{let r;return s.children&&s.children.length>0&&(t=!0,r=s.children.map(a=>i(a)),s.checked=Pk(r)),{element:s,children:r,collapsible:!!r,collapsed:s.collapsed?Sa.PreserveOrCollapsed:Sa.PreserveOrExpanded}},n=e.map(s=>i(s));this._tree.setChildren(null,n),this._container.classList.toggle(nHe,!t)}layout(e){this._tree.getHTMLElement().style.maxHeight=e?`${Math.floor(e/44)*44+6}px`:"",this._tree.layout()}focus(e){switch(e){case pi.First:this._tree.scrollTop=0,this._tree.focusFirst();break;case pi.Second:{this._tree.scrollTop=0;let t=!1;this._tree.focusFirst(void 0,i=>t?!0:(t=!t,!1));break}case pi.Last:this._tree.scrollTop=this._tree.scrollHeight,this._tree.focusLast();break;case pi.Next:{let t=this._tree.getFocus();this._tree.focusNext(void 0,!1,void 0,n=>(this._tree.reveal(n.element),!0));let i=this._tree.getFocus();t.length&&t[0]===i[0]&&this._onLeave.fire();break}case pi.Previous:{let t=this._tree.getFocus();this._tree.focusPrevious(void 0,!1,void 0,n=>(this._tree.reveal(n.element),!0));let i=this._tree.getFocus();t.length&&t[0]===i[0]&&this._onLeave.fire();break}case pi.NextPage:this._tree.focusNextPage(void 0,t=>(this._tree.reveal(t.element),!0));break;case pi.PreviousPage:this._tree.focusPreviousPage(void 0,t=>(this._tree.reveal(t.element),!0));break;case pi.NextSeparator:case pi.PreviousSeparator:return}}registerCheckboxStateListeners(){this._register(this._tree.onDidOpen(e=>{let t=e.element;if(!t||t.disabled)return;if(t.pickable===!1){this._tree.setFocus([t]),this._onDidAccept.fire();return}let i=e.browserEvent?.target;i&&i.classList.contains(Iy.CLASS_NAME)||this.updateCheckboxState(t,t.checked===!0)})),this._register(this._checkboxStateHandler.onDidChangeCheckboxState(e=>{this.updateCheckboxState(e.item,e.checked===!0,!0),this._tree.setFocus([e.item]),this._tree.setSelection([e.item])}))}updateCheckboxState(e,t,i=!1){if((e.checked??!1)===t)return;e.checked=t,i||this._tree.rerender(e);let n=new Set,s=[...this._tree.getNode(e).children];for(;s.length;){let a=s.shift();a?.element&&!n.has(a.element)&&(n.add(a.element),(a.element.checked??!1)!==e.checked&&(a.element.checked=e.checked,this._tree.rerender(a.element)),s.push(...a.children))}let r=this._tree.getParentElement(e);for(;r;){let a=[...this._tree.getNode(r).children],l=Pk(a);(r.checked??!1)!==l&&(r.checked=l,this._tree.rerender(r)),r=this._tree.getParentElement(r)}this._onDidChangeCheckboxState.fire({item:e,checked:e.checked??!1}),this._onDidCheckedLeafItemsChange.fire(this.getCheckedLeafItems())}registerOnDidChangeFocus(){this._register(this._tree.onDidChangeFocus(e=>{let t=this._tree.getFocus().findLast(i=>i!==null);this._tree.setSelection(t?[t]:[],e.browserEvent)}))}getCheckedLeafItems(){let e=new Set,t=[...this._tree.getNode().children],i=new Array;for(;t.length;){let n=t.shift();!n?.element||e.has(n.element)||n.element.checked&&(e.add(n.element),t.push(...n.children),n.element.children||i.push(n.element))}return i}getActiveItems(){return this._tree.getFocus().filter(e=>e!==null)}toggleCheckbox(){for(let e of this.getActiveItems())e.pickable!==!1&&!e.disabled&&this.updateCheckboxState(e,e.checked!==!0)}checkAll(e){let t=new Set,i=[...this._tree.getNode().children],n=!1;for(;i.length;){let s=i.shift();!s?.element||t.has(s.element)||s.element.checked!==e&&(n=!0,s.element.checked=e,i.push(...s.children),t.add(s.element),this._tree.rerender(s.element),this._onDidChangeCheckboxState.fire({item:s.element,checked:s.element.checked}))}n&&this._onDidCheckedLeafItemsChange.fire(this.getCheckedLeafItems())}};Z9=eHe([tHe(3,ie)],Z9)});var X9,yIe=x(()=>{ae();et();rt();le();kN();Bne();ei();Jt();X9=class o extends By{static{this.DEFAULT_ARIA_LABEL=m(1837,"Type to narrow down results.")}constructor(e){super(e),this.type="quickTree",this._value=_e("value",""),this._ariaLabel=_e("ariaLabel",void 0),this._placeholder=_e("placeholder",void 0),this._matchOnDescription=_e("matchOnDescription",!1),this._matchOnLabel=_e("matchOnLabel",!0),this._sortByLabel=_e("sortByLabel",!0),this._activeItems=_e("activeItems",[]),this._itemTree=_e("itemTree",[]),this._onDidChangeCheckedLeafItems=this._register(new N),this._onDidChangeCheckboxState=this._register(new N),this._onDidAcceptEmitter=this._register(new N),this.onDidAccept=Q.any(e.onDidAccept,this._onDidAcceptEmitter.event),this._registerAutoruns(),this._register(e.tree.onDidChangeCheckedLeafItems(t=>this._onDidChangeCheckedLeafItems.fire(t))),this._register(e.tree.onDidChangeCheckboxState(t=>this._onDidChangeCheckboxState.fire(t.item))),this._register(e.tree.tree.onDidChangeFocus(t=>{this._activeItems.set(e.tree.getActiveItems(),void 0)}))}get placeholder(){return this._placeholder.get()}set placeholder(e){this._placeholder.set(e,void 0)}show(){if(!this.visible){let t={title:!!this.title||!!this.step||!!this.titleButtons.length,description:!!this.description,checkAll:!0,checkBox:!0,inputBox:!0,progressBar:!0,visibleCount:!0,count:!0,ok:!0,list:!1,tree:!0,message:!!this.validationMessage,customButton:!1};this.ui.setVisibilities(t),this.visibleDisposables.add(this.ui.inputBox.onDidChange(i=>{this._value.set(i,void 0)})),this.visibleDisposables.add(this.ui.tree.onDidChangeCheckboxState(i=>{let n=Pk([...this.ui.tree.tree.getNode().children]);this.ui.checkAll.checked!==n&&(this.ui.checkAll.checked=n)})),this.visibleDisposables.add(this.ui.checkAll.onChange(i=>{let n=this.ui.checkAll.checked;this.ui.tree.checkAll(n)})),this.visibleDisposables.add(this.ui.tree.onDidChangeCheckedLeafItems(i=>{this.ui.count.setCount(i.length)}))}super.show(),Mc(()=>this.ui.count.setCount(this.ui.tree.getCheckedLeafItems().length));let e=Pk([...this.ui.tree.tree.getNode().children]);this.ui.checkAll.checked!==e&&(this.ui.checkAll.checked=e)}update(){if(!this.visible)return;let e={title:!!this.title||!!this.step||!!this.titleButtons.length,description:!!this.description,checkAll:!0,checkBox:!0,inputBox:!0,progressBar:!0,visibleCount:!0,count:!0,ok:!0,tree:!0,message:!!this.validationMessage};this.ui.setVisibilities(e),super.update()}_registerAutoruns(){this.registerVisibleAutorun(e=>{let t=this._value.read(e);this.ui.inputBox.value=t,this.ui.tree.filter(t)}),this.registerVisibleAutorun(e=>{let t=this._ariaLabel.read(e);t||(t=this.placeholder||o.DEFAULT_ARIA_LABEL,this.title&&(t+=` - ${this.title}`)),this.ui.list.ariaLabel!==t&&(this.ui.list.ariaLabel=t??null),this.ui.inputBox.ariaLabel!==t&&(this.ui.inputBox.ariaLabel=t??"input")}),this.registerVisibleAutorun(e=>{let t=this._placeholder.read(e);this.ui.inputBox.placeholder!==t&&(this.ui.inputBox.placeholder=t??"")}),this.registerVisibleAutorun(e=>{let t=this._matchOnLabel.read(e),i=this._matchOnDescription.read(e);this.ui.tree.updateFilterOptions({matchOnLabel:t,matchOnDescription:i})}),this.registerVisibleAutorun(e=>{let t=this._sortByLabel.read(e);this.ui.tree.sortByLabel=t}),this.registerVisibleAutorun(e=>{let t=this._itemTree.read(e);this.ui.tree.setTreeData(t)})}registerVisibleAutorun(e){this._register(Se(t=>{this._visible.read(t)&&e(t)}))}focus(e){this.ui.tree.focus(e),this.ui.tree.tree.domFocus()}accept(e){this._onDidAcceptEmitter.fire()}}});var SIe,pv,Vne,hd,Hne,Q9,zne,xIe=x(()=>{re();qd();LN();P9();kne();oIe();Vt();ae();W();fp();Rt();Ta();le();Mr();sIe();kN();Cg();br();Ie();Kr();uIe();je();mIe();et();Ya();al();oi();rt();zte();Ns();Eg();kc();CIe();yIe();QW();OD();ei();Jt();SIe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},pv=function(o,e){return function(t,i){e(t,i,o)}},hd=j,Hne="workbench.quickInput.viewState",Q9=class extends T{static{Vne=this}static{this.MAX_WIDTH=600}get currentQuickInput(){return this.controller??void 0}get container(){return this._container}constructor(e,t,i,n,s,r){super(),this.options=e,this.layoutService=t,this.instantiationService=i,this.storageService=s,this.contextMenuService=r,this.enabled=!0,this.onDidAcceptEmitter=this._register(new N),this.onDidCustomEmitter=this._register(new N),this.onDidTriggerButtonEmitter=this._register(new N),this.keyMods={ctrlCmd:!1,alt:!1,shift:!1},this.controller=null,this.onShowEmitter=this._register(new N),this.onShow=this.onShowEmitter.event,this.onHideEmitter=this._register(new N),this.onHide=this.onHideEmitter.event,this._alignment=_e(this,"top"),this.alignment=this._alignment,this.inQuickInputContext=qLe.bindTo(n),this.quickInputTypeContext=KLe.bindTo(n),this.endOfQuickInputBoxContext=YLe.bindTo(n),this.idPrefix=e.idPrefix,this._container=e.container,this.styles=e.styles,this._register(Q.runAndSubscribe(Fm,({window:a,disposables:l})=>this.registerKeyModsListeners(a,l),{window:Tt,disposables:this._store})),this._register(lme(a=>{this.ui&&we(this.ui.container)===a&&(this.reparentUI(this.layoutService.mainContainer),this.layout(this.layoutService.mainContainerDimension,this.layoutService.mainContainerOffset.quickPickTop))})),this.viewState=this.loadViewState()}registerKeyModsListeners(e,t){let i=n=>{this.keyMods.ctrlCmd=n.ctrlKey||n.metaKey,this.keyMods.alt=n.altKey,this.keyMods.shift=n.shiftKey};for(let n of[ee.KEY_DOWN,ee.KEY_UP,ee.MOUSE_DOWN])t.add(B(e,n,i,!0))}getUI(e){if(this.ui)return e&&we(this._container)!==we(this.layoutService.activeContainer)&&(this.reparentUI(this.layoutService.activeContainer),this.layout(this.layoutService.activeContainerDimension,this.layoutService.activeContainerOffset.quickPickTop)),this.ui;let t=X(this._container,hd(".quick-input-widget.show-file-icons"));t.tabIndex=-1,t.style.display="none";let i=or(t),n=X(t,hd(".quick-input-titlebar")),s=this._register(new tu(n,this.contextMenuService,{hoverDelegate:this.options.hoverDelegate,actionViewItemProvider:Ig(this.styles.toggle),icon:!0,label:!1}));s.getElement().classList.add("quick-input-left-action-bar");let r=X(n,hd(".quick-input-title")),a=this._register(new tu(n,this.contextMenuService,{hoverDelegate:this.options.hoverDelegate,actionViewItemProvider:Ig(this.styles.toggle),icon:!0,label:!1}));a.getElement().classList.add("quick-input-right-action-bar");let l=X(t,hd(".quick-input-header")),c=this._register(new mk(m(1827,"Toggle all checkboxes"),!1,{...nk,size:15}));X(l,c.domNode),this._register(c.onChange(()=>{let Z=c.checked;H.setAllVisibleChecked(Z===!0)})),this._register(B(c.domNode,ee.CLICK,Z=>{(Z.x||Z.y)&&f.setFocus()}));let d=X(l,hd(".quick-input-description")),h=X(l,hd(".quick-input-and-message")),u=X(h,hd(".quick-input-filter")),f=this._register(new B9(u,this.styles.inputBox,this.styles.toggle));f.setAttribute("aria-describedby",`${this.idPrefix}message`);let g=X(u,hd(".quick-input-visible-count"));g.setAttribute("aria-live","polite"),g.setAttribute("aria-atomic","true");let p=this._register(new Vy(g,{countFormat:m(1828,"{0} Results")},this.styles.countBadge)),_=X(u,hd(".quick-input-count"));_.setAttribute("aria-live","polite");let b=this._register(new Vy(_,{countFormat:m(1829,"{0} Selected")},this.styles.countBadge)),v=this._register(new tu(l,this.contextMenuService,{hoverDelegate:this.options.hoverDelegate,actionViewItemProvider:Ig(this.styles.toggle),icon:!0,label:!1}));v.getElement().classList.add("quick-input-inline-action-bar");let w=X(l,hd(".quick-input-action")),C=this._register(new Bp(w,this.styles.button));C.label=m(1830,"OK"),this._register(C.onDidClick(Z=>{this.onDidAcceptEmitter.fire()}));let y=X(l,hd(".quick-input-action")),k=this._register(new Bp(y,{...this.styles.button,supportIcons:!0}));k.label=m(1831,"Custom"),this._register(k.onDidClick(Z=>{this.onDidCustomEmitter.fire()}));let I=X(h,hd(`#${this.idPrefix}message.quick-input-message`)),E=this._register(new F9(t,this.styles.progressBar));E.getContainer().classList.add("quick-input-progress");let D=X(t,hd(".quick-input-html-widget"));D.tabIndex=-1;let O=X(t,hd(".quick-input-description")),P=this.idPrefix+"list",H=this._register(this.instantiationService.createInstance(Mk,t,this.options.hoverDelegate,this.options.linkOpenerDelegate,P,this.styles));f.setAttribute("aria-controls",P),this._register(H.onDidChangeFocus(()=>{if(f.hasFocus()){let Z=H.getActiveDescendant();Z?(f.setAttribute("aria-activedescendant",Z),f.setListFocusMode(!0)):(f.removeAttribute("aria-activedescendant"),f.setListFocusMode(!1))}})),this._register(H.onChangedAllVisibleChecked(Z=>{c.checked=Z})),this._register(H.onChangedVisibleCount(Z=>{p.setCount(Z)})),this._register(H.onChangedCheckedCount(Z=>{Mc(()=>b.setCount(Z))})),this._register(H.onLeave(()=>{setTimeout(()=>{this.controller&&(f.setFocus(),this.controller instanceof Wy&&this.controller.canSelectMany&&H.clearFocus())},0)}));let z=this._register(this.instantiationService.createInstance(Z9,t,this.options.hoverDelegate,this.styles));this._register(z.tree.onDidChangeFocus(()=>{if(f.hasFocus()){let Z=z.getActiveDescendant();Z?(f.setAttribute("aria-activedescendant",Z),f.setListFocusMode(!0)):(f.removeAttribute("aria-activedescendant"),f.setListFocusMode(!1))}})),this._register(z.onLeave(()=>{setTimeout(()=>{this.controller&&(f.setFocus(),z.tree.setFocus([]))},0)})),this._register(z.onDidAccept(()=>{this.onDidAcceptEmitter.fire()})),this._register(z.tree.onDidChangeContentHeight(()=>this.updateLayout()));let Y=as(t);return this._register(Y),this._register(B(t,ee.FOCUS,Z=>{let te=this.getUI();if(mn(Z.relatedTarget,te.inputContainer)){let se=te.inputBox.isSelectionAtEnd();this.endOfQuickInputBoxContext.get()!==se&&this.endOfQuickInputBoxContext.set(se)}mn(Z.relatedTarget,te.container)||(this.inQuickInputContext.set(!0),this.previousFocusElement=xt(Z.relatedTarget)?Z.relatedTarget:void 0)},!0)),this._register(Y.onDidBlur(()=>{!this.getUI().ignoreFocusOut&&!this.options.ignoreFocusOut()&&this.hide(_y.Blur),this.inQuickInputContext.set(!1),this.endOfQuickInputBoxContext.set(!1),this.previousFocusElement=void 0})),this._register(f.onKeyDown(Z=>{let te=this.getUI().inputBox.isSelectionAtEnd();this.endOfQuickInputBoxContext.get()!==te&&this.endOfQuickInputBoxContext.set(te),ym(Z.keyCode)||(f.removeAttribute("aria-activedescendant"),f.setListFocusMode(!1))})),this._register(B(t,ee.FOCUS,Z=>{f.setFocus()})),this.dndController=this._register(this.instantiationService.createInstance(zne,this._container,t,[{node:n,includeChildren:!0,excludeNodes:[s.getElement(),a.getElement()]},{node:l,includeChildren:!1}],this.viewState)),this._register(Se(Z=>{let te=this.dndController?.dndViewState.read(Z);te&&(te.top!==void 0&&te.left!==void 0?this.viewState={...this.viewState,top:te.top,left:te.left}:this.viewState=void 0,this.updateLayout(),te.done&&this.saveViewState(this.viewState))})),this._register(Se(Z=>{this._alignment.set(this.dndController.alignment.read(Z),void 0)})),this.ui={container:t,styleSheet:i,leftActionBar:s,titleBar:n,title:r,description1:O,description2:d,widget:D,rightActionBar:a,inlineActionBar:v,checkAll:c,inputContainer:h,filterContainer:u,inputBox:f,visibleCountContainer:g,visibleCount:p,countContainer:_,count:b,okContainer:w,ok:C,message:I,customButtonContainer:y,customButton:k,list:H,tree:z,progressBar:E,onDidAccept:this.onDidAcceptEmitter.event,onDidCustom:this.onDidCustomEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:!1,keyMods:this.keyMods,show:Z=>this.show(Z),hide:()=>this.hide(),setVisibilities:Z=>this.setVisibilities(Z),setEnabled:Z=>this.setEnabled(Z),setContextKey:Z=>this.options.setContextKey(Z),linkOpenerDelegate:Z=>this.options.linkOpenerDelegate(Z)},this.updateStyles(),this.ui}reparentUI(e){this.ui&&(this._container=e,X(this._container,this.ui.container),this.dndController?.reparentUI(this._container))}pick(e,t={},i=Xe.None){return new Promise((n,s)=>{let r=d=>{r=n,t.onKeyMods?.(a.keyMods),n(d)};if(i.isCancellationRequested){r(void 0);return}let a=this.createQuickPick({useSeparators:!0}),l,c=[a,a.onDidAccept(()=>{if(a.canSelectMany)r(a.selectedItems.slice()),a.hide();else{let d=a.activeItems[0];d&&(r(d),a.hide())}}),a.onDidChangeActive(d=>{let h=d[0];h&&t.onDidFocus&&t.onDidFocus(h)}),a.onDidChangeSelection(d=>{if(!a.canSelectMany){let h=d[0];h&&(r(h),a.hide())}}),a.onDidTriggerItemButton(d=>t.onDidTriggerItemButton&&t.onDidTriggerItemButton({...d,removeItem:()=>{let h=a.items.indexOf(d.item);if(h!==-1){let u=a.items.slice(),f=u.splice(h,1),g=a.activeItems.filter(_=>_!==f[0]),p=a.keepScrollPosition;a.keepScrollPosition=!0,a.items=u,g&&(a.activeItems=g),a.keepScrollPosition=p}}})),a.onDidTriggerSeparatorButton(d=>t.onDidTriggerSeparatorButton?.(d)),a.onDidChangeValue(d=>{l&&!d&&(a.activeItems.length!==1||a.activeItems[0]!==l)&&(a.activeItems=[l])}),i.onCancellationRequested(()=>{a.hide()}),a.onDidHide(()=>{Ct(c),r(void 0)})];a.title=t.title,t.value&&(a.value=t.value),a.canSelectMany=!!t.canPickMany,a.placeholder=t.placeHolder,a.prompt=t.prompt,a.ignoreFocusOut=!!t.ignoreFocusLost,a.matchOnDescription=!!t.matchOnDescription,a.matchOnDetail=!!t.matchOnDetail,t.sortByLabel!==void 0&&(a.sortByLabel=t.sortByLabel),a.matchOnLabel=t.matchOnLabel===void 0||t.matchOnLabel,a.quickNavigate=t.quickNavigate,a.hideInput=!!t.hideInput,a.contextKey=t.contextKey,a.anchor=t.anchor,a.anchorPosition=t.anchorPosition,a.busy=!0,Promise.all([e,t.activeItem]).then(([d,h])=>{l=h,a.busy=!1,a.items=d,a.canSelectMany&&(a.selectedItems=d.filter(u=>u.type!=="separator"&&u.picked)),l&&(a.activeItems=[l])}),a.show(),Promise.resolve(e).then(void 0,d=>{s(d),a.hide()})})}setValidationOnInput(e,t){t&&Ln(t)?(e.severity=rn.Error,e.validationMessage=t):t&&!Ln(t)?(e.severity=t.severity,e.validationMessage=t.content):(e.severity=rn.Ignore,e.validationMessage=void 0)}input(e={},t=Xe.None){return new Promise(i=>{if(t.isCancellationRequested){i(void 0);return}let n=this.createInputBox(),s=e.validateInput||(()=>Promise.resolve(void 0)),r=Q.debounce(n.onDidChangeValue,(d,h)=>h,100),a=e.value||"",l=Promise.resolve(s(a)),c=[n,r(d=>{d!==a&&(l=Promise.resolve(s(d)),a=d),l.then(h=>{d===a&&this.setValidationOnInput(n,h)})}),n.onDidAccept(()=>{let d=n.value;d!==a&&(l=Promise.resolve(s(d)),a=d),l.then(h=>{!h||!Ln(h)&&h.severity!==rn.Error?(i(d),n.hide()):d===a&&this.setValidationOnInput(n,h)})}),t.onCancellationRequested(()=>{n.hide()}),n.onDidHide(()=>{Ct(c),i(void 0)})];n.title=e.title,n.value=e.value||"",n.valueSelection=e.valueSelection,n.prompt=e.prompt,n.placeholder=e.placeHolder,n.password=!!e.password,n.ignoreFocusOut=!!e.ignoreFocusLost,n.show()})}createQuickPick(e={useSeparators:!1}){let t=this.getUI(!0);return new Wy(t)}createInputBox(){let e=this.getUI(!0);return new M9(e)}show(e){let t=this.getUI(!0),i=this.controller;if(this.controller=e,i?.didHide(),xt(e.anchor)){let s=we(e.anchor);we(this._container)!==s&&this.reparentUI(this.layoutService.getContainer(s))}this.setEnabled(!0),t.leftActionBar.setActions([]),t.title.textContent="",t.description1.textContent="",t.description2.textContent="",Wn(t.widget),t.rightActionBar.setActions([]),t.inlineActionBar.setActions([]),t.checkAll.checked=!1,t.inputBox.placeholder="",t.inputBox.password=!1,t.inputBox.showDecoration(rn.Ignore),t.visibleCount.setCount(0),t.count.setCount(0),t.countContainer.style.right="4px",Wn(t.message),t.progressBar.stop(),t.progressBar.getContainer().setAttribute("aria-hidden","true"),t.list.setElements([]),t.list.matchOnDescription=!1,t.list.matchOnDetail=!1,t.list.matchOnLabel=!0,t.list.sortByLabel=!0,t.tree.updateFilterOptions({matchOnDescription:!1,matchOnLabel:!0}),t.tree.sortByLabel=!0,t.ignoreFocusOut=!1,t.inputBox.toggles=void 0,t.inputBox.actions=void 0;let n=this.options.backKeybindingLabel();Sne.tooltip=n?m(1832,"Back ({0})",n):m(1833,"Back"),t.container.style.display="",this.updateLayout(),this.dndController?.setEnabled(!e.anchor),this.dndController?.layoutContainer(),e.anchor?this._alignment.set("custom",void 0):this._alignment.set(this.dndController?.alignment.get()??"top",void 0),this.onShowEmitter.fire(),t.inputBox.setFocus(),this.quickInputTypeContext.set(e.type)}isVisible(){return!!this.ui&&this.ui.container.style.display!=="none"}setVisibilities(e){let t=this.getUI();t.title.style.display=e.title?"":"none",t.description1.style.display=e.description&&(e.inputBox||e.checkAll)?"":"none",t.description2.style.display=e.description&&!(e.inputBox||e.checkAll)?"":"none",t.checkAll.domNode.style.display=e.checkAll?"":"none",t.inputContainer.style.display=e.inputBox?"":"none",t.filterContainer.style.display=e.inputBox?"":"none",t.visibleCountContainer.style.display=e.visibleCount?"":"none",t.countContainer.style.display=e.count?"":"none",t.okContainer.style.display=e.ok?"":"none",t.customButtonContainer.style.display=e.customButton?"":"none",t.message.style.display=e.message?"":"none",t.progressBar.getContainer().style.display=e.progressBar?"":"none",t.list.displayed=!!e.list,t.tree.displayed=!!e.tree,t.container.classList.toggle("show-checkboxes",!!e.checkBox),t.container.classList.toggle("hidden-input",!e.inputBox&&!e.description),this.updateLayout()}setEnabled(e){if(e!==this.enabled){this.enabled=e;let t=this.getUI();for(let i=0;i .monaco-keybinding-key {"),this.styles.keybindingLabel.keybindingLabelBackground&&s.push(`background-color: ${this.styles.keybindingLabel.keybindingLabelBackground};`),this.styles.keybindingLabel.keybindingLabelBorder&&s.push(`border-color: ${this.styles.keybindingLabel.keybindingLabelBorder};`),this.styles.keybindingLabel.keybindingLabelBottomBorder&&s.push(`border-bottom-color: ${this.styles.keybindingLabel.keybindingLabelBottomBorder};`),this.styles.keybindingLabel.keybindingLabelShadow&&s.push(`box-shadow: inset 0 -1px 0 ${this.styles.keybindingLabel.keybindingLabelShadow};`),this.styles.keybindingLabel.keybindingLabelForeground&&s.push(`color: ${this.styles.keybindingLabel.keybindingLabelForeground};`),s.push("}"));let r=s.join(` +`);r!==this.ui.styleSheet.textContent&&(this.ui.styleSheet.textContent=r)}}loadViewState(){try{let e=JSON.parse(this.storageService.get(Hne,-1,"{}"));if(e.top!==void 0||e.left!==void 0)return e}catch{}}saveViewState(e){this.layoutService.activeContainer===this.layoutService.mainContainer&&(e!==void 0?this.storageService.store(Hne,JSON.stringify(e),-1,1):this.storageService.remove(Hne,-1))}};Q9=Vne=SIe([pv(1,Ca),pv(2,ie),pv(3,Ce),pv(4,zn),pv(5,eo)],Q9);zne=class extends T{constructor(e,t,i,n,s,r,a){super(),this._container=e,this._quickInputContainer=t,this._quickInputDragAreas=i,this._layoutService=s,this.configurationService=a,this.dndViewState=_e(this,void 0),this._enabled=!0,this._snapThreshold=20,this._snapLineHorizontalRatio=.25,this._alignment=_e(this,"top"),this.alignment=this._alignment,this._quickInputAlignmentContext=jLe.bindTo(r);let l=gke(this.configurationService)==="custom";this._controlsOnLeft=l&&PM===1,this._controlsOnRight=l&&(PM===3||PM===2),this._registerLayoutListener(),this.registerMouseListeners(),this.dndViewState.set({...n,done:!0},void 0),n?.top!==void 0&&n?.left!==void 0&&this._setAlignmentState(void 0)}reparentUI(e){this._container=e}layoutContainer(e=this._layoutService.activeContainerDimension){if(!this._enabled)return;let t=this.dndViewState.get(),i=this._quickInputContainer.getBoundingClientRect();if(t?.top!==void 0&&t?.left!==void 0){let n=Math.round(t.left*100)/100,s=e.width,r=i.width,a=n*s-r/2;this._layout(t.top*e.height,a)}}setEnabled(e){this._enabled=e,this._quickInputContainer.classList.toggle("no-drag",!e)}_setAlignmentState(e){this._quickInputAlignmentContext.set(e),this._alignment.set(e??"custom",void 0)}_registerLayoutListener(){this._register(Q.filter(this._layoutService.onDidLayoutContainer,e=>e.container===this._container)(e=>this.layoutContainer(e.dimension)))}registerMouseListeners(){let e=this._quickInputContainer;this._register(UK(e,t=>{if(!this._enabled)return;let i=new so(we(e),t);if(i.detail!==2)return;let n=this._quickInputDragAreas.find(({node:s,includeChildren:r})=>r?mn(i.target,s):i.target===s);!n||n.excludeNodes?.some(s=>mn(i.target,s))||(this.dndViewState.set({top:void 0,left:void 0,done:!0},void 0),this._setAlignmentState("top"))})),this._register(Bw(e,t=>{if(!this._enabled)return;let i=we(this._layoutService.activeContainer),n=new so(i,t),s=this._quickInputDragAreas.find(({node:u,includeChildren:f})=>f?mn(n.target,u):n.target===u);if(!s||s.excludeNodes?.some(u=>mn(n.target,u)))return;let r=this._quickInputContainer.getBoundingClientRect(),a=n.browserEvent.clientX-r.left,l=n.browserEvent.clientY-r.top,c=!1,d=ume(i,u=>{new so(i,u).preventDefault(),c||(c=!0),this._layout(u.clientY-l,u.clientX-a)}),h=UK(i,u=>{if(c){let f=this.dndViewState.get();this.dndViewState.set({top:f?.top,left:f?.left,done:!0},void 0)}d.dispose(),h.dispose()})}))}_layout(e,t){let i=this._getTopSnapValue(),n=this._getCenterYSnapValue(),s=this._getCenterXSnapValue();e=Math.max(0,Math.min(e,this._container.clientHeight-this._quickInputContainer.clientHeight)),e{Vt();ae();je();Ie();Cg();eh();WLe();kc();$t();bi();Zi();xi();qi();Mi();Xi();$i();Vi();Qi();Ji();Kt();kN();xIe();oi();re();et();ei();Jt();oHe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},NN=function(o,e){return function(t,i){e(t,i,o)}},J9=class extends e5{get controller(){return this._controller||(this._controller=this._register(this.createController())),this._controller}get hasController(){return!!this._controller}get currentQuickInput(){return this.controller.currentQuickInput}get quickAccess(){return this._quickAccess||(this._quickAccess=this._register(this.instantiationService.createInstance(D9))),this._quickAccess}constructor(e,t,i,n,s){super(i),this.instantiationService=e,this.contextKeyService=t,this.layoutService=n,this.configurationService=s,this._alignment=_e(this,"top"),this._onShow=this._register(new N),this._onHide=this._register(new N),this.contexts=new Map}createController(e=this.layoutService,t){let i={idPrefix:"quickInput_",container:e.activeContainer,ignoreFocusOut:()=>!1,backKeybindingLabel:()=>{},setContextKey:s=>this.setContextKey(s),linkOpenerDelegate:s=>{this.instantiationService.invokeFunction(r=>{r.get(Ar).open(s,{allowCommands:!0,fromUserGesture:!0})})},returnFocus:()=>e.focus(),styles:this.computeStyles(),hoverDelegate:this._register(this.instantiationService.createInstance(O9))},n=this._register(this.instantiationService.createInstance(Q9,{...i,...t}));return n.layout(e.activeContainerDimension,e.activeContainerOffset.quickPickTop),this._register(e.onDidLayoutActiveContainer(s=>{we(e.activeContainer)===we(n.container)&&n.layout(s,e.activeContainerOffset.quickPickTop)})),this._register(e.onDidChangeActiveContainer(()=>{n.isVisible()||n.layout(e.activeContainerDimension,e.activeContainerOffset.quickPickTop)})),this._register(n.onShow(()=>{this.resetContextKeys(),this._onShow.fire()})),this._register(n.onHide(()=>{this.resetContextKeys(),this._onHide.fire()})),this._register(Se(s=>{this._alignment.set(n.alignment.read(s),void 0)})),n}setContextKey(e){let t;e&&(t=this.contexts.get(e),t||(t=new fe(e,!1).bindTo(this.contextKeyService),this.contexts.set(e,t))),!(t&&t.get())&&(this.resetContextKeys(),t?.set(!0))}resetContextKeys(){this.contexts.forEach(e=>{e.get()&&e.reset()})}pick(e,t,i=Xe.None){return this.controller.pick(e,t,i)}input(e={},t=Xe.None){return this.controller.input(e,t)}createQuickPick(e={useSeparators:!1}){return this.controller.createQuickPick(e)}createInputBox(){return this.controller.createInputBox()}toggle(){this.controller.toggle()}toggleHover(){this.hasController&&this.controller.toggleHover()}updateStyles(){this.hasController&&this.controller.applyStyles(this.computeStyles())}computeStyles(){return{widget:{quickInputBackground:de(BF),quickInputForeground:de(Dve),quickInputTitleBackground:de(Nve),widgetBorder:de(s1),widgetShadow:de(Uf)},inputBox:ok,toggle:ik,countBadge:t6,button:oke,progressBar:ske,keybindingLabel:tk,list:Gu({listBackground:BF,listFocusBackground:jf,listFocusForeground:qf,listInactiveFocusForeground:qf,listInactiveSelectionIconForeground:c1,listInactiveFocusBackground:jf,listInactiveSelectionBackground:jf,listInactiveSelectionForeground:qf,listFocusOutline:Ai,listInactiveFocusOutline:Ai,treeStickyScrollBackground:BF}),pickerGroup:{pickerGroupBorder:de(Rve),pickerGroupForeground:de(WF)}}}};J9=oHe([NN(0,ie),NN(1,Ce),NN(2,yt),NN(3,Ca),NN(4,Me)],J9)});var LIe,qy,Une,eH,RN,$ne,IIe=x(()=>{BLe();ae();lt();Kt();Vt();Ie();je();Gee();ao();kIe();pw();oi();LIe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},qy=function(o,e){return function(t,i){e(t,i,o)}},Une=class extends J9{constructor(e,t,i,n,s,r){super(t,i,n,new L8(e.getContainerDomNode(),s),r),this.host=void 0;let a=RN.get(e);if(a){let l=a.widget;this.host={_serviceBrand:void 0,get mainContainer(){return l.getDomNode()},getContainer(){return l.getDomNode()},whenContainerStylesLoaded(){},get containers(){return[l.getDomNode()]},get activeContainer(){return l.getDomNode()},get mainContainerDimension(){return e.getLayoutInfo()},get activeContainerDimension(){return e.getLayoutInfo()},get onDidLayoutMainContainer(){return e.onDidLayoutChange},get onDidLayoutActiveContainer(){return e.onDidLayoutChange},get onDidLayoutContainer(){return Q.map(e.onDidLayoutChange,c=>({container:l.getDomNode(),dimension:c}))},get onDidChangeActiveContainer(){return Q.None},get onDidAddContainer(){return Q.None},get mainContainerOffset(){return{top:0,quickPickTop:0}},get activeContainerOffset(){return{top:0,quickPickTop:0}},focus:()=>e.focus()}}else this.host=void 0}createController(){return super.createController(this.host)}};Une=LIe([qy(1,ie),qy(2,Ce),qy(3,yt),qy(4,ot),qy(5,Me)],Une);eH=class{get activeService(){let e=this.codeEditorService.getFocusedCodeEditor();if(!e)throw new Error("Quick input service needs a focused editor to work.");let t=this.mapEditorToService.get(e);if(!t){let i=t=this.instantiationService.createInstance(Une,e);this.mapEditorToService.set(e,t),Id(e.onDidDispose)(()=>{i.dispose(),this.mapEditorToService.delete(e)})}return t}get currentQuickInput(){return this.activeService.currentQuickInput}get quickAccess(){return this.activeService.quickAccess}constructor(e,t){this.instantiationService=e,this.codeEditorService=t,this.mapEditorToService=new Map}pick(e,t,i=Xe.None){return this.activeService.pick(e,t,i)}input(e,t){return this.activeService.input(e,t)}createQuickPick(e={useSeparators:!1}){return this.activeService.createQuickPick(e)}createInputBox(){return this.activeService.createInputBox()}toggle(){return this.activeService.toggle()}toggleHover(){return this.activeService.toggleHover()}};eH=LIe([qy(0,ie),qy(1,ot)],eH);RN=class o{static{this.ID="editor.controller.quickInput"}static get(e){return e.getContribution(o.ID)}constructor(e){this.editor=e,this.widget=new $ne(this.editor)}dispose(){this.widget.dispose()}},$ne=class o{static{this.ID="editor.contrib.quickInputWidget"}constructor(e){this.codeEditor=e,this.domNode=document.createElement("div"),this.codeEditor.addOverlayWidget(this)}getId(){return o.ID}getDomNode(){return this.domNode}getPosition(){return{preference:{top:0,left:0}}}dispose(){this.codeEditor.removeOverlayWidget(this)}};Ue(RN.ID,RN,4)});function sHe(o,e,t){if(!(/^((http:)|(https:)|(file:))/.test(e)&&e.substring(0,globalThis.origin.length)!==globalThis.origin)){let n=e.lastIndexOf("?"),s=e.lastIndexOf("#",n),r=n>0?new URLSearchParams(e.substring(n+1,~s?s:void 0)):new URLSearchParams;CO.addSearchParam(r,!0,!0),r.toString()?e=`${e}?${r.toString()}#${o}`:e=`${e}#${o}`}let i=new Blob([Zs([`/*${o}*/`,`globalThis._VSCODE_NLS_MESSAGES = ${JSON.stringify(Gq())};`,`globalThis._VSCODE_NLS_LANGUAGE = ${JSON.stringify(NI())};`,`globalThis._VSCODE_FILE_ROOT = ${JSON.stringify(globalThis._VSCODE_FILE_ROOT)};`,"const ttPolicy = globalThis.trustedTypes?.createPolicy('defaultWorkerFactory', { createScriptURL: value => value });","globalThis.workerttPolicy = ttPolicy;",t?"try {":"",`await import(ttPolicy?.createScriptURL(${JSON.stringify(e)}) ?? ${JSON.stringify(e)});`,t?`} catch (err) { console.error(${JSON.stringify(t)}, err); throw err; }`:"","globalThis.postMessage({ type: 'vscode-worker-ready' });",`/*${o}*/`]).join("")],{type:"application/javascript"});return URL.createObjectURL(i)}function rHe(o){return new Promise((e,t)=>{o.onmessage=function(i){i.data.type==="vscode-worker-ready"&&(o.onmessage=null,e(o))},o.onerror=t})}function aHe(o){return!!o&&typeof o.then=="function"}var tH,EIe,qne,TIe=x(()=>{Nu();qe();Ae();ae();W();jo();xG();le();tH=class o{static{this._workerIdPool=0}createWorkerClient(e){let t,i=++o._workerIdPool;return e instanceof Worker||aHe(e)?t=Promise.resolve(e):t=this._createWorker(e),new hP(new qne(t,i))}_createWorker(e){let t=this.getWorkerUrl(e),i=sHe(e.label,t,this._getWorkerLoadingFailedErrorMessage(e)),n=new Worker(EIe?EIe.createScriptURL(i):i,{name:e.label,type:"module"});return rHe(n)}_getWorkerLoadingFailedErrorMessage(e){}getWorkerUrl(e){if(!e.esmModuleLocation)throw new Error("Missing esmModuleLocation in WebWorkerDescriptor");return(typeof e.esmModuleLocation=="function"?e.esmModuleLocation():e.esmModuleLocation).toString(!0)}},EIe=(()=>{let o=globalThis;return typeof self=="object"&&self.constructor&&self.constructor.name==="DedicatedWorkerGlobalScope"&&o.workerttPolicy!==void 0?o.workerttPolicy:Ur("defaultWorkerFactory",{createScriptURL:e=>e})})();qne=class extends T{constructor(e,t){super(),this._onMessage=this._register(new N),this.onMessage=this._onMessage.event,this._onError=this._register(new N),this.onError=this._onError.event,this.id=t,this.worker=e,this.postMessage("-please-ignore-",[]);let i=n=>{this._onError.fire(n)};this.worker.then(n=>{n.onmessage=s=>{this._onMessage.fire(s.data)},n.onmessageerror=s=>{this._onError.fire(s)},typeof n.addEventListener=="function"&&n.addEventListener("error",i)}),this._register(ne(()=>{this.worker?.then(n=>{n.onmessage=null,n.onmessageerror=null,n.removeEventListener("error",i),n.terminate()}),this.worker=null}))}getId(){return this.id}postMessage(e,t){this.worker?.then(i=>{try{i.postMessage(e,t)}catch(n){De(n),De(new Error("FAILED to post message to worker",{cause:n}))}})}}});var iH,DIe=x(()=>{Ns();TIe();iH=class extends tH{_createWorker(e){let t=Dw();if(t&&typeof t.getWorker=="function"){let i=t.getWorker("workerMain.js",e.label);if(i!==void 0)return Promise.resolve(i)}return super._createWorker(e)}_getWorkerLoadingFailedErrorMessage(e){return`Failed to load worker script for label: ${e.label}. +Ensure your bundler properly bundles modules referenced by "new URL('...?esm', import.meta.url)".`}getWorkerUrl(e){let t=Dw();if(t&&typeof t.getWorkerUrl=="function"){let s=t.getWorkerUrl("workerMain.js",e.label);if(s!==void 0)return new URL(s,document.baseURI).toString()}if(!e.esmModuleLocationBundler)throw new Error(`You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker for the worker label: ${e.label}`);return(typeof e.esmModuleLocationBundler=="function"?e.esmModuleLocationBundler():e.esmModuleLocationBundler).toString()}}});var NIe,RIe,AIe,MIe,OIe=x(()=>{Wl();$t();bi();Zi();xi();qi();Mi();Xi();$i();Vi();Qi();Ji();NIe={base:"vs",inherit:!1,rules:[{token:"",foreground:"000000",background:"fffffe"},{token:"invalid",foreground:"cd3131"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"001188"},{token:"variable.predefined",foreground:"4864AA"},{token:"constant",foreground:"dd0000"},{token:"comment",foreground:"008000"},{token:"number",foreground:"098658"},{token:"number.hex",foreground:"3030c0"},{token:"regexp",foreground:"800000"},{token:"annotation",foreground:"808080"},{token:"type",foreground:"008080"},{token:"delimiter",foreground:"000000"},{token:"delimiter.html",foreground:"383838"},{token:"delimiter.xml",foreground:"0000FF"},{token:"tag",foreground:"800000"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"800000"},{token:"metatag",foreground:"e00000"},{token:"metatag.content.html",foreground:"FF0000"},{token:"metatag.html",foreground:"808080"},{token:"metatag.xml",foreground:"808080"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"863B00"},{token:"string.key.json",foreground:"A31515"},{token:"string.value.json",foreground:"0451A5"},{token:"attribute.name",foreground:"FF0000"},{token:"attribute.value",foreground:"0451A5"},{token:"attribute.value.number",foreground:"098658"},{token:"attribute.value.unit",foreground:"098658"},{token:"attribute.value.html",foreground:"0000FF"},{token:"attribute.value.xml",foreground:"0000FF"},{token:"string",foreground:"A31515"},{token:"string.html",foreground:"0000FF"},{token:"string.sql",foreground:"FF0000"},{token:"string.yaml",foreground:"0451A5"},{token:"keyword",foreground:"0000FF"},{token:"keyword.json",foreground:"0451A5"},{token:"keyword.flow",foreground:"AF00DB"},{token:"keyword.flow.scss",foreground:"0000FF"},{token:"operator.scss",foreground:"666666"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"C700C7"}],colors:{[Er]:"#FFFFFE",[$c]:"#000000",[lZ]:"#E5EBF1",[zC]:"#D3D3D3",[UC]:"#939393",[vC]:"#ADD6FF4D"}},RIe={base:"vs-dark",inherit:!1,rules:[{token:"",foreground:"D4D4D4",background:"1E1E1E"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"74B0DF"},{token:"variable.predefined",foreground:"4864AA"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"B5CEA8"},{token:"number.hex",foreground:"5BB498"},{token:"regexp",foreground:"B46695"},{token:"annotation",foreground:"cc6666"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"DCDCDC"},{token:"delimiter.html",foreground:"808080"},{token:"delimiter.xml",foreground:"808080"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"A79873"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"DD6A6F"},{token:"metatag.content.html",foreground:"9CDCFE"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key.json",foreground:"9CDCFE"},{token:"string.value.json",foreground:"CE9178"},{token:"attribute.name",foreground:"9CDCFE"},{token:"attribute.value",foreground:"CE9178"},{token:"attribute.value.number.css",foreground:"B5CEA8"},{token:"attribute.value.unit.css",foreground:"B5CEA8"},{token:"attribute.value.hex.css",foreground:"D4D4D4"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"keyword.json",foreground:"CE9178"},{token:"keyword.flow.scss",foreground:"569CD6"},{token:"operator.scss",foreground:"909090"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[Er]:"#1E1E1E",[$c]:"#D4D4D4",[lZ]:"#3A3D41",[zC]:"#404040",[UC]:"#707070",[vC]:"#ADD6FF26"}},AIe={base:"hc-black",inherit:!1,rules:[{token:"",foreground:"FFFFFF",background:"000000"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"1AEBFF"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"FFFFFF"},{token:"regexp",foreground:"C0C0C0"},{token:"annotation",foreground:"569CD6"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"FFFF00"},{token:"delimiter.html",foreground:"FFFF00"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta",foreground:"D4D4D4"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"569CD6"},{token:"metatag.content.html",foreground:"1AEBFF"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key",foreground:"9CDCFE"},{token:"string.value",foreground:"CE9178"},{token:"attribute.name",foreground:"569CD6"},{token:"attribute.value",foreground:"3FF23F"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[Er]:"#000000",[$c]:"#FFFFFF",[zC]:"#FFFFFF",[UC]:"#FFFFFF"}},MIe={base:"hc-light",inherit:!1,rules:[{token:"",foreground:"292929",background:"FFFFFF"},{token:"invalid",foreground:"B5200D"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"264F70"},{token:"variable.predefined",foreground:"4864AA"},{token:"constant",foreground:"dd0000"},{token:"comment",foreground:"008000"},{token:"number",foreground:"098658"},{token:"number.hex",foreground:"3030c0"},{token:"regexp",foreground:"800000"},{token:"annotation",foreground:"808080"},{token:"type",foreground:"008080"},{token:"delimiter",foreground:"000000"},{token:"delimiter.html",foreground:"383838"},{token:"tag",foreground:"800000"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"800000"},{token:"metatag",foreground:"e00000"},{token:"metatag.content.html",foreground:"B5200D"},{token:"metatag.html",foreground:"808080"},{token:"metatag.xml",foreground:"808080"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"863B00"},{token:"string.key.json",foreground:"A31515"},{token:"string.value.json",foreground:"0451A5"},{token:"attribute.name",foreground:"264F78"},{token:"attribute.value",foreground:"0451A5"},{token:"string",foreground:"A31515"},{token:"string.sql",foreground:"B5200D"},{token:"keyword",foreground:"0000FF"},{token:"keyword.flow",foreground:"AF00DB"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"C700C7"}],colors:{[Er]:"#FFFFFF",[$c]:"#292929",[zC]:"#292929",[UC]:"#292929"}}});function wi(o,e,t,i){return jy.registerIcon(o,e,t,i)}function Kne(){return jy}function hHe(){let o=QM();for(let e in o){let t="\\"+o[e].toString(16);jy.registerIcon(e,{fontCharacter:t})}}var lHe,PIe,FIe,cHe,dHe,jne,jy,WIe,HIe,BIe,nH,Ec=x(()=>{Ze();ti();KI();Li();ae();Rt();ai();le();kP();ls();W();lHe={IconContribution:"base.contributions.icons"};(function(o){function e(t,i){let n=t.defaults;for(;Ee.isThemeIcon(n);){let s=jy.getIcon(n.id);if(!s)return;n=s.defaults}return n}o.getDefinition=e})(PIe||(PIe={}));(function(o){function e(i){return{weight:i.weight,style:i.style,src:i.src.map(n=>({format:n.format,location:n.location.toString()}))}}o.toJSONObject=e;function t(i){let n=s=>Ln(s)?s:void 0;if(i&&Array.isArray(i.src)&&i.src.every(s=>Ln(s.format)&&Ln(s.location)))return{weight:n(i.weight),style:n(i.style),src:i.src.map(s=>({format:s.format,location:Le.parse(s.location)}))}}o.fromJSONObject=t})(FIe||(FIe={}));cHe=/^([\w_-]+)$/,dHe=m(2093,"The font ID must only contain letters, numbers, underscores and dashes."),jne=class extends T{constructor(){super(),this._onDidChange=this._register(new N),this.onDidChange=this._onDidChange.event,this.iconSchema={definitions:{icons:{type:"object",properties:{fontId:{type:"string",description:m(2094,"The id of the font to use. If not set, the font that is defined first is used."),pattern:cHe.source,patternErrorMessage:dHe},fontCharacter:{type:"string",description:m(2095,"The font character associated with the icon definition.")}},additionalProperties:!1,defaultSnippets:[{body:{fontCharacter:"\\\\e030"}}]}},type:"object",properties:{}},this.iconReferenceSchema={type:"string",pattern:`^${Ee.iconNameExpression}$`,enum:[],enumDescriptions:[]},this.iconsById={},this.iconFontsById={}}registerIcon(e,t,i,n){let s=this.iconsById[e];if(s){if(i&&!s.description){s.description=i,this.iconSchema.properties[e].markdownDescription=`${i} $(${e})`;let l=this.iconReferenceSchema.enum.indexOf(e);l!==-1&&(this.iconReferenceSchema.enumDescriptions[l]=i),this._onDidChange.fire()}return s}let r={id:e,description:i,defaults:t,deprecationMessage:n};this.iconsById[e]=r;let a={$ref:"#/definitions/icons"};return n&&(a.deprecationMessage=n),i&&(a.markdownDescription=`${i}: $(${e})`),this.iconSchema.properties[e]=a,this.iconReferenceSchema.enum.push(e),this.iconReferenceSchema.enumDescriptions.push(i||""),this._onDidChange.fire(),{id:e}}getIcons(){return Object.keys(this.iconsById).map(e=>this.iconsById[e])}getIcon(e){return this.iconsById[e]}getIconSchema(){return this.iconSchema}toString(){let e=(s,r)=>s.id.localeCompare(r.id),t=s=>{for(;Ee.isThemeIcon(s.defaults);)s=this.iconsById[s.defaults.id];return`codicon codicon-${s?s.id:""}`},i=[];i.push("| preview | identifier | default codicon ID | description"),i.push("| ----------- | --------------------------------- | --------------------------------- | --------------------------------- |");let n=Object.keys(this.iconsById).map(s=>this.iconsById[s]);for(let s of n.filter(r=>!!r.description).sort(e))i.push(`||${s.id}|${Ee.isThemeIcon(s.defaults)?s.defaults.id:s.id}|${s.description||""}|`);i.push("| preview | identifier "),i.push("| ----------- | --------------------------------- |");for(let s of n.filter(r=>!Ee.isThemeIcon(r.defaults)).sort(e))i.push(`||${s.id}|`);return i.join(` +`)}},jy=new jne;jt.add(lHe.IconContribution,jy);hHe();WIe="vscode://schemas/icons",HIe=jt.as(Gw.JSONContribution);HIe.registerSchema(WIe,jy.getIconSchema());BIe=new at(()=>HIe.notifySchemaChanged(WIe),200);jy.onDidChange(()=>{BIe.isScheduled()||BIe.schedule()});nH=wi("widget-close",$.close,m(2096,"Icon for the close action in widgets."));wi("goto-previous-location",$.arrowUp,m(2097,"Icon for goto previous editor location."));wi("goto-next-location",$.arrowDown,m(2098,"Icon for goto next editor location."));Ee.modify($.sync,"spin");Ee.modify($.loading,"spin")});function VIe(o){let e=new F,t=e.add(new N),i=Kne();return e.add(i.onDidChange(()=>t.fire())),o&&e.add(o.onDidProductIconThemeChange(()=>t.fire())),{dispose:()=>e.dispose(),onDidChange:t.event,getCSS(){let n=o?o.getProductIconTheme():new AN,s={},r=new K0,a=new K0;for(let l of i.getIcons()){let c=n.getIcon(l);if(!c)continue;let d=c.font,h=$l`--vscode-icon-${KD(l.id)}-font-family`,u=$l`--vscode-icon-${KD(l.id)}-content`;d?(s[d.id]=d.definition,a.push($l`${h}: ${Tp(d.id)};`,$l`${u}: ${Tp(c.fontCharacter)};`),r.push($l`.codicon-${KD(l.id)}:before { content: ${Tp(c.fontCharacter)}; font-family: ${Tp(d.id)}; }`)):(a.push($l`${u}: ${Tp(c.fontCharacter)}; ${h}: 'codicon';`),r.push($l`.codicon-${KD(l.id)}:before { content: ${Tp(c.fontCharacter)}; }`))}for(let l in s){let c=s[l],d=c.weight?$l`font-weight: ${pte(c.weight)};`:$l``,h=c.style?$l`font-style: ${pte(c.style)};`:$l``,u=new K0;for(let f of c.src)u.push($l`${Ul(f.location)} format(${Tp(f.format)})`);r.push($l`@font-face { src: ${u.join(", ")}; font-family: ${Tp(l)};${d}${h} font-display: block; }`)}return r.push($l`:root { ${a.join(" ")} }`),r.join(` +`)}}}var AN,zIe=x(()=>{ju();ae();W();Li();Ec();AN=class{getIcon(e){let t=Kne(),i=e.defaults;for(;Ee.isThemeIcon(i);){let n=t.getIcon(i.id);if(!n)return;i=n.defaults}return i}}});function sH(o){return o===Bg||o===Ky||o===_v||o===bv}function Gne(o){switch(o){case Bg:return NIe;case Ky:return RIe;case _v:return AIe;case bv:return MIe}}function oH(o){let e=Gne(o);return new rH(o,e)}var Bg,Ky,_v,bv,UIe,uHe,rH,aH,Yne=x(()=>{re();qd();Ns();Yi();ae();Ci();rC();YQ();OIe();ls();$t();bi();Zi();xi();qi();Mi();Xi();$i();Vi();Qi();Ji();Kt();W();Kc();zIe();br();Bg="vs",Ky="vs-dark",_v="hc-black",bv="hc-light",UIe=jt.as(nZ.ColorContribution),uHe=jt.as(nX.ThemingContribution),rH=class{constructor(e,t){this.semanticHighlighting=!1,this.themeData=t;let i=t.base;e.length>0?(sH(e)?this.id=e:this.id=i+" "+e,this.themeName=e):(this.id=i,this.themeName=i),this.colors=null,this.defaultColors=Object.create(null),this._tokenTheme=null}get base(){return this.themeData.base}notifyBaseUpdated(){this.themeData.inherit&&(this.colors=null,this._tokenTheme=null)}getColors(){if(!this.colors){let e=new Map;for(let t in this.themeData.colors)e.set(t,K.fromHex(this.themeData.colors[t]));if(this.themeData.inherit){let t=Gne(this.themeData.base);for(let i in t.colors)e.has(i)||e.set(i,K.fromHex(t.colors[i]))}this.colors=e}return this.colors}getColor(e,t){let i=this.getColors().get(e);if(i)return i;if(t!==!1)return this.getDefault(e)}getDefault(e){let t=this.defaultColors[e];return t||(t=UIe.resolveDefaultColor(e,this),this.defaultColors[e]=t,t)}defines(e){return this.getColors().has(e)}get type(){switch(this.base){case Bg:return pc.LIGHT;case _v:return pc.HIGH_CONTRAST_DARK;case bv:return pc.HIGH_CONTRAST_LIGHT;default:return pc.DARK}}get tokenTheme(){if(!this._tokenTheme){let e=[],t=[];if(this.themeData.inherit){let s=Gne(this.themeData.base);e=s.rules,s.encodedTokensColors&&(t=s.encodedTokensColors)}let i=this.themeData.colors["editor.foreground"],n=this.themeData.colors["editor.background"];if(i||n){let s={token:""};i&&(s.foreground=i),n&&(s.background=n),e.push(s)}e=e.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(t=this.themeData.encodedTokensColors),this._tokenTheme=nD.createFromRawTokenTheme(e,t)}return this._tokenTheme}getTokenStyleMetadata(e,t,i){let s=this.tokenTheme._match([e].concat(t).join(".")).metadata,r=Wo.getForeground(s),a=Wo.getFontStyle(s);return{foreground:r,italic:!!(a&1),bold:!!(a&2),underline:!!(a&4),strikethrough:!!(a&8)}}get tokenColorMap(){return[]}};aH=class extends T{constructor(){super(),this._onColorThemeChange=this._register(new N),this.onDidColorThemeChange=this._onColorThemeChange.event,this._onProductIconThemeChange=this._register(new N),this.onDidProductIconThemeChange=this._onProductIconThemeChange.event,this._environment=Object.create(null),this._builtInProductIconTheme=new AN,this._autoDetectHighContrast=!0,this._knownThemes=new Map,this._knownThemes.set(Bg,oH(Bg)),this._knownThemes.set(Ky,oH(Ky)),this._knownThemes.set(_v,oH(_v)),this._knownThemes.set(bv,oH(bv));let e=this._register(VIe(this));this._codiconCSS=e.getCSS(),this._themeCSS="",this._allCSS=`${this._codiconCSS} +${this._themeCSS}`,this._globalStyleElement=null,this._styleElements=[],this._colorMapOverride=null,this.setTheme(Bg),this._onOSSchemeChanged(),this._register(e.onDidChange(()=>{this._codiconCSS=e.getCSS(),this._updateCSS()})),lK(Tt,"(forced-colors: active)",()=>{this._onOSSchemeChanged()})}registerEditorContainer(e){return Hw(e)?this._registerShadowDomContainer(e):this._registerRegularEditorContainer()}_registerRegularEditorContainer(){return this._globalStyleElement||(this._globalStyleElement=or(void 0,e=>{e.className="monaco-colors",e.textContent=this._allCSS}),this._styleElements.push(this._globalStyleElement)),T.None}_registerShadowDomContainer(e){let t=or(e,i=>{i.className="monaco-colors",i.textContent=this._allCSS});return this._styleElements.push(t),{dispose:()=>{for(let i=0;i{i.base===e&&i.notifyBaseUpdated()}),this._theme.themeName===e&&this.setTheme(e)}getColorTheme(){return this._theme}setColorMapOverride(e){this._colorMapOverride=e,this._updateThemeOrColorMap()}setTheme(e){let t;this._knownThemes.has(e)?t=this._knownThemes.get(e):t=this._knownThemes.get(Bg),this._updateActualTheme(t)}_updateActualTheme(e){!e||this._theme===e||(this._theme=e,this._updateThemeOrColorMap())}_onOSSchemeChanged(){if(this._autoDetectHighContrast){let e=Tt.matchMedia("(forced-colors: active)").matches;if(e!==ga(this._theme.type)){let t;_c(this._theme.type)?t=e?_v:Ky:t=e?bv:Bg,this._updateActualTheme(this._knownThemes.get(t))}}}setAutoDetectHighContrast(e){this._autoDetectHighContrast=e,this._onOSSchemeChanged()}_updateThemeOrColorMap(){let e=[],t={},i={addRule:r=>{t[r]||(e.push(r),t[r]=!0)}};uHe.getThemingParticipants().forEach(r=>r(this._theme,i,this._environment));let n=[];for(let r of UIe.getColors()){let a=this._theme.getColor(r.id,!0);a&&n.push(`${CF(r.id)}: ${a.toString()};`)}i.addRule(`.monaco-editor, .monaco-diff-editor, .monaco-component { ${n.join(` +`)} }`);let s=this._colorMapOverride||this._theme.tokenTheme.getColorMap();i.addRule(vSe(s)),i.addRule(".monaco-editor, .monaco-diff-editor, .monaco-component { forced-color-adjust: none; }"),this._themeCSS=e.join(` +`),this._updateCSS(),Ti.setColorMap(s),this._onColorThemeChange.fire(this._theme)}_updateCSS(){this._allCSS=`${this._codiconCSS} +${this._themeCSS}`,this._styleElements.forEach(e=>e.textContent=this._allCSS)}getFileIconTheme(){return{hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!1}}getProductIconTheme(){return this._builtInProductIconTheme}}});var lH,$Ie=x(()=>{lH=class{getParserClass(){throw new Error("not implemented in StandaloneTreeSitterLibraryService")}supportsLanguage(e,t){return!1}getLanguage(e,t,i){}getInjectionQueries(e,t){return null}getHighlightingQueries(e,t){return null}}});function qIe(o){return!!o&&typeof o=="object"&&(!o.overrideIdentifier||typeof o.overrideIdentifier=="string")&&(!o.resource||o.resource instanceof Le)}function MN(o,e,t){if(!e||!(o instanceof cH))return;let i=[];Object.keys(e).forEach(n=>{SLe(n)&&i.push([`editor.${n}`,e[n]]),t&&xLe(n)&&i.push([`diffEditor.${n}`,e[n]])}),i.length>0&&o.updateValues(i)}var Hp,hr,Zne,Xne,Qne,Jne,eoe,toe,ioe,noe,vv,ooe,cH,soe,roe,aoe,loe,coe,doe,hoe,uoe,foe,goe,moe,poe,_oe,it,ON=x(()=>{Y1e();J1e();c8();th();b0e();C0e();Kee();Gee();re();wr();br();Ae();ae();vx();W();yo();rt();Xo();fp();He();ai();L0e();us();Ip();yi();tte();T0e();ih();Ii();oi();ste();D0e();N0e();je();Ske();Kr();xke();m6();Xte();W0();h8();xP();Qo();Ie();Lke();ny();Tke();Oi();Jte();Rh();eie();Nke();dk();Cg();Lk();So();gLe();Xu();mLe();Hs();eh();Qh();Mr();al();Dl();eg();pLe();gP();My();sne();uv();ao();CLe();cne();hne();lh();Pe();ue();fv();xr();MLe();mF();PLe();Ra();FLe();Il();zE();yB();Mg();gv();IIe();DIe();Yne();$Ie();Hp=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},hr=function(o,e){return function(t,i){e(t,i,o)}},Zne=class{constructor(e){this.disposed=!1,this.model=e,this._onWillDispose=new N}get textEditorModel(){return this.model}dispose(){this.disposed=!0,this._onWillDispose.fire()}},Xne=class{constructor(e){this.modelService=e}createModelReference(e){let t=this.modelService.getModel(e);return t?Promise.resolve(new HM(new Zne(t))):Promise.reject(new Error("Model not found"))}};Xne=Hp([hr(0,ui)],Xne);Qne=class o{static{this.NULL_PROGRESS_RUNNER={done:()=>{},total:()=>{},worked:()=>{}}}show(){return o.NULL_PROGRESS_RUNNER}async showWhile(e,t){await e}},Jne=class{withProgress(e,t,i){return t({report:()=>{}})}},eoe=class{constructor(){this.isExtensionDevelopment=!1,this.isBuilt=!1}},toe=class{async confirm(e){return{confirmed:this.doConfirm(e.message,e.detail),checkboxChecked:!1}}doConfirm(e,t){let i=e;return t&&(i=i+` + +`+t),Tt.confirm(i)}async prompt(e){let t;if(this.doConfirm(e.message,e.detail)){let n=[...e.buttons??[]];e.cancelButton&&typeof e.cancelButton!="string"&&typeof e.cancelButton!="boolean"&&n.push(e.cancelButton),t=await n[0]?.run({checkboxChecked:!1})}return{result:t}}async error(e,t){await this.prompt({type:rn.Error,message:e,detail:t})}},ioe=class o{static{this.NO_OP=new d3}info(e){return this.notify({severity:rn.Info,message:e})}warn(e){return this.notify({severity:rn.Warning,message:e})}error(e){return this.notify({severity:rn.Error,message:e})}notify(e){switch(e.severity){case rn.Error:console.error(e.message);break;case rn.Warning:console.warn(e.message);break;default:console.log(e.message);break}return o.NO_OP}prompt(e,t,i,n){return o.NO_OP}status(e,t){return{close:()=>{}}}},noe=class{constructor(e){this._onWillExecuteCommand=new N,this._onDidExecuteCommand=new N,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this._instantiationService=e}executeCommand(e,...t){let i=st.getCommand(e);if(!i)return Promise.reject(new Error(`command '${e}' not found`));try{this._onWillExecuteCommand.fire({commandId:e,args:t});let n=this._instantiationService.invokeFunction.apply(this._instantiationService,[i.handler,...t]);return this._onDidExecuteCommand.fire({commandId:e,args:t}),Promise.resolve(n)}catch(n){return Promise.reject(n)}}};noe=Hp([hr(0,ie)],noe);vv=class extends w6{constructor(e,t,i,n,s,r){super(e,t,i,n,s),this._cachedResolver=null,this._dynamicKeybindings=[],this._domNodeListeners=[];let a=f=>{let g=new F;g.add(B(f,ee.KEY_DOWN,p=>{let _=new Mt(p);this._dispatch(_,_.target)&&(_.preventDefault(),_.stopPropagation())})),g.add(B(f,ee.KEY_UP,p=>{let _=new Mt(p);this._singleModifierDispatch(_,_.target)&&_.preventDefault()})),this._domNodeListeners.push(new ooe(f,g))},l=f=>{for(let g=0;g{f.getOption(70)||a(f.getContainerDomNode())},d=f=>{f.getOption(70)||l(f.getContainerDomNode())};this._register(r.onCodeEditorAdd(c)),this._register(r.onCodeEditorRemove(d)),r.listCodeEditors().forEach(c);let h=f=>{a(f.getContainerDomNode())},u=f=>{l(f.getContainerDomNode())};this._register(r.onDiffEditorAdd(h)),this._register(r.onDiffEditorRemove(u)),r.listDiffEditors().forEach(h)}addDynamicKeybinding(e,t,i,n){return sa(st.registerCommand(e,i),this.addDynamicKeybindings([{keybinding:t,command:e,when:n}]))}addDynamicKeybindings(e){let t=e.map(i=>({keybinding:iE(i.keybinding,Po),command:i.command??null,commandArgs:i.commandArgs,when:i.when,weight1:1e3,weight2:0,extensionId:null,isBuiltinExtension:!1}));return this._dynamicKeybindings=this._dynamicKeybindings.concat(t),this.updateResolver(),ne(()=>{for(let i=0;ithis._log(i))}return this._cachedResolver}_documentHasFocus(){return Tt.document.hasFocus()}_toNormalizedKeybindingItems(e,t){let i=[],n=0;for(let s of e){let r=s.when||void 0,a=s.keybinding;if(!a)i[n++]=new nN(void 0,s.command,s.commandArgs,r,t,null,!1);else{let l=oN.resolveKeybinding(a,Po);for(let c of l)i[n++]=new nN(c,s.command,s.commandArgs,r,t,null,!1)}}return i}resolveKeyboardEvent(e){let t=new Cf(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,e.keyCode);return new oN([t],Po)}};vv=Hp([hr(0,Ce),hr(1,Et),hr(2,$n),hr(3,si),hr(4,Ot),hr(5,ot)],vv);ooe=class extends T{constructor(e,t){super(),this.domNode=e,this._register(t)}};cH=class{constructor(e){this.logService=e,this._onDidChangeConfiguration=new N,this.onDidChangeConfiguration=this._onDidChangeConfiguration.event;let t=new M8(e);this._configuration=new UD(t.reload(),Va.createEmptyModel(e),Va.createEmptyModel(e),Va.createEmptyModel(e),Va.createEmptyModel(e),Va.createEmptyModel(e),new un,Va.createEmptyModel(e),new un,e),t.dispose()}getValue(e,t){let i=typeof e=="string"?e:void 0,n=qIe(e)?e:qIe(t)?t:{};return this._configuration.getValue(i,n,void 0)}updateValues(e){let t={data:this._configuration.toData()},i=[];for(let n of e){let[s,r]=n;this.getValue(s)!==r&&(this._configuration.updateValue(s,r),i.push(s))}if(i.length>0){let n=new A8({keys:i,overrides:[]},t,this._configuration,void 0,this.logService);n.source=8,this._onDidChangeConfiguration.fire(n)}return Promise.resolve()}updateValue(e,t,i,n){return this.updateValues([[e,t]])}inspect(e,t={}){return this._configuration.inspect(e,t,void 0)}};cH=Hp([hr(0,Ot)],cH);soe=class extends T{constructor(e,t,i){super(),this.configurationService=e,this.modelService=t,this.languageService=i,this._onDidChangeConfiguration=this._register(new N),this._register(this.configurationService.onDidChangeConfiguration(n=>{this._onDidChangeConfiguration.fire({affectedKeys:n.affectedKeys,affectsConfiguration:(s,r)=>n.affectsConfiguration(r)})}))}getValue(e,t,i){let n=M.isIPosition(t)?t:null,s=n?typeof i=="string"?i:void 0:typeof t=="string"?t:void 0,r=e?this.getLanguage(e,n):void 0;return typeof s>"u"?this.configurationService.getValue({resource:e,overrideIdentifier:r}):this.configurationService.getValue(s,{resource:e,overrideIdentifier:r})}getLanguage(e,t){let i=this.modelService.getModel(e);return i?t?i.getLanguageIdAtPosition(t.lineNumber,t.column):i.getLanguageId():this.languageService.guessLanguageIdByFilepathOrFirstLine(e)}};soe=Hp([hr(0,Me),hr(1,ui),hr(2,ri)],soe);roe=class{constructor(e){this.configurationService=e}getEOL(e,t){let i=this.configurationService.getValue("files.eol",{overrideIdentifier:t,resource:e});return i&&typeof i=="string"&&i!=="auto"?i:po||Ye?` +`:`\r +`}};roe=Hp([hr(0,Me)],roe);aoe=class{publicLog2(){}},loe=class o{static{this.SCHEME="inmemory"}constructor(){let e=Le.from({scheme:o.SCHEME,authority:"model",path:"/"});this.workspace={id:one,folders:[new r9({uri:e,name:"",index:0})]}}getWorkspace(){return this.workspace}getWorkspaceFolder(e){return e&&e.scheme===o.SCHEME?this.workspace.folders[0]:null}};coe=class{constructor(e){this._modelService=e}hasPreviewHandler(){return!1}async apply(e,t){let i=Array.isArray(e)?e:Ik.convert(e),n=new Map;for(let a of i){if(!(a instanceof Ag))throw new Error("bad edit - only text edits are supported");let l=this._modelService.getModel(a.resource);if(!l)throw new Error("bad edit - model not found");if(typeof a.versionId=="number"&&l.getVersionId()!==a.versionId)throw new Error("bad state - model changed in the meantime");let c=n.get(l);c||(c=[],n.set(l,c)),c.push(Ni.replaceMove(S.lift(a.textEdit.range),a.textEdit.text))}let s=0,r=0;for(let[a,l]of n)a.pushStackElement(),a.pushEditOperations([],l,()=>[]),a.pushStackElement(),r+=1,s+=l.length;return{ariaSummary:Rd(E9.bulkEditServiceSummary,s,r),isApplied:s>0}}};coe=Hp([hr(0,ui)],coe);doe=class{getUriLabel(e,t){return e.scheme==="file"?e.fsPath:e.path}getUriBasenameLabel(e){return Os(e)}},hoe=class extends f6{constructor(e,t){super(e),this._codeEditorService=t}showContextView(e,t,i){if(!t){let n=this._codeEditorService.getFocusedCodeEditor()||this._codeEditorService.getActiveCodeEditor();n&&(t=n.getContainerDomNode())}return super.showContextView(e,t,i)}};hoe=Hp([hr(0,Ca),hr(1,ot)],hoe);uoe=class{constructor(){this._neverEmitter=new N,this.onDidChangeTrust=this._neverEmitter.event}isWorkspaceTrusted(){return!0}},foe=class extends v9{constructor(){super()}},goe=class extends n9{constructor(){super(new sP)}},moe=class extends u6{constructor(e,t,i,n,s,r){super(e,t,i,n,s,r),this.configure({blockMouse:!1})}};moe=Hp([hr(0,$n),hr(1,si),hr(2,sl),hr(3,$e),hr(4,Yo),hr(5,Ce)],moe);poe=class{async playSignal(e,t){}},_oe=class{constructor(){this.onDidChangeDefaultAccount=Q.None}async getDefaultAccount(){return null}};Je(Z_,iH,0);Je(Ot,goe,0);Je(Me,cH,0);Je(qx,soe,0);Je(rF,roe,0);Je(ad,loe,0);Je(Zh,doe,0);Je($n,aoe,0);Je(yg,toe,0);Je(z0,eoe,0);Je(si,ioe,0);Je(za,o9,0);Je(ri,foe,0);Je(cr,aH,0);Je(ui,S9,0);Je(Qx,C9,0);Je(Ce,W8,0);Je(s9,Jne,0);Je(Kl,Qne,0);Je(zn,r8,0);Je(Jh,coe,0);Je(c9,uoe,0);Je(Hn,Xne,0);Je(Ri,I8,0);Je(Lc,z6,0);Je(Et,noe,0);Je($e,vv,0);Je(Mn,eH,0);Je(sl,hoe,0);Je(Ar,u9,0);Je(Lo,N8,0);Je(eo,moe,0);Je(Yo,E8,0);Je(ll,poe,0);Je(v0,lH,0);Je(lP,aP,0);Je(lk,g6,0);Je(p6,_oe,0);Je(g9,f9,0);Je(ba,wN,0);(function(o){let e=new ed;for(let[l,c]of MG())e.set(l,c);let t=new b6(e,!0);e.set(ie,t);function i(l){n||r({});let c=e.get(l);if(!c)throw new Error("Missing service "+l);return c instanceof uc?t.invokeFunction(d=>d.get(l)):c}o.get=i;let n=!1,s=new N;function r(l){if(n)return t;n=!0;for(let[d,h]of MG())e.get(d)||e.set(d,h);for(let d in l)if(l.hasOwnProperty(d)){let h=Ne(d);e.get(h)instanceof uc&&e.set(h,l[d])}let c=LLe();for(let d of c)try{t.createInstance(d)}catch(h){De(h)}return s.fire(),t}o.initialize=r;function a(l){if(n)return l();let c=new F,d=c.add(s.event(()=>{d.dispose(),c.add(l())}));return c}o.withServices=a})(it||(it={}))});function Ju(o,e){return o}function Fk(o){return ht(o)}var Bk=x(()=>{et();Es()});function boe(o,e,t,i=Di.ofCaller()){return xl({debugName:()=>`Configuration Key "${o}"`},n=>t.onDidChangeConfiguration(s=>{s.affectsConfiguration(o)&&n(s)}),()=>t.getValue(o)??e,i)}function iu(o,e,t,i=Di.ofCaller()){let n=o.bindTo(e),s=new F;return Bn({debugName:()=>`Set Context Key "${o.key}"`},r=>{let a=t(r);return n.set(a),a},i).recomputeInitiallyAndOnChange(s),s}var dH=x(()=>{W();et();aa();Gt();Xn()});var Gl,Gy=x(()=>{Gl=class o{static capture(e){if(e.getScrollTop()===0||e.hasPendingScrollAnimation())return new o(e.getScrollTop(),e.getContentHeight(),null,0,null);let t=null,i=0,n=e.getVisibleRanges();if(n.length>0){t=n[0].getStartPosition();let s=e.getTopForPosition(t.lineNumber,t.column);i=e.getScrollTop()-s}return new o(e.getScrollTop(),e.getContentHeight(),t,i,e.getPosition())}constructor(e,t,i,n,s){this._initialScrollTop=e,this._initialContentHeight=t,this._visiblePosition=i,this._visiblePositionScrollDelta=n,this._cursorPosition=s}restore(e){if(!(this._initialContentHeight===e.getContentHeight()&&this._initialScrollTop===e.getScrollTop())&&this._visiblePosition){let t=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(t+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(e){if(this._initialContentHeight===e.getContentHeight()&&this._initialScrollTop===e.getScrollTop())return;let t=e.getPosition();if(!this._cursorPosition||!t)return;let i=e.getTopForLineNumber(t.lineNumber)-e.getTopForLineNumber(this._cursorPosition.lineNumber);e.setScrollTop(e.getScrollTop()+i,1)}}});function jIe(o,e,t,i){if(o.length===0)return e;if(e.length===0)return o;let n=[],s=0,r=0;for(;sd?(n.push(l),r++):(n.push(i(a,l)),s++,r++)}for(;s`Apply decorations from ${e.debugName}`},n=>{let s=e.read(n);i.set(s)})),t.add({dispose:()=>{i.clear()}}),t}function zp(o,e){return o.appendChild(e),ne(()=>{e.remove()})}function KIe(o,e){return o.prepend(e),ne(()=>{e.remove()})}function Coe(o,e,t){let i=e.get(),n=i,s=i,r=_e("animatedValue",i),a=-1,l=300,c;t.add(kf({changeTracker:{createChangeSummary:()=>({animate:!1}),handleChange:(h,u)=>(h.didChange(e)&&(u.animate=u.animate||h.change),!0)}},(h,u)=>{c!==void 0&&(o.cancelAnimationFrame(c),c=void 0),n=s,i=e.read(h),n===i?a=Date.now()-l:a=Date.now()-(u.animate?0:l),d()}));function d(){let h=Date.now()-a;s=Math.floor(fHe(h,n,i-n,l)),h{for(let[i,n]of Object.entries(e))n&&typeof n=="object"&&"read"in n&&(n=n.read(t)),typeof n=="number"&&(n=`${n}px`),i=i.replace(/[A-Z]/g,s=>"-"+s.toLowerCase()),o.style[i]=n})}function Vk(o,e,t,i){let n=new F,s=[];return n.add(To((r,a)=>{let l=e.read(r),c=new Map,d=new Map;t&&t(!0),o.changeViewZones(h=>{for(let u of s)h.removeZone(u),i?.delete(u);s.length=0;for(let u of l){let f=h.addZone(u);u.setZoneId&&u.setZoneId(f),s.push(f),i?.add(f),c.set(u,f)}}),t&&t(!1),a.add(kf({changeTracker:{createChangeSummary(){return{zoneIds:[]}},handleChange(h,u){let f=d.get(h.changedObservable);return f!==void 0&&u.zoneIds.push(f),!0}}},(h,u)=>{for(let f of l)f.onChange&&(d.set(f.onChange,c.get(f)),f.onChange.read(h));t&&t(!0),o.changeViewZones(f=>{for(let g of u.zoneIds)f.layoutZone(g)}),t&&t(!1)}))})),n.add({dispose(){t&&t(!0),o.changeViewZones(r=>{for(let a of s)r.removeZone(a)}),i?.clear(),t&&t(!1)}}),n}function yoe(o,e){let t=Um(e,n=>n.original.startLineNumber<=o.lineNumber);if(!t)return S.fromPositions(o);if(t.original.endLineNumberExclusive<=o.lineNumber){let n=o.lineNumber-t.original.endLineNumberExclusive+t.modified.endLineNumberExclusive;return S.fromPositions(new M(n,o.column))}if(!t.innerChanges)return S.fromPositions(new M(t.modified.startLineNumber,1));let i=Um(t.innerChanges,n=>n.originalRange.getStartPosition().isBeforeOrEqual(o));if(!i){let n=o.lineNumber-t.original.startLineNumber+t.modified.startLineNumber;return S.fromPositions(new M(n,o.column))}if(i.originalRange.containsPosition(o))return i.modifiedRange;{let n=gHe(i.originalRange.getEndPosition(),o);return S.fromPositions(n.addToPosition(i.modifiedRange.getEndPosition()))}}function gHe(o,e){return o.lineNumber===e.lineNumber?new fn(0,e.column-o.column):new fn(e.lineNumber-o.lineNumber,e.column-1)}function GIe(o,e){let t;return o.filter(i=>{let n=e(i,t);return t=i,n})}var Wk,Yy,Wg,voe,hH,Vp,uH,woe,ud=x(()=>{ha();Vt();W();et();jY();Pe();ue();fc();Jt();ei();vs();Wk=class extends T{get width(){return this._width}get height(){return this._height}get automaticLayout(){return this._automaticLayout}constructor(e,t){super(),this._automaticLayout=!1,this.elementSizeObserver=this._register(new Jx(e,t)),this._width=_e(this,this.elementSizeObserver.getWidth()),this._height=_e(this,this.elementSizeObserver.getHeight()),this._register(this.elementSizeObserver.onDidChange(i=>Yt(n=>{this._width.set(this.elementSizeObserver.getWidth(),n),this._height.set(this.elementSizeObserver.getHeight(),n)})))}observe(e){this.elementSizeObserver.observe(e)}setAutomaticLayout(e){this._automaticLayout=e,e?this.elementSizeObserver.startObserving():this.elementSizeObserver.stopObserving()}};Yy=class extends T{constructor(e,t,i){super(),this._register(new voe(e,i)),this._register(ch(i,{height:t.actualHeight,top:t.actualTop}))}},Wg=class{get afterLineNumber(){return this._afterLineNumber.get()}constructor(e,t){this._afterLineNumber=e,this.heightInPx=t,this.domNode=document.createElement("div"),this._actualTop=_e(this,void 0),this._actualHeight=_e(this,void 0),this.actualTop=this._actualTop,this.actualHeight=this._actualHeight,this.showInHiddenAreas=!0,this.onChange=this._afterLineNumber,this.onDomNodeTop=i=>{this._actualTop.set(i,void 0)},this.onComputedHeight=i=>{this._actualHeight.set(i,void 0)}}},voe=class o{static{this._counter=0}constructor(e,t){this._editor=e,this._domElement=t,this._overlayWidgetId=`managedOverlayWidget-${o._counter++}`,this._overlayWidget={getId:()=>this._overlayWidgetId,getDomNode:()=>this._domElement,getPosition:()=>null},this._editor.addOverlayWidget(this._overlayWidget)}dispose(){this._editor.removeOverlayWidget(this._overlayWidget)}};hH=class extends Lt{dispose(){super.dispose(!0)}};Vp=class{static create(e,t=void 0){return new uH(e,e,t)}static createWithDisposable(e,t,i=void 0){let n=new F;return n.add(t),n.add(e),new uH(e,n,i)}},uH=class extends Vp{constructor(e,t,i){super(),this.object=e,this._disposable=t,this._debugOwner=i,this._refCount=1,this._isDisposed=!1,this._owners=[],i&&this._addOwner(i)}_addOwner(e){e&&this._owners.push(e)}createNewRef(e){return this._refCount++,e&&this._addOwner(e),new woe(this,e)}dispose(){this._isDisposed||(this._isDisposed=!0,this._decreaseRefCount(this._debugOwner))}_decreaseRefCount(e){if(this._refCount--,this._refCount===0&&this._disposable.dispose(),e){let t=this._owners.indexOf(e);t!==-1&&this._owners.splice(t,1)}}},woe=class extends Vp{constructor(e,t){super(),this._base=e,this._debugOwner=t,this._isDisposed=!1}get object(){return this._base.object}createNewRef(e){return this._base.createNewRef(e)}dispose(){this._isDisposed||(this._isDisposed=!0,this._base._decreaseRefCount(this._debugOwner))}}});var YIe=x(()=>{});function bHe(o,e,t){let i=[];for(let n of QS(o,(s,r)=>r.modified.startLineNumber-s.modified.endLineNumberExclusive<2*PN)){let s=[];s.push(new koe);let r=new Re(Math.max(1,n[0].original.startLineNumber-PN),Math.min(n[n.length-1].original.endLineNumberExclusive+PN,e+1)),a=new Re(Math.max(1,n[0].modified.startLineNumber-PN),Math.min(n[n.length-1].modified.endLineNumberExclusive+PN,t+1));SM(n,(d,h)=>{let u=new Re(d?d.original.endLineNumberExclusive:r.startLineNumber,h?h.original.startLineNumber:r.endLineNumberExclusive),f=new Re(d?d.modified.endLineNumberExclusive:a.startLineNumber,h?h.modified.startLineNumber:a.endLineNumberExclusive);u.forEach(g=>{s.push(new Eoe(g,f.startLineNumber+(g-u.startLineNumber)))}),h&&(h.original.forEach(g=>{s.push(new Loe(h,g))}),h.modified.forEach(g=>{s.push(new Ioe(h,g))}))});let l=n[0].modified.join(n[n.length-1].modified),c=n[0].original.join(n[n.length-1].original);i.push(new xoe(new ir(l,c),s))}return i}var Doe,Noe,mHe,pHe,_He,wv,Soe,PN,hl,xoe,koe,Loe,Ioe,Eoe,Toe,fH,ZIe=x(()=>{re();Nu();Yh();Gc();qe();ti();W();et();Li();dc();ud();Uo();Qn();Hi();Pe();ue();$d();xr();ua();pb();Km();le();Ip();Ie();Ec();YIe();ys();vs();Gt();ei();Jt();Doe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Noe=function(o,e){return function(t,i){e(t,i,o)}},mHe=wi("diff-review-insert",$.add,m(113,"Icon for 'Insert' in accessible diff viewer.")),pHe=wi("diff-review-remove",$.remove,m(114,"Icon for 'Remove' in accessible diff viewer.")),_He=wi("diff-review-close",$.close,m(115,"Icon for 'Close' in accessible diff viewer.")),wv=class extends T{static{this._ttPolicy=Ur("diffReview",{createHTML:e=>e})}constructor(e,t,i,n,s,r,a,l,c){super(),this._parentNode=e,this._visible=t,this._setVisible=i,this._canClose=n,this._width=s,this._height=r,this._diffs=a,this._models=l,this._instantiationService=c,this._state=V(this,d=>{let h=this._visible.read(d);if(this._parentNode.style.visibility=h?"visible":"hidden",!h)return null;let u=d.store.add(this._instantiationService.createInstance(Soe,this._diffs,this._models,this._setVisible,this._canClose)),f=d.store.add(this._instantiationService.createInstance(Toe,this._parentNode,u,this._width,this._height,this._models));return{model:u,view:f}}).recomputeInitiallyAndOnChange(this._store)}next(){Yt(e=>{let t=this._visible.get();this._setVisible(!0,e),t&&this._state.get().model.nextGroup(e)})}prev(){Yt(e=>{this._setVisible(!0,e),this._state.get().model.previousGroup(e)})}close(){Yt(e=>{this._setVisible(!1,e)})}};wv=Doe([Noe(8,ie)],wv);Soe=class extends T{constructor(e,t,i,n,s){super(),this._diffs=e,this._models=t,this._setVisible=i,this.canClose=n,this._accessibilitySignalService=s,this._groups=_e(this,[]),this._currentGroupIdx=_e(this,0),this._currentElementIdx=_e(this,0),this.groups=this._groups,this.currentGroup=this._currentGroupIdx.map((r,a)=>this._groups.read(a)[r]),this.currentGroupIndex=this._currentGroupIdx,this.currentElement=this._currentElementIdx.map((r,a)=>this.currentGroup.read(a)?.lines[r]),this._register(Se(r=>{let a=this._diffs.read(r);if(!a){this._groups.set([],void 0);return}let l=bHe(a,this._models.getOriginalModel().getLineCount(),this._models.getModifiedModel().getLineCount());Yt(c=>{let d=this._models.getModifiedPosition();if(d){let h=l.findIndex(u=>d?.lineNumber{let a=this.currentElement.read(r);a?.type===hl.Deleted?this._accessibilitySignalService.playSignal(qs.diffLineDeleted,{source:"accessibleDiffViewer.currentElementChanged"}):a?.type===hl.Added&&this._accessibilitySignalService.playSignal(qs.diffLineInserted,{source:"accessibleDiffViewer.currentElementChanged"})})),this._register(Se(r=>{let a=this.currentElement.read(r);if(a&&a.type!==hl.Header){let l=a.modifiedLineNumber??a.diff.modified.startLineNumber;this._models.modifiedSetSelection(S.fromPositions(new M(l,1)))}}))}_goToGroupDelta(e,t){let i=this.groups.get();!i||i.length<=1||yu(t,n=>{this._currentGroupIdx.set(ke.ofLength(i.length).clipCyclic(this._currentGroupIdx.get()+e),n),this._currentElementIdx.set(0,n)})}nextGroup(e){this._goToGroupDelta(1,e)}previousGroup(e){this._goToGroupDelta(-1,e)}_goToLineDelta(e){let t=this.currentGroup.get();!t||t.lines.length<=1||Yt(i=>{this._currentElementIdx.set(ke.ofLength(t.lines.length).clip(this._currentElementIdx.get()+e),i)})}goToNextLine(){this._goToLineDelta(1)}goToPreviousLine(){this._goToLineDelta(-1)}goToLine(e){let t=this.currentGroup.get();if(!t)return;let i=t.lines.indexOf(e);i!==-1&&Yt(n=>{this._currentElementIdx.set(i,n)})}revealCurrentElementInEditor(){if(!this.canClose.get())return;this._setVisible(!1,void 0);let e=this.currentElement.get();e&&(e.type===hl.Deleted?this._models.originalReveal(S.fromPositions(new M(e.originalLineNumber,1))):this._models.modifiedReveal(e.type!==hl.Header?S.fromPositions(new M(e.modifiedLineNumber,1)):void 0))}close(){this.canClose.get()&&(this._setVisible(!1,void 0),this._models.modifiedFocus())}};Soe=Doe([Noe(4,ll)],Soe);PN=3;(function(o){o[o.Header=0]="Header",o[o.Unchanged=1]="Unchanged",o[o.Deleted=2]="Deleted",o[o.Added=3]="Added"})(hl||(hl={}));xoe=class{constructor(e,t){this.range=e,this.lines=t}},koe=class{constructor(){this.type=hl.Header}},Loe=class{constructor(e,t){this.diff=e,this.originalLineNumber=t,this.type=hl.Deleted,this.modifiedLineNumber=void 0}},Ioe=class{constructor(e,t){this.diff=e,this.modifiedLineNumber=t,this.type=hl.Added,this.originalLineNumber=void 0}},Eoe=class{constructor(e,t){this.originalLineNumber=e,this.modifiedLineNumber=t,this.type=hl.Unchanged}},Toe=class extends T{constructor(e,t,i,n,s,r){super(),this._element=e,this._model=t,this._width=i,this._height=n,this._models=s,this._languageService=r,this.domNode=this._element,this.domNode.className="monaco-component diff-review monaco-editor-background";let a=document.createElement("div");a.className="diff-review-actions",this._actionBar=this._register(new Vo(a)),this._register(Se(l=>{this._actionBar.clear(),this._model.canClose.read(l)&&this._actionBar.push(Nh({id:"diffreview.close",label:m(116,"Close"),class:"close-diff-review "+Ee.asClassName(_He),enabled:!0,run:async()=>t.close()}),{label:!1,icon:!0})})),this._content=document.createElement("div"),this._content.className="diff-review-content",this._content.setAttribute("role","code"),this._scrollbar=this._register(new Fh(this._content,{})),Wn(this.domNode,this._scrollbar.getDomNode(),a),this._register(Se(l=>{this._height.read(l),this._width.read(l),this._scrollbar.scanDomNode()})),this._register(ne(()=>{Wn(this.domNode)})),this._register(ch(this.domNode,{width:this._width,height:this._height})),this._register(ch(this._content,{width:this._width,height:this._height})),this._register(To((l,c)=>{this._model.currentGroup.read(l),this._render(c)})),this._register(_i(this.domNode,"keydown",l=>{(l.equals(18)||l.equals(2066)||l.equals(530))&&(l.preventDefault(),this._model.goToNextLine()),(l.equals(16)||l.equals(2064)||l.equals(528))&&(l.preventDefault(),this._model.goToPreviousLine()),(l.equals(9)||l.equals(2057)||l.equals(521)||l.equals(1033))&&(l.preventDefault(),this._model.close()),(l.equals(10)||l.equals(3))&&(l.preventDefault(),this._model.revealCurrentElementInEditor())}))}_render(e){let t=this._models.getOriginalOptions(),i=this._models.getModifiedOptions(),n=document.createElement("div");n.className="diff-review-table",n.setAttribute("role","list"),n.setAttribute("aria-label",m(117,"Accessible Diff Viewer. Use arrow up and down to navigate.")),wn(n,i.get(59)),Wn(this._content,n);let s=this._models.getOriginalModel(),r=this._models.getModifiedModel();if(!s||!r)return;let a=s.getOptions(),l=r.getOptions(),c=i.get(75),d=this._model.currentGroup.get();for(let h of d?.lines||[]){if(!d)break;let u;if(h.type===hl.Header){let g=document.createElement("div");g.className="diff-review-row",g.setAttribute("role","listitem");let p=d.range,_=this._model.currentGroupIndex.get(),b=this._model.groups.get().length,v=k=>k===0?m(118,"no lines changed"):k===1?m(119,"1 line changed"):m(120,"{0} lines changed",k),w=v(p.original.length),C=v(p.modified.length);g.setAttribute("aria-label",m(121,"Difference {0} of {1}: original line {2}, {3}, modified line {4}, {5}",_+1,b,p.original.startLineNumber,w,p.modified.startLineNumber,C));let y=document.createElement("div");y.className="diff-review-cell diff-review-summary",y.appendChild(document.createTextNode(`${_+1}/${b}: @@ -${p.original.startLineNumber},${p.original.length} +${p.modified.startLineNumber},${p.modified.length} @@`)),g.appendChild(y),u=g}else u=this._createRow(h,c,this._width.get(),t,s,a,i,r,l);n.appendChild(u);let f=V(g=>this._model.currentElement.read(g)===h);e.add(Se(g=>{let p=f.read(g);u.tabIndex=p?0:-1,p&&u.focus()})),e.add(B(u,"focus",()=>{this._model.goToLine(h)}))}this._scrollbar.scanDomNode()}_createRow(e,t,i,n,s,r,a,l,c){let d=n.get(165),h=d.glyphMarginWidth+d.lineNumbersWidth,u=a.get(165),f=10+u.glyphMarginWidth+u.lineNumbersWidth,g="diff-review-row",p="",_="diff-review-spacer",b=null;switch(e.type){case hl.Added:g="diff-review-row line-insert",p=" char-insert",b=mHe;break;case hl.Deleted:g="diff-review-row line-delete",p=" char-delete",b=pHe;break}let v=document.createElement("div");v.style.minWidth=i+"px",v.className=g,v.setAttribute("role","listitem"),v.ariaLevel="";let w=document.createElement("div");w.className="diff-review-cell",w.style.height=`${t}px`,v.appendChild(w);let C=document.createElement("span");C.style.width=h+"px",C.style.minWidth=h+"px",C.className="diff-review-line-number"+p,e.originalLineNumber!==void 0?C.appendChild(document.createTextNode(String(e.originalLineNumber))):C.innerText="\xA0",w.appendChild(C);let y=document.createElement("span");y.style.width=f+"px",y.style.minWidth=f+"px",y.style.paddingRight="10px",y.className="diff-review-line-number"+p,e.modifiedLineNumber!==void 0?y.appendChild(document.createTextNode(String(e.modifiedLineNumber))):y.innerText="\xA0",w.appendChild(y);let k=document.createElement("span");if(k.className=_,b){let D=document.createElement("span");D.className=Ee.asClassName(b),D.innerText="\xA0\xA0",k.appendChild(D)}else k.innerText="\xA0\xA0";w.appendChild(k);let I;if(e.modifiedLineNumber!==void 0){let D=this._getLineHtml(l,a,c.tabSize,e.modifiedLineNumber,this._languageService.languageIdCodec);wv._ttPolicy&&(D=wv._ttPolicy.createHTML(D)),w.insertAdjacentHTML("beforeend",D),I=l.getLineContent(e.modifiedLineNumber)}else{let D=this._getLineHtml(s,n,r.tabSize,e.originalLineNumber,this._languageService.languageIdCodec);wv._ttPolicy&&(D=wv._ttPolicy.createHTML(D)),w.insertAdjacentHTML("beforeend",D),I=s.getLineContent(e.originalLineNumber)}I.length===0&&(I=m(122,"blank"));let E="";switch(e.type){case hl.Unchanged:e.originalLineNumber===e.modifiedLineNumber?E=m(123,"{0} unchanged line {1}",I,e.originalLineNumber):E=m(124,"{0} original line {1} modified line {2}",I,e.originalLineNumber,e.modifiedLineNumber);break;case hl.Added:E=m(125,"+ {0} modified line {1}",I,e.modifiedLineNumber);break;case hl.Deleted:E=m(126,"- {0} original line {1}",I,e.originalLineNumber);break}return v.setAttribute("aria-label",E),v}_getLineHtml(e,t,i,n,s){let r=e.getLineContent(n),a=t.get(59),l=t.get(117).verticalScrollbarSize,c=Si.createEmpty(r,s),d=Ja.isBasicASCII(r,e.mightContainNonBasicASCII()),h=Ja.containsRTL(r,d,e.mightContainRTL());return Gx(new Fa(a.isMonospace&&!t.get(40),a.canUseHalfwidthRightwardsArrow,r,!1,d,h,0,c,[],i,0,a.spaceWidth,a.middotWidth,a.wsmiddotWidth,t.get(133),t.get(113),t.get(108),t.get(60)!==nc.OFF,null,null,l)).html}};Toe=Doe([Noe(5,ri)],Toe);fH=class{constructor(e){this.editors=e}getOriginalModel(){return this.editors.original.getModel()}getOriginalOptions(){return this.editors.original.getOptions()}originalReveal(e){this.editors.original.revealRange(e),this.editors.original.setSelection(e),this.editors.original.focus()}getModifiedModel(){return this.editors.modified.getModel()}getModifiedOptions(){return this.editors.modified.getOptions()}modifiedReveal(e){e&&(this.editors.modified.revealRange(e),this.editors.modified.setSelection(e)),this.editors.modified.focus()}modifiedSetSelection(e){this.editors.modified.setSelection(e)}modifiedFocus(){this.editors.modified.focus()}getModifiedPosition(){return this.editors.modified.getPosition()??void 0}}});var vHe,Roe,Aoe,Moe,Ooe,Poe,Foe,XIe,QIe,FN,JIe,eEe,BN=x(()=>{ti();Li();Kn();le();$t();bi();Zi();xi();qi();Mi();Xi();$i();Vi();Qi();Ji();Ec();A("diffEditor.move.border","#8b8b8b9c",m(153,"The border color for text that got moved in the diff editor."));A("diffEditor.moveActive.border","#FFA500",m(154,"The active border color for text that got moved in the diff editor."));A("diffEditor.unchangedRegionShadow",{dark:"#000000",light:"#737373BF",hcDark:"#000000",hcLight:"#737373BF"},m(155,"The color of the shadow around unchanged region widgets."));vHe=wi("diff-insert",$.add,m(156,"Line decoration for inserts in the diff editor.")),Roe=wi("diff-remove",$.remove,m(157,"Line decoration for removals in the diff editor.")),Aoe=Ve.register({className:"line-insert",description:"line-insert",isWholeLine:!0,linesDecorationsClassName:"insert-sign "+Ee.asClassName(vHe),marginClassName:"gutter-insert"}),Moe=Ve.register({className:"line-delete",description:"line-delete",isWholeLine:!0,linesDecorationsClassName:"delete-sign "+Ee.asClassName(Roe),marginClassName:"gutter-delete"}),Ooe=Ve.register({className:"line-insert",description:"line-insert",isWholeLine:!0,marginClassName:"gutter-insert"}),Poe=Ve.register({className:"line-delete",description:"line-delete",isWholeLine:!0,marginClassName:"gutter-delete"}),Foe=Ve.register({className:"char-insert",description:"char-insert",shouldFillLineOnLineBreak:!0}),XIe=Ve.register({className:"char-insert",description:"char-insert",isWholeLine:!0}),QIe=Ve.register({className:"char-insert diff-range-empty",description:"char-insert diff-range-empty"}),FN=Ve.register({className:"char-delete",description:"char-delete",shouldFillLineOnLineBreak:!0}),JIe=Ve.register({className:"char-delete",description:"char-delete",isWholeLine:!0}),eEe=Ve.register({className:"char-delete diff-range-empty",description:"char-delete diff-range-empty"})});var tEe,Boe,Zy,Voe,Woe,Hoe,iEe=x(()=>{Qo();Ie();ae();qa();Qn();$d();Ou();Dl();tEe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Boe=function(o,e){return function(t,i){e(t,i,o)}},Voe=Ne("diffProviderFactoryService"),Woe=class{constructor(e){this.instantiationService=e}createDiffProvider(e){return this.instantiationService.createInstance(Hoe,e)}};Woe=tEe([Boe(0,ie)],Woe);Je(Voe,Woe,1);Hoe=class{static{Zy=this}static{this.diffCache=new Map}constructor(e,t,i){this.editorWorkerService=t,this.telemetryService=i,this.onDidChangeEventEmitter=new N,this.onDidChange=this.onDidChangeEventEmitter.event,this.diffAlgorithm="advanced",this.diffAlgorithmOnDidChangeSubscription=void 0,this.setOptions(e)}dispose(){this.diffAlgorithmOnDidChangeSubscription?.dispose(),this.onDidChangeEventEmitter.dispose()}async computeDiff(e,t,i,n){if(typeof this.diffAlgorithm!="string")return this.diffAlgorithm.computeDiff(e,t,i,n);if(e.isDisposed()||t.isDisposed())return{changes:[],identical:!0,quitEarly:!1,moves:[]};if(e.getLineCount()===1&&e.getLineMaxColumn(1)===1)return t.getLineCount()===1&&t.getLineMaxColumn(1)===1?{changes:[],identical:!0,quitEarly:!1,moves:[]}:{changes:[new Pa(new Re(1,2),new Re(1,t.getLineCount()+1),[new ds(e.getFullModelRange(),t.getFullModelRange())])],identical:!1,quitEarly:!1,moves:[]};let s=JSON.stringify([e.uri.toString(),t.uri.toString()]),r=JSON.stringify([e.id,t.id,e.getAlternativeVersionId(),t.getAlternativeVersionId(),JSON.stringify(i)]),a=Zy.diffCache.get(s);if(a&&a.context===r)return a.result;let l=cn.create(),c=await this.editorWorkerService.computeDiff(e.uri,t.uri,i,this.diffAlgorithm),d=l.elapsed();if(this.telemetryService.publicLog2("diffEditor.computeDiff",{timeMs:d,timedOut:c?.quitEarly??!0,detectedMoves:i.computeMoves?c?.moves.length??0:-1}),n.isCancellationRequested)return{changes:[],identical:!1,quitEarly:!0,moves:[]};if(!c)throw new Error("no diff result available");return Zy.diffCache.size>10&&Zy.diffCache.delete(Zy.diffCache.keys().next().value),Zy.diffCache.set(s,{result:c,context:r}),c}setOptions(e){let t=!1;e.diffAlgorithm&&this.diffAlgorithm!==e.diffAlgorithm&&(this.diffAlgorithmOnDidChangeSubscription?.dispose(),this.diffAlgorithmOnDidChangeSubscription=void 0,this.diffAlgorithm=e.diffAlgorithm,typeof e.diffAlgorithm!="string"&&(this.diffAlgorithmOnDidChangeSubscription=e.diffAlgorithm.onDidChange(()=>this.onDidChangeEventEmitter.fire())),t=!0),t&&this.onDidChangeEventEmitter.fire()}};Hoe=Zy=tEe([Boe(1,Jo),Boe(2,$n)],Hoe)});function gH(o,e,t,i){return e||(e=n=>n!=null),new Promise((n,s)=>{let r=!0,a=!1,l=o.map(d=>({isFinished:e(d),error:t?t(d):!1,state:d})),c=Se(d=>{let{isFinished:h,error:u,state:f}=l.read(d);(h||u)&&(r?a=!0:c.dispose(),u?s(u===!0?f:u):n(f))});if(i){let d=i.onCancellationRequested(()=>{c.dispose(),d.dispose(),s(new Pr)});if(i.isCancellationRequested){c.dispose(),d.dispose(),s(new Pr);return}}r=!1,a&&c.dispose()})}var zoe=x(()=>{Ae();Vt();Jt()});function zo(o,e,t=Di.ofCaller()){return new Uoe(typeof o=="string"?o:new vo(o,void 0,void 0),e,t)}var Uoe,Up=x(()=>{vs();Ih();xf();aa();Uoe=class extends Fc{constructor(e,t,i){super(i),this.event=t,this.handleEvent=()=>{Yt(n=>{for(let s of this._observers)n.updateObserver(s,this),s.handleChange(this,void 0)},()=>this.debugName)},this.debugName=typeof e=="string"?e:e.getDebugName(this)??"Observable Signal From Event"}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0}get(){}}});function yHe(o,e,t){return{changes:o.changes.map(i=>new Pa(i.original,i.modified,i.innerChanges?i.innerChanges.map(n=>SHe(n,e,t)):void 0)),moves:o.moves,identical:o.identical,quitEarly:o.quitEarly}}function SHe(o,e,t){let i=o.originalRange,n=o.modifiedRange;return i.startColumn===1&&n.startColumn===1&&(i.endColumn!==1||n.endColumn!==1)&&i.endColumn===e.getLineMaxColumn(i.endLineNumber)&&n.endColumn===t.getLineMaxColumn(n.endLineNumber)&&i.endLineNumber{Ze();Vt();W();et();iEe();ud();Qn();qe();Fr();fc();ab();$d();nC();PE();ha();yo();WT();bQ();Rt();zoe();ei();Gt();vs();Up();Lf();Jt();wHe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},CHe=function(o,e){return function(t,i){e(t,i,o)}},Uk=class extends T{setActiveMovedText(e){this._activeMovedText.set(e,void 0)}constructor(e,t,i){super(),this.model=e,this._options=t,this._diffProviderFactoryService=i,this._isDiffUpToDate=_e(this,!1),this.isDiffUpToDate=this._isDiffUpToDate,this._diff=_e(this,void 0),this.diff=this._diff,this._unchangedRegions=_e(this,void 0),this.unchangedRegions=V(this,a=>this._options.hideUnchangedRegions.read(a)?this._unchangedRegions.read(a)?.regions??[]:(Yt(l=>{for(let c of this._unchangedRegions.read(void 0)?.regions||[])c.collapseAll(l)}),[])),this.movedTextToCompare=_e(this,void 0),this._activeMovedText=_e(this,void 0),this._hoveredMovedText=_e(this,void 0),this.activeMovedText=V(this,a=>this.movedTextToCompare.read(a)??this._hoveredMovedText.read(a)??this._activeMovedText.read(a)),this._cancellationTokenSource=new Lt,this._diffProvider=V(this,a=>{let l=this._diffProviderFactoryService.createDiffProvider({diffAlgorithm:this._options.diffAlgorithm.read(a)}),c=zo("onDidChange",l.onDidChange);return{diffProvider:l,onChangeSignal:c}}),this._register(ne(()=>this._cancellationTokenSource.cancel()));let n=As("contentChangedSignal"),s=this._register(new at(()=>n.trigger(void 0),200));this._register(Se(a=>{let l=this._unchangedRegions.read(a);if(!l||l.regions.some(g=>g.isDragged.read(a)))return;let c=l.originalDecorationIds.map(g=>e.original.getDecorationRange(g)).map(g=>g?Re.fromRangeInclusive(g):void 0),d=l.modifiedDecorationIds.map(g=>e.modified.getDecorationRange(g)).map(g=>g?Re.fromRangeInclusive(g):void 0),h=l.regions.map((g,p)=>!c[p]||!d[p]?void 0:new zk(c[p].startLineNumber,d[p].startLineNumber,c[p].length,g.visibleLineCountTop.read(a),g.visibleLineCountBottom.read(a))).filter(oo),u=[],f=!1;for(let g of QS(h,(p,_)=>p.getHiddenModifiedRange(a).endLineNumberExclusive===_.getHiddenModifiedRange(a).startLineNumber))if(g.length>1){f=!0;let p=g.reduce((b,v)=>b+v.lineCount,0),_=new zk(g[0].originalLineNumber,g[0].modifiedLineNumber,p,g[0].visibleLineCountTop.read(void 0),g[g.length-1].visibleLineCountBottom.read(void 0));u.push(_)}else u.push(g[0]);if(f){let g=e.original.deltaDecorations(l.originalDecorationIds,u.map(_=>({range:_.originalUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}}))),p=e.modified.deltaDecorations(l.modifiedDecorationIds,u.map(_=>({range:_.modifiedUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}})));Yt(_=>{this._unchangedRegions.set({regions:u,originalDecorationIds:g,modifiedDecorationIds:p},_)})}}));let r=(a,l,c)=>{let d=zk.fromDiffs(a.changes,e.original.getLineCount(),e.modified.getLineCount(),this._options.hideUnchangedRegionsMinimumLineCount.read(c),this._options.hideUnchangedRegionsContextLineCount.read(c)),h,u=this._unchangedRegions.get();if(u){let _=u.originalDecorationIds.map(C=>e.original.getDecorationRange(C)).map(C=>C?Re.fromRangeInclusive(C):void 0),b=u.modifiedDecorationIds.map(C=>e.modified.getDecorationRange(C)).map(C=>C?Re.fromRangeInclusive(C):void 0),w=GIe(u.regions.map((C,y)=>{if(!_[y]||!b[y])return;let k=_[y].length;return new zk(_[y].startLineNumber,b[y].startLineNumber,k,Math.min(C.visibleLineCountTop.get(),k),Math.min(C.visibleLineCountBottom.get(),k-C.visibleLineCountTop.get()))}).filter(oo),(C,y)=>!y||C.modifiedLineNumber>=y.modifiedLineNumber+y.lineCount&&C.originalLineNumber>=y.originalLineNumber+y.lineCount).map(C=>new ir(C.getHiddenOriginalRange(c),C.getHiddenModifiedRange(c)));w=ir.clip(w,Re.ofLength(1,e.original.getLineCount()),Re.ofLength(1,e.modified.getLineCount())),h=ir.inverse(w,e.original.getLineCount(),e.modified.getLineCount())}let f=[];if(h)for(let _ of d){let b=h.filter(v=>v.original.intersectsStrict(_.originalUnchangedRange)&&v.modified.intersectsStrict(_.modifiedUnchangedRange));f.push(..._.setVisibleRanges(b,l))}else f.push(...d);let g=e.original.deltaDecorations(u?.originalDecorationIds||[],f.map(_=>({range:_.originalUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}}))),p=e.modified.deltaDecorations(u?.modifiedDecorationIds||[],f.map(_=>({range:_.modifiedUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}})));this._unchangedRegions.set({regions:f,originalDecorationIds:g,modifiedDecorationIds:p},l)};this._register(e.modified.onDidChangeContent(a=>{if(this._diff.get()){let c=Uh.fromModelContentChanges(a.changes);this._lastDiff,e.original,e.modified}this._isDiffUpToDate.set(!1,void 0),s.schedule()})),this._register(e.original.onDidChangeContent(a=>{if(this._diff.get()){let c=Uh.fromModelContentChanges(a.changes);this._lastDiff,e.original,e.modified}this._isDiffUpToDate.set(!1,void 0),s.schedule()})),this._register(Se(async a=>{let l=a.store;this._options.hideUnchangedRegionsMinimumLineCount.read(a),this._options.hideUnchangedRegionsContextLineCount.read(a),s.cancel(),n.read(a);let c=this._diffProvider.read(a);c.onChangeSignal.read(a),this._isDiffUpToDate.set(!1,void 0);let d=[];l.add(e.original.onDidChangeContent(f=>{let g=Uh.fromModelContentChanges(f.changes);d=h0(d,g)}));let h=[];l.add(e.modified.onDidChangeContent(f=>{let g=Uh.fromModelContentChanges(f.changes);h=h0(h,g)}));let u=await c.diffProvider.computeDiff(e.original,e.modified,{ignoreTrimWhitespace:this._options.ignoreTrimWhitespace.read(a),maxComputationTimeMs:this._options.maxComputationTimeMs.read(a),computeMoves:this._options.showMoves.read(a)},this._cancellationTokenSource.token).catch(gK);!u||this._cancellationTokenSource.token.isCancellationRequested||e.original.isDisposed()||e.modified.isDisposed()||(u=yHe(u,e.original,e.modified),u=(e.original,e.modified,void 0)??u,u=(e.original,e.modified,void 0)??u,Yt(f=>{r(u,f),this._lastDiff=u;let g=$oe.fromDiffResult(u);this._diff.set(g,f),this._isDiffUpToDate.set(!0,f);let p=this.movedTextToCompare.read(void 0);this.movedTextToCompare.set(p?this._lastDiff.moves.find(_=>_.lineRangeMapping.modified.intersect(p.lineRangeMapping.modified)):void 0,f)}))}))}ensureModifiedLineIsVisible(e,t,i){if(this.diff.get()?.mappings.length===0)return;let n=this._unchangedRegions.get()?.regions||[];for(let s of n)if(s.getHiddenModifiedRange(void 0).contains(e)){s.showModifiedLine(e,t,i);return}}ensureOriginalLineIsVisible(e,t,i){if(this.diff.get()?.mappings.length===0)return;let n=this._unchangedRegions.get()?.regions||[];for(let s of n)if(s.getHiddenOriginalRange(void 0).contains(e)){s.showOriginalLine(e,t,i);return}}async waitForDiff(){await gH(this.isDiffUpToDate,e=>e,void 0,this._cancellationTokenSource.token).catch(gK)}serializeState(){return{collapsedRegions:this._unchangedRegions.get()?.regions.map(t=>({range:t.getHiddenModifiedRange(void 0).serialize()}))}}restoreSerializedState(e){let t=e.collapsedRegions?.map(n=>Re.deserialize(n.range)),i=this._unchangedRegions.get();!i||!t||Yt(n=>{for(let s of i.regions)for(let r of t)if(s.modifiedUnchangedRange.intersect(r)){s.setHiddenModifiedRange(r,n);break}})}};Uk=wHe([CHe(2,Voe)],Uk);$oe=class o{static fromDiffResult(e){return new o(e.changes.map(t=>new WN(t)),e.moves||[],e.identical,e.quitEarly)}constructor(e,t,i,n){this.mappings=e,this.movedTexts=t,this.identical=i,this.quitEarly=n}},WN=class{constructor(e){this.lineRangeMapping=e}},zk=class o{static fromDiffs(e,t,i,n,s){let r=Pa.inverse(e,t,i),a=[];for(let l of r){let c=l.original.startLineNumber,d=l.modified.startLineNumber,h=l.original.length,u=c===1&&d===1,f=c+h===t+1&&d+h===i+1;(u||f)&&h>=s+n?(u&&!f&&(h-=s),f&&!u&&(c+=s,d+=s,h-=s),a.push(new o(c,d,h,0,0))):h>=s*2+n&&(c+=s,d+=s,h-=s*2,a.push(new o(c,d,h,0,0)))}return a}get originalUnchangedRange(){return Re.ofLength(this.originalLineNumber,this.lineCount)}get modifiedUnchangedRange(){return Re.ofLength(this.modifiedLineNumber,this.lineCount)}constructor(e,t,i,n,s){this.originalLineNumber=e,this.modifiedLineNumber=t,this.lineCount=i,this._visibleLineCountTop=_e(this,0),this.visibleLineCountTop=this._visibleLineCountTop,this._visibleLineCountBottom=_e(this,0),this.visibleLineCountBottom=this._visibleLineCountBottom,this._shouldHideControls=V(this,l=>this.visibleLineCountTop.read(l)+this.visibleLineCountBottom.read(l)===this.lineCount&&!this.isDragged.read(l)),this.isDragged=_e(this,void 0);let r=Math.max(Math.min(n,this.lineCount),0),a=Math.max(Math.min(s,this.lineCount-n),0);jq(n===r),jq(s===a),this._visibleLineCountTop.set(r,void 0),this._visibleLineCountBottom.set(a,void 0)}setVisibleRanges(e,t){let i=[],n=new Ud(e.map(l=>l.modified)).subtractFrom(this.modifiedUnchangedRange),s=this.originalLineNumber,r=this.modifiedLineNumber,a=this.modifiedLineNumber+this.lineCount;if(n.ranges.length===0)this.showAll(t),i.push(this);else{let l=0;for(let c of n.ranges){let d=l===n.ranges.length-1;l++;let h=(d?a:c.endLineNumberExclusive)-r,u=new o(s,r,h,0,0);u.setHiddenModifiedRange(c,t),i.push(u),s=u.originalUnchangedRange.endLineNumberExclusive,r=u.modifiedUnchangedRange.endLineNumberExclusive}}return i}shouldHideControls(e){return this._shouldHideControls.read(e)}getHiddenOriginalRange(e){return Re.ofLength(this.originalLineNumber+this._visibleLineCountTop.read(e),this.lineCount-this._visibleLineCountTop.read(e)-this._visibleLineCountBottom.read(e))}getHiddenModifiedRange(e){return Re.ofLength(this.modifiedLineNumber+this._visibleLineCountTop.read(e),this.lineCount-this._visibleLineCountTop.read(e)-this._visibleLineCountBottom.read(e))}setHiddenModifiedRange(e,t){let i=e.startLineNumber-this.modifiedLineNumber,n=this.modifiedLineNumber+this.lineCount-e.endLineNumberExclusive;this.setState(i,n,t)}getMaxVisibleLineCountTop(){return this.lineCount-this._visibleLineCountBottom.get()}getMaxVisibleLineCountBottom(){return this.lineCount-this._visibleLineCountTop.get()}showMoreAbove(e=10,t){let i=this.getMaxVisibleLineCountTop();this._visibleLineCountTop.set(Math.min(this._visibleLineCountTop.get()+e,i),t)}showMoreBelow(e=10,t){let i=this.lineCount-this._visibleLineCountTop.get();this._visibleLineCountBottom.set(Math.min(this._visibleLineCountBottom.get()+e,i),t)}showAll(e){this._visibleLineCountBottom.set(this.lineCount-this._visibleLineCountTop.get(),e)}showModifiedLine(e,t,i){let n=e+1-(this.modifiedLineNumber+this._visibleLineCountTop.get()),s=this.modifiedLineNumber-this._visibleLineCountBottom.get()+this.lineCount-e;t===0&&n{a.preventDefault();let l=e.ownerDocument.getSelection();if(!l||l.rangeCount===0)return;let c=l.getRangeAt(0);if(!c||c.collapsed)return;let d=c.startContainer.nodeType===Node.TEXT_NODE?c.startContainer.parentElement:c.startContainer,h=c.endContainer.nodeType===Node.TEXT_NODE?c.endContainer.parentElement:c.endContainer;if(!d||!h)return;let u=t.getModelPositionAt(d,c.startOffset),f=t.getModelPositionAt(h,c.endOffset);if(!u||!f)return;let g=u.delta(i.original.startLineNumber-1),p=f.delta(i.original.startLineNumber-1),_=p.isBefore(g)?S.fromPositions(p,g):S.fromPositions(g,p),b=n.getValueInRange(_);s.writeText(b)})),r}var oEe=x(()=>{re();W();ue()});var pH,sEe=x(()=>{re();ys();ti();W();rt();Li();le();oEe();pH=class extends T{get visibility(){return this._visibility}set visibility(e){this._visibility!==e&&(this._visibility=e,this._diffActions.style.visibility=e?"visible":"hidden")}constructor(e,t,i,n,s,r,a,l,c,d){super(),this._getViewZoneId=e,this._marginDomNode=t,this._deletedCodeDomNode=i,this._modifiedEditor=n,this._diff=s,this._editor=r,this._renderLinesResult=a,this._originalTextModel=l,this._contextMenuService=c,this._clipboardService=d,this._visibility=!1,this._marginDomNode.style.zIndex="10",this._diffActions=document.createElement("div"),this._diffActions.className=Ee.asClassName($.lightBulb)+" lightbulb-glyph",this._diffActions.style.position="absolute";let h=this._modifiedEditor.getOption(75);this._diffActions.style.right="0px",this._diffActions.style.visibility="hidden",this._diffActions.style.height=`${h}px`,this._diffActions.style.lineHeight=`${h}px`,this._marginDomNode.appendChild(this._diffActions);let u=0,f=n.getOption(144)&&!pr,g=(p,_,b)=>{this._contextMenuService.showContextMenu({domForShadowRoot:f?n.getDomNode()??void 0:void 0,getAnchor:()=>p,onHide:b,getActions:()=>{let v=[],w=s.modified.isEmpty;return v.push(new Cs("diff.clipboard.copyDeletedContent",w?s.original.length>1?m(128,"Copy deleted lines"):m(129,"Copy deleted line"):s.original.length>1?m(130,"Copy changed lines"):m(131,"Copy changed line"),void 0,!0,async()=>{let y=this._originalTextModel.getValueInRange(s.original.toExclusiveRange());await this._clipboardService.writeText(y)})),s.original.length>1&&v.push(new Cs("diff.clipboard.copyDeletedLineContent",w?m(132,"Copy deleted line ({0})",s.original.startLineNumber+u):m(133,"Copy changed line ({0})",s.original.startLineNumber+u),void 0,!0,async()=>{let y=this._originalTextModel.getLineContent(s.original.startLineNumber+u);y===""&&(y=this._originalTextModel.getEndOfLineSequence()===0?` +`:`\r +`),await this._clipboardService.writeText(y)})),n.getOption(104)||v.push(new Cs("diff.inline.revertChange",m(134,"Revert this change"),void 0,!0,async()=>{this._editor.revert(this._diff)})),v},autoSelectFirstItem:!0})};this._register(_i(this._diffActions,"mousedown",p=>{if(!p.leftButton)return;let{top:_,height:b}=ii(this._diffActions),v=Math.floor(h/3);p.preventDefault(),g({x:p.posx,y:_+b+v})})),this._register(n.onMouseMove(p=>{(p.target.type===8||p.target.type===5)&&p.target.detail.viewZoneId===this._getViewZoneId()?(u=this._updateLightBulbPosition(this._marginDomNode,p.event.browserEvent.y,h),this.visibility=!0):this.visibility=!1})),this._register(nEe({domNode:this._deletedCodeDomNode,diffEntry:s,originalModel:this._originalTextModel,renderLinesResult:this._renderLinesResult,clipboardService:d}))}_updateLightBulbPosition(e,t,i){let{top:n}=ii(e),s=t-n,r=Math.floor(s/i),a=r*i;if(this._diffActions.style.top=`${a}px`,this._renderLinesResult.viewLineCounts){let l=0;for(let c=0;c0,r=new Aa(1e4),a=0,l=0,c=[],d=[];for(let g=0;g'):a.appendString('px;">');let c=e.getLineContent(),d=Ja.isBasicASCII(c,n),h=Ja.containsRTL(c,d,s),u=Au(new Fa(r.fontInfo.isMonospace&&!r.disableMonospaceOptimizations,r.fontInfo.canUseHalfwidthRightwardsArrow,c,!1,d,h,0,e,t,r.tabSize,0,r.fontInfo.spaceWidth,r.fontInfo.middotWidth,r.fontInfo.wsmiddotWidth,r.stopRenderingLineAfter,r.renderWhitespace,r.renderControlCharacters,r.fontLigatures!==nc.OFF,null,null,r.verticalScrollbarSize),a);a.appendString("");let f=u.characterMapping.getHorizontalOffset(u.characterMapping.length);return{output:u,maxCharWidth:f}}var rEe,nu,ou,qoe,_H,$k=x(()=>{Nu();dc();Uo();Pe();Iu();mb();pb();Km();_1();rEe=Ur("diffEditorWidget",{createHTML:o=>o});nu=class{constructor(e,t=e.map(s=>null),i=!0,n=!0){this.lineTokens=e,this.lineBreakData=t,this.mightContainNonBasicASCII=i,this.mightContainRTL=n}},ou=class o{static fromEditor(e){let t=e.getOptions(),i=t.get(59),n=t.get(165);return new o(e.getModel()?.getOptions().tabSize||0,i,t.get(40),i.typicalHalfwidthCharacterWidth,t.get(118),t.get(75),n.decorationsWidth,t.get(133),t.get(113),t.get(108),t.get(60),t.get(117).verticalScrollbarSize)}constructor(e,t,i,n,s,r,a,l,c,d,h,u,f=!0){this.tabSize=e,this.fontInfo=t,this.disableMonospaceOptimizations=i,this.typicalHalfwidthCharacterWidth=n,this.scrollBeyondLastColumn=s,this.lineHeight=r,this.lineDecorationsWidth=a,this.stopRenderingLineAfter=l,this.renderWhitespace=c,this.renderControlCharacters=d,this.fontLigatures=h,this.verticalScrollbarSize=u,this.setWidth=f}withSetWidth(e){return new o(this.tabSize,this.fontInfo,this.disableMonospaceOptimizations,this.typicalHalfwidthCharacterWidth,this.scrollBeyondLastColumn,this.lineHeight,this.lineDecorationsWidth,this.stopRenderingLineAfter,this.renderWhitespace,this.renderControlCharacters,this.fontLigatures,this.verticalScrollbarSize,e)}withScrollBeyondLastColumn(e){return new o(this.tabSize,this.fontInfo,this.disableMonospaceOptimizations,this.typicalHalfwidthCharacterWidth,e,this.lineHeight,this.lineDecorationsWidth,this.stopRenderingLineAfter,this.renderWhitespace,this.renderControlCharacters,this.fontLigatures,this.verticalScrollbarSize,this.setWidth)}},qoe=class{constructor(e,t,i,n,s){this.heightInLines=e,this.minWidthInPx=t,this.viewLineCounts=i,this._renderOutputs=n,this._source=s}getModelPositionAt(e,t){let i=e;for(;i&&!i.classList.contains("view-line");)i=i.parentElement;if(!i)return;let n=i.parentElement;if(!n)return;let s=n.querySelectorAll(".view-line"),r=-1;for(let h=0;h=this._renderOutputs.length)return;let a=1,l=r;for(let h=0;hthis._source.lineTokens.length)return;let c=this._renderOutputs[r];if(!c)return;let d=ip(c.characterMapping,e,t)+c.offset;return new M(a,d)}},_H=class extends aC{constructor(e,t,i){super(e,t),this.offset=i}}});function cEe(o,e,t,i,n,s){let r=new Ld(dEe(o,i)),a=new Ld(dEe(e,n)),l=o.getOption(75),c=e.getOption(75),d=[],h=0,u=0;function f(g,p){for(;;){let _=r.peek(),b=a.peek();if(_&&_.lineNumber>=g&&(_=void 0),b&&b.lineNumber>=p&&(b=void 0),!_&&!b)break;let v=_?_.lineNumber-h:Number.MAX_VALUE,w=b?b.lineNumber-u:Number.MAX_VALUE;vw?(a.dequeue(),_={lineNumber:b.lineNumber-u+h,heightInPx:0}):(r.dequeue(),a.dequeue()),d.push({originalRange:Re.ofLength(_.lineNumber,1),modifiedRange:Re.ofLength(b.lineNumber,1),originalHeightInPx:l+_.heightInPx,modifiedHeightInPx:c+b.heightInPx,diff:void 0})}}for(let g of t){let w=function(C,y,k=!1){if(CP.lineNumberP+H.heightInPx,0)??0,O=a.takeWhile(P=>P.lineNumberP+H.heightInPx,0)??0;d.push({originalRange:I,modifiedRange:E,originalHeightInPx:I.length*l+D,modifiedHeightInPx:E.length*c+O,diff:g.lineRangeMapping}),v=C,b=y},p=g.lineRangeMapping;f(p.original.startLineNumber,p.modified.startLineNumber);let _=!0,b=p.modified.startLineNumber,v=p.original.startLineNumber;if(s)for(let C of p.innerChanges||[]){C.originalRange.startColumn>1&&C.modifiedRange.startColumn>1&&w(C.originalRange.startLineNumber,C.modifiedRange.startLineNumber);let y=o.getModel(),k=C.originalRange.endLineNumber<=y.getLineCount()?y.getLineMaxColumn(C.originalRange.endLineNumber):Number.MAX_SAFE_INTEGER;C.originalRange.endColumn1&&i.push({lineNumber:l,heightInPx:r*(c-1)})}for(let l of o.getWhitespaces()){if(e.has(l.id))continue;let c=l.afterLineNumber===0?0:s.convertViewPositionToModelPosition(new M(l.afterLineNumber,1)).lineNumber;t.push({lineNumber:c,heightInPx:l.height})}return jIe(t,i,l=>l.lineNumber,(l,c)=>({lineNumber:l.lineNumber,heightInPx:l.heightInPx+c.heightInPx}))}function VN(o){return o.innerChanges?o.innerChanges.every(e=>HN(e.modifiedRange)&&HN(e.originalRange)||e.originalRange.equalsRange(new S(1,1,1,1))):!1}function HN(o){return o.startLineNumber===o.endLineNumber}var xHe,lEe,bH,zN=x(()=>{re();qe();Ze();ti();W();et();Li();Rt();dc();BN();mH();sEe();$k();ud();Qn();Pe();ih();Kr();ue();S0();ei();Xn();Gt();Jt();xHe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},lEe=function(o,e){return function(t,i){e(t,i,o)}},bH=class extends T{constructor(e,t,i,n,s,r,a,l,c,d){super(),this._targetWindow=e,this._editors=t,this._diffModel=i,this._options=n,this._diffEditorWidget=s,this._canIgnoreViewZoneUpdateEvent=r,this._origViewZonesToIgnore=a,this._modViewZonesToIgnore=l,this._clipboardService=c,this._contextMenuService=d,this._originalTopPadding=_e(this,0),this._originalScrollOffset=_e(this,0),this._originalScrollOffsetAnimated=Coe(this._targetWindow,this._originalScrollOffset,this._store),this._modifiedTopPadding=_e(this,0),this._modifiedScrollOffset=_e(this,0),this._modifiedScrollOffsetAnimated=Coe(this._targetWindow,this._modifiedScrollOffset,this._store);let h=_e("invalidateAlignmentsState",0),u=this._register(new at(()=>{h.set(h.get()+1,void 0)},0));this._register(this._editors.original.onDidChangeViewZones(w=>{this._canIgnoreViewZoneUpdateEvent()||u.schedule()})),this._register(this._editors.modified.onDidChangeViewZones(w=>{this._canIgnoreViewZoneUpdateEvent()||u.schedule()})),this._register(this._editors.original.onDidChangeConfiguration(w=>{(w.hasChanged(166)||w.hasChanged(75))&&u.schedule()})),this._register(this._editors.modified.onDidChangeConfiguration(w=>{(w.hasChanged(166)||w.hasChanged(75))&&u.schedule()}));let f=this._diffModel.map(w=>w?pt(this,w.model.original.onDidChangeTokens,()=>w.model.original.tokenization.backgroundTokenizationState===2):void 0).map((w,C)=>w?.read(C)),g=V(w=>{let C=this._diffModel.read(w),y=C?.diff.read(w);if(!C||!y)return null;h.read(w);let I=this._options.renderSideBySide.read(w);return cEe(this._editors.original,this._editors.modified,y.mappings,this._origViewZonesToIgnore,this._modViewZonesToIgnore,I)}),p=V(w=>{let C=this._diffModel.read(w)?.movedTextToCompare.read(w);if(!C)return null;h.read(w);let y=C.changes.map(k=>new WN(k));return cEe(this._editors.original,this._editors.modified,y,this._origViewZonesToIgnore,this._modViewZonesToIgnore,!0)});function _(){let w=document.createElement("div");return w.className="diagonal-fill",w}let b=this._register(new F);this.viewZones=V(this,w=>{b.clear();let C=g.read(w)||[],y=[],k=[],I=this._modifiedTopPadding.read(w);I>0&&k.push({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:I,showInHiddenAreas:!0,suppressMouseDown:!0});let E=this._originalTopPadding.read(w);E>0&&y.push({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:E,showInHiddenAreas:!0,suppressMouseDown:!0});let D=this._options.renderSideBySide.read(w),O={getLineContent:ce=>this._editors.original.getModel().getLineContent(ce),getLineInjectedText:ce=>null},P=D?void 0:this._editors.modified._getViewModel()?.createLineBreaksComputer(O);if(P){let ce=this._editors.original.getModel();for(let Be of C)if(Be.diff)for(let Ge=Be.originalRange.startLineNumber;Gece.getLineCount())return{orig:y,mod:k};P?.addRequest(Ge,null)}}let H=P?.finalize()??[],z=0,Y=this._editors.modified.getOption(75),Z=this._diffModel.read(w)?.movedTextToCompare.read(w),te=this._editors.original.getModel()?.mightContainNonBasicASCII()??!1,se=this._editors.original.getModel()?.mightContainRTL()??!1,he=ou.fromEditor(this._editors.modified);for(let ce of C)if(ce.diff&&!D&&(!this._options.useTrueInlineDiffRendering.read(w)||!VN(ce.diff))){if(!ce.originalRange.isEmpty){f.read(w);let Ge=document.createElement("div");Ge.classList.add("view-lines","line-delete","line-delete-selectable","monaco-mouse-cursor-text");let tt=this._editors.original.getModel();if(ce.originalRange.endLineNumberExclusive-1>tt.getLineCount())return{orig:y,mod:k};let Nt=new nu(ce.originalRange.mapToLineArray(di=>tt.tokenization.getLineTokens(di)),ce.originalRange.mapToLineArray(di=>H[z++]),te,se),mt=[];for(let di of ce.diff.innerChanges||[])mt.push(new $h(di.originalRange.delta(-(ce.diff.original.startLineNumber-1)),FN.className,0));let Pt=Hg(Nt,he,mt,Ge),ct=document.createElement("div");if(ct.className="inline-deleted-margin-view-zone",wn(ct,he.fontInfo),this._options.renderIndicators.read(w))for(let di=0;di_h(Fn),ct,Ge,this._editors.modified,ce.diff,this._diffEditorWidget,Pt,this._editors.original.getModel(),this._contextMenuService,this._clipboardService));for(let di=0;di1&&y.push({afterLineNumber:ce.originalRange.startLineNumber+di,domNode:_(),heightInPx:(ia-1)*Y,showInHiddenAreas:!0,suppressMouseDown:!0})}k.push({afterLineNumber:ce.modifiedRange.startLineNumber-1,domNode:Ge,heightInPx:Pt.heightInLines*Y,minWidthInPx:Pt.minWidthInPx,marginDomNode:ct,setZoneId(di){Fn=di},showInHiddenAreas:!0,suppressMouseDown:!1})}let Be=document.createElement("div");Be.className="gutter-delete",y.push({afterLineNumber:ce.originalRange.endLineNumberExclusive-1,domNode:_(),heightInPx:ce.modifiedHeightInPx,marginDomNode:Be,showInHiddenAreas:!0,suppressMouseDown:!0})}else{let Be=ce.modifiedHeightInPx-ce.originalHeightInPx;if(Be>0){if(Z?.lineRangeMapping.original.delta(-1).deltaLength(2).contains(ce.originalRange.endLineNumberExclusive-1))continue;y.push({afterLineNumber:ce.originalRange.endLineNumberExclusive-1,domNode:_(),heightInPx:Be,showInHiddenAreas:!0,suppressMouseDown:!0})}else{let Ge=function(){let Nt=document.createElement("div");return Nt.className="arrow-revert-change "+Ee.asClassName($.arrowRight),w.store.add(B(Nt,"mousedown",mt=>mt.stopPropagation())),w.store.add(B(Nt,"click",mt=>{mt.stopPropagation(),s.revert(ce.diff)})),j("div",{},Nt)};if(Z?.lineRangeMapping.modified.delta(-1).deltaLength(2).contains(ce.modifiedRange.endLineNumberExclusive-1))continue;let tt;ce.diff&&ce.diff.modified.isEmpty&&this._options.shouldRenderOldRevertArrows.read(w)&&(tt=Ge()),k.push({afterLineNumber:ce.modifiedRange.endLineNumberExclusive-1,domNode:_(),heightInPx:-Be,marginDomNode:tt,showInHiddenAreas:!0,suppressMouseDown:!0})}}for(let ce of p.read(w)??[]){if(!Z?.lineRangeMapping.original.intersect(ce.originalRange)||!Z?.lineRangeMapping.modified.intersect(ce.modifiedRange))continue;let Be=ce.modifiedHeightInPx-ce.originalHeightInPx;Be>0?y.push({afterLineNumber:ce.originalRange.endLineNumberExclusive-1,domNode:_(),heightInPx:Be,showInHiddenAreas:!0,suppressMouseDown:!0}):k.push({afterLineNumber:ce.modifiedRange.endLineNumberExclusive-1,domNode:_(),heightInPx:-Be,showInHiddenAreas:!0,suppressMouseDown:!0})}return{orig:y,mod:k}});let v=!1;this._register(this._editors.original.onDidScrollChange(w=>{w.scrollLeftChanged&&!v&&(v=!0,this._editors.modified.setScrollLeft(w.scrollLeft),v=!1)})),this._register(this._editors.modified.onDidScrollChange(w=>{w.scrollLeftChanged&&!v&&(v=!0,this._editors.original.setScrollLeft(w.scrollLeft),v=!1)})),this._originalScrollTop=pt(this._editors.original.onDidScrollChange,()=>this._editors.original.getScrollTop()),this._modifiedScrollTop=pt(this._editors.modified.onDidScrollChange,()=>this._editors.modified.getScrollTop()),this._register(Se(w=>{let C=this._originalScrollTop.read(w)-(this._originalScrollOffsetAnimated.read(void 0)-this._modifiedScrollOffsetAnimated.read(w))-(this._originalTopPadding.read(void 0)-this._modifiedTopPadding.read(w));C!==this._editors.modified.getScrollTop()&&this._editors.modified.setScrollTop(C,1)})),this._register(Se(w=>{let C=this._modifiedScrollTop.read(w)-(this._modifiedScrollOffsetAnimated.read(void 0)-this._originalScrollOffsetAnimated.read(w))-(this._modifiedTopPadding.read(void 0)-this._originalTopPadding.read(w));C!==this._editors.original.getScrollTop()&&this._editors.original.setScrollTop(C,1)})),this._register(Se(w=>{let C=this._diffModel.read(w)?.movedTextToCompare.read(w),y=0;if(C){let k=this._editors.original.getTopForLineNumber(C.lineRangeMapping.original.startLineNumber,!0)-this._originalTopPadding.read(void 0);y=this._editors.modified.getTopForLineNumber(C.lineRangeMapping.modified.startLineNumber,!0)-this._modifiedTopPadding.read(void 0)-k}y>0?(this._modifiedTopPadding.set(0,void 0),this._originalTopPadding.set(y,void 0)):y<0?(this._modifiedTopPadding.set(-y,void 0),this._originalTopPadding.set(0,void 0)):setTimeout(()=>{this._modifiedTopPadding.set(0,void 0),this._originalTopPadding.set(0,void 0)},400),this._editors.modified.hasTextFocus()?this._originalScrollOffset.set(this._modifiedScrollOffset.read(void 0)-y,void 0,!0):this._modifiedScrollOffset.set(this._originalScrollOffset.read(void 0)+y,void 0,!0)}))}};bH=xHe([lEe(8,Lo),lEe(9,eo)],bH)});var Cv,joe,vH,Koe=x(()=>{re();Yh();ys();qe();ha();ti();W();et();Li();ud();Hi();le();Hr();Xn();Up();ei();Gt();Jt();Es();Cv=class o extends T{static{this.movedCodeBlockPadding=4}constructor(e,t,i,n,s){super(),this._rootElement=e,this._diffModel=t,this._originalEditorLayoutInfo=i,this._modifiedEditorLayoutInfo=n,this._editors=s,this._originalScrollTop=pt(this,this._editors.original.onDidScrollChange,()=>this._editors.original.getScrollTop()),this._modifiedScrollTop=pt(this,this._editors.modified.onDidScrollChange,()=>this._editors.modified.getScrollTop()),this._viewZonesChanged=zo("onDidChangeViewZones",this._editors.modified.onDidChangeViewZones),this.width=_e(this,0),this._modifiedViewZonesChangedSignal=zo("modified.onDidChangeViewZones",this._editors.modified.onDidChangeViewZones),this._originalViewZonesChangedSignal=zo("original.onDidChangeViewZones",this._editors.original.onDidChangeViewZones),this._state=V(this,d=>{this._element.replaceChildren();let h=this._diffModel.read(d),u=h?.diff.read(d)?.movedTexts;if(!u||u.length===0){this.width.set(0,void 0);return}this._viewZonesChanged.read(d);let f=this._originalEditorLayoutInfo.read(d),g=this._modifiedEditorLayoutInfo.read(d);if(!f||!g){this.width.set(0,void 0);return}this._modifiedViewZonesChangedSignal.read(d),this._originalViewZonesChangedSignal.read(d);let p=u.map(k=>{function I(te,se){let he=se.getTopForLineNumber(te.startLineNumber,!0),ce=se.getTopForLineNumber(te.endLineNumberExclusive,!0);return(he+ce)/2}let E=I(k.lineRangeMapping.original,this._editors.original),D=this._originalScrollTop.read(d),O=I(k.lineRangeMapping.modified,this._editors.modified),P=this._modifiedScrollTop.read(d),H=E-D,z=O-P,Y=Math.min(E,O),Z=Math.max(E,O);return{range:new ke(Y,Z),from:H,to:z,fromWithoutScroll:E,toWithoutScroll:O,move:k}});p.sort(Ife(Un(k=>k.fromWithoutScroll>k.toWithoutScroll,LM),Un(k=>k.fromWithoutScroll>k.toWithoutScroll?k.fromWithoutScroll:-k.toWithoutScroll,is)));let _=joe.compute(p.map(k=>k.range)),b=10,v=f.verticalScrollbarWidth,w=(_.getTrackCount()-1)*10+b*2,C=v+w+(g.contentLeft-o.movedCodeBlockPadding),y=0;for(let k of p){let I=_.getTrack(y),E=v+b+I*10,D=15,O=15,P=C,H=g.glyphMarginWidth+g.lineNumbersWidth,z=18,Y=document.createElementNS("http://www.w3.org/2000/svg","rect");Y.classList.add("arrow-rectangle"),Y.setAttribute("x",`${P-H}`),Y.setAttribute("y",`${k.to-z/2}`),Y.setAttribute("width",`${H}`),Y.setAttribute("height",`${z}`),this._element.appendChild(Y);let Z=document.createElementNS("http://www.w3.org/2000/svg","g"),te=document.createElementNS("http://www.w3.org/2000/svg","path");te.setAttribute("d",`M 0 ${k.from} L ${E} ${k.from} L ${E} ${k.to} L ${P-O} ${k.to}`),te.setAttribute("fill","none"),Z.appendChild(te);let se=document.createElementNS("http://www.w3.org/2000/svg","polygon");se.classList.add("arrow"),d.store.add(Se(he=>{te.classList.toggle("currentMove",k.move===h.activeMovedText.read(he)),se.classList.toggle("currentMove",k.move===h.activeMovedText.read(he))})),se.setAttribute("points",`${P-O},${k.to-D/2} ${P},${k.to} ${P-O},${k.to+D/2}`),Z.appendChild(se),this._element.appendChild(Z),y++}this.width.set(w,void 0)}),this._element=document.createElementNS("http://www.w3.org/2000/svg","svg"),this._element.setAttribute("class","moved-blocks-lines"),this._rootElement.appendChild(this._element),this._register(ne(()=>this._element.remove())),this._register(Se(d=>{let h=this._originalEditorLayoutInfo.read(d),u=this._modifiedEditorLayoutInfo.read(d);!h||!u||(this._element.style.left=`${h.width-h.verticalScrollbarWidth}px`,this._element.style.height=`${h.height}px`,this._element.style.width=`${h.verticalScrollbarWidth+h.contentLeft-o.movedCodeBlockPadding+this.width.read(d)}px`)})),this._register(Su(this._state));let r=V(d=>{let u=this._diffModel.read(d)?.diff.read(d);return u?u.movedTexts.map(f=>({move:f,original:new Wg(ht(f.lineRangeMapping.original.startLineNumber-1),18),modified:new Wg(ht(f.lineRangeMapping.modified.startLineNumber-1),18)})):[]});this._register(Vk(this._editors.original,r.map(d=>d.map(h=>h.original)))),this._register(Vk(this._editors.modified,r.map(d=>d.map(h=>h.modified)))),this._register(To((d,h)=>{let u=r.read(d);for(let f of u)h.add(new vH(this._editors.original,f.original,f.move,"original",this._diffModel.get())),h.add(new vH(this._editors.modified,f.modified,f.move,"modified",this._diffModel.get()))}));let a=zo("original.onDidFocusEditorWidget",d=>this._editors.original.onDidFocusEditorWidget(()=>setTimeout(()=>d(void 0),0))),l=zo("modified.onDidFocusEditorWidget",d=>this._editors.modified.onDidFocusEditorWidget(()=>setTimeout(()=>d(void 0),0))),c="modified";this._register(kf({changeTracker:{createChangeSummary:()=>{},handleChange:(d,h)=>(d.didChange(a)&&(c="original"),d.didChange(l)&&(c="modified"),!0)}},d=>{a.read(d),l.read(d);let h=this._diffModel.read(d);if(!h)return;let u=h.diff.read(d),f;if(u&&c==="original"){let g=this._editors.originalCursor.read(d);g&&(f=u.movedTexts.find(p=>p.lineRangeMapping.original.contains(g.lineNumber)))}if(u&&c==="modified"){let g=this._editors.modifiedCursor.read(d);g&&(f=u.movedTexts.find(p=>p.lineRangeMapping.modified.contains(g.lineNumber)))}f!==h.movedTextToCompare.read(void 0)&&h.movedTextToCompare.set(void 0,void 0),h.setActiveMovedText(f)}))}},joe=class o{static compute(e){let t=[],i=[];for(let n of e){let s=t.findIndex(r=>!r.intersectsStrict(n));s===-1&&(t.length>=6?s=Rpe(t,Un(a=>a.intersectWithRangeLength(n),is)):(s=t.length,t.push(new zP))),t[s].addRange(n),i.push(s)}return new o(t.length,i)}constructor(e,t){this._trackCount=e,this.trackPerLineIdx=t}getTrack(e){return this.trackPerLineIdx[e]}getTrackCount(){return this._trackCount}},vH=class extends Yy{constructor(e,t,i,n,s){let r=Dt("div.diff-hidden-lines-widget");super(e,t,r.root),this._editor=e,this._move=i,this._kind=n,this._diffModel=s,this._nodes=Dt("div.diff-moved-code-block",{style:{marginRight:"4px"}},[Dt("div.text-content@textContent"),Dt("div.action-bar@actionBar")]),r.root.appendChild(this._nodes.root);let a=pt(this._editor.onDidLayoutChange,()=>this._editor.getLayoutInfo());this._register(ch(this._nodes.root,{paddingRight:a.map(u=>u.verticalScrollbarWidth)}));let l;i.changes.length>0?l=this._kind==="original"?m(147,"Code moved with changes to line {0}-{1}",this._move.lineRangeMapping.modified.startLineNumber,this._move.lineRangeMapping.modified.endLineNumberExclusive-1):m(148,"Code moved with changes from line {0}-{1}",this._move.lineRangeMapping.original.startLineNumber,this._move.lineRangeMapping.original.endLineNumberExclusive-1):l=this._kind==="original"?m(149,"Code moved to line {0}-{1}",this._move.lineRangeMapping.modified.startLineNumber,this._move.lineRangeMapping.modified.endLineNumberExclusive-1):m(150,"Code moved from line {0}-{1}",this._move.lineRangeMapping.original.startLineNumber,this._move.lineRangeMapping.original.endLineNumberExclusive-1);let c=this._register(new Vo(this._nodes.actionBar,{highlightToggledItems:!0})),d=new Cs("",l,"",!1);c.push(d,{icon:!1,label:!0});let h=new Cs("","Compare",Ee.asClassName($.compareChanges),!0,()=>{this._editor.focus(),this._diffModel.movedTextToCompare.set(this._diffModel.movedTextToCompare.get()===i?void 0:this._move,void 0)});this._register(Se(u=>{let f=this._diffModel.movedTextToCompare.read(u)===i;h.checked=f})),c.push(h,{icon:!1,label:!0})}}});var wH,hEe=x(()=>{W();et();zN();Koe();BN();ud();Gt();wH=class extends T{constructor(e,t,i,n){super(),this._editors=e,this._diffModel=t,this._options=i,this._decorations=V(this,s=>{let r=this._diffModel.read(s),a=r?.diff.read(s);if(!a)return null;let l=this._diffModel.read(s).movedTextToCompare.read(s),c=this._options.renderIndicators.read(s),d=this._options.showEmptyDecorations.read(s),h=[],u=[];if(!l)for(let g of a.mappings)if(g.lineRangeMapping.original.isEmpty||h.push({range:g.lineRangeMapping.original.toInclusiveRange(),options:c?Moe:Poe}),g.lineRangeMapping.modified.isEmpty||u.push({range:g.lineRangeMapping.modified.toInclusiveRange(),options:c?Aoe:Ooe}),g.lineRangeMapping.modified.isEmpty||g.lineRangeMapping.original.isEmpty)g.lineRangeMapping.original.isEmpty||h.push({range:g.lineRangeMapping.original.toInclusiveRange(),options:JIe}),g.lineRangeMapping.modified.isEmpty||u.push({range:g.lineRangeMapping.modified.toInclusiveRange(),options:XIe});else{let p=this._options.useTrueInlineDiffRendering.read(s)&&VN(g.lineRangeMapping);for(let _ of g.lineRangeMapping.innerChanges||[])if(g.lineRangeMapping.original.contains(_.originalRange.startLineNumber)&&h.push({range:_.originalRange,options:_.originalRange.isEmpty()&&d?eEe:FN}),g.lineRangeMapping.modified.contains(_.modifiedRange.startLineNumber)&&u.push({range:_.modifiedRange,options:_.modifiedRange.isEmpty()&&d&&!p?QIe:Foe}),p){let b=r.model.original.getValueInRange(_.originalRange);u.push({range:_.modifiedRange,options:{description:"deleted-text",before:{content:b,inlineClassName:"inline-deleted-text"},zIndex:1e5,showIfCollapsed:!0}})}}if(l)for(let g of l.changes){let p=g.original.toInclusiveRange();p&&h.push({range:p,options:c?Moe:Poe});let _=g.modified.toInclusiveRange();_&&u.push({range:_,options:c?Aoe:Ooe});for(let b of g.innerChanges||[])h.push({range:b.originalRange,options:FN}),u.push({range:b.modifiedRange,options:Foe})}let f=this._diffModel.read(s).activeMovedText.read(s);for(let g of a.movedTexts)h.push({range:g.lineRangeMapping.original.toInclusiveRange(),options:{description:"moved",blockClassName:"movedOriginal"+(g===f?" currentMove":""),blockPadding:[Cv.movedCodeBlockPadding,0,Cv.movedCodeBlockPadding,Cv.movedCodeBlockPadding]}}),u.push({range:g.lineRangeMapping.modified.toInclusiveRange(),options:{description:"moved",blockClassName:"movedModified"+(g===f?" currentMove":""),blockPadding:[4,0,4,4]}});return{originalDecorations:h,modifiedDecorations:u}}),this._register(Hk(this._editors.original,this._decorations.map(s=>s?.originalDecorations||[]))),this._register(Hk(this._editors.modified,this._decorations.map(s=>s?.modifiedDecorations||[])))}}});var ps,yv=x(()=>{ps=class o{static equals(e,t){return e.x===t.x&&e.y===t.y}constructor(e,t){this.x=e,this.y=t}add(e){return new o(this.x+e.x,this.y+e.y)}deltaX(e){return new o(this.x+e,this.y)}deltaY(e){return new o(this.x,this.y+e)}toString(){return`(${this.x},${this.y})`}subtract(e){return new o(this.x-e.x,this.y-e.y)}scale(e){return new o(this.x*e,this.y*e)}mapComponents(e){return new o(e(this.x),e(this.y))}isZero(){return this.x===0&&this.y===0}withThreshold(e){return this.mapComponents(t=>t>e?t-e:t<-e?t+e:0)}}});function Ht(o){return Goe.get(o)}var Goe,js=x(()=>{Rs();W();et();Qn();Hi();Pe();gi();yv();vs();Xn();Gt();aa();Jt();ei();aB();Lf();Up();Goe=class o extends T{static{this._map=new Map}static get(e){let t=o._map.get(e);if(!t){t=new o(e),o._map.set(e,t);let i=e.onDidDispose(()=>{let n=o._map.get(e);n&&(o._map.delete(e),n.dispose(),i.dispose())})}return t}_beginUpdate(){this._updateCounter++,this._updateCounter===1&&(this._currentTransaction=new Cu(()=>{}))}_endUpdate(){if(this._updateCounter--,this._updateCounter===0){let e=this._currentTransaction;this._currentTransaction=void 0,e.finish()}}constructor(e){super(),this.editor=e,this._sawZeroLineWidth=!1,this._onDidContainerResize=xl({owner:this,getTransaction:()=>this._currentTransaction},t=>{let i=this.editor.getContainerDomNode(),n=new ResizeObserver(()=>{this._sawZeroLineWidth&&(this._sawZeroLineWidth=!1,this.editor.resetLineWidthCaches()),t(void 0)});return n.observe(i),{dispose:()=>n.disconnect()}},()=>({})),this._updateCounter=0,this._currentTransaction=void 0,this._model=_e(this,this.editor.getModel()),this.model=this._model,this.isReadonly=xl({owner:this,getTransaction:()=>this._currentTransaction},this.editor.onDidChangeConfiguration,()=>this.editor.getOption(104)),this._versionId=Kb({owner:this,lazy:!0},this.editor.getModel()?.getVersionId()??null),this.versionId=this._versionId,this._selections=Kb({owner:this,equalsFn:Sf(Rm(me.selectionsEqual)),lazy:!0},this.editor.getSelections()??null),this.selections=this._selections,this.positions=Bn({owner:this,equalsFn:Sf(Rm(M.equals))},t=>this.selections.read(t)?.map(i=>i.getStartPosition())??null),this.isFocused=xl({owner:this,getTransaction:()=>this._currentTransaction},t=>{let i=this.editor.onDidFocusEditorWidget(t),n=this.editor.onDidBlurEditorWidget(t);return{dispose(){i.dispose(),n.dispose()}}},()=>this.editor.hasWidgetFocus()),this.isTextFocused=xl({owner:this,getTransaction:()=>this._currentTransaction},t=>{let i=this.editor.onDidFocusEditorText(t),n=this.editor.onDidBlurEditorText(t);return{dispose(){i.dispose(),n.dispose()}}},()=>this.editor.hasTextFocus()),this.inComposition=xl({owner:this,getTransaction:()=>this._currentTransaction},t=>{let i=this.editor.onDidCompositionStart(()=>{t(void 0)}),n=this.editor.onDidCompositionEnd(()=>{t(void 0)});return{dispose(){i.dispose(),n.dispose()}}},()=>this.editor.inComposition),this.value=Mw(this,t=>(this.versionId.read(t),this.model.read(t)?.getValue()??""),(t,i)=>{let n=this.model.get();n!==null&&t!==n.getValue()&&n.setValue(t)}),this.valueIsEmpty=V(this,t=>(this.versionId.read(t),this.editor.getModel()?.getValueLength()===0)),this.cursorSelection=Bn({owner:this,equalsFn:Sf(me.selectionsEqual)},t=>this.selections.read(t)?.[0]??null),this.cursorPosition=Bn({owner:this,equalsFn:M.equals},t=>this.selections.read(t)?.[0]?.getPosition()??null),this.cursorLineNumber=V(this,t=>this.cursorPosition.read(t)?.lineNumber??null),this.onDidType=As(this),this.onDidPaste=As(this),this.scrollTop=xl({owner:this,getTransaction:()=>this._currentTransaction},this.editor.onDidScrollChange,()=>this.editor.getScrollTop()),this.scrollLeft=xl({owner:this,getTransaction:()=>this._currentTransaction},this.editor.onDidScrollChange,()=>this.editor.getScrollLeft()),this.layoutInfo=xl({owner:this,getTransaction:()=>this._currentTransaction},this.editor.onDidLayoutChange,()=>this.editor.getLayoutInfo()),this.layoutInfoContentLeft=this.layoutInfo.map(t=>t.contentLeft),this.layoutInfoDecorationsLeft=this.layoutInfo.map(t=>t.decorationsLeft),this.layoutInfoWidth=this.layoutInfo.map(t=>t.width),this.layoutInfoHeight=this.layoutInfo.map(t=>t.height),this.layoutInfoMinimap=this.layoutInfo.map(t=>t.minimap),this.layoutInfoVerticalScrollbarWidth=this.layoutInfo.map(t=>t.verticalScrollbarWidth),this.contentWidth=xl({owner:this,getTransaction:()=>this._currentTransaction},this.editor.onDidContentSizeChange,()=>this.editor.getContentWidth()),this.contentHeight=xl({owner:this,getTransaction:()=>this._currentTransaction},this.editor.onDidContentSizeChange,()=>this.editor.getContentHeight()),this._onDidChangeViewZones=zo(this,this.editor.onDidChangeViewZones),this._onDidHiddenAreasChanged=zo(this,this.editor.onDidChangeHiddenAreas),this._onDidLineHeightChanged=zo(this,this.editor.onDidChangeLineHeight),this._widgetCounter=0,this.openedPeekWidgets=_e(this,0),this._register(this.editor.onBeginUpdate(()=>this._beginUpdate())),this._register(this.editor.onEndUpdate(()=>this._endUpdate())),this._register(this.editor.onDidChangeModel(()=>{this._beginUpdate();try{this._model.set(this.editor.getModel(),this._currentTransaction),this._forceUpdate()}finally{this._endUpdate()}})),this._register(this.editor.onDidType(t=>{this._beginUpdate();try{this._forceUpdate(),this.onDidType.trigger(this._currentTransaction,t)}finally{this._endUpdate()}})),this._register(this.editor.onDidPaste(t=>{this._beginUpdate();try{this._forceUpdate(),this.onDidPaste.trigger(this._currentTransaction,t)}finally{this._endUpdate()}})),this._register(this.editor.onDidChangeModelContent(t=>{this._beginUpdate();try{this._versionId.set(this.editor.getModel()?.getVersionId()??null,this._currentTransaction,t),this._forceUpdate()}finally{this._endUpdate()}})),this._register(this.editor.onDidChangeCursorSelection(t=>{this._beginUpdate();try{this._selections.set(this.editor.getSelections(),this._currentTransaction,t),this._forceUpdate()}finally{this._endUpdate()}})),this.domNode=V(t=>(this.model.read(t),this.editor.getDomNode()))}transaction(e){this._beginUpdate();try{return e(this._currentTransaction)}finally{this._endUpdate()}}forceUpdate(e){this._beginUpdate();try{return this._forceUpdate(),e?e(this._currentTransaction):void 0}finally{this._endUpdate()}}_forceUpdate(){this._beginUpdate();try{this._model.set(this.editor.getModel(),this._currentTransaction),this._versionId.set(this.editor.getModel()?.getVersionId()??null,this._currentTransaction,void 0),this._selections.set(this.editor.getSelections(),this._currentTransaction,void 0)}finally{this._endUpdate()}}getOption(e,t=Di.ofCaller()){return pt(this,i=>this.editor.onDidChangeConfiguration(n=>{n.hasChanged(e)&&i(void 0)}),()=>this.editor.getOption(e),t)}setDecorations(e){let t=new F,i=this.editor.createDecorationsCollection();return t.add(xx({owner:this,debugName:()=>`Apply decorations from ${e.debugName}`},n=>{let s=e.read(n);i.set(s)})),t.add({dispose:()=>{i.clear()}}),t}createOverlayWidget(e){let t="observableOverlayWidget"+this._widgetCounter++,i={getDomNode:()=>e.domNode,getPosition:()=>e.position.get(),getId:()=>t,allowEditorOverflow:e.allowEditorOverflow,getMinContentWidthInPx:()=>e.minContentWidthInPx.get()};this.editor.addOverlayWidget(i);let n=Se(s=>{e.position.read(s),e.minContentWidthInPx.read(s),this.editor.layoutOverlayWidget(i)});return ne(()=>{n.dispose(),this.editor.removeOverlayWidget(i)})}createContentWidget(e){let t="observableContentWidget"+this._widgetCounter++,i={getDomNode:()=>e.domNode,getPosition:()=>e.position.get(),getId:()=>t,allowEditorOverflow:e.allowEditorOverflow};this.editor.addContentWidget(i);let n=Se(s=>{e.position.read(s),this.editor.layoutContentWidget(i)});return ne(()=>{n.dispose(),this.editor.removeContentWidget(i)})}observeLineOffsetRange(e,t){let i=this.observePosition(e.map(s=>new M(s.startLineNumber,1)),t),n=this.observePosition(e.map(s=>new M(s.endLineNumberExclusive+1,1)),t);return V(s=>{i.read(s),n.read(s);let r=e.read(s),a=this.model.read(s)?.getLineCount(),l=(typeof a<"u"&&r.startLineNumber>a?this.editor.getBottomForLineNumber(a):this.editor.getTopForLineNumber(r.startLineNumber))-this.scrollTop.read(s),c=r.isEmpty?l:this.editor.getBottomForLineNumber(r.endLineNumberExclusive-1)-this.scrollTop.read(s);return new ke(l,c)})}getLeftOfPosition(e,t){this.layoutInfo.read(t),this.value.read(t);let i=this.editor.getOffsetForColumn(e.lineNumber,e.column);if(i===-1){let n=this.editor.getOption(59).typicalHalfwidthCharacterWidth;i=e.column*n}return i}observePosition(e,t){let i=e.get(),n=Kb({owner:this,debugName:()=>`topLeftOfPosition${i?.toString()}`,equalsFn:Sf(ps.equals)},new ps(0,0)),s="observablePositionWidget"+this._widgetCounter++,r=document.createElement("div"),a={getDomNode:()=>r,getPosition:()=>i?{preference:[0],position:e.get()}:null,getId:()=>s,allowEditorOverflow:!1,useDisplayNone:!0,afterRender:(l,c)=>{let d=this._model.get();d&&i&&i.lineNumber>d.getLineCount()?n.set(new ps(0,this.editor.getBottomForLineNumber(d.getLineCount())-this.scrollTop.get()),void 0):n.set(c?new ps(c.left,c.top):null,void 0)}};return this.editor.addContentWidget(a),t.add(Se(l=>{i=e.read(l),this.editor.layoutContentWidget(a)})),t.add(ne(()=>{this.editor.removeContentWidget(a)})),n}isTargetHovered(e,t){let i=_e("isInjectedTextHovered",!1);return t.add(this.editor.onMouseMove(n=>{let s=e(n);i.set(s,void 0)})),t.add(this.editor.onMouseLeave(n=>{i.set(!1,void 0)})),i}observeLineHeightForPosition(e){return V(t=>{let i=e instanceof M?e:e.read(t);return i===null?null:(this.getOption(75).read(t),this.editor.getLineHeightForPosition(i))})}observeLineHeightForLine(e){return typeof e=="number"?this.observeLineHeightForPosition(new M(e,1)):V(t=>{let i=e.read(t);return i===null?null:this.observeLineHeightForPosition(new M(i,1)).read(t)})}observeLineHeightsForLineRange(e){return V(t=>{let i=e instanceof Re?e:e.read(t),n=[];for(let s=i.startLineNumber;s(this.layoutInfo.read(t),this._onDidChangeViewZones.read(t),this._onDidHiddenAreasChanged.read(t),this._onDidLineHeightChanged.read(t),this._versionId.read(t),this.editor.getTopForLineNumber(e)))}}});var kHe,LHe,ef,Xy,Yoe=x(()=>{re();Go();XF();W();et();ud();Pe();kX();$t();bi();Zi();xi();qi();Mi();Xi();$i();Vi();Qi();Ji();Kt();Xn();Gt();Jt();Up();kHe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},LHe=function(o,e){return function(t,i){e(t,i,o)}},Xy=class extends T{static{ef=this}static{this.ONE_OVERVIEW_WIDTH=15}static{this.ENTIRE_DIFF_OVERVIEW_WIDTH=this.ONE_OVERVIEW_WIDTH*2}constructor(e,t,i,n,s,r,a){super(),this._editors=e,this._rootElement=t,this._diffModel=i,this._rootWidth=n,this._rootHeight=s,this._modifiedEditorLayoutInfo=r,this._themeService=a,this.width=ef.ENTIRE_DIFF_OVERVIEW_WIDTH;let l=pt(this._themeService.onDidColorThemeChange,()=>this._themeService.getColorTheme()),c=V(u=>{let f=l.read(u),g=f.getColor(mbe)||(f.getColor(Xm)||LF).transparent(2),p=f.getColor(pbe)||(f.getColor(zf)||IF).transparent(2);return{insertColor:g,removeColor:p}}),d=wt(document.createElement("div"));d.setClassName("diffViewport"),d.setPosition("absolute");let h=Dt("div.diffOverview",{style:{position:"absolute",top:"0px",width:ef.ENTIRE_DIFF_OVERVIEW_WIDTH+"px"}}).root;this._register(zp(h,d.domNode)),this._register(_i(h,ee.POINTER_DOWN,u=>{this._editors.modified.delegateVerticalScrollbarPointerDown(u)})),this._register(B(h,ee.MOUSE_WHEEL,u=>{this._editors.modified.delegateScrollFromMouseWheelEvent(u)},{passive:!1})),this._register(zp(this._rootElement,h)),this._register(To((u,f)=>{let g=this._diffModel.read(u),p=this._editors.original.createOverviewRuler("original diffOverviewRuler");p&&(f.add(p),f.add(zp(h,p.getDomNode())));let _=this._editors.modified.createOverviewRuler("modified diffOverviewRuler");if(_&&(f.add(_),f.add(zp(h,_.getDomNode()))),!p||!_)return;let b=zo("viewZoneChanged",this._editors.original.onDidChangeViewZones),v=zo("viewZoneChanged",this._editors.modified.onDidChangeViewZones),w=zo("hiddenRangesChanged",this._editors.original.onDidChangeHiddenAreas),C=zo("hiddenRangesChanged",this._editors.modified.onDidChangeHiddenAreas);f.add(Se(y=>{b.read(y),v.read(y),w.read(y),C.read(y);let k=c.read(y),I=g?.diff.read(y)?.mappings;function E(P,H,z){let Y=z._getViewModel();return Y?P.filter(Z=>Z.length>0).map(Z=>{let te=Y.coordinatesConverter.convertModelPositionToViewPosition(new M(Z.startLineNumber,1)),se=Y.coordinatesConverter.convertModelPositionToViewPosition(new M(Z.endLineNumberExclusive,1)),he=se.lineNumber-te.lineNumber;return new LT(te.lineNumber,se.lineNumber,he,H.toString())}):[]}let D=E((I||[]).map(P=>P.lineRangeMapping.original),k.removeColor,this._editors.original),O=E((I||[]).map(P=>P.lineRangeMapping.modified),k.insertColor,this._editors.modified);p?.setZones(D),_?.setZones(O)})),f.add(Se(y=>{let k=this._rootHeight.read(y),I=this._rootWidth.read(y),E=this._modifiedEditorLayoutInfo.read(y);if(E){let D=ef.ENTIRE_DIFF_OVERVIEW_WIDTH-2*ef.ONE_OVERVIEW_WIDTH;p.setLayout({top:0,height:k,right:D+ef.ONE_OVERVIEW_WIDTH,width:ef.ONE_OVERVIEW_WIDTH}),_.setLayout({top:0,height:k,right:0,width:ef.ONE_OVERVIEW_WIDTH});let O=this._editors.modifiedScrollTop.read(y),P=this._editors.modifiedScrollHeight.read(y),H=this._editors.modified.getOption(117),z=new Tb(H.verticalHasArrows?H.arrowSize:0,H.verticalScrollbarSize,0,E.height,P,O);d.setTop(z.getSliderPosition()),d.setHeight(z.getSliderSize())}else d.setTop(0),d.setHeight(0);h.style.height=k+"px",h.style.left=I-ef.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",d.setWidth(ef.ENTIRE_DIFF_OVERVIEW_WIDTH)}))}))}};Xy=ef=kHe([LHe(6,yt)],Xy)});var IHe,Zoe,CH,uEe=x(()=>{ae();W();et();js();Yoe();Uo();Pe();le();Ie();Oi();je();Xn();Gt();Jt();IHe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Zoe=function(o,e){return function(t,i){e(t,i,o)}},CH=class extends T{get onDidContentSizeChange(){return this._onDidContentSizeChange.event}constructor(e,t,i,n,s,r,a,l){super(),this.originalEditorElement=e,this.modifiedEditorElement=t,this._options=i,this._argCodeEditorWidgetOptions=n,this._createInnerEditor=s,this._contextKeyService=r,this._instantiationService=a,this._keybindingService=l,this.original=this._register(this._createLeftHandSideEditor(this._options.editorOptions.get(),this._argCodeEditorWidgetOptions.originalEditor||{})),this.modified=this._register(this._createRightHandSideEditor(this._options.editorOptions.get(),this._argCodeEditorWidgetOptions.modifiedEditor||{})),this._onDidContentSizeChange=this._register(new N),this.modifiedScrollTop=pt(this,this.modified.onDidScrollChange,()=>this.modified.getScrollTop()),this.modifiedScrollHeight=pt(this,this.modified.onDidScrollChange,()=>this.modified.getScrollHeight()),this.modifiedObs=Ht(this.modified),this.originalObs=Ht(this.original),this.modifiedModel=this.modifiedObs.model,this.modifiedSelections=pt(this,this.modified.onDidChangeCursorSelection,()=>this.modified.getSelections()??[]),this.modifiedCursor=Bn({owner:this,equalsFn:M.equals},c=>this.modifiedSelections.read(c)[0]?.getPosition()??new M(1,1)),this.originalCursor=pt(this,this.original.onDidChangeCursorPosition,()=>this.original.getPosition()??new M(1,1)),this.isOriginalFocused=Ht(this.original).isFocused,this.isModifiedFocused=Ht(this.modified).isFocused,this.isFocused=V(this,c=>this.isOriginalFocused.read(c)||this.isModifiedFocused.read(c)),this._argCodeEditorWidgetOptions=null,this._register(kf({changeTracker:{createChangeSummary:()=>({}),handleChange:(c,d)=>(c.didChange(i.editorOptions)&&Object.assign(d,c.change.changedOptions),!0)}},(c,d)=>{i.editorOptions.read(c),this._options.renderSideBySide.read(c),this.modified.updateOptions(this._adjustOptionsForRightHandSide(c,d)),this.original.updateOptions(this._adjustOptionsForLeftHandSide(c,d))}))}_createLeftHandSideEditor(e,t){let i=this._adjustOptionsForLeftHandSide(void 0,e),n=this._constructInnerEditor(this._instantiationService,this.originalEditorElement,i,t),s=this._contextKeyService.createKey("isInDiffLeftEditor",n.hasWidgetFocus());return this._register(n.onDidFocusEditorWidget(()=>s.set(!0))),this._register(n.onDidBlurEditorWidget(()=>s.set(!1))),n}_createRightHandSideEditor(e,t){let i=this._adjustOptionsForRightHandSide(void 0,e),n=this._constructInnerEditor(this._instantiationService,this.modifiedEditorElement,i,t),s=this._contextKeyService.createKey("isInDiffRightEditor",n.hasWidgetFocus());return this._register(n.onDidFocusEditorWidget(()=>s.set(!0))),this._register(n.onDidBlurEditorWidget(()=>s.set(!1))),n}_constructInnerEditor(e,t,i,n){let s=this._createInnerEditor(e,t,i,n);return this._register(s.onDidContentSizeChange(r=>{let a=this.original.getContentWidth()+this.modified.getContentWidth()+Xy.ENTIRE_DIFF_OVERVIEW_WIDTH,l=Math.max(this.modified.getContentHeight(),this.original.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:l,contentWidth:a,contentHeightChanged:r.contentHeightChanged,contentWidthChanged:r.contentWidthChanged})})),s}_adjustOptionsForLeftHandSide(e,t){let i=this._adjustOptionsForSubEditor(t);return this._options.renderSideBySide.get()?(i.unicodeHighlight=this._options.editorOptions.get().unicodeHighlight||{},i.wordWrapOverride1=this._options.diffWordWrap.get()):(i.wordWrapOverride1="off",i.wordWrapOverride2="off",i.stickyScroll={enabled:!1},i.unicodeHighlight={nonBasicASCII:!1,ambiguousCharacters:!1,invisibleCharacters:!1}),i.glyphMargin=this._options.renderSideBySide.get(),t.originalAriaLabel&&(i.ariaLabel=t.originalAriaLabel),i.ariaLabel=this._updateAriaLabel(i.ariaLabel),i.readOnly=!this._options.originalEditable.get(),i.dropIntoEditor={enabled:!i.readOnly},i.extraEditorClassName="original-in-monaco-diff-editor",i}_adjustOptionsForRightHandSide(e,t){let i=this._adjustOptionsForSubEditor(t);return t.modifiedAriaLabel&&(i.ariaLabel=t.modifiedAriaLabel),i.ariaLabel=this._updateAriaLabel(i.ariaLabel),i.wordWrapOverride1=this._options.diffWordWrap.get(),i.revealHorizontalRightPadding=bs.revealHorizontalRightPadding.defaultValue+Xy.ENTIRE_DIFF_OVERVIEW_WIDTH,i.scrollbar.verticalHasArrows=!1,i.extraEditorClassName="modified-in-monaco-diff-editor",i}_adjustOptionsForSubEditor(e){let t={...e,dimension:{height:0,width:0}};return t.inDiffEditor=!0,t.automaticLayout=!1,t.allowVariableLineHeights=!1,t.allowVariableFonts=!1,t.allowVariableFontsInAccessibilityMode=!1,t.scrollbar={...t.scrollbar||{}},t.folding=!1,t.codeLens=this._options.diffCodeLens.get(),t.fixedOverflowWidgets=!0,t.minimap={...t.minimap||{}},t.minimap.enabled=!1,this._options.hideUnchangedRegions.get()?t.stickyScroll={enabled:!1}:t.stickyScroll=this._options.editorOptions.get().stickyScroll,t}_updateAriaLabel(e){e||(e="");let t=m(127," use {0} to open the accessibility help.",this._keybindingService.lookupKeybinding("editor.action.accessibilityHelp")?.getAriaLabel());return this._options.accessibilityVerbose.get()?e+t:e?e.replaceAll(t,""):""}};CH=IHe([Zoe(5,Ce),Zoe(6,ie),Zoe(7,$e)],CH)});var yH,qk,Xoe=x(()=>{fk();W();et();Gt();ei();Jt();yH=class{resetSash(){this._sashRatio.set(void 0,void 0)}constructor(e,t){this._options=e,this.dimensions=t,this.sashLeft=Mw(this,i=>{let n=this._sashRatio.read(i)??this._options.splitViewDefaultRatio.read(i);return this._computeSashLeft(n,i)},(i,n)=>{let s=this.dimensions.width.get();this._sashRatio.set(i/s,n)}),this._sashRatio=_e(this,void 0)}_computeSashLeft(e,t){let i=this.dimensions.width.read(t),n=Math.floor(this._options.splitViewDefaultRatio.read(t)*i),s=this._options.enableSplitViewResizing.read(t)?Math.floor(e*i):n,r=100;return i<=r*2?n:si-r?i-r:s}},qk=class extends T{constructor(e,t,i,n,s,r){super(),this._domNode=e,this._dimensions=t,this._enabled=i,this._boundarySashes=n,this.sashLeft=s,this._resetSash=r,this._sash=this._register(new ql(this._domNode,{getVerticalSashTop:a=>0,getVerticalSashLeft:a=>this.sashLeft.get(),getVerticalSashHeight:a=>this._dimensions.height.get()},{orientation:0})),this._startSashPosition=void 0,this._register(this._sash.onDidStart(()=>{this._startSashPosition=this.sashLeft.get()})),this._register(this._sash.onDidChange(a=>{this.sashLeft.set(this._startSashPosition+(a.currentX-a.startX),void 0)})),this._register(this._sash.onDidEnd(()=>this._sash.layout())),this._register(this._sash.onDidReset(()=>this._resetSash())),this._register(Se(a=>{let l=this._boundarySashes.read(a);l&&(this._sash.orthogonalEndSash=l.bottom)})),this._register(Se(a=>{let l=this._enabled.read(a);this._sash.state=l?3:0,this.sashLeft.read(a),this._dimensions.height.read(a),this._sash.layout()}))}}});var SH,fEe=x(()=>{ae();W();SH=class o extends T{constructor(){super(...arguments),this._id=++o.idCounter,this._onDidDispose=this._register(new N),this.onDidDispose=this._onDidDispose.event}static{this.idCounter=0}getId(){return this.getEditorType()+":v2:"+this._id}getVisibleColumnFromPosition(e){return this._targetEditor.getVisibleColumnFromPosition(e)}getPosition(){return this._targetEditor.getPosition()}setPosition(e,t="api"){this._targetEditor.setPosition(e,t)}revealLine(e,t=0){this._targetEditor.revealLine(e,t)}revealLineInCenter(e,t=0){this._targetEditor.revealLineInCenter(e,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._targetEditor.revealLineInCenterIfOutsideViewport(e,t)}revealLineNearTop(e,t=0){this._targetEditor.revealLineNearTop(e,t)}revealPosition(e,t=0){this._targetEditor.revealPosition(e,t)}revealPositionInCenter(e,t=0){this._targetEditor.revealPositionInCenter(e,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._targetEditor.revealPositionInCenterIfOutsideViewport(e,t)}revealPositionNearTop(e,t=0){this._targetEditor.revealPositionNearTop(e,t)}getSelection(){return this._targetEditor.getSelection()}getSelections(){return this._targetEditor.getSelections()}setSelection(e,t="api"){this._targetEditor.setSelection(e,t)}setSelections(e,t="api"){this._targetEditor.setSelections(e,t)}revealLines(e,t,i=0){this._targetEditor.revealLines(e,t,i)}revealLinesInCenter(e,t,i=0){this._targetEditor.revealLinesInCenter(e,t,i)}revealLinesInCenterIfOutsideViewport(e,t,i=0){this._targetEditor.revealLinesInCenterIfOutsideViewport(e,t,i)}revealLinesNearTop(e,t,i=0){this._targetEditor.revealLinesNearTop(e,t,i)}revealRange(e,t=0,i=!1,n=!0){this._targetEditor.revealRange(e,t,i,n)}revealRangeInCenter(e,t=0){this._targetEditor.revealRangeInCenter(e,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._targetEditor.revealRangeInCenterIfOutsideViewport(e,t)}revealRangeNearTop(e,t=0){this._targetEditor.revealRangeNearTop(e,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._targetEditor.revealRangeNearTopIfOutsideViewport(e,t)}revealRangeAtTop(e,t=0){this._targetEditor.revealRangeAtTop(e,t)}getSupportedActions(){return this._targetEditor.getSupportedActions()}focus(){this._targetEditor.focus()}trigger(e,t,i){this._targetEditor.trigger(e,t,i)}createDecorationsCollection(e){return this._targetEditor.createDecorationsCollection(e)}changeDecorations(e){return this._targetEditor.changeDecorations(e)}}});function gEe(o,e){return la(o,(t,i)=>i??e(t))}var mEe=x(()=>{Hr()});function DHe(o,e){return o.mappings.every(t=>NHe(t.lineRangeMapping)||RHe(t.lineRangeMapping)||e&&VN(t.lineRangeMapping))}function NHe(o){return o.original.length===0}function RHe(o){return o.modified.length===0}function pEe(o,e){return{enableSplitViewResizing:We(o.enableSplitViewResizing,e.enableSplitViewResizing),splitViewDefaultRatio:ege(o.splitViewDefaultRatio,.5,.1,.9),renderSideBySide:We(o.renderSideBySide,e.renderSideBySide),renderMarginRevertIcon:We(o.renderMarginRevertIcon,e.renderMarginRevertIcon),maxComputationTime:mu(o.maxComputationTime,e.maxComputationTime,0,1073741824),maxFileSize:mu(o.maxFileSize,e.maxFileSize,0,1073741824),ignoreTrimWhitespace:We(o.ignoreTrimWhitespace,e.ignoreTrimWhitespace),renderIndicators:We(o.renderIndicators,e.renderIndicators),originalEditable:We(o.originalEditable,e.originalEditable),diffCodeLens:We(o.diffCodeLens,e.diffCodeLens),renderOverviewRuler:We(o.renderOverviewRuler,e.renderOverviewRuler),diffWordWrap:dn(o.diffWordWrap,e.diffWordWrap,["off","on","inherit"]),diffAlgorithm:dn(o.diffAlgorithm,e.diffAlgorithm,["legacy","advanced","advanced-external","advanced-wasm"],{smart:"legacy",experimental:"advanced"}),accessibilityVerbose:We(o.accessibilityVerbose,e.accessibilityVerbose),experimental:{showMoves:We(o.experimental?.showMoves,e.experimental.showMoves),showEmptyDecorations:We(o.experimental?.showEmptyDecorations,e.experimental.showEmptyDecorations),useTrueInlineView:We(o.experimental?.useTrueInlineView,e.experimental.useTrueInlineView)},hideUnchangedRegions:{enabled:We(o.hideUnchangedRegions?.enabled??o.experimental?.collapseUnchangedRegions,e.hideUnchangedRegions.enabled),contextLineCount:mu(o.hideUnchangedRegions?.contextLineCount,e.hideUnchangedRegions.contextLineCount,0,1073741824),minimumLineCount:mu(o.hideUnchangedRegions?.minimumLineCount,e.hideUnchangedRegions.minimumLineCount,0,1073741824),revealLineCount:mu(o.hideUnchangedRegions?.revealLineCount,e.hideUnchangedRegions.revealLineCount,0,1073741824)},isInEmbeddedEditor:We(o.isInEmbeddedEditor,e.isInEmbeddedEditor),onlyShowAccessibleDiffViewer:We(o.onlyShowAccessibleDiffViewer,e.onlyShowAccessibleDiffViewer),renderSideBySideInlineBreakpoint:mu(o.renderSideBySideInlineBreakpoint,e.renderSideBySideInlineBreakpoint,0,1073741824),useInlineViewWhenSpaceIsLimited:We(o.useInlineViewWhenSpaceIsLimited,e.useInlineViewWhenSpaceIsLimited),renderGutterMenu:We(o.renderGutterMenu,e.renderGutterMenu),compactMode:We(o.compactMode,e.compactMode)}}var EHe,THe,jk,Qoe=x(()=>{et();us();dne();Uo();zN();mEe();ei();Xn();Gt();EHe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},THe=function(o,e){return function(t,i){e(t,i,o)}},jk=class{get editorOptions(){return this._options}constructor(e,t){this._accessibilityService=t,this._diffEditorWidth=_e(this,0),this._screenReaderMode=pt(this,this._accessibilityService.onDidChangeScreenReaderOptimized,()=>this._accessibilityService.isScreenReaderOptimized()),this.couldShowInlineViewBecauseOfSize=V(this,n=>this._options.read(n).renderSideBySide&&this._diffEditorWidth.read(n)<=this._options.read(n).renderSideBySideInlineBreakpoint),this.renderOverviewRuler=V(this,n=>this._options.read(n).renderOverviewRuler),this.renderSideBySide=V(this,n=>this.compactMode.read(n)&&this.shouldRenderInlineViewInSmartMode.read(n)?!1:this._options.read(n).renderSideBySide&&!(this._options.read(n).useInlineViewWhenSpaceIsLimited&&this.couldShowInlineViewBecauseOfSize.read(n)&&!this._screenReaderMode.read(n))),this.readOnly=V(this,n=>this._options.read(n).readOnly),this.shouldRenderOldRevertArrows=V(this,n=>!(!this._options.read(n).renderMarginRevertIcon||!this.renderSideBySide.read(n)||this.readOnly.read(n)||this.shouldRenderGutterMenu.read(n))),this.shouldRenderGutterMenu=V(this,n=>this._options.read(n).renderGutterMenu),this.renderIndicators=V(this,n=>this._options.read(n).renderIndicators),this.enableSplitViewResizing=V(this,n=>this._options.read(n).enableSplitViewResizing),this.splitViewDefaultRatio=V(this,n=>this._options.read(n).splitViewDefaultRatio),this.ignoreTrimWhitespace=V(this,n=>this._options.read(n).ignoreTrimWhitespace),this.maxComputationTimeMs=V(this,n=>this._options.read(n).maxComputationTime),this.showMoves=V(this,n=>this._options.read(n).experimental.showMoves&&this.renderSideBySide.read(n)),this.isInEmbeddedEditor=V(this,n=>this._options.read(n).isInEmbeddedEditor),this.diffWordWrap=V(this,n=>this._options.read(n).diffWordWrap),this.originalEditable=V(this,n=>this._options.read(n).originalEditable),this.diffCodeLens=V(this,n=>this._options.read(n).diffCodeLens),this.accessibilityVerbose=V(this,n=>this._options.read(n).accessibilityVerbose),this.diffAlgorithm=V(this,n=>this._options.read(n).diffAlgorithm),this.showEmptyDecorations=V(this,n=>this._options.read(n).experimental.showEmptyDecorations),this.onlyShowAccessibleDiffViewer=V(this,n=>this._options.read(n).onlyShowAccessibleDiffViewer),this.compactMode=V(this,n=>this._options.read(n).compactMode),this.trueInlineDiffRenderingEnabled=V(this,n=>this._options.read(n).experimental.useTrueInlineView),this.useTrueInlineDiffRendering=V(this,n=>!this.renderSideBySide.read(n)&&this.trueInlineDiffRenderingEnabled.read(n)),this.hideUnchangedRegions=V(this,n=>this._options.read(n).hideUnchangedRegions.enabled),this.hideUnchangedRegionsRevealLineCount=V(this,n=>this._options.read(n).hideUnchangedRegions.revealLineCount),this.hideUnchangedRegionsContextLineCount=V(this,n=>this._options.read(n).hideUnchangedRegions.contextLineCount),this.hideUnchangedRegionsMinimumLineCount=V(this,n=>this._options.read(n).hideUnchangedRegions.minimumLineCount),this._model=_e(this,void 0),this.shouldRenderInlineViewInSmartMode=this._model.map(this,n=>gEe(this,s=>{let r=n?.diff.read(s);return r?DHe(r,this.trueInlineDiffRenderingEnabled.read(s)):void 0})).flatten().map(this,n=>!!n),this.inlineViewHideOriginalLineNumbers=this.compactMode;let i={...e,...pEe(e,lr)};this._options=_e(this,i)}updateOptions(e){let t=pEe(e,this._options.get()),i={...this._options.get(),...e,...t};this._options.set(i,void 0,{changedOptions:e})}setWidth(e){this._diffEditorWidth.set(e,void 0)}setModel(e){this._model.set(e,void 0)}};jk=EHe([THe(1,Ri)],jk)});var ese,Joe,_Ee=x(()=>{ae();Qo();Ie();yi();ese=Ne("IActionViewItemService"),Joe=class{constructor(){this._providers=new Map,this._onDidChange=new N,this.onDidChange=this._onDidChange.event}dispose(){this._onDidChange.dispose()}lookUp(e,t){return this._providers.get(this._makeKey(e,t))}_makeKey(e,t){return`${e.id}/${t instanceof Te?t.id:t}`}};Je(ese,Joe,1)});var bEe,fd,UN,Sv,$N=x(()=>{re();Ya();LN();ys();qe();n0();Ae();ae();oa();W();le();Ap();yi();tte();Ii();je();Kr();Oi();Dl();_Ee();Ie();bEe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},fd=function(o,e){return function(t,i){e(t,i,o)}},UN=class extends tu{constructor(e,t,i,n,s,r,a,l){super(e,s,{getKeyBinding:d=>r.lookupKeybinding(d.id)??void 0,...t,allowContextMenu:!0,skipTelemetry:typeof t?.telemetrySource=="string"}),this._options=t,this._menuService=i,this._contextKeyService=n,this._contextMenuService=s,this._keybindingService=r,this._commandService=a,this._sessionDisposables=this._store.add(new F);let c=t?.telemetrySource;c&&this._store.add(this.actionBar.onDidRun(d=>l.publicLog2("workbenchActionExecuted",{id:d.action.id,from:c})))}setActions(e,t=[],i){this._sessionDisposables.clear();let n=e.slice(),s=t.slice(),r=[],a=0,l=[],c=!1;if(this._options?.hiddenItemStrategy!==-1)for(let d=0;df?.id)),h=this._options.overflowBehavior.maxItems-d.size,u=0;for(let f=0;f=h&&(n[f]=void 0,l[f]=g))}}Uq(n),Uq(l),super.setActions(Wi.clean(n),Wi.join(Wi.clean(l),s)),(r.length>0||n.length>0)&&this._sessionDisposables.add(B(this.getElement(),"contextmenu",d=>{let h=new so(we(this.getElement()),d),u=this.getItemAction(h.target);if(!u)return;h.preventDefault(),h.stopPropagation();let f=[];if(u instanceof Ss&&u.menuKeybinding)f.push(u.menuKeybinding);else if(!(u instanceof Hd||u instanceof Hy)){let p=!!this._keybindingService.lookupKeybinding(u.id);f.push(ete(this._commandService,this._keybindingService,u.id,void 0,p))}if(r.length>0){let p=!1;if(a===1&&this._options?.hiddenItemStrategy===0){p=!0;for(let _=0;_this._menuService.resetHiddenStates(i)}))),g.length!==0&&this._contextMenuService.showContextMenu({getAnchor:()=>h,getActions:()=>g,menuId:this._options?.contextMenu,menuActionOptions:{renderShortTitle:!0,...this._options?.menuOptions},skipTelemetry:typeof this._options?.telemetrySource=="string",contextKeyService:this._contextKeyService})}))}};UN=bEe([fd(2,Yo),fd(3,Ce),fd(4,eo),fd(5,$e),fd(6,Et),fd(7,$n)],UN);Sv=class extends UN{get onDidChangeMenuItems(){return this._onDidChangeMenuItems.event}constructor(e,t,i,n,s,r,a,l,c,d,h){super(e,{resetMenu:t,...i,actionViewItemProvider:(u,f)=>{let g=d.lookUp(t,u instanceof Hd?u.item.submenu.id:u.id);g||(g=i?.actionViewItemProvider);let p=g?.(u,f,h,we(e).vscodeWindowId);return p||rk(h,u,f)}},n,s,r,a,l,c),this._onDidChangeMenuItems=this._store.add(new N),this._container=e,this._menuOptions=i?.menuOptions,this._toolbarOptions=i?.toolbarOptions,this._menu=this._store.add(n.createMenu(t,s,{emitEventsForSubmenuChanges:!0,eventDebounceDelay:i?.eventDebounceDelay})),this._store.add(this._menu.onDidChange(()=>{this._updateToolbar(),this._onDidChangeMenuItems.fire(this)})),this._store.add(d.onDidChange(u=>{u===t&&this._updateToolbar()})),this._updateToolbar()}_updateToolbar(){let{primary:e,secondary:t}=sk(this._menu.getActions(this._menuOptions),this._toolbarOptions?.primaryGroup,this._toolbarOptions?.shouldInlineSubmenu,this._toolbarOptions?.useSeparatorsInPrimaryActions);this._container.classList.toggle("has-no-actions",e.length===0&&t.length===0),super.setActions(e,t)}setActions(){throw new xe("This toolbar is populated from a menu.")}};Sv=bEe([fd(3,Yo),fd(4,Ce),fd(5,eo),fd(6,$e),fd(7,Et),fd(8,$n),fd(9,ese),fd(10,ie)],Sv)});var Vg,xH=x(()=>{cb();fc();Vg=class extends lb{constructor(e){super(),this._textModel=e}getValueOfRange(e){return this._textModel.getValueInRange(e)}getLineLength(e){return this._textModel.getLineLength(e)}get length(){let e=this._textModel.getLineCount(),t=this._textModel.getLineLength(e);return new fn(e-1,t)}}});var Kk,tse=x(()=>{ys();Kk=class extends hc{constructor(e){super(),this._getContext=e}runAction(e,t){let i=this._getContext();return super.runAction(e,i)}}});var kH,ise,vEe=x(()=>{re();W();et();Qn();Hi();Xn();Up();Lf();vs();Jt();ei();kH=class extends T{constructor(e,t,i){super(),this._editor=e,this._domNode=t,this.itemProvider=i,this.scrollTop=pt(this,this._editor.onDidScrollChange,r=>this._editor.getScrollTop()),this.isScrollTopZero=this.scrollTop.map(r=>r===0),this.modelAttached=pt(this,this._editor.onDidChangeModel,r=>this._editor.hasModel()),this.editorOnDidChangeViewZones=zo("onDidChangeViewZones",this._editor.onDidChangeViewZones),this.editorOnDidContentSizeChange=zo("onDidContentSizeChange",this._editor.onDidContentSizeChange),this.domNodeSizeChanged=As("domNodeSizeChanged"),this.views=this._register(new vh),this._domNode.className="gutter monaco-editor";let n=this._domNode.appendChild(Dt("div.scroll-decoration",{role:"presentation",ariaHidden:"true",style:{width:"100%"}}).root),s=new ResizeObserver(()=>{Yt(r=>{this.domNodeSizeChanged.trigger(r)})});s.observe(this._domNode),this._register(ne(()=>s.disconnect())),this._register(Se(r=>{n.className=this.isScrollTopZero.read(r)?"":"scroll-decoration"})),this._register(Se(r=>this.render(r)))}dispose(){super.dispose(),Wn(this._domNode)}render(e){if(!this.modelAttached.read(e))return;this.domNodeSizeChanged.read(e),this.editorOnDidChangeViewZones.read(e),this.editorOnDidContentSizeChange.read(e);let t=this.scrollTop.read(e),i=this._editor.getVisibleRanges(),n=new Set(this.views.keys()),s=ke.ofStartAndLength(0,this._domNode.clientHeight);if(!s.isEmpty)for(let r of i){let a=new Re(r.startLineNumber,r.endLineNumber+1),l=this.itemProvider.getIntersectingGutterItems(a,e);Yt(c=>{for(let d of l){if(!d.range.intersect(a))continue;n.delete(d.id);let h=this.views.get(d.id);if(h)h.item.set(d,c);else{let p=document.createElement("div");this._domNode.appendChild(p);let _=_e("item",d),b=this.itemProvider.createView(_,p);h=new ise(_,b,p),this.views.set(d.id,h)}let u=d.range.startLineNumber<=this._editor.getModel().getLineCount()?this._editor.getTopForLineNumber(d.range.startLineNumber,!0)-t:d.range.startLineNumber>1?this._editor.getBottomForLineNumber(d.range.startLineNumber-1,!1)-t:0,g=(d.range.endLineNumberExclusive===1?Math.max(u,this._editor.getTopForLineNumber(d.range.startLineNumber,!1)-t):Math.max(u,this._editor.getBottomForLineNumber(d.range.endLineNumberExclusive-1,!0)-t))-u;h.domNode.style.top=`${u}px`,h.domNode.style.height=`${g}px`,h.gutterItemView.layout(ke.ofStartAndLength(u,g),s)}})}for(let r of n)this.views.deleteAndDispose(r)}},ise=class{constructor(e,t,i){this.item=e,this.gutterItemView=t,this.domNode=i}dispose(){this.gutterItemView.dispose(),this.domNode.remove()}}});var wEe,IH,nse,LH,EH,TH,ose,CEe=x(()=>{re();W();et();$N();yi();je();ol();Ie();Qn();Hi();ue();Al();$d();xH();tse();Xoe();ud();vEe();Gt();Xn();ei();Jt();wEe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},IH=function(o,e){return function(t,i){e(t,i,o)}},nse=[],LH=35,EH=class extends T{constructor(e,t,i,n,s,r,a,l,c){super(),this._diffModel=t,this._editors=i,this._options=n,this._sashLayout=s,this._boundarySashes=r,this._instantiationService=a,this._contextKeyService=l,this._menuService=c,this._menu=this._register(this._menuService.createMenu(Te.DiffEditorHunkToolbar,this._contextKeyService)),this._actions=pt(this,this._menu.onDidChange,()=>this._menu.getActions()),this._hasActions=this._actions.map(h=>h.length>0),this._showSash=V(this,h=>this._options.renderSideBySide.read(h)&&this._hasActions.read(h)),this.width=V(this,h=>this._hasActions.read(h)?LH:0),this.elements=Dt("div.gutter@gutter",{style:{position:"absolute",height:"100%",width:LH+"px"}},[]),this._currentDiff=V(this,h=>{let u=this._diffModel.read(h);if(!u)return;let f=u.diff.read(h)?.mappings,g=this._editors.modifiedCursor.read(h);if(g)return f?.find(p=>p.lineRangeMapping.modified.contains(g.lineNumber))}),this._selectedDiffs=V(this,h=>{let f=this._diffModel.read(h)?.diff.read(h);if(!f)return nse;let g=this._editors.modifiedSelections.read(h);if(g.every(v=>v.isEmpty()))return nse;let p=new Ud(g.map(v=>Re.fromRangeInclusive(v))),b=f.mappings.filter(v=>v.lineRangeMapping.innerChanges&&p.intersects(v.lineRangeMapping.modified)).map(v=>({mapping:v,rangeMappings:v.lineRangeMapping.innerChanges.filter(w=>g.some(C=>S.areIntersecting(w.modifiedRange,C)))}));return b.length===0||b.every(v=>v.rangeMappings.length===0)?nse:b}),this._register(KIe(e,this.elements.root)),this._register(B(this.elements.root,"click",()=>{this._editors.modified.focus()})),this._register(ch(this.elements.root,{display:this._hasActions.map(h=>h?"block":"none")})),Wr(this,h=>this._showSash.read(h)?new qk(e,this._sashLayout.dimensions,this._options.enableSplitViewResizing,this._boundarySashes,Mw(this,f=>this._sashLayout.sashLeft.read(f)-LH,(f,g)=>this._sashLayout.sashLeft.set(f+LH,g)),()=>this._sashLayout.resetSash()):void 0).recomputeInitiallyAndOnChange(this._store);let d=V(this,h=>{let u=this._diffModel.read(h);if(!u)return[];let f=u.diff.read(h);if(!f)return[];let g=this._selectedDiffs.read(h);if(g.length>0){let _=Pa.fromRangeMappings(g.flatMap(b=>b.rangeMappings));return[new TH(_,!0,Te.DiffEditorSelectionToolbar,void 0,u.model.original.uri,u.model.modified.uri)]}let p=this._currentDiff.read(h);return f.mappings.map(_=>new TH(_.lineRangeMapping.withInnerChangesFromLineRanges(),_.lineRangeMapping===p?.lineRangeMapping,Te.DiffEditorHunkToolbar,void 0,u.model.original.uri,u.model.modified.uri))});this._register(new kH(this._editors.modified,this.elements.root,{getIntersectingGutterItems:(h,u)=>d.read(u),createView:(h,u)=>this._instantiationService.createInstance(ose,h,u,this)})),this._register(B(this.elements.gutter,ee.MOUSE_WHEEL,h=>{this._editors.modified.getOption(117).handleMouseWheel&&this._editors.modified.delegateScrollFromMouseWheelEvent(h)},{passive:!1}))}computeStagedValue(e){let t=e.innerChanges??[],i=new Vg(this._editors.modifiedModel.get()),n=new Vg(this._editors.original.getModel());return new Lr(t.map(a=>a.toTextEdit(i))).apply(n)}layout(e){this.elements.gutter.style.left=e+"px"}};EH=wEe([IH(6,ie),IH(7,Ce),IH(8,Yo)],EH);TH=class{constructor(e,t,i,n,s,r){this.mapping=e,this.showAlways=t,this.menuId=i,this.rangeOverride=n,this.originalUri=s,this.modifiedUri=r}get id(){return this.mapping.modified.toString()}get range(){return this.rangeOverride??this.mapping.modified}},ose=class extends T{constructor(e,t,i,n){super(),this._item=e,this._elements=Dt("div.gutterItem",{style:{height:"20px",width:"34px"}},[Dt("div.background@background",{},[]),Dt("div.buttons@buttons",{},[])]),this._showAlways=this._item.map(this,r=>r.showAlways),this._menuId=this._item.map(this,r=>r.menuId),this._isSmall=_e(this,!1),this._lastItemRange=void 0,this._lastViewRange=void 0;let s=this._register(n.createInstance(gg,"element",{instantHover:!0},{position:{hoverPosition:1}}));this._register(zp(t,this._elements.root)),this._register(Se(r=>{let a=this._showAlways.read(r);this._elements.root.classList.toggle("noTransition",!0),this._elements.root.classList.toggle("showAlways",a),setTimeout(()=>{this._elements.root.classList.toggle("noTransition",!1)},0)})),this._register(To((r,a)=>{this._elements.buttons.replaceChildren();let l=a.add(n.createInstance(Sv,this._elements.buttons,this._menuId.read(r),{orientation:1,hoverDelegate:s,toolbarOptions:{primaryGroup:c=>c.startsWith("primary")},overflowBehavior:{maxItems:this._isSmall.read(r)?1:3},hiddenItemStrategy:0,actionRunner:a.add(new Kk(()=>{let c=this._item.read(void 0),d=c.mapping;return{mapping:d,originalWithModifiedChanges:i.computeStagedValue(d),originalUri:c.originalUri,modifiedUri:c.modifiedUri}})),menuOptions:{shouldForwardArgs:!0}}));a.add(l.onDidChangeMenuItems(()=>{this._lastItemRange&&this.layout(this._lastItemRange,this._lastViewRange)}))}))}layout(e,t){this._lastItemRange=e,this._lastViewRange=t;let i=this._elements.buttons.clientHeight;this._isSmall.set(this._item.get().mapping.original.startLineNumber===1&&e.length<30,void 0),i=this._elements.buttons.clientHeight;let n=e.length/2-i/2,s=i,r=e.start+n,a=ke.tryCreate(s,t.endExclusive-s-i),l=ke.tryCreate(e.start+s,e.endExclusive-i-s);l&&a&&l.start{re();od();ti();Rr();W();et();Li();Rt();le();Ie();Qn();Pe();ue();Ci();js();ud();ei();Gt();vs();Jt();AHe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},MHe=function(o,e){return function(t,i){e(t,i,o)}},xv=class extends T{static{sse=this}static{this._breadcrumbsSourceFactory=_e(this,()=>({dispose(){},getBreadcrumbItems(e,t){return[]},getAt:()=>[]}))}static setBreadcrumbsSourceFactory(e){this._breadcrumbsSourceFactory.set(e,void 0)}get isUpdatingHiddenAreas(){return this._isUpdatingHiddenAreas}constructor(e,t,i,n){super(),this._editors=e,this._diffModel=t,this._options=i,this._instantiationService=n,this._modifiedOutlineSource=Wr(this,l=>{let c=this._editors.modifiedModel.read(l),d=sse._breadcrumbsSourceFactory.read(l);return!c||!d?void 0:d(c,this._instantiationService)}),this._isUpdatingHiddenAreas=!1,this._register(this._editors.original.onDidChangeCursorPosition(l=>{if(l.reason===1)return;let c=this._diffModel.get();Yt(d=>{for(let h of this._editors.original.getSelections()||[])c?.ensureOriginalLineIsVisible(h.getStartPosition().lineNumber,0,d),c?.ensureOriginalLineIsVisible(h.getEndPosition().lineNumber,0,d)})})),this._register(this._editors.modified.onDidChangeCursorPosition(l=>{if(l.reason===1)return;let c=this._diffModel.get();Yt(d=>{for(let h of this._editors.modified.getSelections()||[])c?.ensureModifiedLineIsVisible(h.getStartPosition().lineNumber,0,d),c?.ensureModifiedLineIsVisible(h.getEndPosition().lineNumber,0,d)})}));let s=this._diffModel.map((l,c)=>{let d=l?.unchangedRegions.read(c)??[];return d.length===1&&d[0].modifiedLineNumber===1&&d[0].lineCount===this._editors.modifiedModel.read(c)?.getLineCount()?[]:d});this.viewZones=V(this,l=>{let c=this._modifiedOutlineSource.read(l);if(!c)return{origViewZones:[],modViewZones:[]};let d=[],h=[],u=this._options.renderSideBySide.read(l),f=this._options.compactMode.read(l),g=s.read(l);for(let p=0;p_.getHiddenOriginalRange(w).startLineNumber-1),v=new Wg(b,12);d.push(v),l.store.add(new DH(this._editors.original,v,_,!u))}{let b=V(this,w=>_.getHiddenModifiedRange(w).startLineNumber-1),v=new Wg(b,12);h.push(v),l.store.add(new DH(this._editors.modified,v,_))}}else{{let b=V(this,w=>_.getHiddenOriginalRange(w).startLineNumber-1),v=new Wg(b,24);d.push(v),l.store.add(new NH(this._editors.original,v,_,_.originalUnchangedRange,!u,c,w=>this._diffModel.get().ensureModifiedLineIsVisible(w,2,void 0),this._options))}{let b=V(this,w=>_.getHiddenModifiedRange(w).startLineNumber-1),v=new Wg(b,24);h.push(v),l.store.add(new NH(this._editors.modified,v,_,_.modifiedUnchangedRange,!1,c,w=>this._diffModel.get().ensureModifiedLineIsVisible(w,2,void 0),this._options))}}}return{origViewZones:d,modViewZones:h}});let r={description:"unchanged lines",className:"diff-unchanged-lines",isWholeLine:!0},a={description:"Fold Unchanged",glyphMarginHoverMessage:new Gn(void 0,{isTrusted:!0,supportThemeIcons:!0}).appendMarkdown(m(140,"Fold Unchanged Region")),glyphMarginClassName:"fold-unchanged "+Ee.asClassName($.fold),zIndex:10001};this._register(Hk(this._editors.original,V(this,l=>{let c=s.read(l),d=c.map(h=>({range:h.originalUnchangedRange.toInclusiveRange(),options:r}));for(let h of c)h.shouldHideControls(l)&&d.push({range:S.fromPositions(new M(h.originalLineNumber,1)),options:a});return d}))),this._register(Hk(this._editors.modified,V(this,l=>{let c=s.read(l),d=c.map(h=>({range:h.modifiedUnchangedRange.toInclusiveRange(),options:r}));for(let h of c)h.shouldHideControls(l)&&d.push({range:Re.ofLength(h.modifiedLineNumber,1).toInclusiveRange(),options:a});return d}))),this._register(Se(l=>{let c=s.read(l);this._isUpdatingHiddenAreas=!0;try{this._editors.original.setHiddenAreas(c.map(d=>d.getHiddenOriginalRange(l).toInclusiveRange()).filter(oo)),this._editors.modified.setHiddenAreas(c.map(d=>d.getHiddenModifiedRange(l).toInclusiveRange()).filter(oo))}finally{this._isUpdatingHiddenAreas=!1}})),this._register(this._editors.modified.onMouseUp(l=>{if(!l.event.rightButton&&l.target.position&&l.target.element?.className.includes("fold-unchanged")){let c=l.target.position.lineNumber,d=this._diffModel.get();if(!d)return;let h=d.unchangedRegions.get().find(u=>u.modifiedUnchangedRange.contains(c));if(!h)return;h.collapseAll(void 0),l.event.stopPropagation(),l.event.preventDefault()}})),this._register(this._editors.original.onMouseUp(l=>{if(!l.event.rightButton&&l.target.position&&l.target.element?.className.includes("fold-unchanged")){let c=l.target.position.lineNumber,d=this._diffModel.get();if(!d)return;let h=d.unchangedRegions.get().find(u=>u.originalUnchangedRange.contains(c));if(!h)return;h.collapseAll(void 0),l.event.stopPropagation(),l.event.preventDefault()}}))}};xv=sse=AHe([MHe(3,ie)],xv);DH=class extends Yy{constructor(e,t,i,n=!1){let s=Dt("div.diff-hidden-lines-widget");super(e,t,s.root),this._unchangedRegion=i,this._hide=n,this._nodes=Dt("div.diff-hidden-lines-compact",[Dt("div.line-left",[]),Dt("div.text@text",[]),Dt("div.line-right",[])]),s.root.appendChild(this._nodes.root),this._hide&&this._nodes.root.replaceChildren(),this._register(Se(r=>{if(!this._hide){let a=this._unchangedRegion.getHiddenModifiedRange(r).length,l=m(141,"{0} hidden lines",a);this._nodes.text.innerText=l}}))}},NH=class extends Yy{constructor(e,t,i,n,s,r,a,l){let c=Dt("div.diff-hidden-lines-widget");super(e,t,c.root),this._editor=e,this._unchangedRegion=i,this._unchangedRegionRange=n,this._hide=s,this._modifiedOutlineSource=r,this._revealModifiedHiddenLine=a,this._options=l,this._nodes=Dt("div.diff-hidden-lines",[Dt("div.top@top",{title:m(142,"Click or drag to show more above")}),Dt("div.center@content",{style:{display:"flex"}},[Dt("div@first",{style:{display:"flex",justifyContent:"center",alignItems:"center",flexShrink:"0"}},[j("a",{title:m(143,"Show Unchanged Region"),role:"button",onclick:()=>{this._unchangedRegion.showAll(void 0)}},...nd("$(unfold)"))]),Dt("div@others",{style:{display:"flex",justifyContent:"center",alignItems:"center"}})]),Dt("div.bottom@bottom",{title:m(144,"Click or drag to show more below"),role:"button"})]),c.root.appendChild(this._nodes.root),this._hide?Wn(this._nodes.first):this._register(ch(this._nodes.first,{width:Ht(this._editor).layoutInfoContentLeft})),this._register(Se(h=>{let u=this._unchangedRegion.visibleLineCountTop.read(h)+this._unchangedRegion.visibleLineCountBottom.read(h)===this._unchangedRegion.lineCount;this._nodes.bottom.classList.toggle("canMoveTop",!u),this._nodes.bottom.classList.toggle("canMoveBottom",this._unchangedRegion.visibleLineCountBottom.read(h)>0),this._nodes.top.classList.toggle("canMoveTop",this._unchangedRegion.visibleLineCountTop.read(h)>0),this._nodes.top.classList.toggle("canMoveBottom",!u);let f=this._unchangedRegion.isDragged.read(h),g=this._editor.getDomNode();g&&(g.classList.toggle("draggingUnchangedRegion",!!f),f==="top"?(g.classList.toggle("canMoveTop",this._unchangedRegion.visibleLineCountTop.read(h)>0),g.classList.toggle("canMoveBottom",!u)):f==="bottom"?(g.classList.toggle("canMoveTop",!u),g.classList.toggle("canMoveBottom",this._unchangedRegion.visibleLineCountBottom.read(h)>0)):(g.classList.toggle("canMoveTop",!1),g.classList.toggle("canMoveBottom",!1)))}));let d=this._editor;this._register(B(this._nodes.top,"mousedown",h=>{if(h.button!==0)return;this._nodes.top.classList.toggle("dragging",!0),this._nodes.root.classList.toggle("dragging",!0),h.preventDefault();let u=h.clientY,f=!1,g=this._unchangedRegion.visibleLineCountTop.get();this._unchangedRegion.isDragged.set("top",void 0);let p=we(this._nodes.top),_=B(p,"mousemove",v=>{let C=v.clientY-u;f=f||Math.abs(C)>2;let y=Math.round(C/d.getOption(75)),k=Math.max(0,Math.min(g+y,this._unchangedRegion.getMaxVisibleLineCountTop()));this._unchangedRegion.visibleLineCountTop.set(k,void 0)}),b=B(p,"mouseup",v=>{f||this._unchangedRegion.showMoreAbove(this._options.hideUnchangedRegionsRevealLineCount.get(),void 0),this._nodes.top.classList.toggle("dragging",!1),this._nodes.root.classList.toggle("dragging",!1),this._unchangedRegion.isDragged.set(void 0,void 0),_.dispose(),b.dispose()})})),this._register(B(this._nodes.bottom,"mousedown",h=>{if(h.button!==0)return;this._nodes.bottom.classList.toggle("dragging",!0),this._nodes.root.classList.toggle("dragging",!0),h.preventDefault();let u=h.clientY,f=!1,g=this._unchangedRegion.visibleLineCountBottom.get();this._unchangedRegion.isDragged.set("bottom",void 0);let p=we(this._nodes.bottom),_=B(p,"mousemove",v=>{let C=v.clientY-u;f=f||Math.abs(C)>2;let y=Math.round(C/d.getOption(75)),k=Math.max(0,Math.min(g-y,this._unchangedRegion.getMaxVisibleLineCountBottom())),I=this._unchangedRegionRange.endLineNumberExclusive>d.getModel().getLineCount()?d.getContentHeight():d.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);this._unchangedRegion.visibleLineCountBottom.set(k,void 0);let E=this._unchangedRegionRange.endLineNumberExclusive>d.getModel().getLineCount()?d.getContentHeight():d.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);d.setScrollTop(d.getScrollTop()+(E-I))}),b=B(p,"mouseup",v=>{if(this._unchangedRegion.isDragged.set(void 0,void 0),!f){let w=d.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);this._unchangedRegion.showMoreBelow(this._options.hideUnchangedRegionsRevealLineCount.get(),void 0);let C=d.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);d.setScrollTop(d.getScrollTop()+(C-w))}this._nodes.bottom.classList.toggle("dragging",!1),this._nodes.root.classList.toggle("dragging",!1),_.dispose(),b.dispose()})})),this._register(Se(h=>{let u=[];if(!this._hide){let f=i.getHiddenModifiedRange(h).length,g=m(145,"{0} hidden lines",f),p=j("span",{title:m(146,"Double click to unfold")},g);p.addEventListener("dblclick",v=>{v.button===0&&(v.preventDefault(),this._unchangedRegion.showAll(void 0))}),u.push(p);let _=this._unchangedRegion.getHiddenModifiedRange(h),b=this._modifiedOutlineSource.getBreadcrumbItems(_,h);if(b.length>0){u.push(j("span",void 0,"\xA0\xA0|\xA0\xA0"));for(let v=0;v{this._revealModifiedHiddenLine(w.startLineNumber)}}}}Wn(this._nodes.others,...u)}))}}});var rse,AH,MH,yEe=x(()=>{re();od();ti();W();et();Qn();ue();$d();ho();le();Gt();Jt();rse=[],AH=class extends T{constructor(e,t,i,n){super(),this._editors=e,this._diffModel=t,this._options=i,this._widget=n,this._selectedDiffs=V(this,s=>{let a=this._diffModel.read(s)?.diff.read(s);if(!a)return rse;let l=this._editors.modifiedSelections.read(s);if(l.every(u=>u.isEmpty()))return rse;let c=new Ud(l.map(u=>Re.fromRangeInclusive(u))),h=a.mappings.filter(u=>u.lineRangeMapping.innerChanges&&c.intersects(u.lineRangeMapping.modified)).map(u=>({mapping:u,rangeMappings:u.lineRangeMapping.innerChanges.filter(f=>l.some(g=>S.areIntersecting(f.modifiedRange,g)))}));return h.length===0||h.every(u=>u.rangeMappings.length===0)?rse:h}),this._register(To((s,r)=>{if(!this._options.shouldRenderOldRevertArrows.read(s))return;let a=this._diffModel.read(s),l=a?.diff.read(s);if(!a||!l||a.movedTextToCompare.read(s))return;let c=[],d=this._selectedDiffs.read(s),h=new Set(d.map(u=>u.mapping));if(d.length>0){let u=this._editors.modifiedSelections.read(s),f=r.add(new MH(u[u.length-1].positionLineNumber,this._widget,d.flatMap(g=>g.rangeMappings),!0));this._editors.modified.addGlyphMarginWidget(f),c.push(f)}for(let u of l.mappings)if(!h.has(u)&&!u.lineRangeMapping.modified.isEmpty&&u.lineRangeMapping.innerChanges){let f=r.add(new MH(u.lineRangeMapping.modified.startLineNumber,this._widget,u.lineRangeMapping,!1));this._editors.modified.addGlyphMarginWidget(f),c.push(f)}r.add(ne(()=>{for(let u of c)this._editors.modified.removeGlyphMarginWidget(u)}))}))}},MH=class o extends T{static{this.counter=0}getId(){return this._id}constructor(e,t,i,n){super(),this._lineNumber=e,this._widget=t,this._diffs=i,this._revertSelection=n,this._id=`revertButton${o.counter++}`,this._domNode=Dt("div.revertButton",{title:this._revertSelection?m(151,"Revert Selected Changes"):m(152,"Revert Change")},[Us($.arrowRight)]).root,this._register(B(this._domNode,ee.MOUSE_DOWN,s=>{s.button!==2&&(s.stopPropagation(),s.preventDefault())})),this._register(B(this._domNode,ee.MOUSE_UP,s=>{s.stopPropagation(),s.preventDefault()})),this._register(B(this._domNode,ee.CLICK,s=>{this._diffs instanceof ir?this._widget.revert(this._diffs):this._widget.revertRangeMappings(this._diffs),s.stopPropagation(),s.preventDefault()}))}getDomNode(){return this._domNode}getPosition(){return{lane:Oa.Right,range:{startColumn:1,startLineNumber:this._lineNumber,endColumn:1,endLineNumber:this._lineNumber},zIndex:10001}}}});var SEe=x(()=>{});function PHe(o){return o.mappings.map(e=>{let t=e.lineRangeMapping,i,n,s,r,a=t.innerChanges;return t.original.isEmpty?(i=t.original.startLineNumber-1,n=0,a=void 0):(i=t.original.startLineNumber,n=t.original.endLineNumberExclusive-1),t.modified.isEmpty?(s=t.modified.startLineNumber-1,r=0,a=void 0):(s=t.modified.startLineNumber,r=t.modified.endLineNumberExclusive-1),{originalStartLineNumber:i,originalEndLineNumber:n,modifiedStartLineNumber:s,modifiedEndLineNumber:r,charChanges:a?.map(l=>({originalStartLineNumber:l.originalRange.startLineNumber,originalStartColumn:l.originalRange.startColumn,originalEndLineNumber:l.originalRange.endLineNumber,originalEndColumn:l.originalRange.endColumn,modifiedStartLineNumber:l.modifiedRange.startLineNumber,modifiedStartColumn:l.modifiedRange.startColumn,modifiedEndLineNumber:l.modifiedRange.endLineNumber,modifiedEndColumn:l.modifiedRange.endColumn}))}})}var OHe,qN,dh,OH=x(()=>{re();ha();Ae();ae();Bk();W();et();Ip();je();Ie();ny();dH();Qh();Qn();Pe();ue();$E();li();lt();ao();Gy();sy();ZIe();hEe();uEe();Xoe();zN();fEe();Qoe();mH();CEe();RH();Koe();Yoe();yEe();SEe();ud();ei();Gt();Jt();Hr();vs();Xn();OHe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},qN=function(o,e){return function(t,i){e(t,i,o)}},dh=class extends SH{get onDidContentSizeChange(){return this._editors.onDidContentSizeChange}constructor(e,t,i,n,s,r,a,l){super(),this._domElement=e,this._parentContextKeyService=n,this._parentInstantiationService=s,this._codeEditorService=r,this._accessibilitySignalService=a,this._editorProgressService=l,this.elements=Dt("div.monaco-diff-editor.side-by-side",{style:{position:"relative",height:"100%"}},[Dt("div.editor.original@original",{style:{position:"absolute",height:"100%"}}),Dt("div.editor.modified@modified",{style:{position:"absolute",height:"100%"}}),Dt("div.accessibleDiffViewer@accessibleDiffViewer",{style:{position:"absolute",height:"100%"}})]),this._diffModelSrc=this._register(kx(this,void 0)),this._diffModel=V(this,C=>this._diffModelSrc.read(C)?.object),this.onDidChangeModel=Q.fromObservableLight(this._diffModel),this._contextKeyService=this._register(this._parentContextKeyService.createScoped(this._domElement)),this._instantiationService=this._register(this._parentInstantiationService.createChild(new ed([Ce,this._contextKeyService]))),this._boundarySashes=_e(this,void 0),this._accessibleDiffViewerShouldBeVisible=_e(this,!1),this._accessibleDiffViewerVisible=V(this,C=>this._options.onlyShowAccessibleDiffViewer.read(C)?!0:this._accessibleDiffViewerShouldBeVisible.read(C)),this._movedBlocksLinesPart=_e(this,void 0),this._layoutInfo=V(this,C=>{let y=this._rootSizeObserver.width.read(C),k=this._rootSizeObserver.height.read(C);this._rootSizeObserver.automaticLayout?this.elements.root.style.height="100%":this.elements.root.style.height=k+"px";let I=this._sash.read(C),E=this._gutter.read(C),D=E?.width.read(C)??0,O=this._overviewRulerPart.read(C)?.width??0,P,H,z,Y,Z;if(!!I){let se=I.sashLeft.read(C),he=this._movedBlocksLinesPart.read(C)?.width.read(C)??0;P=0,H=se-D-he,Z=se-D,z=se,Y=y-z-O}else{Z=0;let se=this._options.inlineViewHideOriginalLineNumbers.read(C);P=D,se?H=0:H=Math.max(5,this._editors.originalObs.layoutInfoDecorationsLeft.read(C)),z=D+H,Y=y-z-O}return this.elements.original.style.left=P+"px",this.elements.original.style.width=H+"px",this._editors.original.layout({width:H,height:k},!0),E?.layout(Z),this.elements.modified.style.left=z+"px",this.elements.modified.style.width=Y+"px",this._editors.modified.layout({width:Y,height:k},!0),{modifiedEditor:this._editors.modified.getLayoutInfo(),originalEditor:this._editors.original.getLayoutInfo()}}),this._diffValue=this._diffModel.map((C,y)=>C?.diff.read(y)),this.onDidUpdateDiff=Q.fromObservableLight(this._diffValue),this._codeEditorService.willCreateDiffEditor(),this._contextKeyService.createKey("isInDiffEditor",!0),this._domElement.appendChild(this.elements.root),this._register(ne(()=>this.elements.root.remove())),this._rootSizeObserver=this._register(new Wk(this.elements.root,t.dimension)),this._rootSizeObserver.setAutomaticLayout(t.automaticLayout??!1),this._options=this._instantiationService.createInstance(jk,t),this._register(Se(C=>{this._options.setWidth(this._rootSizeObserver.width.read(C))})),this._contextKeyService.createKey(R.isEmbeddedDiffEditor.key,!1),this._register(iu(R.isEmbeddedDiffEditor,this._contextKeyService,C=>this._options.isInEmbeddedEditor.read(C))),this._register(iu(R.comparingMovedCode,this._contextKeyService,C=>!!this._diffModel.read(C)?.movedTextToCompare.read(C))),this._register(iu(R.diffEditorRenderSideBySideInlineBreakpointReached,this._contextKeyService,C=>this._options.couldShowInlineViewBecauseOfSize.read(C))),this._register(iu(R.diffEditorInlineMode,this._contextKeyService,C=>!this._options.renderSideBySide.read(C))),this._register(iu(R.hasChanges,this._contextKeyService,C=>(this._diffModel.read(C)?.diff.read(C)?.mappings.length??0)>0)),this._editors=this._register(this._instantiationService.createInstance(CH,this.elements.original,this.elements.modified,this._options,i,(C,y,k,I)=>this._createInnerEditor(C,y,k,I))),this._register(iu(R.diffEditorOriginalWritable,this._contextKeyService,C=>this._options.originalEditable.read(C))),this._register(iu(R.diffEditorModifiedWritable,this._contextKeyService,C=>!this._options.readOnly.read(C))),this._register(iu(R.diffEditorOriginalUri,this._contextKeyService,C=>this._diffModel.read(C)?.model.original.uri.toString()??"")),this._register(iu(R.diffEditorModifiedUri,this._contextKeyService,C=>this._diffModel.read(C)?.model.modified.uri.toString()??"")),this._overviewRulerPart=Wr(this,C=>this._options.renderOverviewRuler.read(C)?this._instantiationService.createInstance(Ju(Xy),this._editors,this.elements.root,this._diffModel,this._rootSizeObserver.width,this._rootSizeObserver.height,this._layoutInfo.map(y=>y.modifiedEditor)):void 0).recomputeInitiallyAndOnChange(this._store);let c={height:this._rootSizeObserver.height,width:this._rootSizeObserver.width.map((C,y)=>C-(this._overviewRulerPart.read(y)?.width??0))};this._sashLayout=new yH(this._options,c),this._sash=Wr(this,C=>{let y=this._options.renderSideBySide.read(C);return this.elements.root.classList.toggle("side-by-side",y),y?new qk(this.elements.root,c,this._options.enableSplitViewResizing,this._boundarySashes,this._sashLayout.sashLeft,()=>this._sashLayout.resetSash()):void 0}).recomputeInitiallyAndOnChange(this._store);let d=Wr(this,C=>this._instantiationService.createInstance(Ju(xv),this._editors,this._diffModel,this._options)).recomputeInitiallyAndOnChange(this._store);Wr(this,C=>this._instantiationService.createInstance(Ju(wH),this._editors,this._diffModel,this._options,this)).recomputeInitiallyAndOnChange(this._store);let h=new Set,u=new Set,f=!1,g=Wr(this,C=>this._instantiationService.createInstance(Ju(bH),we(this._domElement),this._editors,this._diffModel,this._options,this,()=>f||d.read(void 0).isUpdatingHiddenAreas,h,u)).recomputeInitiallyAndOnChange(this._store),p=V(this,C=>{let y=g.read(C).viewZones.read(C).orig,k=d.read(C).viewZones.read(C).origViewZones;return y.concat(k)}),_=V(this,C=>{let y=g.read(C).viewZones.read(C).mod,k=d.read(C).viewZones.read(C).modViewZones;return y.concat(k)});this._register(Vk(this._editors.original,p,C=>{f=C},h));let b;this._register(Vk(this._editors.modified,_,C=>{f=C,f?b=Gl.capture(this._editors.modified):(b?.restore(this._editors.modified),b=void 0)},u)),this._accessibleDiffViewer=Wr(this,C=>this._instantiationService.createInstance(Ju(wv),this.elements.accessibleDiffViewer,this._accessibleDiffViewerVisible,(y,k)=>this._accessibleDiffViewerShouldBeVisible.set(y,k),this._options.onlyShowAccessibleDiffViewer.map(y=>!y),this._rootSizeObserver.width,this._rootSizeObserver.height,this._diffModel.map((y,k)=>y?.diff.read(k)?.mappings.map(I=>I.lineRangeMapping)),new fH(this._editors))).recomputeInitiallyAndOnChange(this._store);let v=this._accessibleDiffViewerVisible.map(C=>C?"hidden":"visible");this._register(ch(this.elements.modified,{visibility:v})),this._register(ch(this.elements.original,{visibility:v})),this._createDiffEditorContributions(),this._codeEditorService.addDiffEditor(this),this._register(ne(()=>{this._codeEditorService.removeDiffEditor(this)})),this._gutter=Wr(this,C=>this._options.shouldRenderGutterMenu.read(C)?this._instantiationService.createInstance(Ju(EH),this.elements.root,this._diffModel,this._editors,this._options,this._sashLayout,this._boundarySashes):void 0),this._register(Su(this._layoutInfo)),Wr(this,C=>new(Ju(Cv))(this.elements.root,this._diffModel,this._layoutInfo.map(y=>y.originalEditor),this._layoutInfo.map(y=>y.modifiedEditor),this._editors)).recomputeInitiallyAndOnChange(this._store,C=>{this._movedBlocksLinesPart.set(C,void 0)}),this._register(Q.runAndSubscribe(this._editors.modified.onDidChangeCursorPosition,C=>this._handleCursorPositionChange(C,!0))),this._register(Q.runAndSubscribe(this._editors.original.onDidChangeCursorPosition,C=>this._handleCursorPositionChange(C,!1)));let w=this._diffModel.map(this,(C,y)=>{if(C)return C.diff.read(y)===void 0&&!C.isDiffUpToDate.read(y)});this._register(To((C,y)=>{if(w.read(C)===!0){let k=this._editorProgressService.show(!0,1e3);y.add(ne(()=>k.done()))}})),this._register(To((C,y)=>{y.add(new(Ju(AH))(this._editors,this._diffModel,this._options,this))})),this._register(To((C,y)=>{let k=this._diffModel.read(C);if(k)for(let I of[k.model.original,k.model.modified])y.add(I.onWillDispose(E=>{De(new xe("TextModel got disposed before DiffEditorWidget model got reset")),this.setModel(null)}))})),this._register(Se(C=>{this._options.setModel(this._diffModel.read(C))}))}_createInnerEditor(e,t,i,n){return e.createInstance(qh,t,i,n)}_createDiffEditorContributions(){let e=Y_.getDiffEditorContributions();for(let t of e)try{this._register(this._instantiationService.createInstance(t.ctor,this))}catch(i){De(i)}}get _targetEditor(){return this._editors.modified}getEditorType(){return jm.IDiffEditor}layout(e){this._rootSizeObserver.observe(e)}hasTextFocus(){return this._editors.original.hasTextFocus()||this._editors.modified.hasTextFocus()}saveViewState(){let e=this._editors.original.saveViewState(),t=this._editors.modified.saveViewState();return{original:e,modified:t,modelState:this._diffModel.get()?.serializeState()}}restoreViewState(e){if(e&&e.original&&e.modified){let t=e;this._editors.original.restoreViewState(t.original),this._editors.modified.restoreViewState(t.modified),t.modelState&&this._diffModel.get()?.restoreSerializedState(t.modelState)}}handleInitialized(){this._editors.original.handleInitialized(),this._editors.modified.handleInitialized()}createViewModel(e){return this._instantiationService.createInstance(Uk,e,this._options)}getModel(){return this._diffModel.get()?.model??null}setModel(e){let t=e?"model"in e?Vp.create(e).createNewRef(this):Vp.create(this.createViewModel(e),this):null;this.setDiffModel(t)}setDiffModel(e,t){let i=this._diffModel.get();!e&&i&&this._accessibleDiffViewer.get().close(),this._diffModel.get()!==e?.object&&yu(t,n=>{let s=e?.object;pt.batchEventsGlobally(n,()=>{this._editors.original.setModel(s?s.model.original:null),this._editors.modified.setModel(s?s.model.modified:null)});let r=this._diffModelSrc.get()?.createNewRef(this);this._diffModelSrc.set(e?.createNewRef(this),n),setTimeout(()=>{r?.dispose()},0)})}updateOptions(e){this._options.updateOptions(e)}getContainerDomNode(){return this._domElement}getOriginalEditor(){return this._editors.original}getModifiedEditor(){return this._editors.modified}getLineChanges(){let e=this._diffModel.get()?.diff.get();return e?PHe(e):null}getDiffComputationResult(){let e=this._diffModel.get()?.diff.get();return e?{changes:this.getLineChanges(),changes2:e.mappings.map(t=>t.lineRangeMapping),identical:e.identical,quitEarly:e.quitEarly}:null}revert(e){let t=this._diffModel.get();!t||!t.isDiffUpToDate.get()||(this._editors.modified.pushUndoStop(),this._editors.modified.executeEdits("diffEditor",[{range:e.modified.toExclusiveRange(),text:t.model.original.getValueInRange(e.original.toExclusiveRange())}]),this._editors.modified.pushUndoStop())}revertRangeMappings(e){let t=this._diffModel.get();if(!t||!t.isDiffUpToDate.get())return;let i=e.map(n=>({range:n.modifiedRange,text:t.model.original.getValueInRange(n.originalRange)}));this._editors.modified.pushUndoStop(),this._editors.modified.executeEdits("diffEditor",i),this._editors.modified.pushUndoStop()}revertFocusedRangeMappings(){let e=this._diffModel.get();if(!e||!e.isDiffUpToDate.get())return;let t=this._diffModel.get()?.diff.get()?.mappings;if(!t||t.length===0)return;let i=this._editors.modified;if(!i.hasTextFocus())return;let n=i.getPosition().lineNumber,s=i.getSelection(),r=Re.fromRange(s||new S(n,0,n,0)),a=t.filter(l=>l.lineRangeMapping.modified.intersect(r));i.pushUndoStop(),i.executeEdits("diffEditor",a.map(l=>({range:l.lineRangeMapping.modified.toExclusiveRange(),text:e.model.original.getValueInRange(l.lineRangeMapping.original.toExclusiveRange())}))),i.pushUndoStop()}_goTo(e){this._editors.modified.setPosition(new M(e.lineRangeMapping.modified.startLineNumber,1)),this._editors.modified.revealRangeInCenter(e.lineRangeMapping.modified.toExclusiveRange())}goToDiff(e){let t=this._diffModel.get()?.diff.get()?.mappings;if(!t||t.length===0)return;let i=this._editors.modified.getPosition().lineNumber,n;e==="next"?this._editors.modified.getModel().getLineCount()===i?n=t[0]:n=t.find(r=>r.lineRangeMapping.modified.startLineNumber>i)??t[0]:n=Um(t,s=>s.lineRangeMapping.modified.startLineNumber{let t=e.diff.get()?.mappings;!t||t.length===0||this._goTo(t[0])})}accessibleDiffViewerNext(){this._accessibleDiffViewer.get().next()}accessibleDiffViewerPrev(){this._accessibleDiffViewer.get().prev()}async waitForDiff(){let e=this._diffModel.get();e&&await e.waitForDiff()}mapToOtherSide(){let e=this._editors.modified.hasWidgetFocus(),t=e?this._editors.modified:this._editors.original,i=e?this._editors.original:this._editors.modified,n,s=t.getSelection();if(s){let r=this._diffModel.get()?.diff.get()?.mappings.map(a=>e?a.lineRangeMapping.flip():a.lineRangeMapping);if(r){let a=yoe(s.getStartPosition(),r),l=yoe(s.getEndPosition(),r);n=S.plusRange(a,l)}}return{destination:i,destinationSelection:n}}switchSide(){let{destination:e,destinationSelection:t}=this.mapToOtherSide();e.focus(),t&&e.setSelection(t)}exitCompareMove(){let e=this._diffModel.get();e&&e.movedTextToCompare.set(void 0,void 0)}collapseAllUnchangedRegions(){let e=this._diffModel.get()?.unchangedRegions.get();e&&Yt(t=>{for(let i of e)i.collapseAll(t)})}showAllUnchangedRegions(){let e=this._diffModel.get()?.unchangedRegions.get();e&&Yt(t=>{for(let i of e)i.showAll(t)})}_handleCursorPositionChange(e,t){if(e?.reason===3){let i=this._diffModel.get()?.diff.get()?.mappings.find(n=>t?n.lineRangeMapping.modified.contains(e.position.lineNumber):n.lineRangeMapping.original.contains(e.position.lineNumber));i?.lineRangeMapping.modified.isEmpty?this._accessibilitySignalService.playSignal(qs.diffLineDeleted,{source:"diffEditor.cursorPositionChanged"}):i?.lineRangeMapping.original.isEmpty?this._accessibilitySignalService.playSignal(qs.diffLineInserted,{source:"diffEditor.cursorPositionChanged"}):i&&this._accessibilitySignalService.playSignal(qs.diffLineModified,{source:"diffEditor.cursorPositionChanged"})}}};dh=OHe([qN(3,Ce),qN(4,ie),qN(5,ot),qN(6,ll),qN(7,Kl)],dh)});function gd(o){return o&&typeof o.getEditorType=="function"?o.getEditorType()===jm.ICodeEditor:!1}function jN(o){return o&&typeof o.getEditorType=="function"?o.getEditorType()===jm.IDiffEditor:!1}function FHe(o){return!!o&&typeof o=="object"&&typeof o.onDidChangeActiveEditor=="function"}function PH(o){return gd(o)?o:jN(o)?o.getModifiedEditor():FHe(o)&&gd(o.activeCodeEditor)?o.activeCodeEditor:null}var Qy=x(()=>{$E()});var xEe=x(()=>{});var BHe,kEe,FH,BH,LEe=x(()=>{re();Nu();oi();GY();xr();zd();CJ();dc();Qy();xEe();BHe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},kEe=function(o,e){return function(t,i){e(t,i,o)}},BH=class{static{FH=this}static{this._ttpTokenizer=Ur("tokenizeToString",{createHTML(e){return e}})}constructor(e,t){this._configurationService=e,this._languageService=t}async renderCodeBlock(e,t,i){let n=gd(i.context)?i.context:void 0,s;e?s=this._languageService.getLanguageIdByLanguageName(e):n&&(s=n.getModel()?.getLanguageId()),s||(s=cs);let r=await axe(this._languageService,t,s),a=FH._ttpTokenizer?FH._ttpTokenizer.createHTML(r)??r:r,l=document.createElement("span");l.innerHTML=a;let c=l.querySelector(".monaco-tokenized-source");return xt(c)?(wn(c,this.getFontInfo(n)),l):document.createElement("span")}getFontInfo(e){return e?e.getOption(59):V_e({fontFamily:this._configurationService.getValue("editor").fontFamily},1)}};BH=FH=BHe([kEe(0,Me),kEe(1,ri)],BH)});function HHe(o){if(!o){if(IEe)return;IEe=!0}M_e(o||Tt.document.body)}function lse(o,e,t,i,n){if(t=t||"",!i){let s=t.indexOf(` +`),r=t;return s!==-1&&(r=t.substring(0,s)),EEe(o,t,e.createByFilepathOrFirstLine(n||null,r),n)}return EEe(o,t,e.createById(i),n)}function EEe(o,e,t,i){return o.createModel(e,t,i)}var ase,an,WHe,IEe,WH,HH,VH,TEe=x(()=>{hs();W();ao();sy();nQ();ON();gv();yi();Ii();oi();je();Kr();Ie();Oi();Hs();Kt();us();Mg();ih();Qh();Ra();xr();Kee();zd();Do();Ut();OH();Ip();br();xc();ol();rd();Kh();LEe();eg();ase=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},an=function(o,e){return function(t,i){e(t,i,o)}},WHe=0,IEe=!1;WH=class extends qh{constructor(e,t,i,n,s,r,a,l,c,d,h,u,f,g,p){let _={...t};_.ariaLabel=_.ariaLabel||L9.editorViewAccessibleLabel,super(e,_,{},i,n,s,r,c,d,h,u,f,p),l instanceof vv?this._standaloneKeybindingService=l:this._standaloneKeybindingService=null,HHe(_.ariaContainerElement),R0e((b,v)=>i.createInstance(gg,b,{instantHover:v},{})),M0e(a),g.setDefaultCodeBlockRenderer(i.createInstance(BH))}addCommand(e,t,i){if(!this._standaloneKeybindingService)return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"),null;let n="DYNAMIC_"+ ++WHe,s=G.deserialize(i);return this._standaloneKeybindingService.addDynamicKeybinding(n,e,t,s),n}createContextKey(e,t){return this._contextKeyService.createKey(e,t)}addAction(e){if(typeof e.id!="string"||typeof e.label!="string"||typeof e.run!="function")throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");if(!this._standaloneKeybindingService)return console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),T.None;let t=e.id,i=e.label,n=G.and(G.equals("editorId",this.getId()),G.deserialize(e.precondition)),s=e.keybindings,r=G.and(n,G.deserialize(e.keybindingContext)),a=e.contextMenuGroupId||null,l=e.contextMenuOrder||0,c=(f,...g)=>Promise.resolve(e.run(this,...g)),d=new F,h=this.getId()+":"+t;if(d.add(st.registerCommand(h,c)),a){let f={command:{id:h,title:i},when:n,group:a,order:l};d.add(lo.appendMenuItem(Te.EditorContext,f))}if(Array.isArray(s))for(let f of s)d.add(this._standaloneKeybindingService.addDynamicKeybinding(h,f,c,r));let u=new i0(h,i,i,void 0,n,(...f)=>Promise.resolve(e.run(this,...f)),this._contextKeyService);return this._actions.set(t,u),d.add(ne(()=>{this._actions.delete(t)})),d}_triggerCommand(e,t){if(this._codeEditorService instanceof VD)try{this._codeEditorService.setActiveCodeEditor(this),super._triggerCommand(e,t)}finally{this._codeEditorService.setActiveCodeEditor(null)}else super._triggerCommand(e,t)}};WH=ase([an(2,ie),an(3,ot),an(4,Et),an(5,Ce),an(6,Jn),an(7,$e),an(8,yt),an(9,si),an(10,Ri),an(11,zt),an(12,be),an(13,ar),an(14,ba)],WH);HH=class extends WH{constructor(e,t,i,n,s,r,a,l,c,d,h,u,f,g,p,_,b,v){let w={...t};MN(h,w,!1);let C=c.registerEditorContainer(e);typeof w.theme=="string"&&c.setTheme(w.theme),typeof w.autoDetectHighContrast<"u"&&c.setAutoDetectHighContrast(!!w.autoDetectHighContrast);let y=w.model;delete w.model,super(e,w,i,n,s,r,a,l,c,d,u,p,_,b,v),this._configurationService=h,this._standaloneThemeService=c,this._register(C);let k;if(typeof y>"u"){let I=g.getLanguageIdByMimeType(w.language)||w.language||cs;k=lse(f,g,w.value||"",I,void 0),this._ownsModel=!0}else k=y,this._ownsModel=!1;if(this._attachModel(k),k){let I={oldModelUrl:null,newModelUrl:k.uri};this._onDidChangeModel.fire(I)}}updateOptions(e){MN(this._configurationService,e,!1),typeof e.theme=="string"&&this._standaloneThemeService.setTheme(e.theme),typeof e.autoDetectHighContrast<"u"&&this._standaloneThemeService.setAutoDetectHighContrast(!!e.autoDetectHighContrast),super.updateOptions(e)}_postDetachModelCleanup(e){super._postDetachModelCleanup(e),e&&this._ownsModel&&(e.dispose(),this._ownsModel=!1)}};HH=ase([an(2,ie),an(3,ot),an(4,Et),an(5,Ce),an(6,Jn),an(7,$e),an(8,cr),an(9,si),an(10,Me),an(11,Ri),an(12,ui),an(13,ri),an(14,zt),an(15,be),an(16,ar),an(17,ba)],HH);VH=class extends dh{constructor(e,t,i,n,s,r,a,l,c,d,h,u){let f={...t};MN(l,f,!0);let g=r.registerEditorContainer(e);typeof f.theme=="string"&&r.setTheme(f.theme),typeof f.autoDetectHighContrast<"u"&&r.setAutoDetectHighContrast(!!f.autoDetectHighContrast),super(e,f,{},n,i,s,u,d),this._configurationService=l,this._standaloneThemeService=r,this._register(g)}updateOptions(e){MN(this._configurationService,e,!0),typeof e.theme=="string"&&this._standaloneThemeService.setTheme(e.theme),typeof e.autoDetectHighContrast<"u"&&this._standaloneThemeService.setAutoDetectHighContrast(!!e.autoDetectHighContrast),super.updateOptions(e)}_createInnerEditor(e,t,i){return e.createInstance(WH,t,i)}getOriginalEditor(){return super.getOriginalEditor()}getModifiedEditor(){return super.getModifiedEditor()}addCommand(e,t,i){return this.getModifiedEditor().addCommand(e,t,i)}createContextKey(e,t){return this.getModifiedEditor().createContextKey(e,t)}addAction(e){return this.getModifiedEditor().addAction(e)}};VH=ase([an(2,ie),an(3,Ce),an(4,ot),an(5,cr),an(6,si),an(7,Me),an(8,eo),an(9,Kl),an(10,Lo),an(11,ll)],VH)});var DEe=x(()=>{le();$t();bi();Zi();xi();qi();Mi();Xi();$i();Vi();Qi();Ji();A("multiDiffEditor.headerBackground",{dark:"#262626",light:"tab.inactiveBackground",hcDark:"tab.inactiveBackground",hcLight:"tab.inactiveBackground"},m(158,"The background color of the diff editor's header"));A("multiDiffEditor.background",Er,m(159,"The background color of the multi file diff editor"));A("multiDiffEditor.border",{dark:"sideBarSectionHeader.border",light:"#cccccc",hcDark:"sideBarSectionHeader.border",hcLight:"#cccccc"},m(160,"The border color of the multi file diff editor"))});var VHe,NEe,zH,UH,cse=x(()=>{re();P9();ti();W();et();Ap();$N();yi();je();Ie();ny();js();OH();tse();vs();ei();Gt();Jt();VHe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},NEe=function(o,e){return function(t,i){e(t,i,o)}},zH=class{constructor(e,t){this.viewModel=e,this.deltaScrollVertical=t}getId(){return this.viewModel}},UH=class extends T{constructor(e,t,i,n,s){super(),this._container=e,this._overflowWidgetsDomNode=t,this._workbenchUIElementFactory=i,this._instantiationService=n,this._viewModel=_e(this,void 0),this._collapsed=V(this,l=>this._viewModel.read(l)?.collapsed.read(l)),this._editorContentHeight=_e(this,500),this.contentHeight=V(this,l=>(this._collapsed.read(l)?0:this._editorContentHeight.read(l))+this._outerEditorHeight),this._modifiedContentWidth=_e(this,0),this._modifiedWidth=_e(this,0),this._originalContentWidth=_e(this,0),this._originalWidth=_e(this,0),this.maxScroll=V(this,l=>{let c=this._modifiedContentWidth.read(l)-this._modifiedWidth.read(l),d=this._originalContentWidth.read(l)-this._originalWidth.read(l);return c>d?{maxScroll:c,width:this._modifiedWidth.read(l)}:{maxScroll:d,width:this._originalWidth.read(l)}}),this._elements=Dt("div.multiDiffEntry",[Dt("div.header@header",[Dt("div.header-content",[Dt("div.collapse-button@collapseButton"),Dt("div.file-path",[Dt("div.title.modified.show-file-icons@primaryPath",[]),Dt("div.status.deleted@status",["R"]),Dt("div.title.original.show-file-icons@secondaryPath",[])]),Dt("div.actions@actions")])]),Dt("div.editorParent",[Dt("div.editorContainer@editor")])]),this.editor=this._register(this._instantiationService.createInstance(dh,this._elements.editor,{overflowWidgetsDomNode:this._overflowWidgetsDomNode,fixedOverflowWidgets:!0},{})),this.isModifedFocused=Ht(this.editor.getModifiedEditor()).isFocused,this.isOriginalFocused=Ht(this.editor.getOriginalEditor()).isFocused,this.isFocused=V(this,l=>this.isModifedFocused.read(l)||this.isOriginalFocused.read(l)),this._resourceLabel=this._workbenchUIElementFactory.createResourceLabel?this._register(this._workbenchUIElementFactory.createResourceLabel(this._elements.primaryPath)):void 0,this._resourceLabel2=this._workbenchUIElementFactory.createResourceLabel?this._register(this._workbenchUIElementFactory.createResourceLabel(this._elements.secondaryPath)):void 0,this._dataStore=this._register(new F),this._headerHeight=40,this._lastScrollTop=-1,this._isSettingScrollTop=!1;let r=this._register(new Bp(this._elements.collapseButton,{}));this._register(Se(l=>{r.element.className="",r.icon=this._collapsed.read(l)?$.chevronRight:$.chevronDown})),this._register(r.onDidClick(()=>{this._viewModel.get()?.collapsed.set(!this._collapsed.get(),void 0)})),this._workbenchUIElementFactory.headerClickToCollapse&&(this._elements.header.tabIndex=0,this._elements.header.setAttribute("role","button"),this._register(B(this._elements.header,ee.CLICK,l=>{let c=l.target;c instanceof Element&&(c.closest(".actions")||c.closest(".collapse-button")||this._viewModel.get()?.collapsed.set(!this._collapsed.get(),void 0))})),this._register(B(this._elements.header,ee.KEY_DOWN,l=>{if(l.key==="Enter"||l.key===" "){let c=l.target;if(c instanceof Element&&(c.closest(".actions")||c.closest(".collapse-button")))return;l.preventDefault(),this._viewModel.get()?.collapsed.set(!this._collapsed.get(),void 0)}}))),this._register(Se(l=>{let c=this._collapsed.read(l);this._elements.editor.style.display=c?"none":"block",this._workbenchUIElementFactory.headerClickToCollapse&&this._elements.header.setAttribute("aria-expanded",String(!c))})),this._register(this.editor.getModifiedEditor().onDidLayoutChange(l=>{let c=this.editor.getModifiedEditor().getLayoutInfo().contentWidth;this._modifiedWidth.set(c,void 0)})),this._register(this.editor.getOriginalEditor().onDidLayoutChange(l=>{let c=this.editor.getOriginalEditor().getLayoutInfo().contentWidth;this._originalWidth.set(c,void 0)})),this._register(this.editor.onDidContentSizeChange(l=>{Ow(c=>{this._editorContentHeight.set(l.contentHeight,c),this._modifiedContentWidth.set(this.editor.getModifiedEditor().getContentWidth(),c),this._originalContentWidth.set(this.editor.getOriginalEditor().getContentWidth(),c)})})),this._register(this.editor.getOriginalEditor().onDidScrollChange(l=>{if(this._isSettingScrollTop||!l.scrollTopChanged||!this._data)return;let c=l.scrollTop-this._lastScrollTop;this._data.deltaScrollVertical(c)})),this._register(Se(l=>{let c=this._viewModel.read(l)?.isActive.read(l);this._elements.root.classList.toggle("active",c)})),this._container.appendChild(this._elements.root),this._outerEditorHeight=this._headerHeight,this._contextKeyService=this._register(s.createScoped(this._elements.actions));let a=this._register(this._instantiationService.createChild(new ed([Ce,this._contextKeyService])));this._register(a.createInstance(Sv,this._elements.actions,Te.MultiDiffEditorFileToolbar,{actionRunner:this._register(new Kk(()=>this._viewModel.get()?.modifiedUri??this._viewModel.get()?.originalUri)),menuOptions:{shouldForwardArgs:!0},toolbarOptions:{primaryGroup:l=>l.startsWith("navigation")},actionViewItemProvider:(l,c)=>rk(a,l,c)}))}setScrollLeft(e){this._modifiedContentWidth.get()-this._modifiedWidth.get()>this._originalContentWidth.get()-this._originalWidth.get()?this.editor.getModifiedEditor().setScrollLeft(e):this.editor.getOriginalEditor().setScrollLeft(e)}setData(e){this._data=e;function t(n){return{...n,scrollBeyondLastLine:!1,hideUnchangedRegions:{enabled:!0},scrollbar:{vertical:"hidden",horizontal:"hidden",handleMouseWheel:!1,useShadows:!1},renderOverviewRuler:!1,fixedOverflowWidgets:!0,overviewRulerBorder:!1}}if(!e){Ow(n=>{this._viewModel.set(void 0,n),this.editor.setDiffModel(null,n),this._dataStore.clear()});return}let i=e.viewModel.documentDiffItem;if(Ow(n=>{this._resourceLabel?.setUri(e.viewModel.modifiedUri??e.viewModel.originalUri,{strikethrough:e.viewModel.modifiedUri===void 0});let s=!1,r=!1,a=!1,l="";e.viewModel.modifiedUri&&e.viewModel.originalUri&&e.viewModel.modifiedUri.path!==e.viewModel.originalUri.path?(l="R",s=!0):e.viewModel.modifiedUri?e.viewModel.originalUri||(l="A",a=!0):(l="D",r=!0),this._elements.status.classList.toggle("renamed",s),this._elements.status.classList.toggle("deleted",r),this._elements.status.classList.toggle("added",a),this._elements.status.innerText=l,this._resourceLabel2?.setUri(s?e.viewModel.originalUri:void 0,{strikethrough:!0}),this._dataStore.clear(),this._viewModel.set(e.viewModel,n),this.editor.setDiffModel(e.viewModel.diffEditorViewModelRef,n),this.editor.updateOptions(t(i.options??{}))}),i.onOptionsDidChange&&this._dataStore.add(i.onOptionsDidChange(()=>{this.editor.updateOptions(t(i.options??{}))})),e.viewModel.isAlive.recomputeInitiallyAndOnChange(this._dataStore,n=>{n||this.setData(void 0)}),e.viewModel.documentDiffItem.contextKeys)for(let[n,s]of Object.entries(e.viewModel.documentDiffItem.contextKeys))this._contextKeyService.createKey(n,s)}render(e,t,i,n){this._elements.root.style.visibility="visible",this._elements.root.style.top=`${e.start}px`,this._elements.root.style.height=`${e.length}px`,this._elements.root.style.width=`${t}px`,this._elements.root.style.position="absolute";let s=e.length-this._headerHeight,r=Math.max(0,Math.min(n.start-e.start,s));this._elements.header.style.transform=`translateY(${r}px)`,Ow(a=>{this.editor.layout({width:t-16-2,height:e.length-this._outerEditorHeight})});try{this._isSettingScrollTop=!0,this._lastScrollTop=i,this.editor.getOriginalEditor().setScrollTop(i)}finally{this._isSettingScrollTop=!1}this._elements.header.classList.toggle("shadow",r>0||i>0),this._elements.header.classList.toggle("collapsed",r===s)}hide(){this._elements.root.style.top="-100000px",this._elements.root.style.visibility="hidden"}};UH=VHe([NEe(3,ie),NEe(4,Ce)],UH)});var $H,REe=x(()=>{$H=class{constructor(e){this._create=e,this._unused=new Set,this._used=new Set,this._itemData=new Map}getUnusedObj(e){let t;if(this._unused.size===0)t=this._create(e),this._itemData.set(t,e);else{let i=[...this._unused.values()];t=i.find(n=>this._itemData.get(n).getId()===e.getId())??i[0],this._unused.delete(t),this._itemData.set(t,e),t.setData(e)}return this._used.add(t),{object:t,dispose:()=>{this._used.delete(t),this._unused.size>5?t.dispose():this._unused.add(t)}}}dispose(){for(let e of this._used)e.dispose();for(let e of this._unused)e.dispose();this._used.clear(),this._unused.clear()}}});var AEe=x(()=>{});function UHe(o,e){let t=o.getModel(),i=o.createDecorationsCollection([{range:e,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout(()=>{o.getModel()===t&&i.clear()},350)}var zHe,MEe,Gk,dse,hse=x(()=>{re();Gc();qe();ha();Ae();W();et();C1();le();je();Ie();ny();Hi();gi();li();ud();cse();REe();AEe();Xn();Gt();vs();Jt();ei();zHe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},MEe=function(o,e){return function(t,i){e(t,i,o)}},Gk=class extends T{constructor(e,t,i,n,s,r){super(),this._element=e,this._dimension=t,this._viewModel=i,this._workbenchUIElementFactory=n,this._parentContextKeyService=s,this._parentInstantiationService=r,this._scrollableElements=Dt("div.scrollContent",[Dt("div@content",{style:{overflow:"hidden"}}),Dt("div.monaco-editor@overflowWidgetsDomNode",{})]),this._scrollable=this._register(new Yd({forceIntegerValues:!1,scheduleAtNextAnimationFrame:c=>ws(we(this._element),c),smoothScrollDuration:100})),this._scrollableElement=this._register(new Gf(this._scrollableElements.root,{vertical:1,horizontal:1,useShadows:!1},this._scrollable)),this._elements=Dt("div.monaco-component.multiDiffEditor",{},[Dt("div",{},[this._scrollableElement.getDomNode()]),Dt("div.placeholder@placeholder",{},[Dt("div")])]),this._sizeObserver=this._register(new Wk(this._element,void 0)),this._objectPool=this._register(new $H(c=>{let d=this._instantiationService.createInstance(UH,this._scrollableElements.content,this._scrollableElements.overflowWidgetsDomNode,this._workbenchUIElementFactory);return d.setData(c),d})),this.scrollTop=pt(this,this._scrollableElement.onScroll,()=>this._scrollableElement.getScrollPosition().scrollTop),this.scrollLeft=pt(this,this._scrollableElement.onScroll,()=>this._scrollableElement.getScrollPosition().scrollLeft),this._viewItemsInfo=V(this,c=>{let d=this._viewModel.read(c);if(!d)return{items:[],getItem:g=>{throw new xe}};let h=d.items.read(c),u=new Map;return{items:h.map(g=>{let p=c.store.add(new dse(g,this._objectPool,this.scrollLeft,b=>{this._scrollableElement.setScrollPosition({scrollTop:this._scrollableElement.getScrollPosition().scrollTop+b})})),_=this._lastDocStates?.[p.getKey()];return _&&Yt(b=>{p.setViewState(_,b)}),u.set(g,p),p}),getItem:g=>u.get(g)}}),this._viewItems=this._viewItemsInfo.map(this,c=>c.items),this._spaceBetweenPx=0,this._totalHeight=this._viewItems.map(this,(c,d)=>c.reduce((h,u)=>h+u.contentHeight.read(d)+this._spaceBetweenPx,0)),this.activeControl=V(this,c=>{let d=this._viewModel.read(c)?.activeDiffItem.read(c);return d?this._viewItemsInfo.read(c).getItem(d).template.read(c)?.editor:void 0}),this._contextKeyService=this._register(this._parentContextKeyService.createScoped(this._element)),this._instantiationService=this._register(this._parentInstantiationService.createChild(new ed([Ce,this._contextKeyService]))),this._contextKeyService.createKey(R.inMultiDiffEditor.key,!0),this._lastDocStates={},this._register(To((c,d)=>{let h=this._viewModel.read(c);if(h&&h.contextKeys)for(let[u,f]of Object.entries(h.contextKeys)){let g=this._contextKeyService.createKey(u,void 0);g.set(f),d.add(ne(()=>g.reset()))}}));let a=this._parentContextKeyService.createKey(R.multiDiffEditorAllCollapsed.key,!1);this._register(Se(c=>{let d=this._viewModel.read(c);if(d){let h=d.items.read(c).every(u=>u.collapsed.read(c));a.set(h)}})),this._register(Se(c=>{let d=this._dimension.read(c);this._sizeObserver.observe(d)}));let l=V(c=>{if(this._viewItems.read(c).length>0)return;let h=this._viewModel.read(c);return!h||h.isLoading.read(c)?m(161,"Loading..."):m(162,"No Changed Files")});this._register(Se(c=>{let d=l.read(c);this._elements.placeholder.innerText=d??"",this._elements.placeholder.classList.toggle("visible",!!d)})),this._scrollableElements.content.style.position="relative",this._register(Se(c=>{let d=this._sizeObserver.height.read(c);this._scrollableElements.root.style.height=`${d}px`;let h=this._totalHeight.read(c);this._scrollableElements.content.style.height=`${h}px`;let u=this._sizeObserver.width.read(c),f=u,g=this._viewItems.read(c),p=RE(g,Un(_=>_.maxScroll.read(c).maxScroll,is));if(p){let _=p.maxScroll.read(c);f=u+_.maxScroll}this._scrollableElement.setScrollDimensions({width:u,height:d,scrollHeight:h,scrollWidth:f})})),e.replaceChildren(this._elements.root),this._register(ne(()=>{e.replaceChildren()})),this._register(Se(c=>{let d=this._viewModel.read(c);if(d&&!d.isLoading.read(c)){if(d.items.read(c).length===0||d.activeDiffItem.read(c))return;this.goToNextChange()}})),this._register(this._register(Se(c=>{Ow(d=>{this.render(c)})})))}reveal(e,t){let i=this._viewItems.get(),n=i.findIndex(c=>c.viewModel.originalUri?.toString()===e.original?.toString()&&c.viewModel.modifiedUri?.toString()===e.modified?.toString());if(n===-1)throw new xe("Resource not found in diff editor");let s=i[n];this._viewModel.get().activeDiffItem.setCache(s.viewModel,void 0);let r=0;for(let c=0;cl.viewModel===i):-1;if(n===-1){this._goToFile(0,"first");return}let s=t[n];s.viewModel.collapsed.get()&&s.viewModel.collapsed.set(!1,void 0);let r=s.template.get()?.editor;if(r?.getDiffComputationResult()?.changes2?.length){let l=r.getModifiedEditor().getPosition()?.lineNumber||1,c=r.getDiffComputationResult().changes2;if(e==="next"?c.some(h=>h.modified.startLineNumber>l):c.some(h=>h.modified.endLineNumberExclusive<=l)){r.goToDiff(e);return}}let a=(n+(e==="next"?1:-1)+t.length)%t.length;this._goToFile(a,e==="next"?"first":"last")}_goToFile(e,t){let i=this._viewItems.get()[e];i.viewModel.collapsed.get()&&i.viewModel.collapsed.set(!1,void 0),this.reveal({original:i.viewModel.originalUri,modified:i.viewModel.modifiedUri});let n=i.template.get()?.editor;if(n?.getDiffComputationResult()?.changes2?.length)if(t==="first")n.revealFirstDiff();else{let s=n.getDiffComputationResult().changes2.at(-1),r=n.getModifiedEditor();r.setPosition({lineNumber:s.modified.startLineNumber,column:1}),r.revealLineInCenter(s.modified.startLineNumber)}n?.focus()}render(e){let t=this.scrollTop.read(e),i=0,n=0,s=0,r=this._sizeObserver.height.read(e),a=ke.ofStartAndLength(t,r),l=this._sizeObserver.width.read(e);for(let c of this._viewItems.read(e)){let d=c.contentHeight.read(e),h=Math.min(d,r),u=ke.ofStartAndLength(n,h),f=ke.ofStartAndLength(s,d);if(f.isBefore(a))i-=d-h,c.hide();else if(f.isAfter(a))c.hide();else{let g=Math.max(0,Math.min(a.start-f.start,d-h));i-=g;let p=ke.ofStartAndLength(t+i,r);c.render(u,g,l,p)}n+=h+this._spaceBetweenPx,s+=d+this._spaceBetweenPx}this._scrollableElements.content.style.transform=`translateY(${-(t+i)}px)`}};Gk=zHe([MEe(4,Ce),MEe(5,ie)],Gk);dse=class extends T{constructor(e,t,i,n){super(),this.viewModel=e,this._objectPool=t,this._scrollLeft=i,this._deltaScrollVertical=n,this._templateRef=this._register(kx(this,void 0)),this.contentHeight=V(this,s=>this._templateRef.read(s)?.object.contentHeight?.read(s)??this.viewModel.lastTemplateData.read(s).contentHeight),this.maxScroll=V(this,s=>this._templateRef.read(s)?.object.maxScroll.read(s)??{maxScroll:0,scrollWidth:0}),this.template=V(this,s=>this._templateRef.read(s)?.object),this._isHidden=_e(this,!1),this._isFocused=V(this,s=>this.template.read(s)?.isFocused.read(s)??!1),this.viewModel.setIsFocused(this._isFocused,void 0),this._register(Se(s=>{let r=this._scrollLeft.read(s);this._templateRef.read(s)?.object.setScrollLeft(r)})),this._register(Se(s=>{let r=this._templateRef.read(s);!r||!this._isHidden.read(s)||r.object.isFocused.read(s)||this._clear()}))}dispose(){this._clear(),super.dispose()}toString(){return`VirtualViewItem(${this.viewModel.documentDiffItem.modified?.uri.toString()})`}getKey(){return this.viewModel.getKey()}setViewState(e,t){this.viewModel.collapsed.set(e.collapsed,t),this._updateTemplateData(t);let i=this.viewModel.lastTemplateData.get(),n=e.selections?.map(me.liftSelection);this.viewModel.lastTemplateData.set({...i,selections:n},t);let s=this._templateRef.get();s&&n&&s.object.editor.setSelections(n)}_updateTemplateData(e){let t=this._templateRef.get();t&&this.viewModel.lastTemplateData.set({contentHeight:t.object.contentHeight.get(),selections:t.object.editor.getSelections()??void 0},e)}_clear(){let e=this._templateRef.get();e&&Yt(t=>{this._updateTemplateData(t),e.object.hide(),this._templateRef.set(void 0,t)})}hide(){this._isHidden.set(!0,void 0)}render(e,t,i,n){this._isHidden.set(!1,void 0);let s=this._templateRef.get();if(!s){s=this._objectPool.getUnusedObj(new zH(this.viewModel,this._deltaScrollVertical)),this._templateRef.set(s,void 0);let r=this.viewModel.lastTemplateData.get().selections;r&&s.object.editor.setSelections(r)}s.object.render(e,i,t,n)}}});var $He,qHe,qH,OEe=x(()=>{Bk();W();et();Ie();DEe();cse();hse();ei();Gt();Hr();$He=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},qHe=function(o,e){return function(t,i){e(t,i,o)}},qH=class extends T{constructor(e,t,i){super(),this._element=e,this._workbenchUIElementFactory=t,this._instantiationService=i,this._dimension=_e(this,void 0),this._viewModel=_e(this,void 0),this._widgetImpl=V(this,n=>n.store.add(this._instantiationService.createInstance(Ju(Gk),this._element,this._dimension,this._viewModel,this._workbenchUIElementFactory))),this._register(Su(this._widgetImpl))}};qH=$He([qHe(2,ie)],qH)});function jHe(o,e,t){return it.initialize(t||{}).createInstance(HH,o,e)}function KHe(o){return it.get(ot).onCodeEditorAdd(t=>{o(t)})}function GHe(o){return it.get(ot).onDiffEditorAdd(t=>{o(t)})}function YHe(){return it.get(ot).listCodeEditors()}function ZHe(){return it.get(ot).listDiffEditors()}function XHe(o,e,t){return it.initialize(t||{}).createInstance(VH,o,e)}function QHe(o,e){let t=it.initialize(e||{});return new qH(o,{},t)}function JHe(o){if(typeof o.id!="string"||typeof o.run!="function")throw new Error("Invalid command descriptor, `id` and `run` are required properties!");return st.registerCommand(o.id,o.run)}function e7e(o){if(typeof o.id!="string"||typeof o.label!="string"||typeof o.run!="function")throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");let e=G.deserialize(o.precondition),t=(n,...s)=>Gi.runEditorCommand(n,s,e,(r,a,l)=>Promise.resolve(o.run(a,...l))),i=new F;if(i.add(st.registerCommand(o.id,t)),o.contextMenuGroupId){let n={command:{id:o.id,title:o.label},when:e,group:o.contextMenuGroupId,order:o.contextMenuOrder||0};i.add(lo.appendMenuItem(Te.EditorContext,n))}if(Array.isArray(o.keybindings)){let n=it.get($e);if(!(n instanceof vv))console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService");else{let s=G.and(e,G.deserialize(o.keybindingContext));i.add(n.addDynamicKeybindings(o.keybindings.map(r=>({keybinding:r,command:o.id,when:s}))))}}return i}function t7e(o){return PEe([o])}function PEe(o){let e=it.get($e);return e instanceof vv?e.addDynamicKeybindings(o.map(t=>({keybinding:t.keybinding,command:t.command,commandArgs:t.commandArgs,when:G.deserialize(t.when)}))):(console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),T.None)}function i7e(o,e,t){let i=it.get(ri),n=i.getLanguageIdByMimeType(e)||e;return lse(it.get(ui),i,o,n,t)}function n7e(o,e){let t=it.get(ri),i=t.getLanguageIdByMimeType(e)||e||cs;o.setLanguage(t.createById(i))}function o7e(o,e,t){o&&it.get(za).changeOne(e,o.uri,t)}function s7e(o){it.get(za).changeAll(o,[])}function r7e(o){return it.get(za).read(o)}function a7e(o){return it.get(za).onMarkerChanged(o)}function l7e(o){return it.get(ui).getModel(o)}function c7e(){return it.get(ui).getModels()}function d7e(o){return it.get(ui).onModelAdded(o)}function h7e(o){return it.get(ui).onModelRemoved(o)}function u7e(o){return it.get(ui).onModelLanguageChanged(t=>{o({model:t.model,oldLanguage:t.oldLanguageId})})}function f7e(o){return w_e(it.get(ui),it.get(Z_),o)}function g7e(o,e){let t=it.get(ri),i=it.get(cr);return Xx.colorizeElement(i,t,o,e).then(()=>{i.registerEditorContainer(o)})}function m7e(o,e,t){let i=it.get(ri);return it.get(cr).registerEditorContainer(Tt.document.body),Xx.colorize(i,o,e,t)}function p7e(o,e,t=4){return it.get(cr).registerEditorContainer(Tt.document.body),Xx.colorizeModelLine(o,e,t)}function _7e(o){let e=Ti.get(o);return e||{getInitialState:()=>Hf,tokenize:(t,i,n)=>jx(o,n)}}function b7e(o,e){Ti.getOrCreate(e);let t=_7e(e),i=Eo(o),n=[],s=t.getInitialState();for(let r=0,a=i.length;r{if(!i)return null;let s=t.options?.selection,r;return s&&typeof s.endLineNumber=="number"&&typeof s.endColumn=="number"?r=s:s&&(r={lineNumber:s.startLineNumber,column:s.startColumn}),await o.openCodeEditor(i,t.resource,r)?i:null})}function FEe(){return{create:jHe,getEditors:YHe,getDiffEditors:ZHe,onDidCreateEditor:KHe,onDidCreateDiffEditor:GHe,createDiffEditor:XHe,addCommand:JHe,addEditorAction:e7e,addKeybindingRule:t7e,addKeybindingRules:PEe,createModel:i7e,setModelLanguage:n7e,setModelMarkers:o7e,getModelMarkers:r7e,removeAllMarkers:s7e,onDidChangeMarkers:a7e,getModels:c7e,getModel:l7e,onDidCreateModel:d7e,onWillDisposeModel:h7e,onDidChangeModelLanguage:u7e,createWebWorker:f7e,colorizeElement:g7e,colorize:m7e,colorizeModelLine:p7e,tokenize:b7e,defineTheme:v7e,setTheme:w7e,remeasureFonts:C7e,registerCommand:y7e,registerLinkOpener:S7e,registerEditorOpener:x7e,AccessibilitySupport:n2,ContentWidgetPositionPreference:c2,CursorChangeReason:d2,DefaultEndOfLine:h2,EditorAutoIndentStrategy:f2,EditorOption:g2,EndOfLinePreference:m2,EndOfLineSequence:p2,MinimapPosition:E2,MinimapSectionHeaderStyle:T2,MouseTargetType:D2,OverlayWidgetPositionPreference:A2,OverviewRulerLane:M2,GlyphMarginLane:_2,RenderLineNumbersType:F2,RenderMinimap:B2,ScrollbarVisibility:H2,ScrollType:W2,TextEditorCursorBlinkingStyle:K2,TextEditorCursorStyle:G2,TrackedRangeStickiness:Y2,WrappingIndent:Z2,InjectedTextCursorStops:w2,PositionAffinity:P2,ShowLightbulbIconMode:z2,TextDirection:j2,ConfigurationChangedEvent:lx,BareFontInfo:C_,FontInfo:wm,TextModelResolvedOptions:nb,FindMatch:Nf,ApplyUpdateResult:S_,EditorZoom:Ia,createMultiFileDiffEditor:QHe,EditorType:jm,EditorOptions:bs}}var BEe=x(()=>{br();W();He();ai();Ege();JK();lt();ao();C_e();Uo();sx();Cm();$E();Ci();xr();zd();Kx();ho();Ra();X2();N_e();TEe();ON();gv();yi();Ii();je();Oi();Xu();eh();OEe();gP()});function k7e(o,e){if(!e||!Array.isArray(e))return!1;for(let t of e)if(!o(t))return!1;return!0}function jH(o,e){return typeof o=="boolean"?o:e}function WEe(o,e){return typeof o=="string"?o:e}function L7e(o){let e={};for(let t of o)e[t]=!0;return e}function HEe(o,e=!1){e&&(o=o.map(function(i){return i.toLowerCase()}));let t=L7e(o);return e?function(i){return t[i.toLowerCase()]!==void 0&&t.hasOwnProperty(i.toLowerCase())}:function(i){return t[i]!==void 0&&t.hasOwnProperty(i)}}function use(o,e,t){e=e.replace(/@@/g,"");let i=0,n;do n=!1,e=e.replace(/@(\w+)/g,function(r,a){n=!0;let l="";if(typeof o[a]=="string")l=o[a];else if(o[a]&&o[a]instanceof RegExp)l=o[a].source;else throw o[a]===void 0?Sn(o,"language definition does not contain attribute '"+a+"', used at: "+e):Sn(o,"attribute reference '"+a+"' must be a string, used at: "+e);return _b(l)?"":"(?:"+l+")"}),i++;while(n&&i<5);e=e.replace(/\x01/g,"@");let s=(o.ignoreCase?"i":"")+(o.unicode?"u":"");if(t&&e.match(/\$[sS](\d\d?)/g)){let a=null,l=null;return c=>(l&&a===c||(a=c,l=new RegExp(I_e(o,e,c),s)),l)}return new RegExp(e,s)}function I7e(o,e,t,i){if(i<0)return o;if(i=100){i=i-100;let n=t.split(".");if(n.unshift(t),i=0&&(i.tokenSubst=!0),typeof t.bracket=="string")if(t.bracket==="@open")i.bracket=1;else if(t.bracket==="@close")i.bracket=-1;else throw Sn(o,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+e);if(t.next){if(typeof t.next!="string")throw Sn(o,"the next state must be a string value in rule: "+e);{let n=t.next;if(!/^(@pop|@push|@popall)$/.test(n)&&(n[0]==="@"&&(n=n.substr(1)),n.indexOf("$")<0&&!E_e(o,Vf(o,n,"",[],""))))throw Sn(o,"the next state '"+t.next+"' is not defined in rule: "+e);i.next=n}}return typeof t.goBack=="number"&&(i.goBack=t.goBack),typeof t.switchTo=="string"&&(i.switchTo=t.switchTo),typeof t.log=="string"&&(i.log=t.log),typeof t.nextEmbedded=="string"&&(i.nextEmbedded=t.nextEmbedded,o.usesEmbedded=!0),i}}else if(Array.isArray(t)){let i=[];for(let n=0,s=t.length;n=1&&c.length<=3)if(h.setRegex(i,c[0]),c.length>=3)if(typeof c[1]=="string")h.setAction(i,{token:c[1],next:c[2]});else if(typeof c[1]=="object"){let u=c[1];u.next=c[2],h.setAction(i,u)}else throw Sn(t,"a next state as the last element of a rule can only be given if the action is either an object or a string, at: "+r);else h.setAction(i,c[1]);else{if(!c.regex)throw Sn(t,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+r);c.name&&typeof c.name=="string"&&(h.name=c.name),c.matchOnlyAtStart&&(h.matchOnlyAtLineStart=jH(c.matchOnlyAtLineStart,!1)),h.setRegex(i,c.regex),h.setAction(i,c.action)}a.push(h)}}}if(!e.tokenizer||typeof e.tokenizer!="object")throw Sn(t,"a language definition must define the 'tokenizer' attribute as an object");t.tokenizer=[];for(let r in e.tokenizer)if(e.tokenizer.hasOwnProperty(r)){t.start||(t.start=r);let a=e.tokenizer[r];t.tokenizer[r]=new Array,n("tokenizer."+r,t.tokenizer[r],a)}if(t.usesEmbedded=i.usesEmbedded,e.brackets){if(!Array.isArray(e.brackets))throw Sn(t,"the 'brackets' attribute must be defined as an array")}else e.brackets=[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}];let s=[];for(let r of e.brackets){let a=r;if(a&&Array.isArray(a)&&a.length===3&&(a={token:a[2],open:a[0],close:a[1]}),a.open===a.close)throw Sn(t,"open and close brackets in a 'brackets' attribute must be different: "+a.open+` + hint: use the 'bracket' attribute if matching on equal brackets is required.`);if(typeof a.open=="string"&&typeof a.token=="string"&&typeof a.close=="string")s.push({token:a.token+t.tokenPostfix,open:Mu(t,a.open),close:Mu(t,a.close)});else throw Sn(t,"every element in the 'brackets' array must be a '{open,close,token}' object or array")}return t.brackets=s,t.noThrow=!0,t}var gse,VEe=x(()=>{Rt();WY();gse=class{constructor(e){this.regex=new RegExp(""),this.action={token:""},this.matchOnlyAtLineStart=!1,this.name="",this.name=e}setRegex(e,t){let i;if(typeof t=="string")i=t;else if(t instanceof RegExp)i=t.source;else throw Sn(e,"rules must start with a match string or regular expression: "+this.name);this.matchOnlyAtLineStart=i.length>0&&i[0]==="^",this.name=this.name+": "+i,this.regex=use(e,"^(?:"+(this.matchOnlyAtLineStart?i.substr(1):i)+")",!0)}setAction(e,t){this.action=fse(e,this.name,t)}resolveRegex(e){return this.regex instanceof RegExp?this.regex:this.regex(e)}}});function T7e(o){eb.registerLanguage(o)}function D7e(){let o=[];return o=o.concat(eb.getLanguages()),o}function N7e(o){return it.get(ri).languageIdCodec.encodeLanguageId(o)}function R7e(o,e){return it.withServices(()=>{let i=it.get(ri).onDidRequestRichLanguageFeatures(n=>{n===o&&(i.dispose(),e())});return i})}function A7e(o,e){return it.withServices(()=>{let i=it.get(ri).onDidRequestBasicLanguageFeatures(n=>{n===o&&(i.dispose(),e())});return i})}function M7e(o,e){if(!it.get(ri).isRegisteredLanguageId(o))throw new Error(`Cannot set configuration for unknown language ${o}`);return it.get(zt).register(o,e,100)}function O7e(o){return typeof o.getInitialState=="function"}function P7e(o){return"tokenizeEncoded"in o}function zEe(o){return o&&typeof o.then=="function"}function F7e(o){let e=it.get(cr);if(o){let t=[null];for(let i=1,n=o.length;i{let i=await Promise.resolve(e.create());return i?O7e(i)?UEe(o,i):new dC(it.get(ri),it.get(cr),o,mse(o,i),it.get(Me)):null});return Ti.registerFactory(o,t)}function B7e(o,e){if(!it.get(ri).isRegisteredLanguageId(o))throw new Error(`Cannot set tokens provider for unknown language ${o}`);return zEe(e)?_se(o,{create:()=>e}):Ti.register(o,UEe(o,e))}function W7e(o,e){let t=i=>new dC(it.get(ri),it.get(cr),o,mse(o,i),it.get(Me));return zEe(e)?_se(o,{create:()=>e}):Ti.register(o,t(e))}function H7e(o,e){return it.get(be).referenceProvider.register(o,e)}function V7e(o,e){return it.get(be).renameProvider.register(o,e)}function z7e(o,e){return it.get(be).newSymbolNamesProvider.register(o,e)}function U7e(o,e){return it.get(be).signatureHelpProvider.register(o,e)}function $7e(o,e){return it.get(be).hoverProvider.register(o,{provideHover:async(i,n,s,r)=>{let a=i.getWordAtPosition(n);return Promise.resolve(e.provideHover(i,n,s,r)).then(l=>{if(l)return!l.range&&a&&(l.range=new S(n.lineNumber,a.startColumn,n.lineNumber,a.endColumn)),l.range||(l.range=new S(n.lineNumber,n.column,n.lineNumber,n.column)),l})}})}function q7e(o,e){return it.get(be).documentSymbolProvider.register(o,e)}function j7e(o,e){return it.get(be).documentHighlightProvider.register(o,e)}function K7e(o,e){return it.get(be).linkedEditingRangeProvider.register(o,e)}function G7e(o,e){return it.get(be).definitionProvider.register(o,e)}function Y7e(o,e){return it.get(be).implementationProvider.register(o,e)}function Z7e(o,e){return it.get(be).typeDefinitionProvider.register(o,e)}function X7e(o,e){return it.get(be).codeLensProvider.register(o,e)}function Q7e(o,e,t){return it.get(be).codeActionProvider.register(o,{providedCodeActionKinds:t?.providedCodeActionKinds,documentation:t?.documentation,provideCodeActions:(n,s,r,a)=>{let c=it.get(za).read({resource:n.uri}).filter(d=>S.areIntersectingOrTouching(d,s));return e.provideCodeActions(n,s,{markers:c,only:r.only,trigger:r.trigger},a)},resolveCodeAction:e.resolveCodeAction})}function J7e(o,e){return it.get(be).documentFormattingEditProvider.register(o,e)}function eVe(o,e){return it.get(be).documentRangeFormattingEditProvider.register(o,e)}function tVe(o,e){return it.get(be).onTypeFormattingEditProvider.register(o,e)}function iVe(o,e){return it.get(be).linkProvider.register(o,e)}function nVe(o,e){return it.get(be).completionProvider.register(o,e)}function oVe(o,e){return it.get(be).colorProvider.register(o,e)}function sVe(o,e){return it.get(be).foldingRangeProvider.register(o,e)}function rVe(o,e){return it.get(be).declarationProvider.register(o,e)}function aVe(o,e){return it.get(be).selectionRangeProvider.register(o,e)}function lVe(o,e){return it.get(be).documentSemanticTokensProvider.register(o,e)}function cVe(o,e){return it.get(be).documentRangeSemanticTokensProvider.register(o,e)}function dVe(o,e){return it.get(be).inlineCompletionsProvider.register(o,e)}function hVe(o,e){return it.get(be).inlayHintsProvider.register(o,e)}function $Ee(){return{register:T7e,getLanguages:D7e,onLanguage:R7e,onLanguageEncountered:A7e,getEncodedLanguageId:N7e,setLanguageConfiguration:M7e,setColorMap:F7e,registerTokensProviderFactory:_se,setTokensProvider:B7e,setMonarchTokensProvider:W7e,registerReferenceProvider:H7e,registerRenameProvider:V7e,registerNewSymbolNameProvider:z7e,registerCompletionItemProvider:nVe,registerSignatureHelpProvider:U7e,registerHoverProvider:$7e,registerDocumentSymbolProvider:q7e,registerDocumentHighlightProvider:j7e,registerLinkedEditingRangeProvider:K7e,registerDefinitionProvider:G7e,registerImplementationProvider:Y7e,registerTypeDefinitionProvider:Z7e,registerCodeLensProvider:X7e,registerCodeActionProvider:Q7e,registerDocumentFormattingEditProvider:J7e,registerDocumentRangeFormattingEditProvider:eVe,registerOnTypeFormattingEditProvider:tVe,registerLinkProvider:iVe,registerColorProvider:oVe,registerFoldingRangeProvider:sVe,registerDeclarationProvider:rVe,registerSelectionRangeProvider:aVe,registerDocumentSemanticTokensProvider:lVe,registerDocumentRangeSemanticTokensProvider:cVe,registerInlineCompletionsProvider:dVe,registerInlayHintsProvider:hVe,DocumentHighlightKind:u2,CompletionItemKind:r2,CompletionItemTag:a2,CompletionItemInsertTextRule:s2,SymbolKind:$2,SymbolTag:q2,IndentAction:v2,CompletionTriggerKind:l2,SignatureHelpTriggerKind:U2,InlayHintKind:C2,InlineCompletionTriggerKind:x2,CodeActionTriggerType:o2,NewSymbolNameTag:N2,NewSymbolNameTriggerKind:R2,PartialAcceptTriggerKind:O2,HoverVerbosityAction:b2,InlineCompletionEndOfLifeReasonKind:y2,InlineCompletionHintStyle:S2,FoldingRangeKind:bu,SelectedSuggestionInfo:hx,EditDeltaInfo:s0}}var pse,KH,qEe=x(()=>{Yi();ue();Ci();xr();Do();zd();Ut();X2();ON();VEe();UY();gv();oi();Xu();Xd();pse=class{constructor(e,t){this._languageId=e,this._actual=t}dispose(){}getInitialState(){return this._actual.getInitialState()}tokenize(e,t,i){if(typeof this._actual.tokenize=="function")return KH.adaptTokenize(this._languageId,this._actual,e,i);throw new Error("Not supported!")}tokenizeEncoded(e,t,i){let n=this._actual.tokenizeEncoded(e,i);return new Lm(n.tokens,[],n.endState)}},KH=class o{constructor(e,t,i,n){this._languageId=e,this._actual=t,this._languageService=i,this._standaloneThemeService=n}dispose(){}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(e,t){let i=[],n=0;for(let s=0,r=e.length;s0&&s[r-1]===u)continue;let f=h.startIndex;c===0?f=0:f{lt();je();Vt();tc();Ie();Qo();le();bse=Ne("IEditorCancelService"),jEe=new fe("cancellableOperation",!1,m(978,"Whether the editor runs a cancellable operation, e.g. like 'Peek References'"));Je(bse,class{constructor(){this._tokens=new WeakMap}add(o,e){let t=this._tokens.get(o);t||(t=o.invokeWithinContext(n=>{let s=jEe.bindTo(n.get(Ce)),r=new In;return{key:s,tokens:r}}),this._tokens.set(o,t));let i;return t.key.set(!0),i=t.tokens.push(e),()=>{i&&(i(),t.key.set(!t.tokens.isEmpty()),i=void 0)}}cancel(o){let e=this._tokens.get(o);if(!e)return;let t=e.tokens.pop();t&&(t.cancel(),e.key.set(!e.tokens.isEmpty()))}},1);GH=class extends Lt{constructor(e,t){super(t),this.editor=e,this._unregister=e.invokeWithinContext(i=>i.get(bse).add(e,this))}dispose(){this._unregister(),super.dispose()}};ye(new class extends Gi{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:jEe})}runEditorCommand(o,e){o.get(bse).cancel(e)}})});var Yk,ul,Jy,zg=x(()=>{He();ue();Vt();W();KEe();Yk=class o{constructor(e,t){if(this.flags=t,(this.flags&1)!==0){let i=e.getModel();this.modelVersionId=i?Rd("{0}#{1}",i.uri.toString(),i.getVersionId()):null}else this.modelVersionId=null;(this.flags&4)!==0?this.position=e.getPosition():this.position=null,(this.flags&2)!==0?this.selection=e.getSelection():this.selection=null,(this.flags&8)!==0?(this.scrollLeft=e.getScrollLeft(),this.scrollTop=e.getScrollTop()):(this.scrollLeft=-1,this.scrollTop=-1)}_equals(e){if(!(e instanceof o))return!1;let t=e;return!(this.modelVersionId!==t.modelVersionId||this.scrollLeft!==t.scrollLeft||this.scrollTop!==t.scrollTop||!this.position&&t.position||this.position&&!t.position||this.position&&t.position&&!this.position.equals(t.position)||!this.selection&&t.selection||this.selection&&!t.selection||this.selection&&t.selection&&!this.selection.equalsRange(t.selection))}validate(e){return this._equals(new o(e,this.flags))}},ul=class extends GH{constructor(e,t,i,n){super(e,n),this._listener=new F,t&4&&this._listener.add(e.onDidChangeCursorPosition(s=>{(!i||!S.containsPosition(i,s.position))&&this.cancel()})),t&2&&this._listener.add(e.onDidChangeCursorSelection(s=>{(!i||!S.containsRange(i,s.selection))&&this.cancel()})),t&8&&this._listener.add(e.onDidScrollChange(s=>this.cancel())),t&1&&(this._listener.add(e.onDidChangeModel(s=>this.cancel())),this._listener.add(e.onDidChangeModelContent(s=>this.cancel())))}dispose(){this._listener.dispose(),super.dispose()}},Jy=class extends Lt{constructor(e,t){super(t),this._listener=e.onDidChangeContent(()=>this.cancel())}dispose(){this._listener.dispose(),super.dispose()}}});var eS,vse=x(()=>{lh();ue();Gy();eS=class o{static _handleEolEdits(e,t){let i,n=[];for(let s of t)typeof s.eol=="number"&&(i=s.eol),s.range&&typeof s.text=="string"&&n.push(s);return typeof i=="number"&&e.hasModel()&&e.getModel().pushEOL(i),n}static _isFullModelReplaceEdit(e,t){if(!e.hasModel())return!1;let i=e.getModel(),n=i.validateRange(t.range);return i.getFullModelRange().equalsRange(n)}static execute(e,t,i){i&&e.pushUndoStop();let n=Gl.capture(e),s=o._handleEolEdits(e,t);s.length===1&&o._isFullModelReplaceEdit(e,s[0])?e.executeEdits("formatEditsCommand",s.map(r=>Ni.replace(S.lift(r.range),r.text))):e.executeEdits("formatEditsCommand",s.map(r=>Ni.replaceMove(S.lift(r.range),r.text))),i&&e.pushUndoStop(),n.restoreRelativeVerticalPositionOfCursor(e)}}});var YH,ZH,GEe=x(()=>{YH=class{constructor(e){this.value=e,this._lower=e.toLowerCase()}static toKey(e){return typeof e=="string"?e.toLowerCase():e._lower}},ZH=class{constructor(e){if(this._set=new Set,e)for(let t of e)this.add(t)}add(e){this._set.add(YH.toKey(e))}has(e){return this._set.has(YH.toKey(e))}}});function YEe(o,e,t){let i=[],n=new ZH,s=o.ordered(t);for(let a of s)i.push(a),a.extensionId&&n.add(a.extensionId);let r=e.ordered(t);for(let a of r){if(a.extensionId){if(n.has(a.extensionId))continue;n.add(a.extensionId)}i.push({displayName:a.displayName,extensionId:a.extensionId,provideDocumentFormattingEdits(l,c,d){return a.provideDocumentRangeFormattingEdits(l,l.getFullModelRange(),c,d)}})}return i}async function wse(o,e,t,i,n,s,r){let a=o.get(ie),{documentRangeFormattingEditProvider:l}=o.get(be),c=gd(e)?e.getModel():e,d=l.ordered(c),h=await Zk.select(d,c,i,2);h&&(n.report(h),await a.invokeFunction(uVe,h,e,t,s,r))}async function uVe(o,e,t,i,n,s){let r=o.get(Jo),a=o.get(Ot),l=o.get(ll),c,d;gd(t)?(c=t.getModel(),d=new ul(t,5,void 0,n)):(c=t,d=new Jy(t,n));let h=[],u=0;for(let b of JS(i).sort(S.compareRangesUsingStarts))u>0&&S.areIntersectingOrTouching(h[u-1],b)?h[u-1]=S.fromPositions(h[u-1].getStartPosition(),b.getEndPosition()):u=h.push(b);let f=async b=>{a.trace("[format][provideDocumentRangeFormattingEdits] (request)",e.extensionId?.value,b);let v=await e.provideDocumentRangeFormattingEdits(c,b,c.getFormattingOptions(),d.token)||[];return a.trace("[format][provideDocumentRangeFormattingEdits] (response)",e.extensionId?.value,v),v},g=(b,v)=>{if(!b.length||!v.length)return!1;let w=b.reduce((C,y)=>S.plusRange(C,y.range),b[0].range);if(!v.some(C=>S.intersectRanges(w,C.range)))return!1;for(let C of b)for(let y of v)if(S.intersectRanges(C.range,y.range))return!0;return!1},p=[],_=[];try{if(typeof e.provideDocumentRangesFormattingEdits=="function"){a.trace("[format][provideDocumentRangeFormattingEdits] (request)",e.extensionId?.value,h);let b=await e.provideDocumentRangesFormattingEdits(c,h,c.getFormattingOptions(),d.token)||[];a.trace("[format][provideDocumentRangeFormattingEdits] (response)",e.extensionId?.value,b),_.push(b)}else{for(let b of h){if(d.token.isCancellationRequested)return!0;_.push(await f(b))}for(let b=0;b({text:w.text,range:S.lift(w.range),forceMoveMarkers:!0})),w=>{for(let{range:C}of w)if(S.areIntersectingOrTouching(C,v))return[new me(C.startLineNumber,C.startColumn,C.endLineNumber,C.endColumn)];return null})}return l.playSignal(qs.format,{userGesture:s}),!0}async function ZEe(o,e,t,i,n,s){let r=o.get(ie),a=o.get(be),l=gd(e)?e.getModel():e,c=YEe(a.documentFormattingEditProvider,a.documentRangeFormattingEditProvider,l),d=await Zk.select(c,l,t,1);d&&(i.report(d),await r.invokeFunction(fVe,d,e,t,n,s))}async function fVe(o,e,t,i,n,s){let r=o.get(Jo),a=o.get(ll),l,c;gd(t)?(l=t.getModel(),c=new ul(t,5,void 0,n)):(l=t,c=new Jy(t,n));let d;try{let h=await e.provideDocumentFormattingEdits(l,l.getFormattingOptions(),c.token);if(d=await r.computeMoreMinimalEdits(l.uri,h),c.token.isCancellationRequested)return!0}finally{c.dispose()}if(!d||d.length===0)return!1;if(gd(t))eS.execute(t,d,i!==2),i!==2&&t.revealPositionInCenterIfOutsideViewport(t.getPosition(),1);else{let[{range:h}]=d,u=new me(h.startLineNumber,h.startColumn,h.endLineNumber,h.endColumn);l.pushEditOperations([u],d.map(f=>({text:f.text,range:S.lift(f.range),forceMoveMarkers:!0})),f=>{for(let{range:g}of f)if(S.areIntersectingOrTouching(g,u))return[new me(g.startLineNumber,g.startColumn,g.endLineNumber,g.endColumn)];return null})}return a.playSignal(qs.format,{userGesture:s}),!0}async function gVe(o,e,t,i,n,s){let r=e.documentRangeFormattingEditProvider.ordered(t);for(let a of r){let l=await Promise.resolve(a.provideDocumentRangeFormattingEdits(t,i,n,s)).catch(ni);if(no(l))return await o.computeMoreMinimalEdits(t.uri,l)}}async function mVe(o,e,t,i,n){let s=YEe(e.documentFormattingEditProvider,e.documentRangeFormattingEditProvider,t);for(let r of s){let a=await Promise.resolve(r.provideDocumentFormattingEdits(t,i,n)).catch(ni);if(no(a))return await o.computeMoreMinimalEdits(t.uri,a)}}function Cse(o,e,t,i,n,s,r){let a=e.onTypeFormattingEditProvider.ordered(t);return a.length===0||a[0].autoFormatTriggerCharacters.indexOf(n)<0?Promise.resolve(void 0):Promise.resolve(a[0].provideOnTypeFormattingEdits(t,i,n,s,r)).catch(ni).then(l=>o.computeMoreMinimalEdits(t.uri,l))}function pVe(o){let e=o;return!!e&&typeof e=="object"&&typeof e.tabSize=="number"&&typeof e.insertSpaces=="boolean"}function yse(o,e){let t;if(pVe(o))t=o;else{let i=e.object.textEditorModel.getOptions();t={tabSize:i.tabSize,insertSpaces:i.insertSpaces}}return t}var Zk,Sse=x(()=>{qe();Vt();Ae();oa();tc();Rt();ai();zg();Qy();Pe();ue();gi();Ou();Il();vse();Ii();GEe();Ie();Ut();So();Ip();Zk=class o{static{this._selectors=new In}static setFormatterSelector(e){return{dispose:o._selectors.unshift(e)}}static async select(e,t,i,n){if(e.length===0)return;let s=ut.first(o._selectors);if(s)return await s(e,t,i,n)}};st.registerCommand("_executeFormatRangeProvider",async function(o,...e){let[t,i,n]=e;bt(Le.isUri(t)),bt(S.isIRange(i));let s=o.get(Hn),r=o.get(Jo),a=o.get(be),l=await s.createModelReference(t);try{return gVe(r,a,l.object.textEditorModel,S.lift(i),yse(n,l),Xe.None)}finally{l.dispose()}});st.registerCommand("_executeFormatDocumentProvider",async function(o,...e){let[t,i]=e;bt(Le.isUri(t));let n=o.get(Hn),s=o.get(Jo),r=o.get(be),a=await n.createModelReference(t);try{return mVe(s,r,a.object.textEditorModel,yse(i,a),Xe.None)}finally{a.dispose()}});st.registerCommand("_executeFormatOnTypeProvider",async function(o,...e){let[t,i,n,s]=e;bt(Le.isUri(t)),bt(M.isIPosition(i)),bt(typeof n=="string");let r=o.get(Hn),a=o.get(Jo),l=o.get(be),c=await r.createModelReference(t);try{return Cse(a,l,c.object.textEditorModel,M.lift(i),n,yse(s,c),Xe.None)}finally{c.dispose()}})});var dTe={};nt(dTe,{CancellationTokenSource:()=>XEe,Emitter:()=>QEe,KeyCode:()=>JEe,KeyMod:()=>eTe,MarkerSeverity:()=>sTe,MarkerTag:()=>rTe,Position:()=>tTe,Range:()=>iTe,Selection:()=>nTe,SelectionDirection:()=>oTe,Token:()=>lTe,Uri:()=>aTe,editor:()=>cTe,languages:()=>Ei});var fl,XEe,QEe,JEe,eTe,tTe,iTe,nTe,oTe,sTe,rTe,aTe,lTe,cTe,Ei,_Ve,Xk,md=x(()=>{Uo();tK();BEe();qEe();Sse();Ns();bs.wrappingIndent.defaultValue=0;bs.glyphMargin.defaultValue=!1;bs.autoIndent.defaultValue=3;bs.overviewRulerLanes.defaultValue=2;Zk.setFormatterSelector((o,e,t)=>Promise.resolve(o[0]));fl=Q2();fl.editor=FEe();fl.languages=$Ee();XEe=fl.CancellationTokenSource,QEe=fl.Emitter,JEe=fl.KeyCode,eTe=fl.KeyMod,tTe=fl.Position,iTe=fl.Range,nTe=fl.Selection,oTe=fl.SelectionDirection,sTe=fl.MarkerSeverity,rTe=fl.MarkerTag,aTe=fl.Uri,lTe=fl.Token,cTe=fl.editor,Ei=fl.languages,_Ve=Dw(),Xk=globalThis;(_Ve?.globalAPI||typeof Xk.define=="function"&&Xk.define.amd)&&(Xk.monaco=fl);typeof Xk.require<"u"&&typeof Xk.require.config=="function"&&Xk.require.config({ignoreDuplicateModules:["vscode-languageserver-types","vscode-languageserver-types/main","vscode-languageserver-textdocument","vscode-languageserver-textdocument/main","vscode-nls","vscode-nls/vscode-nls","jsonc-parser","jsonc-parser/main","vscode-uri","vscode-uri/index","vs/basic-languages/typescript/typescript"]})});var uTe={};nt(uTe,{conf:()=>bVe,language:()=>vVe});var bVe,vVe,fTe=x(()=>{bVe={comments:{lineComment:"*"},brackets:[["[","]"],["(",")"]]},vVe={defaultToken:"invalid",ignoreCase:!0,tokenPostfix:".abap",keywords:["abap-source","abbreviated","abstract","accept","accepting","according","activation","actual","add","add-corresponding","adjacent","after","alias","aliases","align","all","allocate","alpha","analysis","analyzer","and","append","appendage","appending","application","archive","area","arithmetic","as","ascending","aspect","assert","assign","assigned","assigning","association","asynchronous","at","attributes","authority","authority-check","avg","back","background","backup","backward","badi","base","before","begin","between","big","binary","bintohex","bit","black","blank","blanks","blob","block","blocks","blue","bound","boundaries","bounds","boxed","break-point","buffer","by","bypassing","byte","byte-order","call","calling","case","cast","casting","catch","center","centered","chain","chain-input","chain-request","change","changing","channels","character","char-to-hex","check","checkbox","ci_","circular","class","class-coding","class-data","class-events","class-methods","class-pool","cleanup","clear","client","clob","clock","close","coalesce","code","coding","col_background","col_group","col_heading","col_key","col_negative","col_normal","col_positive","col_total","collect","color","column","columns","comment","comments","commit","common","communication","comparing","component","components","compression","compute","concat","concat_with_space","concatenate","cond","condense","condition","connect","connection","constants","context","contexts","continue","control","controls","conv","conversion","convert","copies","copy","corresponding","country","cover","cpi","create","creating","critical","currency","currency_conversion","current","cursor","cursor-selection","customer","customer-function","dangerous","data","database","datainfo","dataset","date","dats_add_days","dats_add_months","dats_days_between","dats_is_valid","daylight","dd/mm/yy","dd/mm/yyyy","ddmmyy","deallocate","decimal_shift","decimals","declarations","deep","default","deferred","define","defining","definition","delete","deleting","demand","department","descending","describe","destination","detail","dialog","directory","disconnect","display","display-mode","distinct","divide","divide-corresponding","division","do","dummy","duplicate","duplicates","duration","during","dynamic","dynpro","edit","editor-call","else","elseif","empty","enabled","enabling","encoding","end","endat","endcase","endcatch","endchain","endclass","enddo","endenhancement","end-enhancement-section","endexec","endform","endfunction","endian","endif","ending","endinterface","end-lines","endloop","endmethod","endmodule","end-of-definition","end-of-editing","end-of-file","end-of-page","end-of-selection","endon","endprovide","endselect","end-test-injection","end-test-seam","endtry","endwhile","endwith","engineering","enhancement","enhancement-point","enhancements","enhancement-section","entries","entry","enum","environment","equiv","errormessage","errors","escaping","event","events","exact","except","exception","exceptions","exception-table","exclude","excluding","exec","execute","exists","exit","exit-command","expand","expanding","expiration","explicit","exponent","export","exporting","extend","extended","extension","extract","fail","fetch","field","field-groups","fields","field-symbol","field-symbols","file","filter","filters","filter-table","final","find","first","first-line","fixed-point","fkeq","fkge","flush","font","for","form","format","forward","found","frame","frames","free","friends","from","function","functionality","function-pool","further","gaps","generate","get","giving","gkeq","gkge","global","grant","green","group","groups","handle","handler","harmless","hashed","having","hdb","header","headers","heading","head-lines","help-id","help-request","hextobin","hide","high","hint","hold","hotspot","icon","id","identification","identifier","ids","if","ignore","ignoring","immediately","implementation","implementations","implemented","implicit","import","importing","in","inactive","incl","include","includes","including","increment","index","index-line","infotypes","inheriting","init","initial","initialization","inner","inout","input","insert","instance","instances","instr","intensified","interface","interface-pool","interfaces","internal","intervals","into","inverse","inverted-date","is","iso","job","join","keep","keeping","kernel","key","keys","keywords","kind","language","last","late","layout","leading","leave","left","left-justified","leftplus","leftspace","legacy","length","let","level","levels","like","line","lines","line-count","linefeed","line-selection","line-size","list","listbox","list-processing","little","llang","load","load-of-program","lob","local","locale","locator","logfile","logical","log-point","long","loop","low","lower","lpad","lpi","ltrim","mail","main","major-id","mapping","margin","mark","mask","match","matchcode","max","maximum","medium","members","memory","mesh","message","message-id","messages","messaging","method","methods","min","minimum","minor-id","mm/dd/yy","mm/dd/yyyy","mmddyy","mode","modif","modifier","modify","module","move","move-corresponding","multiply","multiply-corresponding","name","nametab","native","nested","nesting","new","new-line","new-page","new-section","next","no","no-display","no-extension","no-gap","no-gaps","no-grouping","no-heading","no-scrolling","no-sign","no-title","no-topofpage","no-zero","node","nodes","non-unicode","non-unique","not","null","number","object","objects","obligatory","occurrence","occurrences","occurs","of","off","offset","ole","on","only","open","option","optional","options","or","order","other","others","out","outer","output","output-length","overflow","overlay","pack","package","pad","padding","page","pages","parameter","parameters","parameter-table","part","partially","pattern","percentage","perform","performing","person","pf1","pf10","pf11","pf12","pf13","pf14","pf15","pf2","pf3","pf4","pf5","pf6","pf7","pf8","pf9","pf-status","pink","places","pool","pos_high","pos_low","position","pragmas","precompiled","preferred","preserving","primary","print","print-control","priority","private","procedure","process","program","property","protected","provide","public","push","pushbutton","put","queue-only","quickinfo","radiobutton","raise","raising","range","ranges","read","reader","read-only","receive","received","receiver","receiving","red","redefinition","reduce","reduced","ref","reference","refresh","regex","reject","remote","renaming","replace","replacement","replacing","report","request","requested","reserve","reset","resolution","respecting","responsible","result","results","resumable","resume","retry","return","returncode","returning","returns","right","right-justified","rightplus","rightspace","risk","rmc_communication_failure","rmc_invalid_status","rmc_system_failure","role","rollback","rows","rpad","rtrim","run","sap","sap-spool","saving","scale_preserving","scale_preserving_scientific","scan","scientific","scientific_with_leading_zero","scroll","scroll-boundary","scrolling","search","secondary","seconds","section","select","selection","selections","selection-screen","selection-set","selection-sets","selection-table","select-options","send","separate","separated","set","shared","shift","short","shortdump-id","sign_as_postfix","single","size","skip","skipping","smart","some","sort","sortable","sorted","source","specified","split","spool","spots","sql","sqlscript","stable","stamp","standard","starting","start-of-editing","start-of-selection","state","statement","statements","static","statics","statusinfo","step-loop","stop","structure","structures","style","subkey","submatches","submit","subroutine","subscreen","subtract","subtract-corresponding","suffix","sum","summary","summing","supplied","supply","suppress","switch","switchstates","symbol","syncpoints","syntax","syntax-check","syntax-trace","system-call","system-exceptions","system-exit","tab","tabbed","table","tables","tableview","tabstrip","target","task","tasks","test","testing","test-injection","test-seam","text","textpool","then","throw","time","times","timestamp","timezone","tims_is_valid","title","titlebar","title-lines","to","tokenization","tokens","top-lines","top-of-page","trace-file","trace-table","trailing","transaction","transfer","transformation","translate","transporting","trmac","truncate","truncation","try","tstmp_add_seconds","tstmp_current_utctimestamp","tstmp_is_valid","tstmp_seconds_between","type","type-pool","type-pools","types","uline","unassign","under","unicode","union","unique","unit_conversion","unix","unpack","until","unwind","up","update","upper","user","user-command","using","utf-8","valid","value","value-request","values","vary","varying","verification-message","version","via","view","visible","wait","warning","when","whenever","where","while","width","window","windows","with","with-heading","without","with-title","word","work","write","writer","xml","xsd","yellow","yes","yymmdd","zero","zone","abap_system_timezone","abap_user_timezone","access","action","adabas","adjust_numbers","allow_precision_loss","allowed","amdp","applicationuser","as_geo_json","as400","associations","balance","behavior","breakup","bulk","cds","cds_client","check_before_save","child","clients","corr","corr_spearman","cross","cycles","datn_add_days","datn_add_months","datn_days_between","dats_from_datn","dats_tims_to_tstmp","dats_to_datn","db2","db6","ddl","dense_rank","depth","deterministic","discarding","entities","entity","error","failed","finalize","first_value","fltp_to_dec","following","fractional","full","graph","grouping","hierarchy","hierarchy_ancestors","hierarchy_ancestors_aggregate","hierarchy_descendants","hierarchy_descendants_aggregate","hierarchy_siblings","incremental","indicators","lag","last_value","lead","leaves","like_regexpr","link","locale_sap","lock","locks","many","mapped","matched","measures","median","mssqlnt","multiple","nodetype","ntile","nulls","occurrences_regexpr","one","operations","oracle","orphans","over","parent","parents","partition","pcre","period","pfcg_mapping","preceding","privileged","product","projection","rank","redirected","replace_regexpr","reported","response","responses","root","row","row_number","sap_system_date","save","schema","session","sets","shortdump","siblings","spantree","start","stddev","string_agg","subtotal","sybase","tims_from_timn","tims_to_timn","to_blob","to_clob","total","trace-entry","tstmp_to_dats","tstmp_to_dst","tstmp_to_tims","tstmpl_from_utcl","tstmpl_to_utcl","unbounded","utcl_add_seconds","utcl_current","utcl_seconds_between","uuid","var","verbatim"],builtinFunctions:["abs","acos","asin","atan","bit-set","boolc","boolx","ceil","char_off","charlen","cmax","cmin","concat_lines_of","contains","contains_any_not_of","contains_any_of","cos","cosh","count","count_any_not_of","count_any_of","dbmaxlen","distance","escape","exp","find_any_not_of","find_any_of","find_end","floor","frac","from_mixed","ipow","line_exists","line_index","log","log10","matches","nmax","nmin","numofchar","repeat","rescale","reverse","round","segment","shift_left","shift_right","sign","sin","sinh","sqrt","strlen","substring","substring_after","substring_before","substring_from","substring_to","tan","tanh","to_lower","to_mixed","to_upper","trunc","utclong_add","utclong_current","utclong_diff","xsdbool","xstrlen"],typeKeywords:["b","c","d","decfloat16","decfloat34","f","i","int8","n","p","s","string","t","utclong","x","xstring","any","clike","csequence","decfloat","numeric","simple","xsequence","accp","char","clnt","cuky","curr","datn","dats","d16d","d16n","d16r","d34d","d34n","d34r","dec","df16_dec","df16_raw","df34_dec","df34_raw","fltp","geom_ewkb","int1","int2","int4","lang","lchr","lraw","numc","quan","raw","rawstring","sstring","timn","tims","unit","utcl","df16_scl","df34_scl","prec","varc","abap_bool","abap_false","abap_true","abap_undefined","me","screen","space","super","sy","syst","table_line","*sys*"],builtinMethods:["class_constructor","constructor"],derivedTypes:["%CID","%CID_REF","%CONTROL","%DATA","%ELEMENT","%FAIL","%KEY","%MSG","%PARAM","%PID","%PID_ASSOC","%PID_PARENT","%_HINTS"],cdsLanguage:["@AbapAnnotation","@AbapCatalog","@AccessControl","@API","@ClientDependent","@ClientHandling","@CompatibilityContract","@DataAging","@EndUserText","@Environment","@LanguageDependency","@MappingRole","@Metadata","@MetadataExtension","@ObjectModel","@Scope","@Semantics","$EXTENSION","$SELF"],selectors:["->","->*","=>","~","~*"],operators:[" +"," -","/","*","**","div","mod","=","#","@","+=","-=","*=","/=","**=","&&=","?=","&","&&","bit-and","bit-not","bit-or","bit-xor","m","o","z","<"," >","<=",">=","<>","><","=<","=>","bt","byte-ca","byte-cn","byte-co","byte-cs","byte-na","byte-ns","ca","cn","co","cp","cs","eq","ge","gt","le","lt","na","nb","ne","np","ns","*/","*:","--","/*","//"],symbols:/[=>))*/,{cases:{"@typeKeywords":"type","@keywords":"keyword","@cdsLanguage":"annotation","@derivedTypes":"type","@builtinFunctions":"type","@builtinMethods":"type","@operators":"key","@default":"identifier"}}],[/<[\w]+>/,"identifier"],[/##[\w|_]+/,"comment"],{include:"@whitespace"},[/[:,.]/,"delimiter"],[/[{}()\[\]]/,"@brackets"],[/@symbols/,{cases:{"@selectors":"tag","@operators":"key","@default":""}}],[/'/,{token:"string",bracket:"@open",next:"@stringquote"}],[/`/,{token:"string",bracket:"@open",next:"@stringping"}],[/\|/,{token:"string",bracket:"@open",next:"@stringtemplate"}],[/\d+/,"number"]],stringtemplate:[[/[^\\\|]+/,"string"],[/\\\|/,"string"],[/\|/,{token:"string",bracket:"@close",next:"@pop"}]],stringping:[[/[^\\`]+/,"string"],[/`/,{token:"string",bracket:"@close",next:"@pop"}]],stringquote:[[/[^\\']+/,"string"],[/'/,{token:"string",bracket:"@close",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,""],[/^\*.*$/,"comment"],[/\".*$/,"comment"]]}}});var gTe={};nt(gTe,{conf:()=>wVe,language:()=>SVe});var wVe,CVe,yVe,XH,SVe,mTe=x(()=>{wVe={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}],folding:{markers:{start:new RegExp("^\\s*//\\s*(?:(?:#?region\\b)|(?:))")}}},CVe=["abstract","activate","and","any","array","as","asc","assert","autonomous","begin","bigdecimal","blob","boolean","break","bulk","by","case","cast","catch","char","class","collect","commit","const","continue","convertcurrency","decimal","default","delete","desc","do","double","else","end","enum","exception","exit","export","extends","false","final","finally","float","for","from","future","get","global","goto","group","having","hint","if","implements","import","in","inner","insert","instanceof","int","interface","into","join","last_90_days","last_month","last_n_days","last_week","like","limit","list","long","loop","map","merge","native","new","next_90_days","next_month","next_n_days","next_week","not","null","nulls","number","object","of","on","or","outer","override","package","parallel","pragma","private","protected","public","retrieve","return","returning","rollback","savepoint","search","select","set","short","sort","stat","static","strictfp","super","switch","synchronized","system","testmethod","then","this","this_month","this_week","throw","throws","today","tolabel","tomorrow","transaction","transient","trigger","true","try","type","undelete","update","upsert","using","virtual","void","volatile","webservice","when","where","while","yesterday"],yVe=o=>o.charAt(0).toUpperCase()+o.substr(1),XH=[];CVe.forEach(o=>{XH.push(o),XH.push(o.toUpperCase()),XH.push(yVe(o))});SVe={defaultToken:"",tokenPostfix:".apex",keywords:XH,operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/@\s*[a-zA-Z_\$][\w\$]*/,"annotation"],[/(@digits)[eE]([\-+]?(@digits))?[fFdD]?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?[fFdD]?/,"number.float"],[/(@digits)[fFdD]/,"number.float"],[/(@digits)[lL]?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string",'@string."'],[/'/,"string","@string.'"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@apexdoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],apexdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/["']/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":"string"}}]]}}});var pTe={};nt(pTe,{conf:()=>xVe,language:()=>kVe});var xVe,kVe,_Te=x(()=>{xVe={comments:{lineComment:"#"}},kVe={defaultToken:"keyword",ignoreCase:!0,tokenPostfix:".azcli",str:/[^#\s]/,tokenizer:{root:[{include:"@comment"},[/\s-+@str*\s*/,{cases:{"@eos":{token:"key.identifier",next:"@popall"},"@default":{token:"key.identifier",next:"@type"}}}],[/^-+@str*\s*/,{cases:{"@eos":{token:"key.identifier",next:"@popall"},"@default":{token:"key.identifier",next:"@type"}}}]],type:[{include:"@comment"},[/-+@str*\s*/,{cases:{"@eos":{token:"key.identifier",next:"@popall"},"@default":"key.identifier"}}],[/@str+\s*/,{cases:{"@eos":{token:"string",next:"@popall"},"@default":"string"}}]],comment:[[/#.*$/,{cases:{"@eos":{token:"comment",next:"@popall"}}}]]}}});var bTe={};nt(bTe,{conf:()=>LVe,language:()=>IVe});var LVe,IVe,vTe=x(()=>{LVe={comments:{lineComment:"REM"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],surroundingPairs:[{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],folding:{markers:{start:new RegExp("^\\s*(::\\s*|REM\\s+)#region"),end:new RegExp("^\\s*(::\\s*|REM\\s+)#endregion")}}},IVe={defaultToken:"",ignoreCase:!0,tokenPostfix:".bat",brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"}],keywords:/call|defined|echo|errorlevel|exist|for|goto|if|pause|set|shift|start|title|not|pushd|popd/,symbols:/[=>PVe,language:()=>FVe});var EVe,TVe,DVe,NVe,RVe,AVe,MVe,OVe,PVe,FVe,CTe=x(()=>{EVe=o=>`\\b${o}\\b`,TVe="[_a-zA-Z]",DVe="[_a-zA-Z0-9]",NVe=EVe(`${TVe}${DVe}*`),RVe=["targetScope","resource","module","param","var","output","for","in","if","existing"],AVe=["true","false","null"],MVe="[ \\t\\r\\n]",OVe="[0-9]+",PVe={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'"},{open:"'''",close:"'''"}],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'",notIn:["string","comment"]},{open:"'''",close:"'''",notIn:["string","comment"]}],autoCloseBefore:`:.,=}])' + `,indentationRules:{increaseIndentPattern:new RegExp("^((?!\\/\\/).)*(\\{[^}\"'`]*|\\([^)\"'`]*|\\[[^\\]\"'`]*)$"),decreaseIndentPattern:new RegExp("^((?!.*?\\/\\*).*\\*/)?\\s*[\\}\\]].*$")}},FVe={defaultToken:"",tokenPostfix:".bicep",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],symbols:/[=>BVe,language:()=>WVe});var BVe,WVe,STe=x(()=>{BVe={comments:{lineComment:"//",blockComment:["(*","*)"]},brackets:[["{","}"],["[","]"],["(",")"],["<",">"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'},{open:"(*",close:"*)"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'},{open:"(*",close:"*)"}]},WVe={defaultToken:"",tokenPostfix:".cameligo",ignoreCase:!0,brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],keywords:["abs","assert","block","Bytes","case","Crypto","Current","else","failwith","false","for","fun","if","in","let","let%entry","let%init","List","list","Map","map","match","match%nat","mod","not","operation","Operation","of","record","Set","set","sender","skip","source","String","then","to","true","type","with"],typeKeywords:["int","unit","string","tz","nat","bool"],operators:["=",">","<","<=",">=","<>",":",":=","and","mod","or","+","-","*","/","@","&","^","%","->","<-","&&","||"],symbols:/[=><:@\^&|+\-*\/\^%]+/,tokenizer:{root:[[/[a-zA-Z_][\w]*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":"identifier"}}],{include:"@whitespace"},[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/\$[0-9a-fA-F]{1,16}/,"number.hex"],[/\d+/,"number"],[/[;,.]/,"delimiter"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/'/,"string","@string"],[/'[^\\']'/,"string"],[/'/,"string.invalid"],[/\#\d+/,"string"]],comment:[[/[^\(\*]+/,"comment"],[/\*\)/,"comment","@pop"],[/\(\*/,"comment"]],string:[[/[^\\']+/,"string"],[/\\./,"string.escape.invalid"],[/'/,{token:"string.quote",bracket:"@close",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,"white"],[/\(\*/,"comment","@comment"],[/\/\/.*$/,"comment"]]}}});var xTe={};nt(xTe,{conf:()=>HVe,language:()=>VVe});var HVe,VVe,kTe=x(()=>{HVe={comments:{lineComment:";;"},brackets:[["[","]"],["(",")"],["{","}"]],autoClosingPairs:[{open:"[",close:"]"},{open:'"',close:'"'},{open:"(",close:")"},{open:"{",close:"}"}],surroundingPairs:[{open:"[",close:"]"},{open:'"',close:'"'},{open:"(",close:")"},{open:"{",close:"}"}]},VVe={defaultToken:"",ignoreCase:!0,tokenPostfix:".clj",brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"{",close:"}",token:"delimiter.curly"}],constants:["true","false","nil"],numbers:/^(?:[+\-]?\d+(?:(?:N|(?:[eE][+\-]?\d+))|(?:\.?\d*(?:M|(?:[eE][+\-]?\d+))?)|\/\d+|[xX][0-9a-fA-F]+|r[0-9a-zA-Z]+)?(?=[\\\[\]\s"#'(),;@^`{}~]|$))/,characters:/^(?:\\(?:backspace|formfeed|newline|return|space|tab|o[0-7]{3}|u[0-9A-Fa-f]{4}|x[0-9A-Fa-f]{4}|.)?(?=[\\\[\]\s"(),;@^`{}~]|$))/,escapes:/^\\(?:["'\\bfnrt]|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,qualifiedSymbols:/^(?:(?:[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*(?:\.[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*)*\/)?(?:\/|[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*)*(?=[\\\[\]\s"(),;@^`{}~]|$))/,specialForms:[".","catch","def","do","if","monitor-enter","monitor-exit","new","quote","recur","set!","throw","try","var"],coreSymbols:["*","*'","*1","*2","*3","*agent*","*allow-unresolved-vars*","*assert*","*clojure-version*","*command-line-args*","*compile-files*","*compile-path*","*compiler-options*","*data-readers*","*default-data-reader-fn*","*e","*err*","*file*","*flush-on-newline*","*fn-loader*","*in*","*math-context*","*ns*","*out*","*print-dup*","*print-length*","*print-level*","*print-meta*","*print-namespace-maps*","*print-readably*","*read-eval*","*reader-resolver*","*source-path*","*suppress-read*","*unchecked-math*","*use-context-classloader*","*verbose-defrecords*","*warn-on-reflection*","+","+'","-","-'","->","->>","->ArrayChunk","->Eduction","->Vec","->VecNode","->VecSeq","-cache-protocol-fn","-reset-methods","..","/","<","<=","=","==",">",">=","EMPTY-NODE","Inst","StackTraceElement->vec","Throwable->map","accessor","aclone","add-classpath","add-watch","agent","agent-error","agent-errors","aget","alength","alias","all-ns","alter","alter-meta!","alter-var-root","amap","ancestors","and","any?","apply","areduce","array-map","as->","aset","aset-boolean","aset-byte","aset-char","aset-double","aset-float","aset-int","aset-long","aset-short","assert","assoc","assoc!","assoc-in","associative?","atom","await","await-for","await1","bases","bean","bigdec","bigint","biginteger","binding","bit-and","bit-and-not","bit-clear","bit-flip","bit-not","bit-or","bit-set","bit-shift-left","bit-shift-right","bit-test","bit-xor","boolean","boolean-array","boolean?","booleans","bound-fn","bound-fn*","bound?","bounded-count","butlast","byte","byte-array","bytes","bytes?","case","cast","cat","char","char-array","char-escape-string","char-name-string","char?","chars","chunk","chunk-append","chunk-buffer","chunk-cons","chunk-first","chunk-next","chunk-rest","chunked-seq?","class","class?","clear-agent-errors","clojure-version","coll?","comment","commute","comp","comparator","compare","compare-and-set!","compile","complement","completing","concat","cond","cond->","cond->>","condp","conj","conj!","cons","constantly","construct-proxy","contains?","count","counted?","create-ns","create-struct","cycle","dec","dec'","decimal?","declare","dedupe","default-data-readers","definline","definterface","defmacro","defmethod","defmulti","defn","defn-","defonce","defprotocol","defrecord","defstruct","deftype","delay","delay?","deliver","denominator","deref","derive","descendants","destructure","disj","disj!","dissoc","dissoc!","distinct","distinct?","doall","dorun","doseq","dosync","dotimes","doto","double","double-array","double?","doubles","drop","drop-last","drop-while","eduction","empty","empty?","ensure","ensure-reduced","enumeration-seq","error-handler","error-mode","eval","even?","every-pred","every?","ex-data","ex-info","extend","extend-protocol","extend-type","extenders","extends?","false?","ffirst","file-seq","filter","filterv","find","find-keyword","find-ns","find-protocol-impl","find-protocol-method","find-var","first","flatten","float","float-array","float?","floats","flush","fn","fn?","fnext","fnil","for","force","format","frequencies","future","future-call","future-cancel","future-cancelled?","future-done?","future?","gen-class","gen-interface","gensym","get","get-in","get-method","get-proxy-class","get-thread-bindings","get-validator","group-by","halt-when","hash","hash-combine","hash-map","hash-ordered-coll","hash-set","hash-unordered-coll","ident?","identical?","identity","if-let","if-not","if-some","ifn?","import","in-ns","inc","inc'","indexed?","init-proxy","inst-ms","inst-ms*","inst?","instance?","int","int-array","int?","integer?","interleave","intern","interpose","into","into-array","ints","io!","isa?","iterate","iterator-seq","juxt","keep","keep-indexed","key","keys","keyword","keyword?","last","lazy-cat","lazy-seq","let","letfn","line-seq","list","list*","list?","load","load-file","load-reader","load-string","loaded-libs","locking","long","long-array","longs","loop","macroexpand","macroexpand-1","make-array","make-hierarchy","map","map-entry?","map-indexed","map?","mapcat","mapv","max","max-key","memfn","memoize","merge","merge-with","meta","method-sig","methods","min","min-key","mix-collection-hash","mod","munge","name","namespace","namespace-munge","nat-int?","neg-int?","neg?","newline","next","nfirst","nil?","nnext","not","not-any?","not-empty","not-every?","not=","ns","ns-aliases","ns-imports","ns-interns","ns-map","ns-name","ns-publics","ns-refers","ns-resolve","ns-unalias","ns-unmap","nth","nthnext","nthrest","num","number?","numerator","object-array","odd?","or","parents","partial","partition","partition-all","partition-by","pcalls","peek","persistent!","pmap","pop","pop!","pop-thread-bindings","pos-int?","pos?","pr","pr-str","prefer-method","prefers","primitives-classnames","print","print-ctor","print-dup","print-method","print-simple","print-str","printf","println","println-str","prn","prn-str","promise","proxy","proxy-call-with-super","proxy-mappings","proxy-name","proxy-super","push-thread-bindings","pvalues","qualified-ident?","qualified-keyword?","qualified-symbol?","quot","rand","rand-int","rand-nth","random-sample","range","ratio?","rational?","rationalize","re-find","re-groups","re-matcher","re-matches","re-pattern","re-seq","read","read-line","read-string","reader-conditional","reader-conditional?","realized?","record?","reduce","reduce-kv","reduced","reduced?","reductions","ref","ref-history-count","ref-max-history","ref-min-history","ref-set","refer","refer-clojure","reify","release-pending-sends","rem","remove","remove-all-methods","remove-method","remove-ns","remove-watch","repeat","repeatedly","replace","replicate","require","reset!","reset-meta!","reset-vals!","resolve","rest","restart-agent","resultset-seq","reverse","reversible?","rseq","rsubseq","run!","satisfies?","second","select-keys","send","send-off","send-via","seq","seq?","seqable?","seque","sequence","sequential?","set","set-agent-send-executor!","set-agent-send-off-executor!","set-error-handler!","set-error-mode!","set-validator!","set?","short","short-array","shorts","shuffle","shutdown-agents","simple-ident?","simple-keyword?","simple-symbol?","slurp","some","some->","some->>","some-fn","some?","sort","sort-by","sorted-map","sorted-map-by","sorted-set","sorted-set-by","sorted?","special-symbol?","spit","split-at","split-with","str","string?","struct","struct-map","subs","subseq","subvec","supers","swap!","swap-vals!","symbol","symbol?","sync","tagged-literal","tagged-literal?","take","take-last","take-nth","take-while","test","the-ns","thread-bound?","time","to-array","to-array-2d","trampoline","transduce","transient","tree-seq","true?","type","unchecked-add","unchecked-add-int","unchecked-byte","unchecked-char","unchecked-dec","unchecked-dec-int","unchecked-divide-int","unchecked-double","unchecked-float","unchecked-inc","unchecked-inc-int","unchecked-int","unchecked-long","unchecked-multiply","unchecked-multiply-int","unchecked-negate","unchecked-negate-int","unchecked-remainder-int","unchecked-short","unchecked-subtract","unchecked-subtract-int","underive","unquote","unquote-splicing","unreduced","unsigned-bit-shift-right","update","update-in","update-proxy","uri?","use","uuid?","val","vals","var-get","var-set","var?","vary-meta","vec","vector","vector-of","vector?","volatile!","volatile?","vreset!","vswap!","when","when-first","when-let","when-not","when-some","while","with-bindings","with-bindings*","with-in-str","with-loading-context","with-local-vars","with-meta","with-open","with-out-str","with-precision","with-redefs","with-redefs-fn","xml-seq","zero?","zipmap"],tokenizer:{root:[{include:"@whitespace"},[/@numbers/,"number"],[/@characters/,"string"],{include:"@string"},[/[()\[\]{}]/,"@brackets"],[/\/#"(?:\.|(?:")|[^"\n])*"\/g/,"regexp"],[/[#'@^`~]/,"meta"],[/@qualifiedSymbols/,{cases:{"^:.+$":"constant","@specialForms":"keyword","@coreSymbols":"keyword","@constants":"constant","@default":"identifier"}}]],whitespace:[[/[\s,]+/,"white"],[/;.*$/,"comment"],[/\(comment\b/,"comment","@comment"]],comment:[[/\(/,"comment","@push"],[/\)/,"comment","@pop"],[/[^()]/,"comment"]],string:[[/"/,"string","@multiLineString"]],multiLineString:[[/"/,"string","@popall"],[/@escapes/,"string.escape"],[/./,"string"]]}}});var LTe={};nt(LTe,{conf:()=>zVe,language:()=>UVe});var zVe,UVe,ITe=x(()=>{zVe={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#%\^\&\*\(\)\=\$\-\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{blockComment:["###","###"],lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*#region\\b"),end:new RegExp("^\\s*#endregion\\b")}}},UVe={defaultToken:"",ignoreCase:!0,tokenPostfix:".coffee",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],regEx:/\/(?!\/\/)(?:[^\/\\]|\\.)*\/[igm]*/,keywords:["and","or","is","isnt","not","on","yes","@","no","off","true","false","null","this","new","delete","typeof","in","instanceof","return","throw","break","continue","debugger","if","else","switch","for","while","do","try","catch","finally","class","extends","super","undefined","then","unless","until","loop","of","by","when"],symbols:/[=>$Ve,language:()=>qVe});var $Ve,qVe,Ise=x(()=>{$Ve={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"[",close:"]"},{open:"{",close:"}"},{open:"(",close:")"},{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*#pragma\\s+region\\b"),end:new RegExp("^\\s*#pragma\\s+endregion\\b")}}},qVe={defaultToken:"",tokenPostfix:".cpp",brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"},{token:"delimiter.angle",open:"<",close:">"}],keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","for","friend","gcnew","generic","goto","if","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m512","__m512d","__m512i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>="],symbols:/[=>\[\]]/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/\d*\d+[eE]([\-+]?\d+)?(@floatsuffix)/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?(@floatsuffix)/,"number.float"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F](@integersuffix)/,"number.hex"],[/0[0-7']*[0-7](@integersuffix)/,"number.octal"],[/0[bB][0-1']*[0-1](@integersuffix)/,"number.binary"],[/\d[\d']*\d(@integersuffix)/,"number"],[/\d(@integersuffix)/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@doccomment"],[/\/\*/,"comment","@comment"],[/\/\/.*\\$/,"comment","@linecomment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],linecomment:[[/.*[^\\]$/,"comment","@pop"],[/[^]+/,"comment"]],doccomment:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],raw:[[/[^)]+/,"string.raw"],[/\)$S2\"/,{token:"string.raw.end",next:"@pop"}],[/\)/,"string.raw"]],annotation:[{include:"@whitespace"},[/using|alignas/,"keyword"],[/[a-zA-Z0-9_]+/,"annotation"],[/[,:]/,"delimiter"],[/[()]/,"@brackets"],[/\]\s*\]/,{token:"annotation",next:"@pop"}]],include:[[/(\s*)(<)([^<>]*)(>)/,["","keyword.directive.include.begin","string.include.identifier",{token:"keyword.directive.include.end",next:"@pop"}]],[/(\s*)(")([^"]*)(")/,["","keyword.directive.include.begin","string.include.identifier",{token:"keyword.directive.include.end",next:"@pop"}]]]}}});var ETe={};nt(ETe,{conf:()=>jVe,language:()=>KVe});var jVe,KVe,TTe=x(()=>{jVe={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\#\$\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],folding:{markers:{start:new RegExp("^\\s*#region\\b"),end:new RegExp("^\\s*#endregion\\b")}}},KVe={defaultToken:"",tokenPostfix:".cs",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],keywords:["extern","alias","using","bool","decimal","sbyte","byte","short","ushort","int","uint","long","ulong","char","float","double","object","dynamic","string","assembly","is","as","ref","out","this","base","new","typeof","void","checked","unchecked","default","delegate","var","const","if","else","switch","case","while","do","for","foreach","in","break","continue","goto","return","throw","try","catch","finally","lock","yield","from","let","where","join","on","equals","into","orderby","ascending","descending","select","group","by","namespace","partial","class","field","event","method","param","public","protected","internal","private","abstract","sealed","static","struct","readonly","volatile","virtual","override","params","get","set","add","remove","operator","true","false","implicit","explicit","interface","enum","null","async","await","fixed","sizeof","stackalloc","unsafe","nameof","when"],namespaceFollows:["namespace","using"],parenFollows:["if","for","while","switch","foreach","using","catch","when"],operators:["=","??","||","&&","|","^","&","==","!=","<=",">=","<<","+","-","*","/","%","!","~","++","--","+=","-=","*=","/=","%=","&=","|=","^=","<<=",">>=",">>","=>"],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/[0-9_]*\.[0-9_]+([eE][\-+]?\d+)?[fFdD]?/,"number.float"],[/0[xX][0-9a-fA-F_]+/,"number.hex"],[/0[bB][01_]+/,"number.hex"],[/[0-9_]+/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,{token:"string.quote",next:"@string"}],[/\$\@"/,{token:"string.quote",next:"@litinterpstring"}],[/\@"/,{token:"string.quote",next:"@litstring"}],[/\$"/,{token:"string.quote",next:"@interpolatedstring"}],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],qualified:[[/[a-zA-Z_][\w]*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":"identifier"}}],[/\./,"delimiter"],["","","@pop"]],namespace:[{include:"@whitespace"},[/[A-Z]\w*/,"namespace"],[/[\.=]/,"delimiter"],["","","@pop"]],comment:[[/[^\/*]+/,"comment"],["\\*/","comment","@pop"],[/[\/*]/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",next:"@pop"}]],litstring:[[/[^"]+/,"string"],[/""/,"string.escape"],[/"/,{token:"string.quote",next:"@pop"}]],litinterpstring:[[/[^"{]+/,"string"],[/""/,"string.escape"],[/{{/,"string.escape"],[/}}/,"string.escape"],[/{/,{token:"string.quote",next:"root.litinterpstring"}],[/"/,{token:"string.quote",next:"@pop"}]],interpolatedstring:[[/[^\\"{]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/{{/,"string.escape"],[/}}/,"string.escape"],[/{/,{token:"string.quote",next:"root.interpolatedstring"}],[/"/,{token:"string.quote",next:"@pop"}]],whitespace:[[/^[ \t\v\f]*#((r)|(load))(?=\s)/,"directive.csx"],[/^[ \t\v\f]*#\w.*$/,"namespace.cpp"],[/[ \t\v\f\r\n]+/,""],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]]}}});var DTe={};nt(DTe,{conf:()=>GVe,language:()=>YVe});var GVe,YVe,NTe=x(()=>{GVe={brackets:[],autoClosingPairs:[],surroundingPairs:[]},YVe={keywords:[],typeKeywords:[],tokenPostfix:".csp",operators:[],symbols:/[=>ZVe,language:()=>XVe});var ZVe,XVe,ATe=x(()=>{ZVe={wordPattern:/(#?-?\d*\.\d\w*%?)|((::|[@#.!:])?[\w-?]+%?)|::|[@#.!:]/g,comments:{blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/"),end:new RegExp("^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/")}}},XVe={defaultToken:"",tokenPostfix:".css",ws:`[ +\r\f]*`,identifier:"-?-?([a-zA-Z]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*",brackets:[{open:"{",close:"}",token:"delimiter.bracket"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],tokenizer:{root:[{include:"@selector"}],selector:[{include:"@comments"},{include:"@import"},{include:"@strings"},["[@](keyframes|-webkit-keyframes|-moz-keyframes|-o-keyframes)",{token:"keyword",next:"@keyframedeclaration"}],["[@](page|content|font-face|-moz-document)",{token:"keyword"}],["[@](charset|namespace)",{token:"keyword",next:"@declarationbody"}],["(url-prefix)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],["(url)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],{include:"@selectorname"},["[\\*]","tag"],["[>\\+,]","delimiter"],["\\[",{token:"delimiter.bracket",next:"@selectorattribute"}],["{",{token:"delimiter.bracket",next:"@selectorbody"}]],selectorbody:[{include:"@comments"},["[*_]?@identifier@ws:(?=(\\s|\\d|[^{;}]*[;}]))","attribute.name","@rulevalue"],["}",{token:"delimiter.bracket",next:"@pop"}]],selectorname:[["(\\.|#(?=[^{])|%|(@identifier)|:)+","tag"]],selectorattribute:[{include:"@term"},["]",{token:"delimiter.bracket",next:"@pop"}]],term:[{include:"@comments"},["(url-prefix)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],["(url)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],{include:"@functioninvocation"},{include:"@numbers"},{include:"@name"},{include:"@strings"},["([<>=\\+\\-\\*\\/\\^\\|\\~,])","delimiter"],[",","delimiter"]],rulevalue:[{include:"@comments"},{include:"@strings"},{include:"@term"},["!important","keyword"],[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],warndebug:[["[@](warn|debug)",{token:"keyword",next:"@declarationbody"}]],import:[["[@](import)",{token:"keyword",next:"@declarationbody"}]],urldeclaration:[{include:"@strings"},[`[^)\r +]+`,"string"],["\\)",{token:"delimiter.parenthesis",next:"@pop"}]],parenthizedterm:[{include:"@term"},["\\)",{token:"delimiter.parenthesis",next:"@pop"}]],declarationbody:[{include:"@term"},[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],comments:[["\\/\\*","comment","@comment"],["\\/\\/+.*","comment"]],comment:[["\\*\\/","comment","@pop"],[/[^*/]+/,"comment"],[/./,"comment"]],name:[["@identifier","attribute.value"]],numbers:[["-?(\\d*\\.)?\\d+([eE][\\-+]?\\d+)?",{token:"attribute.value.number",next:"@units"}],["#[0-9a-fA-F_]+(?!\\w)","attribute.value.hex"]],units:[["(em|ex|ch|rem|fr|vmin|vmax|vw|vh|vm|cm|mm|in|px|pt|pc|deg|grad|rad|turn|s|ms|Hz|kHz|%)?","attribute.value.unit","@pop"]],keyframedeclaration:[["@identifier","attribute.value"],["{",{token:"delimiter.bracket",switchTo:"@keyframebody"}]],keyframebody:[{include:"@term"},["{",{token:"delimiter.bracket",next:"@selectorbody"}],["}",{token:"delimiter.bracket",next:"@pop"}]],functioninvocation:[["@identifier\\(",{token:"attribute.value",next:"@functionarguments"}]],functionarguments:[["\\$@identifier@ws:","attribute.name"],["[,]","delimiter"],{include:"@term"},["\\)",{token:"attribute.value",next:"@pop"}]],strings:[['~?"',{token:"string",next:"@stringenddoublequote"}],["~?'",{token:"string",next:"@stringendquote"}]],stringenddoublequote:[["\\\\.","string"],['"',{token:"string",next:"@pop"}],[/[^\\"]+/,"string"],[".","string"]],stringendquote:[["\\\\.","string"],["'",{token:"string",next:"@pop"}],[/[^\\']+/,"string"],[".","string"]]}}});var MTe={};nt(MTe,{conf:()=>QVe,language:()=>JVe});var QVe,JVe,OTe=x(()=>{QVe={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}]},JVe={defaultToken:"",tokenPostfix:".cypher",ignoreCase:!0,brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"}],keywords:["ALL","AND","AS","ASC","ASCENDING","BY","CALL","CASE","CONTAINS","CREATE","DELETE","DESC","DESCENDING","DETACH","DISTINCT","ELSE","END","ENDS","EXISTS","IN","IS","LIMIT","MANDATORY","MATCH","MERGE","NOT","ON","ON","OPTIONAL","OR","ORDER","REMOVE","RETURN","SET","SKIP","STARTS","THEN","UNION","UNWIND","WHEN","WHERE","WITH","XOR","YIELD"],builtinLiterals:["true","TRUE","false","FALSE","null","NULL"],builtinFunctions:["abs","acos","asin","atan","atan2","avg","ceil","coalesce","collect","cos","cot","count","degrees","e","endNode","exists","exp","floor","head","id","keys","labels","last","left","length","log","log10","lTrim","max","min","nodes","percentileCont","percentileDisc","pi","properties","radians","rand","range","relationships","replace","reverse","right","round","rTrim","sign","sin","size","split","sqrt","startNode","stDev","stDevP","substring","sum","tail","tan","timestamp","toBoolean","toFloat","toInteger","toLower","toString","toUpper","trim","type"],operators:["+","-","*","/","%","^","=","<>","<",">","<=",">=","->","<-","-->","<--"],escapes:/\\(?:[tbnrf\\"'`]|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,digits:/\d+/,octaldigits:/[0-7]+/,hexdigits:/[0-9a-fA-F]+/,tokenizer:{root:[[/[{}[\]()]/,"@brackets"],{include:"common"}],common:[{include:"@whitespace"},{include:"@numbers"},{include:"@strings"},[/:[a-zA-Z_][\w]*/,"type.identifier"],[/[a-zA-Z_][\w]*(?=\()/,{cases:{"@builtinFunctions":"predefined.function"}}],[/[a-zA-Z_$][\w$]*/,{cases:{"@keywords":"keyword","@builtinLiterals":"predefined.literal","@default":"identifier"}}],[/`/,"identifier.escape","@identifierBacktick"],[/[;,.:|]/,"delimiter"],[/[<>=%+\-*/^]+/,{cases:{"@operators":"delimiter","@default":""}}]],numbers:[[/-?(@digits)[eE](-?(@digits))?/,"number.float"],[/-?(@digits)?\.(@digits)([eE]-?(@digits))?/,"number.float"],[/-?0x(@hexdigits)/,"number.hex"],[/-?0(@octaldigits)/,"number.octal"],[/-?(@digits)/,"number"]],strings:[[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@stringDouble"],[/'/,"string","@stringSingle"]],whitespace:[[/[ \t\r\n]+/,"white"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/\/\/.*/,"comment"],[/[^/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[/*]/,"comment"]],stringDouble:[[/[^\\"]+/,"string"],[/@escapes/,"string"],[/\\./,"string.invalid"],[/"/,"string","@pop"]],stringSingle:[[/[^\\']+/,"string"],[/@escapes/,"string"],[/\\./,"string.invalid"],[/'/,"string","@pop"]],identifierBacktick:[[/[^\\`]+/,"identifier.escape"],[/@escapes/,"identifier.escape"],[/\\./,"identifier.escape.invalid"],[/`/,"identifier.escape","@pop"]]}}});var PTe={};nt(PTe,{conf:()=>eze,language:()=>tze});var eze,tze,FTe=x(()=>{eze={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string"]},{open:"`",close:"`",notIn:["string","comment"]},{open:"/**",close:" */",notIn:["string"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:"'",close:"'"},{open:"(",close:")"},{open:'"',close:'"'},{open:"`",close:"`"}],folding:{markers:{start:/^\s*\s*#?region\b/,end:/^\s*\s*#?endregion\b/}}},tze={defaultToken:"invalid",tokenPostfix:".dart",keywords:["abstract","dynamic","implements","show","as","else","import","static","assert","enum","in","super","async","export","interface","switch","await","extends","is","sync","break","external","library","this","case","factory","mixin","throw","catch","false","new","true","class","final","null","try","const","finally","on","typedef","continue","for","operator","var","covariant","Function","part","void","default","get","rethrow","while","deferred","hide","return","with","do","if","set","yield"],typeKeywords:["int","double","String","bool"],operators:["+","-","*","/","~/","%","++","--","==","!=",">","<",">=","<=","=","-=","/=","%=",">>=","^=","+=","*=","~/=","<<=","&=","!=","||","&&","&","|","^","~","<<",">>","!",">>>","??","?",":","|="],symbols:/[=>](?!@symbols)/,"@brackets"],[/!(?=([^=]|$))/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,"number.float"],[/0[xX](@hexdigits)n?/,"number.hex"],[/0[oO]?(@octaldigits)n?/,"number.octal"],[/0[bB](@binarydigits)n?/,"number.binary"],[/(@digits)n?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string_double"],[/'/,"string","@string_single"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@jsdoc"],[/\/\*/,"comment","@comment"],[/\/\/\/.*$/,"comment.doc"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],jsdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/,["regexp.escape.control","regexp.escape.control"]],[/[()]/,"regexp.escape.control"],[/@regexpctl/,"regexp.escape.control"],[/[^\\\/]/,"regexp"],[/@regexpesc/,"regexp.escape"],[/\\\./,"regexp.invalid"],[/(\/)([gimsuy]*)/,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/,"regexp.escape.control"],[/\^/,"regexp.invalid"],[/@regexpesc/,"regexp.escape"],[/[^\]]/,"regexp"],[/\]/,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"\$]+/,"string"],[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"],[/\$\w+/,"identifier"]],string_single:[[/[^\\'\$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"],[/\$\w+/,"identifier"]]}}});var BTe={};nt(BTe,{conf:()=>ize,language:()=>nze});var ize,nze,WTe=x(()=>{ize={brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},nze={defaultToken:"",tokenPostfix:".dockerfile",variable:/\${?[\w]+}?/,tokenizer:{root:[{include:"@whitespace"},{include:"@comment"},[/(ONBUILD)(\s+)/,["keyword",""]],[/(ENV)(\s+)([\w]+)/,["keyword","",{token:"variable",next:"@arguments"}]],[/(FROM|MAINTAINER|RUN|EXPOSE|ENV|ADD|ARG|VOLUME|LABEL|USER|WORKDIR|COPY|CMD|STOPSIGNAL|SHELL|HEALTHCHECK|ENTRYPOINT)/,{token:"keyword",next:"@arguments"}]],arguments:[{include:"@whitespace"},{include:"@strings"},[/(@variable)/,{cases:{"@eos":{token:"variable",next:"@popall"},"@default":"variable"}}],[/\\/,{cases:{"@eos":"","@default":""}}],[/./,{cases:{"@eos":{token:"",next:"@popall"},"@default":""}}]],whitespace:[[/\s+/,{cases:{"@eos":{token:"",next:"@popall"},"@default":""}}]],comment:[[/(^#.*$)/,"comment","@popall"]],strings:[[/\\'$/,"","@popall"],[/\\'/,""],[/'$/,"string","@popall"],[/'/,"string","@stringBody"],[/"$/,"string","@popall"],[/"/,"string","@dblStringBody"]],stringBody:[[/[^\\\$']/,{cases:{"@eos":{token:"string",next:"@popall"},"@default":"string"}}],[/\\./,"string.escape"],[/'$/,"string","@popall"],[/'/,"string","@pop"],[/(@variable)/,"variable"],[/\\$/,"string"],[/$/,"string","@popall"]],dblStringBody:[[/[^\\\$"]/,{cases:{"@eos":{token:"string",next:"@popall"},"@default":"string"}}],[/\\./,"string.escape"],[/"$/,"string","@popall"],[/"/,"string","@pop"],[/(@variable)/,"variable"],[/\\$/,"string"],[/$/,"string","@popall"]]}}});var HTe={};nt(HTe,{conf:()=>oze,language:()=>sze});var oze,sze,VTe=x(()=>{oze={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}]},sze={defaultToken:"",tokenPostfix:".ecl",ignoreCase:!0,brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],pounds:["append","break","declare","demangle","end","for","getdatatype","if","inmodule","loop","mangle","onwarning","option","set","stored","uniquename"].join("|"),keywords:["__compressed__","after","all","and","any","as","atmost","before","beginc","best","between","case","cluster","compressed","compression","const","counter","csv","default","descend","embed","encoding","encrypt","end","endc","endembed","endmacro","enum","escape","except","exclusive","expire","export","extend","fail","few","fileposition","first","flat","forward","from","full","function","functionmacro","group","grouped","heading","hole","ifblock","import","in","inner","interface","internal","joined","keep","keyed","last","left","limit","linkcounted","literal","little_endian","load","local","locale","lookup","lzw","macro","many","maxcount","maxlength","min skew","module","mofn","multiple","named","namespace","nocase","noroot","noscan","nosort","not","noxpath","of","onfail","only","opt","or","outer","overwrite","packed","partition","penalty","physicallength","pipe","prefetch","quote","record","repeat","retry","return","right","right1","right2","rows","rowset","scan","scope","self","separator","service","shared","skew","skip","smart","soapaction","sql","stable","store","terminator","thor","threshold","timelimit","timeout","token","transform","trim","type","unicodeorder","unordered","unsorted","unstable","update","use","validate","virtual","whole","width","wild","within","wnotrim","xml","xpath"],functions:["abs","acos","aggregate","allnodes","apply","ascii","asin","assert","asstring","atan","atan2","ave","build","buildindex","case","catch","choose","choosen","choosesets","clustersize","combine","correlation","cos","cosh","count","covariance","cron","dataset","dedup","define","denormalize","dictionary","distribute","distributed","distribution","ebcdic","enth","error","evaluate","event","eventextra","eventname","exists","exp","fail","failcode","failmessage","fetch","fromunicode","fromxml","getenv","getisvalid","global","graph","group","hash","hash32","hash64","hashcrc","hashmd5","having","httpcall","httpheader","if","iff","index","intformat","isvalid","iterate","join","keydiff","keypatch","keyunicode","length","library","limit","ln","loadxml","local","log","loop","map","matched","matchlength","matchposition","matchtext","matchunicode","max","merge","mergejoin","min","nofold","nolocal","nonempty","normalize","nothor","notify","output","parallel","parse","pipe","power","preload","process","project","pull","random","range","rank","ranked","realformat","recordof","regexfind","regexreplace","regroup","rejected","rollup","round","roundup","row","rowdiff","sample","sequential","set","sin","sinh","sizeof","soapcall","sort","sorted","sqrt","stepped","stored","sum","table","tan","tanh","thisnode","topn","tounicode","toxml","transfer","transform","trim","truncate","typeof","ungroup","unicodeorder","variance","wait","which","workunit","xmldecode","xmlencode","xmltext","xmlunicode"],typesint:["integer","unsigned"].join("|"),typesnum:["data","qstring","string","unicode","utf8","varstring","varunicode"],typesone:["ascii","big_endian","boolean","data","decimal","ebcdic","grouped","integer","linkcounted","pattern","qstring","real","record","rule","set of","streamed","string","token","udecimal","unicode","unsigned","utf8","varstring","varunicode"].join("|"),operators:["+","-","/",":=","<","<>","=",">","\\","and","in","not","or"],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/[0-9_]*\.[0-9_]+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F_]+/,"number.hex"],[/0[bB][01]+/,"number.hex"],[/[0-9_]+/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\v\f\r\n]+/,""],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],string:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]]}}});var zTe={};nt(zTe,{conf:()=>rze,language:()=>aze});var rze,aze,UTe=x(()=>{rze={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'"},{open:'"',close:'"'}],autoClosingPairs:[{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["comment"]},{open:'"""',close:'"""'},{open:"`",close:"`",notIn:["string","comment"]},{open:"(",close:")"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"<<",close:">>"}],indentationRules:{increaseIndentPattern:/^\s*(after|else|catch|rescue|fn|[^#]*(do|<\-|\->|\{|\[|\=))\s*$/,decreaseIndentPattern:/^\s*((\}|\])\s*$|(after|else|catch|rescue|end)\b)/}},aze={defaultToken:"source",tokenPostfix:".elixir",brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"{",close:"}",token:"delimiter.curly"},{open:"<<",close:">>",token:"delimiter.angle.special"}],declarationKeywords:["def","defp","defn","defnp","defguard","defguardp","defmacro","defmacrop","defdelegate","defcallback","defmacrocallback","defmodule","defprotocol","defexception","defimpl","defstruct"],operatorKeywords:["and","in","not","or","when"],namespaceKeywords:["alias","import","require","use"],otherKeywords:["after","case","catch","cond","do","else","end","fn","for","if","quote","raise","receive","rescue","super","throw","try","unless","unquote_splicing","unquote","with"],constants:["true","false","nil"],nameBuiltin:["__MODULE__","__DIR__","__ENV__","__CALLER__","__STACKTRACE__"],operator:/-[->]?|!={0,2}|\*{1,2}|\/|\\\\|&{1,3}|\.\.?|\^(?:\^\^)?|\+\+?|<(?:-|<<|=|>|\|>|~>?)?|=~|={1,3}|>(?:=|>>)?|\|~>|\|>|\|{1,3}|~>>?|~~~|::/,variableName:/[a-z_][a-zA-Z0-9_]*[?!]?/,atomName:/[a-zA-Z_][a-zA-Z0-9_@]*[?!]?|@specialAtomName|@operator/,specialAtomName:/\.\.\.|<<>>|%\{\}|%|\{\}/,aliasPart:/[A-Z][a-zA-Z0-9_]*/,moduleName:/@aliasPart(?:\.@aliasPart)*/,sigilSymmetricDelimiter:/"""|'''|"|'|\/|\|/,sigilStartDelimiter:/@sigilSymmetricDelimiter|<|\{|\[|\(/,sigilEndDelimiter:/@sigilSymmetricDelimiter|>|\}|\]|\)/,sigilModifiers:/[a-zA-Z0-9]*/,decimal:/\d(?:_?\d)*/,hex:/[0-9a-fA-F](_?[0-9a-fA-F])*/,octal:/[0-7](_?[0-7])*/,binary:/[01](_?[01])*/,escape:/\\u[0-9a-fA-F]{4}|\\x[0-9a-fA-F]{2}|\\./,tokenizer:{root:[{include:"@whitespace"},{include:"@comments"},{include:"@keywordsShorthand"},{include:"@numbers"},{include:"@identifiers"},{include:"@strings"},{include:"@atoms"},{include:"@sigils"},{include:"@attributes"},{include:"@symbols"}],whitespace:[[/\s+/,"white"]],comments:[[/(#)(.*)/,["comment.punctuation","comment"]]],keywordsShorthand:[[/(@atomName)(:)(\s+)/,["constant","constant.punctuation","white"]],[/"(?=([^"]|#\{.*?\}|\\")*":)/,{token:"constant.delimiter",next:"@doubleQuotedStringKeyword"}],[/'(?=([^']|#\{.*?\}|\\')*':)/,{token:"constant.delimiter",next:"@singleQuotedStringKeyword"}]],doubleQuotedStringKeyword:[[/":/,{token:"constant.delimiter",next:"@pop"}],{include:"@stringConstantContentInterpol"}],singleQuotedStringKeyword:[[/':/,{token:"constant.delimiter",next:"@pop"}],{include:"@stringConstantContentInterpol"}],numbers:[[/0b@binary/,"number.binary"],[/0o@octal/,"number.octal"],[/0x@hex/,"number.hex"],[/@decimal\.@decimal([eE]-?@decimal)?/,"number.float"],[/@decimal/,"number"]],identifiers:[[/\b(defp?|defnp?|defmacrop?|defguardp?|defdelegate)(\s+)(@variableName)(?!\s+@operator)/,["keyword.declaration","white",{cases:{unquote:"keyword","@default":"function"}}]],[/(@variableName)(?=\s*\.?\s*\()/,{cases:{"@declarationKeywords":"keyword.declaration","@namespaceKeywords":"keyword","@otherKeywords":"keyword","@default":"function.call"}}],[/(@moduleName)(\s*)(\.)(\s*)(@variableName)/,["type.identifier","white","operator","white","function.call"]],[/(:)(@atomName)(\s*)(\.)(\s*)(@variableName)/,["constant.punctuation","constant","white","operator","white","function.call"]],[/(\|>)(\s*)(@variableName)/,["operator","white",{cases:{"@otherKeywords":"keyword","@default":"function.call"}}]],[/(&)(\s*)(@variableName)/,["operator","white","function.call"]],[/@variableName/,{cases:{"@declarationKeywords":"keyword.declaration","@operatorKeywords":"keyword.operator","@namespaceKeywords":"keyword","@otherKeywords":"keyword","@constants":"constant.language","@nameBuiltin":"variable.language","_.*":"comment.unused","@default":"identifier"}}],[/@moduleName/,"type.identifier"]],strings:[[/"""/,{token:"string.delimiter",next:"@doubleQuotedHeredoc"}],[/'''/,{token:"string.delimiter",next:"@singleQuotedHeredoc"}],[/"/,{token:"string.delimiter",next:"@doubleQuotedString"}],[/'/,{token:"string.delimiter",next:"@singleQuotedString"}]],doubleQuotedHeredoc:[[/"""/,{token:"string.delimiter",next:"@pop"}],{include:"@stringContentInterpol"}],singleQuotedHeredoc:[[/'''/,{token:"string.delimiter",next:"@pop"}],{include:"@stringContentInterpol"}],doubleQuotedString:[[/"/,{token:"string.delimiter",next:"@pop"}],{include:"@stringContentInterpol"}],singleQuotedString:[[/'/,{token:"string.delimiter",next:"@pop"}],{include:"@stringContentInterpol"}],atoms:[[/(:)(@atomName)/,["constant.punctuation","constant"]],[/:"/,{token:"constant.delimiter",next:"@doubleQuotedStringAtom"}],[/:'/,{token:"constant.delimiter",next:"@singleQuotedStringAtom"}]],doubleQuotedStringAtom:[[/"/,{token:"constant.delimiter",next:"@pop"}],{include:"@stringConstantContentInterpol"}],singleQuotedStringAtom:[[/'/,{token:"constant.delimiter",next:"@pop"}],{include:"@stringConstantContentInterpol"}],sigils:[[/~[a-z]@sigilStartDelimiter/,{token:"@rematch",next:"@sigil.interpol"}],[/~([A-Z]+)@sigilStartDelimiter/,{token:"@rematch",next:"@sigil.noInterpol"}]],sigil:[[/~([a-z]|[A-Z]+)\{/,{token:"@rematch",switchTo:"@sigilStart.$S2.$1.{.}"}],[/~([a-z]|[A-Z]+)\[/,{token:"@rematch",switchTo:"@sigilStart.$S2.$1.[.]"}],[/~([a-z]|[A-Z]+)\(/,{token:"@rematch",switchTo:"@sigilStart.$S2.$1.(.)"}],[/~([a-z]|[A-Z]+)\"}],[/~([a-z]|[A-Z]+)(@sigilSymmetricDelimiter)/,{token:"@rematch",switchTo:"@sigilStart.$S2.$1.$2.$2"}]],"sigilStart.interpol.s":[[/~s@sigilStartDelimiter/,{token:"string.delimiter",switchTo:"@sigilContinue.$S2.$S3.$S4.$S5"}]],"sigilContinue.interpol.s":[[/(@sigilEndDelimiter)@sigilModifiers/,{cases:{"$1==$S5":{token:"string.delimiter",next:"@pop"},"@default":"string"}}],{include:"@stringContentInterpol"}],"sigilStart.noInterpol.S":[[/~S@sigilStartDelimiter/,{token:"string.delimiter",switchTo:"@sigilContinue.$S2.$S3.$S4.$S5"}]],"sigilContinue.noInterpol.S":[[/(^|[^\\])\\@sigilEndDelimiter/,"string"],[/(@sigilEndDelimiter)@sigilModifiers/,{cases:{"$1==$S5":{token:"string.delimiter",next:"@pop"},"@default":"string"}}],{include:"@stringContent"}],"sigilStart.interpol.r":[[/~r@sigilStartDelimiter/,{token:"regexp.delimiter",switchTo:"@sigilContinue.$S2.$S3.$S4.$S5"}]],"sigilContinue.interpol.r":[[/(@sigilEndDelimiter)@sigilModifiers/,{cases:{"$1==$S5":{token:"regexp.delimiter",next:"@pop"},"@default":"regexp"}}],{include:"@regexpContentInterpol"}],"sigilStart.noInterpol.R":[[/~R@sigilStartDelimiter/,{token:"regexp.delimiter",switchTo:"@sigilContinue.$S2.$S3.$S4.$S5"}]],"sigilContinue.noInterpol.R":[[/(^|[^\\])\\@sigilEndDelimiter/,"regexp"],[/(@sigilEndDelimiter)@sigilModifiers/,{cases:{"$1==$S5":{token:"regexp.delimiter",next:"@pop"},"@default":"regexp"}}],{include:"@regexpContent"}],"sigilStart.interpol":[[/~([a-z]|[A-Z]+)@sigilStartDelimiter/,{token:"sigil.delimiter",switchTo:"@sigilContinue.$S2.$S3.$S4.$S5"}]],"sigilContinue.interpol":[[/(@sigilEndDelimiter)@sigilModifiers/,{cases:{"$1==$S5":{token:"sigil.delimiter",next:"@pop"},"@default":"sigil"}}],{include:"@sigilContentInterpol"}],"sigilStart.noInterpol":[[/~([a-z]|[A-Z]+)@sigilStartDelimiter/,{token:"sigil.delimiter",switchTo:"@sigilContinue.$S2.$S3.$S4.$S5"}]],"sigilContinue.noInterpol":[[/(^|[^\\])\\@sigilEndDelimiter/,"sigil"],[/(@sigilEndDelimiter)@sigilModifiers/,{cases:{"$1==$S5":{token:"sigil.delimiter",next:"@pop"},"@default":"sigil"}}],{include:"@sigilContent"}],attributes:[[/\@(module|type)?doc (~[sS])?"""/,{token:"comment.block.documentation",next:"@doubleQuotedHeredocDocstring"}],[/\@(module|type)?doc (~[sS])?'''/,{token:"comment.block.documentation",next:"@singleQuotedHeredocDocstring"}],[/\@(module|type)?doc (~[sS])?"/,{token:"comment.block.documentation",next:"@doubleQuotedStringDocstring"}],[/\@(module|type)?doc (~[sS])?'/,{token:"comment.block.documentation",next:"@singleQuotedStringDocstring"}],[/\@(module|type)?doc false/,"comment.block.documentation"],[/\@(@variableName)/,"variable"]],doubleQuotedHeredocDocstring:[[/"""/,{token:"comment.block.documentation",next:"@pop"}],{include:"@docstringContent"}],singleQuotedHeredocDocstring:[[/'''/,{token:"comment.block.documentation",next:"@pop"}],{include:"@docstringContent"}],doubleQuotedStringDocstring:[[/"/,{token:"comment.block.documentation",next:"@pop"}],{include:"@docstringContent"}],singleQuotedStringDocstring:[[/'/,{token:"comment.block.documentation",next:"@pop"}],{include:"@docstringContent"}],symbols:[[/\?(\\.|[^\\\s])/,"number.constant"],[/&\d+/,"operator"],[/<<<|>>>/,"operator"],[/[()\[\]\{\}]|<<|>>/,"@brackets"],[/\.\.\./,"identifier"],[/=>/,"punctuation"],[/@operator/,"operator"],[/[:;,.%]/,"punctuation"]],stringContentInterpol:[{include:"@interpolation"},{include:"@escapeChar"},{include:"@stringContent"}],stringContent:[[/./,"string"]],stringConstantContentInterpol:[{include:"@interpolation"},{include:"@escapeChar"},{include:"@stringConstantContent"}],stringConstantContent:[[/./,"constant"]],regexpContentInterpol:[{include:"@interpolation"},{include:"@escapeChar"},{include:"@regexpContent"}],regexpContent:[[/(\s)(#)(\s.*)$/,["white","comment.punctuation","comment"]],[/./,"regexp"]],sigilContentInterpol:[{include:"@interpolation"},{include:"@escapeChar"},{include:"@sigilContent"}],sigilContent:[[/./,"sigil"]],docstringContent:[[/./,"comment.block.documentation"]],escapeChar:[[/@escape/,"constant.character.escape"]],interpolation:[[/#{/,{token:"delimiter.bracket.embed",next:"@interpolationContinue"}]],interpolationContinue:[[/}/,{token:"delimiter.bracket.embed",next:"@pop"}],{include:"@root"}]}}});var $Te={};nt($Te,{conf:()=>lze,language:()=>cze});var lze,cze,qTe=x(()=>{lze={comments:{blockComment:["/*","*/"],lineComment:"//"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string"]},{open:"[",close:"]",notIn:["string"]},{open:"(",close:")",notIn:["string"]},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}]},cze={defaultToken:"",tokenPostfix:".flow",keywords:["import","require","export","forbid","native","if","else","cast","unsafe","switch","default"],types:["io","mutable","bool","int","double","string","flow","void","ref","true","false","with"],operators:["=",">","<","<=",">=","==","!","!=",":=","::=","&&","||","+","-","*","/","@","&","%",":","->","\\","$","??","^"],symbols:/[@$=>](?!@symbols)/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/((0(x|X)[0-9a-fA-F]*)|(([0-9]+\.?[0-9]*)|(\.[0-9]+))((e|E)(\+|-)?[0-9]+)?)/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]]}}});var jTe={};nt(jTe,{conf:()=>dze,language:()=>hze});var dze,hze,KTe=x(()=>{dze={comments:{lineComment:"//",blockComment:["(*","*)"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*//\\s*#region\\b|^\\s*\\(\\*\\s*#region(.*)\\*\\)"),end:new RegExp("^\\s*//\\s*#endregion\\b|^\\s*\\(\\*\\s*#endregion\\s*\\*\\)")}}},hze={defaultToken:"",tokenPostfix:".fs",keywords:["abstract","and","atomic","as","assert","asr","base","begin","break","checked","component","const","constraint","constructor","continue","class","default","delegate","do","done","downcast","downto","elif","else","end","exception","eager","event","external","extern","false","finally","for","fun","function","fixed","functor","global","if","in","include","inherit","inline","interface","internal","land","lor","lsl","lsr","lxor","lazy","let","match","member","mod","module","mutable","namespace","method","mixin","new","not","null","of","open","or","object","override","private","parallel","process","protected","pure","public","rec","return","static","sealed","struct","sig","then","to","true","tailcall","trait","try","type","upcast","use","val","void","virtual","volatile","when","while","with","yield"],symbols:/[=>\]/,"annotation"],[/^#(if|else|endif)/,"keyword"],[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/@symbols/,"delimiter"],[/\d*\d+[eE]([\-+]?\d+)?(@floatsuffix)/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?(@floatsuffix)/,"number.float"],[/0x[0-9a-fA-F]+LF/,"number.float"],[/0x[0-9a-fA-F]+(@integersuffix)/,"number.hex"],[/0b[0-1]+(@integersuffix)/,"number.bin"],[/\d+(@integersuffix)/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"""/,"string",'@string."""'],[/"/,"string",'@string."'],[/\@"/,{token:"string.quote",next:"@litstring"}],[/'[^\\']'B?/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\(\*(?!\))/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^*(]+/,"comment"],[/\*\)/,"comment","@pop"],[/\*/,"comment"],[/\(\*\)/,"comment"],[/\(/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/("""|"B?)/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":"string"}}]],litstring:[[/[^"]+/,"string"],[/""/,"string.escape"],[/"/,{token:"string.quote",next:"@pop"}]]}}});var kv={};nt(kv,{TagAngleInterpolationBracket:()=>mze,TagAngleInterpolationDollar:()=>fze,TagAutoInterpolationBracket:()=>bze,TagAutoInterpolationDollar:()=>_ze,TagBracketInterpolationBracket:()=>pze,TagBracketInterpolationDollar:()=>gze});function e7(o){return{brackets:[["<",">"],["[","]"],["(",")"],["{","}"]],comments:{blockComment:[`${o.open}--`,`--${o.close}`]},autoCloseBefore:` +\r }]),.:;=`,autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string"]}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],folding:{markers:{start:new RegExp(`${o.open}#(?:${JH.join("|")})([^/${o.close}]*(?!/)${o.close})[^${o.open}]*$`),end:new RegExp(`${o.open}/#(?:${JH.join("|")})[\\r\\n\\t ]*>`)}},onEnterRules:[{beforeText:new RegExp(`${o.open}#(?!(?:${QH.join("|")}))([a-zA-Z_]+)([^/${o.close}]*(?!/)${o.close})[^${o.open}]*$`),afterText:new RegExp(`^${o.open}/#([a-zA-Z_]+)[\\r\\n\\t ]*${o.close}$`),action:{indentAction:Ei.IndentAction.IndentOutdent}},{beforeText:new RegExp(`${o.open}#(?!(?:${QH.join("|")}))([a-zA-Z_]+)([^/${o.close}]*(?!/)${o.close})[^${o.open}]*$`),action:{indentAction:Ei.IndentAction.Indent}}]}}function GTe(){return{brackets:[["<",">"],["[","]"],["(",")"],["{","}"]],autoCloseBefore:` +\r }]),.:;=`,autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string"]}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],folding:{markers:{start:new RegExp(`[<\\[]#(?:${JH.join("|")})([^/>\\]]*(?!/)[>\\]])[^<\\[]*$`),end:new RegExp(`[<\\[]/#(?:${JH.join("|")})[\\r\\n\\t ]*>`)}},onEnterRules:[{beforeText:new RegExp(`[<\\[]#(?!(?:${QH.join("|")}))([a-zA-Z_]+)([^/>\\]]*(?!/)[>\\]])[^[<\\[]]*$`),afterText:new RegExp("^[<\\[]/#([a-zA-Z_]+)[\\r\\n\\t ]*[>\\]]$"),action:{indentAction:Ei.IndentAction.IndentOutdent}},{beforeText:new RegExp(`[<\\[]#(?!(?:${QH.join("|")}))([a-zA-Z_]+)([^/>\\]]*(?!/)[>\\]])[^[<\\[]]*$`),action:{indentAction:Ei.IndentAction.Indent}}]}}function tS(o,e){let t=`_${o.id}_${e.id}`,i=s=>s.replace(/__id__/g,t),n=s=>{let r=s.source.replace(/__id__/g,t);return new RegExp(r,s.flags)};return{unicode:!0,includeLF:!1,start:i("default__id__"),ignoreCase:!1,defaultToken:"invalid",tokenPostfix:".freemarker2",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],[i("open__id__")]:new RegExp(o.open),[i("close__id__")]:new RegExp(o.close),[i("iOpen1__id__")]:new RegExp(e.open1),[i("iOpen2__id__")]:new RegExp(e.open2),[i("iClose__id__")]:new RegExp(e.close),[i("startTag__id__")]:n(/(@open__id__)(#)/),[i("endTag__id__")]:n(/(@open__id__)(\/#)/),[i("startOrEndTag__id__")]:n(/(@open__id__)(\/?#)/),[i("closeTag1__id__")]:n(/((?:@blank)*)(@close__id__)/),[i("closeTag2__id__")]:n(/((?:@blank)*\/?)(@close__id__)/),blank:/[ \t\n\r]/,keywords:["false","true","in","as","using"],directiveStartCloseTag1:/attempt|recover|sep|auto[eE]sc|no(?:autoe|AutoE)sc|compress|default|no[eE]scape|comment|no[pP]arse/,directiveStartCloseTag2:/else|break|continue|return|stop|flush|t|lt|rt|nt|nested|recurse|fallback|ftl/,directiveStartBlank:/if|else[iI]f|list|for[eE]ach|switch|case|assign|global|local|include|import|function|macro|transform|visit|stop|return|call|setting|output[fF]ormat|nested|recurse|escape|ftl|items/,directiveEndCloseTag1:/if|list|items|sep|recover|attempt|for[eE]ach|local|global|assign|function|macro|output[fF]ormat|auto[eE]sc|no(?:autoe|AutoE)sc|compress|transform|switch|escape|no[eE]scape/,escapedChar:/\\(?:[ntrfbgla\\'"\{=]|(?:x[0-9A-Fa-f]{1,4}))/,asciiDigit:/[0-9]/,integer:/[0-9]+/,nonEscapedIdStartChar:/[\$@-Z_a-z\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u1FFF\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183-\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3006\u3031-\u3035\u303B-\u303C\u3040-\u318F\u31A0-\u31BA\u31F0-\u31FF\u3300-\u337F\u3400-\u4DB5\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5-\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40-\uFB41\uFB43-\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,escapedIdChar:/\\[\-\.:#]/,idStartChar:/(?:@nonEscapedIdStartChar)|(?:@escapedIdChar)/,id:/(?:@idStartChar)(?:(?:@idStartChar)|(?:@asciiDigit))*/,specialHashKeys:/\*\*|\*|false|true|in|as|using/,namedSymbols:/<=|>=|\\lte|\\lt|<|\\gte|\\gt|>|&&|\\and|->|->|==|!=|\+=|-=|\*=|\/=|%=|\+\+|--|<=|&&|\|\||:|\.\.\.|\.\.\*|\.\.<|\.\.!|\?\?|=|<|\+|-|\*|\/|%|\||\.\.|\?|!|&|\.|,|;/,arrows:["->","->"],delimiters:[";",":",",","."],stringOperators:["lte","lt","gte","gt"],noParseTags:["noparse","noParse","comment"],tokenizer:{[i("default__id__")]:[{include:i("@directive_token__id__")},{include:i("@interpolation_and_text_token__id__")}],[i("fmExpression__id__.directive")]:[{include:i("@blank_and_expression_comment_token__id__")},{include:i("@directive_end_token__id__")},{include:i("@expression_token__id__")}],[i("fmExpression__id__.interpolation")]:[{include:i("@blank_and_expression_comment_token__id__")},{include:i("@expression_token__id__")},{include:i("@greater_operators_token__id__")}],[i("inParen__id__.plain")]:[{include:i("@blank_and_expression_comment_token__id__")},{include:i("@directive_end_token__id__")},{include:i("@expression_token__id__")}],[i("inParen__id__.gt")]:[{include:i("@blank_and_expression_comment_token__id__")},{include:i("@expression_token__id__")},{include:i("@greater_operators_token__id__")}],[i("noSpaceExpression__id__")]:[{include:i("@no_space_expression_end_token__id__")},{include:i("@directive_end_token__id__")},{include:i("@expression_token__id__")}],[i("unifiedCall__id__")]:[{include:i("@unified_call_token__id__")}],[i("singleString__id__")]:[{include:i("@string_single_token__id__")}],[i("doubleString__id__")]:[{include:i("@string_double_token__id__")}],[i("rawSingleString__id__")]:[{include:i("@string_single_raw_token__id__")}],[i("rawDoubleString__id__")]:[{include:i("@string_double_raw_token__id__")}],[i("expressionComment__id__")]:[{include:i("@expression_comment_token__id__")}],[i("noParse__id__")]:[{include:i("@no_parse_token__id__")}],[i("terseComment__id__")]:[{include:i("@terse_comment_token__id__")}],[i("directive_token__id__")]:[[n(/(?:@startTag__id__)(@directiveStartCloseTag1)(?:@closeTag1__id__)/),o.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${e.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${e.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{cases:{"@noParseTags":{token:"tag",next:i("@noParse__id__.$3")},"@default":{token:"tag"}}},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[n(/(?:@startTag__id__)(@directiveStartCloseTag2)(?:@closeTag2__id__)/),o.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${e.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${e.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[n(/(?:@startTag__id__)(@directiveStartBlank)(@blank)/),o.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${e.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${e.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"",next:i("@fmExpression__id__.directive")}]],[n(/(?:@endTag__id__)(@directiveEndCloseTag1)(?:@closeTag1__id__)/),o.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${e.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${e.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[n(/(@open__id__)(@)/),o.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${e.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${e.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive",next:i("@unifiedCall__id__")}]],[n(/(@open__id__)(\/@)((?:(?:@id)(?:\.(?:@id))*)?)(?:@closeTag1__id__)/),[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[n(/(@open__id__)#--/),o.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${e.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${e.id}`}}}:{token:"comment",next:i("@terseComment__id__")}],[n(/(?:@startOrEndTag__id__)([a-zA-Z_]+)/),o.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${e.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${e.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag.invalid",next:i("@fmExpression__id__.directive")}]]],[i("interpolation_and_text_token__id__")]:[[n(/(@iOpen1__id__)(@iOpen2__id__)/),[{token:e.id==="bracket"?"@brackets.interpolation":"delimiter.interpolation"},{token:e.id==="bracket"?"delimiter.interpolation":"@brackets.interpolation",next:i("@fmExpression__id__.interpolation")}]],[/[\$#<\[\{]|(?:@blank)+|[^\$<#\[\{\n\r\t ]+/,{token:"source"}]],[i("string_single_token__id__")]:[[/[^'\\]/,{token:"string"}],[/@escapedChar/,{token:"string.escape"}],[/'/,{token:"string",next:"@pop"}]],[i("string_double_token__id__")]:[[/[^"\\]/,{token:"string"}],[/@escapedChar/,{token:"string.escape"}],[/"/,{token:"string",next:"@pop"}]],[i("string_single_raw_token__id__")]:[[/[^']+/,{token:"string.raw"}],[/'/,{token:"string.raw",next:"@pop"}]],[i("string_double_raw_token__id__")]:[[/[^"]+/,{token:"string.raw"}],[/"/,{token:"string.raw",next:"@pop"}]],[i("expression_token__id__")]:[[/(r?)(['"])/,{cases:{"r'":[{token:"keyword"},{token:"string.raw",next:i("@rawSingleString__id__")}],'r"':[{token:"keyword"},{token:"string.raw",next:i("@rawDoubleString__id__")}],"'":[{token:"source"},{token:"string",next:i("@singleString__id__")}],'"':[{token:"source"},{token:"string",next:i("@doubleString__id__")}]}}],[/(?:@integer)(?:\.(?:@integer))?/,{cases:{"(?:@integer)":{token:"number"},"@default":{token:"number.float"}}}],[/(\.)(@blank*)(@specialHashKeys)/,[{token:"delimiter"},{token:""},{token:"identifier"}]],[/(?:@namedSymbols)/,{cases:{"@arrows":{token:"meta.arrow"},"@delimiters":{token:"delimiter"},"@default":{token:"operators"}}}],[/@id/,{cases:{"@keywords":{token:"keyword.$0"},"@stringOperators":{token:"operators"},"@default":{token:"identifier"}}}],[/[\[\]\(\)\{\}]/,{cases:{"\\[":{cases:{"$S2==gt":{token:"@brackets",next:i("@inParen__id__.gt")},"@default":{token:"@brackets",next:i("@inParen__id__.plain")}}},"\\]":{cases:{...e.id==="bracket"?{"$S2==interpolation":{token:"@brackets.interpolation",next:"@popall"}}:{},...o.id==="bracket"?{"$S2==directive":{token:"@brackets.directive",next:"@popall"}}:{},[i("$S1==inParen__id__")]:{token:"@brackets",next:"@pop"},"@default":{token:"@brackets"}}},"\\(":{token:"@brackets",next:i("@inParen__id__.gt")},"\\)":{cases:{[i("$S1==inParen__id__")]:{token:"@brackets",next:"@pop"},"@default":{token:"@brackets"}}},"\\{":{cases:{"$S2==gt":{token:"@brackets",next:i("@inParen__id__.gt")},"@default":{token:"@brackets",next:i("@inParen__id__.plain")}}},"\\}":{cases:{...e.id==="bracket"?{}:{"$S2==interpolation":{token:"@brackets.interpolation",next:"@popall"}},[i("$S1==inParen__id__")]:{token:"@brackets",next:"@pop"},"@default":{token:"@brackets"}}}}}],[/\$\{/,{token:"delimiter.invalid"}]],[i("blank_and_expression_comment_token__id__")]:[[/(?:@blank)+/,{token:""}],[/[<\[][#!]--/,{token:"comment",next:i("@expressionComment__id__")}]],[i("directive_end_token__id__")]:[[/>/,o.id==="bracket"?{token:"operators"}:{token:"@brackets.directive",next:"@popall"}],[n(/(\/)(@close__id__)/),[{token:"delimiter.directive"},{token:"@brackets.directive",next:"@popall"}]]],[i("greater_operators_token__id__")]:[[/>/,{token:"operators"}],[/>=/,{token:"operators"}]],[i("no_space_expression_end_token__id__")]:[[/(?:@blank)+/,{token:"",switchTo:i("@fmExpression__id__.directive")}]],[i("unified_call_token__id__")]:[[/(@id)((?:@blank)+)/,[{token:"tag"},{token:"",next:i("@fmExpression__id__.directive")}]],[n(/(@id)(\/?)(@close__id__)/),[{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive",next:"@popall"}]],[/./,{token:"@rematch",next:i("@noSpaceExpression__id__")}]],[i("no_parse_token__id__")]:[[n(/(@open__id__)(\/#?)([a-zA-Z]+)((?:@blank)*)(@close__id__)/),{cases:{"$S2==$3":[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:""},{token:"@brackets.directive",next:"@popall"}],"$S2==comment":[{token:"comment"},{token:"comment"},{token:"comment"},{token:"comment"},{token:"comment"}],"@default":[{token:"source"},{token:"source"},{token:"source"},{token:"source"},{token:"source"}]}}],[/[^<\[\-]+|[<\[\-]/,{cases:{"$S2==comment":{token:"comment"},"@default":{token:"source"}}}]],[i("expression_comment_token__id__")]:[[/--[>\]]/,{token:"comment",next:"@pop"}],[/[^\->\]]+|[>\]\-]/,{token:"comment"}]],[i("terse_comment_token__id__")]:[[n(/--(?:@close__id__)/),{token:"comment",next:"@popall"}],[/[^<\[\-]+|[<\[\-]/,{token:"comment"}]]}}}function YTe(o){let e=tS(KN,o),t=tS(GN,o),i=tS(uze,o);return{...e,...t,...i,unicode:!0,includeLF:!1,start:`default_auto_${o.id}`,ignoreCase:!1,defaultToken:"invalid",tokenPostfix:".freemarker2",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],tokenizer:{...e.tokenizer,...t.tokenizer,...i.tokenizer}}}var QH,JH,KN,GN,uze,Ese,Tse,fze,gze,mze,pze,_ze,bze,Lv=x(()=>{md();QH=["assign","flush","ftl","return","global","import","include","break","continue","local","nested","nt","setting","stop","t","lt","rt","fallback"],JH=["attempt","autoesc","autoEsc","compress","comment","escape","noescape","function","if","list","items","sep","macro","noparse","noParse","noautoesc","noAutoEsc","outputformat","switch","visit","recurse"],KN={close:">",id:"angle",open:"<"},GN={close:"\\]",id:"bracket",open:"\\["},uze={close:"[>\\]]",id:"auto",open:"[<\\[]"},Ese={close:"\\}",id:"dollar",open1:"\\$",open2:"\\{"},Tse={close:"\\]",id:"bracket",open1:"\\[",open2:"="};fze={conf:e7(KN),language:tS(KN,Ese)},gze={conf:e7(GN),language:tS(GN,Ese)},mze={conf:e7(KN),language:tS(KN,Tse)},pze={conf:e7(GN),language:tS(GN,Tse)},_ze={conf:GTe(),language:YTe(Ese)},bze={conf:GTe(),language:YTe(Tse)}});var ZTe={};nt(ZTe,{conf:()=>vze,language:()=>wze});var vze,wze,XTe=x(()=>{vze={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"`",close:"`",notIn:["string"]},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"`",close:"`"},{open:'"',close:'"'},{open:"'",close:"'"}]},wze={defaultToken:"",tokenPostfix:".go",keywords:["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","bool","true","false","uint8","uint16","uint32","uint64","int8","int16","int32","int64","float32","float64","complex64","complex128","byte","rune","uint","int","uintptr","string","nil"],operators:["+","-","*","/","%","&","|","^","<<",">>","&^","+=","-=","*=","/=","%=","&=","|=","^=","<<=",">>=","&^=","&&","||","<-","++","--","==","<",">","=","!","!=","<=",">=",":=","...","(",")","","]","{","}",",",";",".",":"],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/\d*\d+[eE]([\-+]?\d+)?/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F]/,"number.hex"],[/0[0-7']*[0-7]/,"number.octal"],[/0[bB][0-1']*[0-1]/,"number.binary"],[/\d[\d']*/,"number"],[/\d/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"],[/`/,"string","@rawstring"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@doccomment"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],doccomment:[[/[^\/*]+/,"comment.doc"],[/\/\*/,"comment.doc.invalid"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],rawstring:[[/[^\`]/,"string"],[/`/,"string","@pop"]]}}});var QTe={};nt(QTe,{conf:()=>Cze,language:()=>yze});var Cze,yze,JTe=x(()=>{Cze={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"""',close:'"""',notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"""',close:'"""'},{open:'"',close:'"'}],folding:{offSide:!0}},yze={defaultToken:"invalid",tokenPostfix:".gql",keywords:["null","true","false","query","mutation","subscription","extend","schema","directive","scalar","type","interface","union","enum","input","implements","fragment","on"],typeKeywords:["Int","Float","String","Boolean","ID"],directiveLocations:["SCHEMA","SCALAR","OBJECT","FIELD_DEFINITION","ARGUMENT_DEFINITION","INTERFACE","UNION","ENUM","ENUM_VALUE","INPUT_OBJECT","INPUT_FIELD_DEFINITION","QUERY","MUTATION","SUBSCRIPTION","FIELD","FRAGMENT_DEFINITION","FRAGMENT_SPREAD","INLINE_FRAGMENT","VARIABLE_DEFINITION"],operators:["=","!","?",":","&","|"],symbols:/[=!?:&|]+/,escapes:/\\(?:["\\\/bfnrt]|u[0-9A-Fa-f]{4})/,tokenizer:{root:[[/[a-z_][\w$]*/,{cases:{"@keywords":"keyword","@default":"key.identifier"}}],[/[$][\w$]*/,{cases:{"@keywords":"keyword","@default":"argument.identifier"}}],[/[A-Z][\w\$]*/,{cases:{"@typeKeywords":"keyword","@default":"type.identifier"}}],{include:"@whitespace"},[/[{}()\[\]]/,"@brackets"],[/@symbols/,{cases:{"@operators":"operator","@default":""}}],[/@\s*[a-zA-Z_\$][\w\$]*/,{token:"annotation",log:"annotation token: $0"}],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F]+/,"number.hex"],[/\d+/,"number"],[/[;,.]/,"delimiter"],[/"""/,{token:"string",next:"@mlstring",nextEmbedded:"markdown"}],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,{token:"string.quote",bracket:"@open",next:"@string"}]],mlstring:[[/[^"]+/,"string"],['"""',{token:"string",next:"@pop",nextEmbedded:"@pop"}]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",bracket:"@close",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,""],[/#.*$/,"comment"]]}}});var tDe={};nt(tDe,{conf:()=>Sze,language:()=>xze});var eDe,Sze,xze,iDe=x(()=>{md();eDe=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],Sze={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["{{!--","--}}"]},brackets:[[""],["<",">"],["{{","}}"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${eDe.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:Ei.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${eDe.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:Ei.IndentAction.Indent}}]},xze={defaultToken:"",tokenPostfix:"",tokenizer:{root:[[/\{\{!--/,"comment.block.start.handlebars","@commentBlock"],[/\{\{!/,"comment.start.handlebars","@comment"],[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.root"}],[/)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)(script)/,["delimiter.html",{token:"tag.html",next:"@script"}]],[/(<)(style)/,["delimiter.html",{token:"tag.html",next:"@style"}]],[/(<)([:\w]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)(\w+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/]+/,"metatag.content.html"],[/>/,"metatag.html","@pop"]],comment:[[/\}\}/,"comment.end.handlebars","@pop"],[/./,"comment.content.handlebars"]],commentBlock:[[/--\}\}/,"comment.block.end.handlebars","@pop"],[/./,"comment.content.handlebars"]],commentHtml:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.comment"}],[/-->/,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],handlebarsInSimpleState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3"}],{include:"handlebarsRoot"}],handlebarsInEmbeddedState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],{include:"handlebarsRoot"}],handlebarsRoot:[[/"[^"]*"/,"string.handlebars"],[/[#/][^\s}]+/,"keyword.helper.handlebars"],[/else\b/,"keyword.helper.handlebars"],[/[\s]+/],[/[^}]/,"variable.parameter.handlebars"]]}}});var nDe={};nt(nDe,{conf:()=>kze,language:()=>Lze});var kze,Lze,oDe=x(()=>{kze={comments:{lineComment:"#",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}]},Lze={defaultToken:"",tokenPostfix:".hcl",keywords:["var","local","path","for_each","any","string","number","bool","true","false","null","if ","else ","endif ","for ","in","endfor"],operators:["=",">=","<=","==","!=","+","-","*","/","%","&&","||","!","<",">","?","...",":"],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"operator","@default":""}}],[/\d*\d+[eE]([\-+]?\d+)?/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/\d[\d']*/,"number"],[/\d/,"number"],[/[;,.]/,"delimiter"],[/"/,"string","@string"],[/'/,"invalid"]],heredoc:[[/<<[-]*\s*["]?([\w\-]+)["]?/,{token:"string.heredoc.delimiter",next:"@heredocBody.$1"}]],heredocBody:[[/([\w\-]+)$/,{cases:{"$1==$S2":[{token:"string.heredoc.delimiter",next:"@popall"}],"@default":"string.heredoc"}}],[/./,"string.heredoc"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"],[/#.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],string:[[/\$\{/,{token:"delimiter",next:"@stringExpression"}],[/[^\\"\$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@popall"]],stringInsideExpression:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],stringExpression:[[/\}/,{token:"delimiter",next:"@pop"}],[/"/,"string","@stringInsideExpression"],{include:"@terraform"}]}}});var rDe={};nt(rDe,{conf:()=>Ize,language:()=>Eze});var sDe,Ize,Eze,aDe=x(()=>{md();sDe=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],Ize={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:[""]},brackets:[[""],["<",">"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${sDe.join("|")}))([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:Ei.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${sDe.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:Ei.IndentAction.Indent}}],folding:{markers:{start:new RegExp("^\\s*"),end:new RegExp("^\\s*")}}},Eze={defaultToken:"",tokenPostfix:".html",ignoreCase:!0,tokenizer:{root:[[/)/,["delimiter","tag","","delimiter"]],[/(<)(script)/,["delimiter",{token:"tag",next:"@script"}]],[/(<)(style)/,["delimiter",{token:"tag",next:"@style"}]],[/(<)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/(<\/)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/]+/,"metatag.content"],[/>/,"metatag","@pop"]],comment:[[/-->/,"comment","@pop"],[/[^-]+/,"comment.content"],[/./,"comment.content"]],otherTag:[[/\/?>/,"delimiter","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],scriptAfterType:[[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/"module"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.text/javascript"}],[/'module'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.text/javascript"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/>/,{token:"delimiter",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]],style:[[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],styleAfterType:[[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/>/,{token:"delimiter",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]]}}});var lDe={};nt(lDe,{conf:()=>Tze,language:()=>Dze});var Tze,Dze,cDe=x(()=>{Tze={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},Dze={defaultToken:"",tokenPostfix:".ini",escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/^\[[^\]]*\]/,"metatag"],[/(^\w+)(\s*)(\=)/,["key","","delimiter"]],{include:"@whitespace"},[/\d+/,"number"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string",'@string."'],[/'/,"string","@string.'"]],whitespace:[[/[ \t\r\n]+/,""],[/^\s*[#;].*$/,"comment"]],string:[[/[^\\"']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/["']/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":"string"}}]]}}});var dDe={};nt(dDe,{conf:()=>Nze,language:()=>Rze});var Nze,Rze,hDe=x(()=>{Nze={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}],folding:{markers:{start:new RegExp("^\\s*//\\s*(?:(?:#?region\\b)|(?:))")}}},Rze={defaultToken:"",tokenPostfix:".java",keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false","yield","record","sealed","non-sealed","permits"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/@\s*[a-zA-Z_\$][\w\$]*/,"annotation"],[/(@digits)[eE]([\-+]?(@digits))?[fFdD]?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?[fFdD]?/,"number.float"],[/0[xX](@hexdigits)[Ll]?/,"number.hex"],[/0(@octaldigits)[Ll]?/,"number.octal"],[/0[bB](@binarydigits)[Ll]?/,"number.binary"],[/(@digits)[fFdD]/,"number.float"],[/(@digits)[lL]?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"""/,"string","@multistring"],[/"/,"string","@string"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@javadoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],javadoc:[[/[^\/*]+/,"comment.doc"],[/\/\*/,"comment.doc.invalid"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],multistring:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"""/,"string","@pop"],[/./,"string"]]}}});var uDe={};nt(uDe,{conf:()=>Dse,language:()=>su});var Dse,su,Nse=x(()=>{md();Dse={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],onEnterRules:[{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,afterText:/^\s*\*\/$/,action:{indentAction:Ei.IndentAction.IndentOutdent,appendText:" * "}},{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,action:{indentAction:Ei.IndentAction.None,appendText:" * "}},{beforeText:/^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,action:{indentAction:Ei.IndentAction.None,appendText:"* "}},{beforeText:/^(\t|(\ \ ))*\ \*\/\s*$/,action:{indentAction:Ei.IndentAction.None,removeText:1}}],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"`",close:"`",notIn:["string","comment"]},{open:"/**",close:" */",notIn:["string"]}],folding:{markers:{start:new RegExp("^\\s*//\\s*#?region\\b"),end:new RegExp("^\\s*//\\s*#?endregion\\b")}}},su={defaultToken:"invalid",tokenPostfix:".ts",keywords:["abstract","any","as","asserts","bigint","boolean","break","case","catch","class","continue","const","constructor","debugger","declare","default","delete","do","else","enum","export","extends","false","finally","for","from","function","get","if","implements","import","in","infer","instanceof","interface","is","keyof","let","module","namespace","never","new","null","number","object","out","package","private","protected","public","override","readonly","require","global","return","satisfies","set","static","string","super","switch","symbol","this","throw","true","try","type","typeof","undefined","unique","unknown","var","void","while","with","yield","async","await","of"],operators:["<=",">=","==","!=","===","!==","=>","+","-","**","*","/","%","++","--","<<",">",">>>","&","|","^","!","~","&&","||","??","?",":","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=","@"],symbols:/[=>](?!@symbols)/,"@brackets"],[/!(?=([^=]|$))/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,"number.float"],[/0[xX](@hexdigits)n?/,"number.hex"],[/0[oO]?(@octaldigits)n?/,"number.octal"],[/0[bB](@binarydigits)n?/,"number.binary"],[/(@digits)n?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string_double"],[/'/,"string","@string_single"],[/`/,"string","@string_backtick"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@jsdoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],jsdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/,["regexp.escape.control","regexp.escape.control"]],[/[()]/,"regexp.escape.control"],[/@regexpctl/,"regexp.escape.control"],[/[^\\\/]/,"regexp"],[/@regexpesc/,"regexp.escape"],[/\\\./,"regexp.invalid"],[/(\/)([dgimsuy]*)/,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/,"regexp.escape.control"],[/\^/,"regexp.invalid"],[/@regexpesc/,"regexp.escape"],[/[^\]]/,"regexp"],[/\]/,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],string_single:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],string_backtick:[[/\$\{/,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\`$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/`/,"string","@pop"]],bracketCounting:[[/\{/,"delimiter.bracket","@bracketCounting"],[/\}/,"delimiter.bracket","@pop"],{include:"common"}]}}});var fDe={};nt(fDe,{conf:()=>Aze,language:()=>Mze});var Aze,Mze,gDe=x(()=>{Nse();Aze=Dse,Mze={defaultToken:"invalid",tokenPostfix:".js",keywords:["break","case","catch","class","continue","const","constructor","debugger","default","delete","do","else","export","extends","false","finally","for","from","function","get","if","import","in","instanceof","let","new","null","return","set","static","super","switch","symbol","this","throw","true","try","typeof","undefined","var","void","while","with","yield","async","await","of"],typeKeywords:[],operators:su.operators,symbols:su.symbols,escapes:su.escapes,digits:su.digits,octaldigits:su.octaldigits,binarydigits:su.binarydigits,hexdigits:su.hexdigits,regexpctl:su.regexpctl,regexpesc:su.regexpesc,tokenizer:su.tokenizer}});var mDe={};nt(mDe,{conf:()=>Oze,language:()=>Pze});var Oze,Pze,pDe=x(()=>{Oze={brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},Pze={tokenPostfix:".julia",keywords:["begin","while","if","for","try","return","break","continue","function","macro","quote","let","local","global","const","do","struct","module","baremodule","using","import","export","end","else","elseif","catch","finally","mutable","primitive","abstract","type","in","isa","where","new"],types:["LinRange","LineNumberNode","LinearIndices","LoadError","MIME","Matrix","Method","MethodError","Missing","MissingException","Module","NTuple","NamedTuple","Nothing","Number","OrdinalRange","OutOfMemoryError","OverflowError","Pair","PartialQuickSort","PermutedDimsArray","Pipe","Ptr","QuoteNode","Rational","RawFD","ReadOnlyMemoryError","Real","ReentrantLock","Ref","Regex","RegexMatch","RoundingMode","SegmentationFault","Set","Signed","Some","StackOverflowError","StepRange","StepRangeLen","StridedArray","StridedMatrix","StridedVecOrMat","StridedVector","String","StringIndexError","SubArray","SubString","SubstitutionString","Symbol","SystemError","Task","Text","TextDisplay","Timer","Tuple","Type","TypeError","TypeVar","UInt","UInt128","UInt16","UInt32","UInt64","UInt8","UndefInitializer","AbstractArray","UndefKeywordError","AbstractChannel","UndefRefError","AbstractChar","UndefVarError","AbstractDict","Union","AbstractDisplay","UnionAll","AbstractFloat","UnitRange","AbstractIrrational","Unsigned","AbstractMatrix","AbstractRange","Val","AbstractSet","Vararg","AbstractString","VecElement","AbstractUnitRange","VecOrMat","AbstractVecOrMat","Vector","AbstractVector","VersionNumber","Any","WeakKeyDict","ArgumentError","WeakRef","Array","AssertionError","BigFloat","BigInt","BitArray","BitMatrix","BitSet","BitVector","Bool","BoundsError","CapturedException","CartesianIndex","CartesianIndices","Cchar","Cdouble","Cfloat","Channel","Char","Cint","Cintmax_t","Clong","Clonglong","Cmd","Colon","Complex","ComplexF16","ComplexF32","ComplexF64","CompositeException","Condition","Cptrdiff_t","Cshort","Csize_t","Cssize_t","Cstring","Cuchar","Cuint","Cuintmax_t","Culong","Culonglong","Cushort","Cvoid","Cwchar_t","Cwstring","DataType","DenseArray","DenseMatrix","DenseVecOrMat","DenseVector","Dict","DimensionMismatch","Dims","DivideError","DomainError","EOFError","Enum","ErrorException","Exception","ExponentialBackOff","Expr","Float16","Float32","Float64","Function","GlobalRef","HTML","IO","IOBuffer","IOContext","IOStream","IdDict","IndexCartesian","IndexLinear","IndexStyle","InexactError","InitError","Int","Int128","Int16","Int32","Int64","Int8","Integer","InterruptException","InvalidStateException","Irrational","KeyError"],keywordops:["<:",">:",":","=>","...",".","->","?"],allops:/[^\w\d\s()\[\]{}"'#]+/,constants:["true","false","nothing","missing","undef","Inf","pi","NaN","\u03C0","\u212F","ans","PROGRAM_FILE","ARGS","C_NULL","VERSION","DEPOT_PATH","LOAD_PATH"],operators:["!","!=","!==","%","&","*","+","-","/","//","<","<<","<=","==","===","=>",">",">=",">>",">>>","\\","^","|","|>","~","\xF7","\u2208","\u2209","\u220B","\u220C","\u2218","\u221A","\u221B","\u2229","\u222A","\u2248","\u2249","\u2260","\u2261","\u2262","\u2264","\u2265","\u2286","\u2287","\u2288","\u2289","\u228A","\u228B","\u22BB"],brackets:[{open:"(",close:")",token:"delimiter.parenthesis"},{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"}],ident:/π|ℯ|\b(?!\d)\w+\b/,escape:/(?:[abefnrstv\\"'\n\r]|[0-7]{1,3}|x[0-9A-Fa-f]{1,2}|u[0-9A-Fa-f]{4})/,escapes:/\\(?:C\-(@escape|.)|c(@escape|.)|@escape)/,tokenizer:{root:[[/(::)\s*|\b(isa)\s+/,"keyword","@typeanno"],[/\b(isa)(\s*\(@ident\s*,\s*)/,["keyword",{token:"",next:"@typeanno"}]],[/\b(type|struct)[ \t]+/,"keyword","@typeanno"],[/^\s*:@ident[!?]?/,"metatag"],[/(return)(\s*:@ident[!?]?)/,["keyword","metatag"]],[/(\(|\[|\{|@allops)(\s*:@ident[!?]?)/,["","metatag"]],[/:\(/,"metatag","@quote"],[/r"""/,"regexp.delim","@tregexp"],[/r"/,"regexp.delim","@sregexp"],[/raw"""/,"string.delim","@rtstring"],[/[bv]?"""/,"string.delim","@dtstring"],[/raw"/,"string.delim","@rsstring"],[/[bv]?"/,"string.delim","@dsstring"],[/(@ident)\{/,{cases:{"$1@types":{token:"type",next:"@gen"},"@default":{token:"type",next:"@gen"}}}],[/@ident[!?'']?(?=\.?\()/,{cases:{"@types":"type","@keywords":"keyword","@constants":"variable","@default":"keyword.flow"}}],[/@ident[!?']?/,{cases:{"@types":"type","@keywords":"keyword","@constants":"variable","@default":"identifier"}}],[/\$\w+/,"key"],[/\$\(/,"key","@paste"],[/@@@ident/,"annotation"],{include:"@whitespace"},[/'(?:@escapes|.)'/,"string.character"],[/[()\[\]{}]/,"@brackets"],[/@allops/,{cases:{"@keywordops":"keyword","@operators":"operator"}}],[/[;,]/,"delimiter"],[/0[xX][0-9a-fA-F](_?[0-9a-fA-F])*/,"number.hex"],[/0[_oO][0-7](_?[0-7])*/,"number.octal"],[/0[bB][01](_?[01])*/,"number.binary"],[/[+\-]?\d+(\.\d+)?(im?|[eE][+\-]?\d+(\.\d+)?)?/,"number"]],typeanno:[[/[a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*\{/,"type","@gen"],[/([a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*)(\s*<:\s*)/,["type","keyword"]],[/[a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*/,"type","@pop"],["","","@pop"]],gen:[[/[a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*\{/,"type","@push"],[/[a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*/,"type"],[/<:/,"keyword"],[/(\})(\s*<:\s*)/,["type",{token:"keyword",next:"@pop"}]],[/\}/,"type","@pop"],{include:"@root"}],quote:[[/\$\(/,"key","@paste"],[/\(/,"@brackets","@paren"],[/\)/,"metatag","@pop"],{include:"@root"}],paste:[[/:\(/,"metatag","@quote"],[/\(/,"@brackets","@paren"],[/\)/,"key","@pop"],{include:"@root"}],paren:[[/\$\(/,"key","@paste"],[/:\(/,"metatag","@quote"],[/\(/,"@brackets","@push"],[/\)/,"@brackets","@pop"],{include:"@root"}],sregexp:[[/^.*/,"invalid"],[/[^\\"()\[\]{}]/,"regexp"],[/[()\[\]{}]/,"@brackets"],[/\\./,"operator.scss"],[/"[imsx]*/,"regexp.delim","@pop"]],tregexp:[[/[^\\"()\[\]{}]/,"regexp"],[/[()\[\]{}]/,"@brackets"],[/\\./,"operator.scss"],[/"(?!"")/,"string"],[/"""[imsx]*/,"regexp.delim","@pop"]],rsstring:[[/^.*/,"invalid"],[/[^\\"]/,"string"],[/\\./,"string.escape"],[/"/,"string.delim","@pop"]],rtstring:[[/[^\\"]/,"string"],[/\\./,"string.escape"],[/"(?!"")/,"string"],[/"""/,"string.delim","@pop"]],dsstring:[[/^.*/,"invalid"],[/[^\\"\$]/,"string"],[/\$/,"","@interpolated"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string.delim","@pop"]],dtstring:[[/[^\\"\$]/,"string"],[/\$/,"","@interpolated"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"(?!"")/,"string"],[/"""/,"string.delim","@pop"]],interpolated:[[/\(/,{token:"",switchTo:"@interpolated_compound"}],[/[a-zA-Z_]\w*/,"identifier"],["","","@pop"]],interpolated_compound:[[/\)/,"","@pop"],{include:"@root"}],whitespace:[[/[ \t\r\n]+/,""],[/#=/,"comment","@multi_comment"],[/#.*$/,"comment"]],multi_comment:[[/#=/,"comment","@push"],[/=#/,"comment","@pop"],[/=(?!#)|#(?!=)/,"comment"],[/[^#=]+/,"comment"]]}}});var _De={};nt(_De,{conf:()=>Fze,language:()=>Bze});var Fze,Bze,bDe=x(()=>{Fze={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}],folding:{markers:{start:new RegExp("^\\s*//\\s*(?:(?:#?region\\b)|(?:))")}}},Bze={defaultToken:"",tokenPostfix:".kt",keywords:["as","as?","break","class","continue","do","else","false","for","fun","if","in","!in","interface","is","!is","null","object","package","return","super","this","throw","true","try","typealias","val","var","when","while","by","catch","constructor","delegate","dynamic","field","file","finally","get","import","init","param","property","receiver","set","setparam","where","actual","abstract","annotation","companion","const","crossinline","data","enum","expect","external","final","infix","inline","inner","internal","lateinit","noinline","open","operator","out","override","private","protected","public","reified","sealed","suspend","tailrec","vararg","field","it"],operators:["+","-","*","/","%","=","+=","-=","*=","/=","%=","++","--","&&","||","!","==","!=","===","!==",">","<","<=",">=","[","]","!!","?.","?:","::","..",":","?","->","@",";","$","_"],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/@\s*[a-zA-Z_\$][\w\$]*/,"annotation"],[/(@digits)[eE]([\-+]?(@digits))?[fF]?/,"number.float"],[/(@digits)?\.(@digits)([eE][\-+]?(@digits))?[fF]?/,"number.float"],[/0[xX](@hexdigits)[uU]?L?/,"number.hex"],[/0[bB](@binarydigits)[uU]?L?/,"number.binary"],[/(@digits)[fF]/,"number.float"],[/(@digits)[uU]?L?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"""/,"string","@multistring"],[/"/,"string","@string"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@javadoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\/\*/,"comment","@comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],javadoc:[[/[^\/*]+/,"comment.doc"],[/\/\*/,"comment.doc","@push"],[/\/\*/,"comment.doc.invalid"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],multistring:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"""/,"string","@pop"],[/./,"string"]]}}});var vDe={};nt(vDe,{conf:()=>Wze,language:()=>Hze});var Wze,Hze,wDe=x(()=>{Wze={wordPattern:/(#?-?\d*\.\d\w*%?)|([@#!.:]?[\w-?]+%?)|[@#!.]/g,comments:{blockComment:["/*","*/"],lineComment:"//"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/"),end:new RegExp("^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/")}}},Hze={defaultToken:"",tokenPostfix:".less",identifier:"-?-?([a-zA-Z]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*",identifierPlus:"-?-?([a-zA-Z:.]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-:.]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],tokenizer:{root:[{include:"@nestedJSBegin"},["[ \\t\\r\\n]+",""],{include:"@comments"},{include:"@keyword"},{include:"@strings"},{include:"@numbers"},["[*_]?[a-zA-Z\\-\\s]+(?=:.*(;|(\\\\$)))","attribute.name","@attribute"],["url(\\-prefix)?\\(",{token:"tag",next:"@urldeclaration"}],["[{}()\\[\\]]","@brackets"],["[,:;]","delimiter"],["#@identifierPlus","tag.id"],["&","tag"],["\\.@identifierPlus(?=\\()","tag.class","@attribute"],["\\.@identifierPlus","tag.class"],["@identifierPlus","tag"],{include:"@operators"},["@(@identifier(?=[:,\\)]))","variable","@attribute"],["@(@identifier)","variable"],["@","key","@atRules"]],nestedJSBegin:[["``","delimiter.backtick"],["`",{token:"delimiter.backtick",next:"@nestedJSEnd",nextEmbedded:"text/javascript"}]],nestedJSEnd:[["`",{token:"delimiter.backtick",next:"@pop",nextEmbedded:"@pop"}]],operators:[["[<>=\\+\\-\\*\\/\\^\\|\\~]","operator"]],keyword:[["(@[\\s]*import|![\\s]*important|true|false|when|iscolor|isnumber|isstring|iskeyword|isurl|ispixel|ispercentage|isem|hue|saturation|lightness|alpha|lighten|darken|saturate|desaturate|fadein|fadeout|fade|spin|mix|round|ceil|floor|percentage)\\b","keyword"]],urldeclaration:[{include:"@strings"},[`[^)\r +]+`,"string"],["\\)",{token:"tag",next:"@pop"}]],attribute:[{include:"@nestedJSBegin"},{include:"@comments"},{include:"@strings"},{include:"@numbers"},{include:"@keyword"},["[a-zA-Z\\-]+(?=\\()","attribute.value","@attribute"],[">","operator","@pop"],["@identifier","attribute.value"],{include:"@operators"},["@(@identifier)","variable"],["[)\\}]","@brackets","@pop"],["[{}()\\[\\]>]","@brackets"],["[;]","delimiter","@pop"],["[,=:]","delimiter"],["\\s",""],[".","attribute.value"]],comments:[["\\/\\*","comment","@comment"],["\\/\\/+.*","comment"]],comment:[["\\*\\/","comment","@pop"],[".","comment"]],numbers:[["(\\d*\\.)?\\d+([eE][\\-+]?\\d+)?",{token:"attribute.value.number",next:"@units"}],["#[0-9a-fA-F_]+(?!\\w)","attribute.value.hex"]],units:[["(em|ex|ch|rem|fr|vmin|vmax|vw|vh|vm|cm|mm|in|px|pt|pc|deg|grad|rad|turn|s|ms|Hz|kHz|%)?","attribute.value.unit","@pop"]],strings:[['~?"',{token:"string.delimiter",next:"@stringsEndDoubleQuote"}],["~?'",{token:"string.delimiter",next:"@stringsEndQuote"}]],stringsEndDoubleQuote:[['\\\\"',"string"],['"',{token:"string.delimiter",next:"@popall"}],[".","string"]],stringsEndQuote:[["\\\\'","string"],["'",{token:"string.delimiter",next:"@popall"}],[".","string"]],atRules:[{include:"@comments"},{include:"@strings"},["[()]","delimiter"],["[\\{;]","delimiter","@pop"],[".","key"]]}}});var CDe={};nt(CDe,{conf:()=>Vze,language:()=>zze});var Vze,zze,yDe=x(()=>{Vze={comments:{lineComment:"COMMENT"},brackets:[["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:":",close:"."}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"`",close:"`"},{open:'"',close:'"'},{open:"'",close:"'"},{open:":",close:"."}],folding:{markers:{start:new RegExp("^\\s*(::\\s*|COMMENT\\s+)#region"),end:new RegExp("^\\s*(::\\s*|COMMENT\\s+)#endregion")}}},zze={tokenPostfix:".lexon",ignoreCase:!0,keywords:["lexon","lex","clause","terms","contracts","may","pay","pays","appoints","into","to"],typeKeywords:["amount","person","key","time","date","asset","text"],operators:["less","greater","equal","le","gt","or","and","add","added","subtract","subtracted","multiply","multiplied","times","divide","divided","is","be","certified"],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,"delimiter"],[/\d*\.\d*\.\d*/,"number.semver"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F]+/,"number.hex"],[/\d+/,"number"],[/[;,.]/,"delimiter"]],quoted_identifier:[[/[^\\"]+/,"identifier"],[/"/,{token:"identifier.quote",bracket:"@close",next:"@pop"}]],space_identifier_until_period:[[":","delimiter"],[" ",{token:"white",next:"@identifier_rest"}]],identifier_until_period:[{include:"@whitespace"},[":",{token:"delimiter",next:"@identifier_rest"}],[/[^\\.]+/,"identifier"],[/\./,{token:"delimiter",bracket:"@close",next:"@pop"}]],identifier_rest:[[/[^\\.]+/,"identifier"],[/\./,{token:"delimiter",bracket:"@close",next:"@pop"}]],semver:[{include:"@whitespace"},[":","delimiter"],[/\d*\.\d*\.\d*/,{token:"number.semver",bracket:"@close",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,"white"]]}}});var SDe={};nt(SDe,{conf:()=>Uze,language:()=>$ze});var Uze,$ze,xDe=x(()=>{Uze={comments:{lineComment:"--",blockComment:["--[[","]]"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},$ze={defaultToken:"",tokenPostfix:".lua",keywords:["and","break","do","else","elseif","end","false","for","function","goto","if","in","local","nil","not","or","repeat","return","then","true","until","while"],brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.array",open:"[",close:"]"},{token:"delimiter.parenthesis",open:"(",close:")"}],operators:["+","-","*","/","%","^","#","==","~=","<=",">=","<",">","=",";",":",",",".","..","..."],symbols:/[=>qze,language:()=>jze});var kDe,qze,jze,IDe=x(()=>{md();kDe=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],qze={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,brackets:[[""],["<",">"],["{{","}}"],["{%","%}"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"%",close:"%"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${kDe.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:Ei.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${kDe.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:Ei.IndentAction.Indent}}]},jze={defaultToken:"",tokenPostfix:"",builtinTags:["if","else","elseif","endif","render","assign","capture","endcapture","case","endcase","comment","endcomment","cycle","decrement","for","endfor","include","increment","layout","raw","endraw","render","tablerow","endtablerow","unless","endunless"],builtinFilters:["abs","append","at_least","at_most","capitalize","ceil","compact","date","default","divided_by","downcase","escape","escape_once","first","floor","join","json","last","lstrip","map","minus","modulo","newline_to_br","plus","prepend","remove","remove_first","replace","replace_first","reverse","round","rstrip","size","slice","sort","sort_natural","split","strip","strip_html","strip_newlines","times","truncate","truncatewords","uniq","upcase","url_decode","url_encode","where"],constants:["true","false"],operators:["==","!=",">","<",">=","<="],symbol:/[=>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)([:\w]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)([\w\-]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[//,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],liquidState:[[/\{\{/,"delimiter.output.liquid"],[/\}\}/,{token:"delimiter.output.liquid",switchTo:"@$S2.$S3"}],[/\{\%/,"delimiter.tag.liquid"],[/raw\s*\%\}/,"delimiter.tag.liquid","@liquidRaw"],[/\%\}/,{token:"delimiter.tag.liquid",switchTo:"@$S2.$S3"}],{include:"liquidRoot"}],liquidRaw:[[/^(?!\{\%\s*endraw\s*\%\}).+/],[/\{\%/,"delimiter.tag.liquid"],[/@identifier/],[/\%\}/,{token:"delimiter.tag.liquid",next:"@root"}]],liquidRoot:[[/\d+(\.\d+)?/,"number.liquid"],[/"[^"]*"/,"string.liquid"],[/'[^']*'/,"string.liquid"],[/\s+/],[/@symbol/,{cases:{"@operators":"operator.liquid","@default":""}}],[/\./],[/@identifier/,{cases:{"@constants":"keyword.liquid","@builtinFilters":"predefined.liquid","@builtinTags":"predefined.liquid","@default":"variable.liquid"}}],[/[^}|%]/,"variable.liquid"]]}}});var EDe={};nt(EDe,{conf:()=>Kze,language:()=>Gze});var Kze,Gze,TDe=x(()=>{Kze={comments:{blockComment:["(*","*)"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"[",close:"]"},{open:"{",close:"}"},{open:"(",close:")"},{open:"(*",close:"*)"},{open:"<*",close:"*>"},{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]}]},Gze={defaultToken:"",tokenPostfix:".m3",brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"}],keywords:["AND","ANY","ARRAY","AS","BEGIN","BITS","BRANDED","BY","CASE","CONST","DIV","DO","ELSE","ELSIF","END","EVAL","EXCEPT","EXCEPTION","EXIT","EXPORTS","FINALLY","FOR","FROM","GENERIC","IF","IMPORT","IN","INTERFACE","LOCK","LOOP","METHODS","MOD","MODULE","NOT","OBJECT","OF","OR","OVERRIDES","PROCEDURE","RAISE","RAISES","READONLY","RECORD","REF","REPEAT","RETURN","REVEAL","SET","THEN","TO","TRY","TYPE","TYPECASE","UNSAFE","UNTIL","UNTRACED","VALUE","VAR","WHILE","WITH"],reservedConstNames:["ABS","ADR","ADRSIZE","BITSIZE","BYTESIZE","CEILING","DEC","DISPOSE","FALSE","FIRST","FLOAT","FLOOR","INC","ISTYPE","LAST","LOOPHOLE","MAX","MIN","NARROW","NEW","NIL","NUMBER","ORD","ROUND","SUBARRAY","TRUE","TRUNC","TYPECODE","VAL"],reservedTypeNames:["ADDRESS","ANY","BOOLEAN","CARDINAL","CHAR","EXTENDED","INTEGER","LONGCARD","LONGINT","LONGREAL","MUTEX","NULL","REAL","REFANY","ROOT","TEXT"],operators:["+","-","*","/","&","^","."],relations:["=","#","<","<=",">",">=","<:",":"],delimiters:["|","..","=>",",",";",":="],symbols:/[>=<#.,:;+\-*/&^]+/,escapes:/\\(?:[\\fnrt"']|[0-7]{3})/,tokenizer:{root:[[/_\w*/,"invalid"],[/[a-zA-Z][a-zA-Z0-9_]*/,{cases:{"@keywords":{token:"keyword.$0"},"@reservedConstNames":{token:"constant.reserved.$0"},"@reservedTypeNames":{token:"type.reserved.$0"},"@default":"identifier"}}],{include:"@whitespace"},[/[{}()\[\]]/,"@brackets"],[/[0-9]+\.[0-9]+(?:[DdEeXx][\+\-]?[0-9]+)?/,"number.float"],[/[0-9]+(?:\_[0-9a-fA-F]+)?L?/,"number"],[/@symbols/,{cases:{"@operators":"operators","@relations":"operators","@delimiters":"delimiter","@default":"invalid"}}],[/'[^\\']'/,"string.char"],[/(')(@escapes)(')/,["string.char","string.escape","string.char"]],[/'/,"invalid"],[/"([^"\\]|\\.)*$/,"invalid"],[/"/,"string.text","@text"]],text:[[/[^\\"]+/,"string.text"],[/@escapes/,"string.escape"],[/\\./,"invalid"],[/"/,"string.text","@pop"]],comment:[[/\(\*/,"comment","@push"],[/\*\)/,"comment","@pop"],[/./,"comment"]],pragma:[[/<\*/,"keyword.pragma","@push"],[/\*>/,"keyword.pragma","@pop"],[/./,"keyword.pragma"]],whitespace:[[/[ \t\r\n]+/,"white"],[/\(\*/,"comment","@comment"],[/<\*/,"keyword.pragma","@pragma"]]}}});var DDe={};nt(DDe,{conf:()=>Yze,language:()=>Zze});var Yze,Zze,NDe=x(()=>{Yze={comments:{blockComment:[""]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">",notIn:["string"]}],surroundingPairs:[{open:"(",close:")"},{open:"[",close:"]"},{open:"`",close:"`"}],folding:{markers:{start:new RegExp("^\\s*"),end:new RegExp("^\\s*")}}},Zze={defaultToken:"",tokenPostfix:".md",control:/[\\`*_\[\]{}()#+\-\.!]/,noncontrol:/[^\\`*_\[\]{}()#+\-\.!]/,escapes:/\\(?:@control)/,jsescapes:/\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,empty:["area","base","basefont","br","col","frame","hr","img","input","isindex","link","meta","param"],tokenizer:{root:[[/^\s*\|/,"@rematch","@table_header"],[/^(\s{0,3})(#+)((?:[^\\#]|@escapes)+)((?:#+)?)/,["white","keyword","keyword","keyword"]],[/^\s*(=+|\-+)\s*$/,"keyword"],[/^\s*((\*[ ]?)+)\s*$/,"meta.separator"],[/^\s*>+/,"comment"],[/^\s*([\*\-+:]|\d+\.)\s/,"keyword"],[/^(\t|[ ]{4})[^ ].*$/,"string"],[/^\s*~~~\s*((?:\w|[\/\-#])+)?\s*$/,{token:"string",next:"@codeblock"}],[/^\s*```\s*((?:\w|[\/\-#])+).*$/,{token:"string",next:"@codeblockgh",nextEmbedded:"$1"}],[/^\s*```\s*$/,{token:"string",next:"@codeblock"}],{include:"@linecontent"}],table_header:[{include:"@table_common"},[/[^\|]+/,"keyword.table.header"]],table_body:[{include:"@table_common"},{include:"@linecontent"}],table_common:[[/\s*[\-:]+\s*/,{token:"keyword",switchTo:"table_body"}],[/^\s*\|/,"keyword.table.left"],[/^\s*[^\|]/,"@rematch","@pop"],[/^\s*$/,"@rematch","@pop"],[/\|/,{cases:{"@eos":"keyword.table.right","@default":"keyword.table.middle"}}]],codeblock:[[/^\s*~~~\s*$/,{token:"string",next:"@pop"}],[/^\s*```\s*$/,{token:"string",next:"@pop"}],[/.*$/,"variable.source"]],codeblockgh:[[/```\s*$/,{token:"string",next:"@pop",nextEmbedded:"@pop"}],[/[^`]+/,"variable.source"]],linecontent:[[/&\w+;/,"string.escape"],[/@escapes/,"escape"],[/\b__([^\\_]|@escapes|_(?!_))+__\b/,"strong"],[/\*\*([^\\*]|@escapes|\*(?!\*))+\*\*/,"strong"],[/\b_[^_]+_\b/,"emphasis"],[/\*([^\\*]|@escapes)+\*/,"emphasis"],[/`([^\\`]|@escapes)+`/,"variable"],[/\{+[^}]+\}+/,"string.target"],[/(!?\[)((?:[^\]\\]|@escapes)*)(\]\([^\)]+\))/,["string.link","","string.link"]],[/(!?\[)((?:[^\]\\]|@escapes)*)(\])/,"string.link"],{include:"html"}],html:[[/<(\w+)\/>/,"tag"],[/<(\w+)(\-|\w)*/,{cases:{"@empty":{token:"tag",next:"@tag.$1"},"@default":{token:"tag",next:"@tag.$1"}}}],[/<\/(\w+)(\-|\w)*\s*>/,{token:"tag"}],[//,"comment","@pop"],[//,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.styleWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],phpInSimpleState:[[/<\?((php)|=)?/,"metatag.php"],[/\?>/,{token:"metatag.php",switchTo:"@$S2.$S3"}],{include:"phpRoot"}],phpInEmbeddedState:[[/<\?((php)|=)?/,"metatag.php"],[/\?>/,{token:"metatag.php",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],{include:"phpRoot"}],phpRoot:[[/[a-zA-Z_]\w*/,{cases:{"@phpKeywords":{token:"keyword.php"},"@phpCompileTimeConstants":{token:"constant.php"},"@default":"identifier.php"}}],[/[$a-zA-Z_]\w*/,{cases:{"@phpPreDefinedVariables":{token:"variable.predefined.php"},"@default":"variable.php"}}],[/[{}]/,"delimiter.bracket.php"],[/[\[\]]/,"delimiter.array.php"],[/[()]/,"delimiter.parenthesis.php"],[/[ \t\r\n]+/],[/(#|\/\/)$/,"comment.php"],[/(#|\/\/)/,"comment.php","@phpLineComment"],[/\/\*/,"comment.php","@phpComment"],[/"/,"string.php","@phpDoubleQuoteString"],[/'/,"string.php","@phpSingleQuoteString"],[/[\+\-\*\%\&\|\^\~\!\=\<\>\/\?\;\:\.\,\@]/,"delimiter.php"],[/\d*\d+[eE]([\-+]?\d+)?/,"number.float.php"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float.php"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F]/,"number.hex.php"],[/0[0-7']*[0-7]/,"number.octal.php"],[/0[bB][0-1']*[0-1]/,"number.binary.php"],[/\d[\d']*/,"number.php"],[/\d/,"number.php"]],phpComment:[[/\*\//,"comment.php","@pop"],[/[^*]+/,"comment.php"],[/./,"comment.php"]],phpLineComment:[[/\?>/,{token:"@rematch",next:"@pop"}],[/.$/,"comment.php","@pop"],[/[^?]+$/,"comment.php","@pop"],[/[^?]+/,"comment.php"],[/./,"comment.php"]],phpDoubleQuoteString:[[/[^\\"]+/,"string.php"],[/@escapes/,"string.escape.php"],[/\\./,"string.escape.invalid.php"],[/"/,"string.php","@pop"]],phpSingleQuoteString:[[/[^\\']+/,"string.php"],[/@escapes/,"string.escape.php"],[/\\./,"string.escape.invalid.php"],[/'/,"string.php","@pop"]]},phpKeywords:["abstract","and","array","as","break","callable","case","catch","cfunction","class","clone","const","continue","declare","default","do","else","elseif","enddeclare","endfor","endforeach","endif","endswitch","endwhile","extends","false","final","for","foreach","function","global","goto","if","implements","interface","instanceof","insteadof","namespace","new","null","object","old_function","or","private","protected","public","resource","static","switch","throw","trait","try","true","use","var","while","xor","die","echo","empty","exit","eval","include","include_once","isset","list","require","require_once","return","print","unset","yield","__construct"],phpCompileTimeConstants:["__CLASS__","__DIR__","__FILE__","__LINE__","__NAMESPACE__","__METHOD__","__FUNCTION__","__TRAIT__"],phpPreDefinedVariables:["$GLOBALS","$_SERVER","$_GET","$_POST","$_FILES","$_REQUEST","$_SESSION","$_ENV","$_COOKIE","$php_errormsg","$HTTP_RAW_POST_DATA","$http_response_header","$argc","$argv"],escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/}});var QDe={};nt(QDe,{conf:()=>_Ue,language:()=>bUe});var _Ue,bUe,JDe=x(()=>{_Ue={comments:{lineComment:"#"},brackets:[["[","]"],["<",">"],["(",")"]],autoClosingPairs:[{open:"[",close:"]"},{open:"<",close:">"},{open:"(",close:")"}],surroundingPairs:[{open:"[",close:"]"},{open:"<",close:">"},{open:"(",close:")"}]},bUe={defaultToken:"",tokenPostfix:".pla",brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"<",close:">",token:"delimiter.angle"},{open:"(",close:")",token:"delimiter.parenthesis"}],keywords:[".i",".o",".mv",".ilb",".ob",".label",".type",".phase",".pair",".symbolic",".symbolic-output",".kiss",".p",".e",".end"],comment:/#.*$/,identifier:/[a-zA-Z]+[a-zA-Z0-9_\-]*/,plaContent:/[01\-~\|]+/,tokenizer:{root:[{include:"@whitespace"},[/@comment/,"comment"],[/\.([a-zA-Z_\-]+)/,{cases:{"@eos":{token:"keyword.$1"},"@keywords":{cases:{".type":{token:"keyword.$1",next:"@type"},"@default":{token:"keyword.$1",next:"@keywordArg"}}},"@default":{token:"keyword.$1"}}}],[/@identifier/,"identifier"],[/@plaContent/,"string"]],whitespace:[[/[ \t\r\n]+/,""]],type:[{include:"@whitespace"},[/\w+/,{token:"type",next:"@pop"}]],keywordArg:[[/[ \t\r\n]+/,{cases:{"@eos":{token:"",next:"@pop"},"@default":""}}],[/@comment/,"comment","@pop"],[/[<>()\[\]]/,{cases:{"@eos":{token:"@brackets",next:"@pop"},"@default":"@brackets"}}],[/\-?\d+/,{cases:{"@eos":{token:"number",next:"@pop"},"@default":"number"}}],[/@identifier/,{cases:{"@eos":{token:"identifier",next:"@pop"},"@default":"identifier"}}],[/[;=]/,{cases:{"@eos":{token:"delimiter",next:"@pop"},"@default":"delimiter"}}]]}}});var eNe={};nt(eNe,{conf:()=>vUe,language:()=>wUe});var vUe,wUe,tNe=x(()=>{vUe={comments:{lineComment:"//",blockComment:["(*","*)"]},brackets:[["{","}"],["[","]"],["(",")"],["<",">"]],autoClosingPairs:[{open:'"',close:'"',notIn:["string","comment"]},{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]}]},wUe={tokenPostfix:".pats",defaultToken:"invalid",keywords:["abstype","abst0ype","absprop","absview","absvtype","absviewtype","absvt0ype","absviewt0ype","as","and","assume","begin","classdec","datasort","datatype","dataprop","dataview","datavtype","dataviewtype","do","end","extern","extype","extvar","exception","fn","fnx","fun","prfn","prfun","praxi","castfn","if","then","else","ifcase","in","infix","infixl","infixr","prefix","postfix","implmnt","implement","primplmnt","primplement","import","let","local","macdef","macrodef","nonfix","symelim","symintr","overload","of","op","rec","sif","scase","sortdef","sta","stacst","stadef","static","staload","dynload","try","tkindef","typedef","propdef","viewdef","vtypedef","viewtypedef","prval","var","prvar","when","where","with","withtype","withprop","withview","withvtype","withviewtype"],keywords_dlr:["$delay","$ldelay","$arrpsz","$arrptrsize","$d2ctype","$effmask","$effmask_ntm","$effmask_exn","$effmask_ref","$effmask_wrt","$effmask_all","$extern","$extkind","$extype","$extype_struct","$extval","$extfcall","$extmcall","$literal","$myfilename","$mylocation","$myfunction","$lst","$lst_t","$lst_vt","$list","$list_t","$list_vt","$rec","$rec_t","$rec_vt","$record","$record_t","$record_vt","$tup","$tup_t","$tup_vt","$tuple","$tuple_t","$tuple_vt","$break","$continue","$raise","$showtype","$vcopyenv_v","$vcopyenv_vt","$tempenver","$solver_assert","$solver_verify"],keywords_srp:["#if","#ifdef","#ifndef","#then","#elif","#elifdef","#elifndef","#else","#endif","#error","#prerr","#print","#assert","#undef","#define","#include","#require","#pragma","#codegen2","#codegen3"],irregular_keyword_list:["val+","val-","val","case+","case-","case","addr@","addr","fold@","free@","fix@","fix","lam@","lam","llam@","llam","viewt@ype+","viewt@ype-","viewt@ype","viewtype+","viewtype-","viewtype","view+","view-","view@","view","type+","type-","type","vtype+","vtype-","vtype","vt@ype+","vt@ype-","vt@ype","viewt@ype+","viewt@ype-","viewt@ype","viewtype+","viewtype-","viewtype","prop+","prop-","prop","type+","type-","type","t@ype","t@ype+","t@ype-","abst@ype","abstype","absviewt@ype","absvt@ype","for*","for","while*","while"],keywords_types:["bool","double","byte","int","short","char","void","unit","long","float","string","strptr"],keywords_effects:["0","fun","clo","prf","funclo","cloptr","cloref","ref","ntm","1"],operators:["@","!","|","`",":","$",".","=","#","~","..","...","=>","=<>","=/=>","=>>","=/=>>","<",">","><",".<",">.",".<>.","->","-<>"],brackets:[{open:",(",close:")",token:"delimiter.parenthesis"},{open:"`(",close:")",token:"delimiter.parenthesis"},{open:"%(",close:")",token:"delimiter.parenthesis"},{open:"'(",close:")",token:"delimiter.parenthesis"},{open:"'{",close:"}",token:"delimiter.parenthesis"},{open:"@(",close:")",token:"delimiter.parenthesis"},{open:"@{",close:"}",token:"delimiter.brace"},{open:"@[",close:"]",token:"delimiter.square"},{open:"#[",close:"]",token:"delimiter.square"},{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],symbols:/[=>]/,digit:/[0-9]/,digitseq0:/@digit*/,xdigit:/[0-9A-Za-z]/,xdigitseq0:/@xdigit*/,INTSP:/[lLuU]/,FLOATSP:/[fFlL]/,fexponent:/[eE][+-]?[0-9]+/,fexponent_bin:/[pP][+-]?[0-9]+/,deciexp:/\.[0-9]*@fexponent?/,hexiexp:/\.[0-9a-zA-Z]*@fexponent_bin?/,irregular_keywords:/val[+-]?|case[+-]?|addr\@?|fold\@|free\@|fix\@?|lam\@?|llam\@?|prop[+-]?|type[+-]?|view[+-@]?|viewt@?ype[+-]?|t@?ype[+-]?|v(iew)?t@?ype[+-]?|abst@?ype|absv(iew)?t@?ype|for\*?|while\*?/,ESCHAR:/[ntvbrfa\\\?'"\(\[\{]/,start:"root",tokenizer:{root:[{regex:/[ \t\r\n]+/,action:{token:""}},{regex:/\(\*\)/,action:{token:"invalid"}},{regex:/\(\*/,action:{token:"comment",next:"lexing_COMMENT_block_ml"}},{regex:/\(/,action:"@brackets"},{regex:/\)/,action:"@brackets"},{regex:/\[/,action:"@brackets"},{regex:/\]/,action:"@brackets"},{regex:/\{/,action:"@brackets"},{regex:/\}/,action:"@brackets"},{regex:/,\(/,action:"@brackets"},{regex:/,/,action:{token:"delimiter.comma"}},{regex:/;/,action:{token:"delimiter.semicolon"}},{regex:/@\(/,action:"@brackets"},{regex:/@\[/,action:"@brackets"},{regex:/@\{/,action:"@brackets"},{regex:/:/,action:{token:"@rematch",next:"@pop"}}],lexing_EXTCODE:[{regex:/^%}/,action:{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}},{regex:/[^%]+/,action:""}],lexing_DQUOTE:[{regex:/"/,action:{token:"string.quote",next:"@pop"}},{regex:/(\{\$)(@IDENTFST@IDENTRST*)(\})/,action:[{token:"string.escape"},{token:"identifier"},{token:"string.escape"}]},{regex:/\\$/,action:{token:"string.escape"}},{regex:/\\(@ESCHAR|[xX]@xdigit+|@digit+)/,action:{token:"string.escape"}},{regex:/[^\\"]+/,action:{token:"string"}}]}}});var iNe={};nt(iNe,{conf:()=>CUe,language:()=>yUe});var CUe,yUe,nNe=x(()=>{CUe={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["[","]"],["(",")"],["{","}"]],autoClosingPairs:[{open:'"',close:'"',notIn:["string","comment","identifier"]},{open:"[",close:"]",notIn:["string","comment","identifier"]},{open:"(",close:")",notIn:["string","comment","identifier"]},{open:"{",close:"}",notIn:["string","comment","identifier"]}]},yUe={defaultToken:"",tokenPostfix:".pq",ignoreCase:!1,brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"{",close:"}",token:"delimiter.brackets"},{open:"(",close:")",token:"delimiter.parenthesis"}],operatorKeywords:["and","not","or"],keywords:["as","each","else","error","false","if","in","is","let","meta","otherwise","section","shared","then","true","try","type"],constructors:["#binary","#date","#datetime","#datetimezone","#duration","#table","#time"],constants:["#infinity","#nan","#sections","#shared"],typeKeywords:["action","any","anynonnull","none","null","logical","number","time","date","datetime","datetimezone","duration","text","binary","list","record","table","function"],builtinFunctions:["Access.Database","Action.Return","Action.Sequence","Action.Try","ActiveDirectory.Domains","AdoDotNet.DataSource","AdoDotNet.Query","AdobeAnalytics.Cubes","AnalysisServices.Database","AnalysisServices.Databases","AzureStorage.BlobContents","AzureStorage.Blobs","AzureStorage.Tables","Binary.Buffer","Binary.Combine","Binary.Compress","Binary.Decompress","Binary.End","Binary.From","Binary.FromList","Binary.FromText","Binary.InferContentType","Binary.Length","Binary.ToList","Binary.ToText","BinaryFormat.7BitEncodedSignedInteger","BinaryFormat.7BitEncodedUnsignedInteger","BinaryFormat.Binary","BinaryFormat.Byte","BinaryFormat.ByteOrder","BinaryFormat.Choice","BinaryFormat.Decimal","BinaryFormat.Double","BinaryFormat.Group","BinaryFormat.Length","BinaryFormat.List","BinaryFormat.Null","BinaryFormat.Record","BinaryFormat.SignedInteger16","BinaryFormat.SignedInteger32","BinaryFormat.SignedInteger64","BinaryFormat.Single","BinaryFormat.Text","BinaryFormat.Transform","BinaryFormat.UnsignedInteger16","BinaryFormat.UnsignedInteger32","BinaryFormat.UnsignedInteger64","Byte.From","Character.FromNumber","Character.ToNumber","Combiner.CombineTextByDelimiter","Combiner.CombineTextByEachDelimiter","Combiner.CombineTextByLengths","Combiner.CombineTextByPositions","Combiner.CombineTextByRanges","Comparer.Equals","Comparer.FromCulture","Comparer.Ordinal","Comparer.OrdinalIgnoreCase","Csv.Document","Cube.AddAndExpandDimensionColumn","Cube.AddMeasureColumn","Cube.ApplyParameter","Cube.AttributeMemberId","Cube.AttributeMemberProperty","Cube.CollapseAndRemoveColumns","Cube.Dimensions","Cube.DisplayFolders","Cube.Measures","Cube.Parameters","Cube.Properties","Cube.PropertyKey","Cube.ReplaceDimensions","Cube.Transform","Currency.From","DB2.Database","Date.AddDays","Date.AddMonths","Date.AddQuarters","Date.AddWeeks","Date.AddYears","Date.Day","Date.DayOfWeek","Date.DayOfWeekName","Date.DayOfYear","Date.DaysInMonth","Date.EndOfDay","Date.EndOfMonth","Date.EndOfQuarter","Date.EndOfWeek","Date.EndOfYear","Date.From","Date.FromText","Date.IsInCurrentDay","Date.IsInCurrentMonth","Date.IsInCurrentQuarter","Date.IsInCurrentWeek","Date.IsInCurrentYear","Date.IsInNextDay","Date.IsInNextMonth","Date.IsInNextNDays","Date.IsInNextNMonths","Date.IsInNextNQuarters","Date.IsInNextNWeeks","Date.IsInNextNYears","Date.IsInNextQuarter","Date.IsInNextWeek","Date.IsInNextYear","Date.IsInPreviousDay","Date.IsInPreviousMonth","Date.IsInPreviousNDays","Date.IsInPreviousNMonths","Date.IsInPreviousNQuarters","Date.IsInPreviousNWeeks","Date.IsInPreviousNYears","Date.IsInPreviousQuarter","Date.IsInPreviousWeek","Date.IsInPreviousYear","Date.IsInYearToDate","Date.IsLeapYear","Date.Month","Date.MonthName","Date.QuarterOfYear","Date.StartOfDay","Date.StartOfMonth","Date.StartOfQuarter","Date.StartOfWeek","Date.StartOfYear","Date.ToRecord","Date.ToText","Date.WeekOfMonth","Date.WeekOfYear","Date.Year","DateTime.AddZone","DateTime.Date","DateTime.FixedLocalNow","DateTime.From","DateTime.FromFileTime","DateTime.FromText","DateTime.IsInCurrentHour","DateTime.IsInCurrentMinute","DateTime.IsInCurrentSecond","DateTime.IsInNextHour","DateTime.IsInNextMinute","DateTime.IsInNextNHours","DateTime.IsInNextNMinutes","DateTime.IsInNextNSeconds","DateTime.IsInNextSecond","DateTime.IsInPreviousHour","DateTime.IsInPreviousMinute","DateTime.IsInPreviousNHours","DateTime.IsInPreviousNMinutes","DateTime.IsInPreviousNSeconds","DateTime.IsInPreviousSecond","DateTime.LocalNow","DateTime.Time","DateTime.ToRecord","DateTime.ToText","DateTimeZone.FixedLocalNow","DateTimeZone.FixedUtcNow","DateTimeZone.From","DateTimeZone.FromFileTime","DateTimeZone.FromText","DateTimeZone.LocalNow","DateTimeZone.RemoveZone","DateTimeZone.SwitchZone","DateTimeZone.ToLocal","DateTimeZone.ToRecord","DateTimeZone.ToText","DateTimeZone.ToUtc","DateTimeZone.UtcNow","DateTimeZone.ZoneHours","DateTimeZone.ZoneMinutes","Decimal.From","Diagnostics.ActivityId","Diagnostics.Trace","DirectQueryCapabilities.From","Double.From","Duration.Days","Duration.From","Duration.FromText","Duration.Hours","Duration.Minutes","Duration.Seconds","Duration.ToRecord","Duration.ToText","Duration.TotalDays","Duration.TotalHours","Duration.TotalMinutes","Duration.TotalSeconds","Embedded.Value","Error.Record","Excel.CurrentWorkbook","Excel.Workbook","Exchange.Contents","Expression.Constant","Expression.Evaluate","Expression.Identifier","Facebook.Graph","File.Contents","Folder.Contents","Folder.Files","Function.From","Function.Invoke","Function.InvokeAfter","Function.IsDataSource","GoogleAnalytics.Accounts","Guid.From","HdInsight.Containers","HdInsight.Contents","HdInsight.Files","Hdfs.Contents","Hdfs.Files","Informix.Database","Int16.From","Int32.From","Int64.From","Int8.From","ItemExpression.From","Json.Document","Json.FromValue","Lines.FromBinary","Lines.FromText","Lines.ToBinary","Lines.ToText","List.Accumulate","List.AllTrue","List.Alternate","List.AnyTrue","List.Average","List.Buffer","List.Combine","List.Contains","List.ContainsAll","List.ContainsAny","List.Count","List.Covariance","List.DateTimeZones","List.DateTimes","List.Dates","List.Difference","List.Distinct","List.Durations","List.FindText","List.First","List.FirstN","List.Generate","List.InsertRange","List.Intersect","List.IsDistinct","List.IsEmpty","List.Last","List.LastN","List.MatchesAll","List.MatchesAny","List.Max","List.MaxN","List.Median","List.Min","List.MinN","List.Mode","List.Modes","List.NonNullCount","List.Numbers","List.PositionOf","List.PositionOfAny","List.Positions","List.Product","List.Random","List.Range","List.RemoveFirstN","List.RemoveItems","List.RemoveLastN","List.RemoveMatchingItems","List.RemoveNulls","List.RemoveRange","List.Repeat","List.ReplaceMatchingItems","List.ReplaceRange","List.ReplaceValue","List.Reverse","List.Select","List.Single","List.SingleOrDefault","List.Skip","List.Sort","List.StandardDeviation","List.Sum","List.Times","List.Transform","List.TransformMany","List.Union","List.Zip","Logical.From","Logical.FromText","Logical.ToText","MQ.Queue","MySQL.Database","Number.Abs","Number.Acos","Number.Asin","Number.Atan","Number.Atan2","Number.BitwiseAnd","Number.BitwiseNot","Number.BitwiseOr","Number.BitwiseShiftLeft","Number.BitwiseShiftRight","Number.BitwiseXor","Number.Combinations","Number.Cos","Number.Cosh","Number.Exp","Number.Factorial","Number.From","Number.FromText","Number.IntegerDivide","Number.IsEven","Number.IsNaN","Number.IsOdd","Number.Ln","Number.Log","Number.Log10","Number.Mod","Number.Permutations","Number.Power","Number.Random","Number.RandomBetween","Number.Round","Number.RoundAwayFromZero","Number.RoundDown","Number.RoundTowardZero","Number.RoundUp","Number.Sign","Number.Sin","Number.Sinh","Number.Sqrt","Number.Tan","Number.Tanh","Number.ToText","OData.Feed","Odbc.DataSource","Odbc.Query","OleDb.DataSource","OleDb.Query","Oracle.Database","Percentage.From","PostgreSQL.Database","RData.FromBinary","Record.AddField","Record.Combine","Record.Field","Record.FieldCount","Record.FieldNames","Record.FieldOrDefault","Record.FieldValues","Record.FromList","Record.FromTable","Record.HasFields","Record.RemoveFields","Record.RenameFields","Record.ReorderFields","Record.SelectFields","Record.ToList","Record.ToTable","Record.TransformFields","Replacer.ReplaceText","Replacer.ReplaceValue","RowExpression.Column","RowExpression.From","Salesforce.Data","Salesforce.Reports","SapBusinessWarehouse.Cubes","SapHana.Database","SharePoint.Contents","SharePoint.Files","SharePoint.Tables","Single.From","Soda.Feed","Splitter.SplitByNothing","Splitter.SplitTextByAnyDelimiter","Splitter.SplitTextByDelimiter","Splitter.SplitTextByEachDelimiter","Splitter.SplitTextByLengths","Splitter.SplitTextByPositions","Splitter.SplitTextByRanges","Splitter.SplitTextByRepeatedLengths","Splitter.SplitTextByWhitespace","Sql.Database","Sql.Databases","SqlExpression.SchemaFrom","SqlExpression.ToExpression","Sybase.Database","Table.AddColumn","Table.AddIndexColumn","Table.AddJoinColumn","Table.AddKey","Table.AggregateTableColumn","Table.AlternateRows","Table.Buffer","Table.Column","Table.ColumnCount","Table.ColumnNames","Table.ColumnsOfType","Table.Combine","Table.CombineColumns","Table.Contains","Table.ContainsAll","Table.ContainsAny","Table.DemoteHeaders","Table.Distinct","Table.DuplicateColumn","Table.ExpandListColumn","Table.ExpandRecordColumn","Table.ExpandTableColumn","Table.FillDown","Table.FillUp","Table.FilterWithDataTable","Table.FindText","Table.First","Table.FirstN","Table.FirstValue","Table.FromColumns","Table.FromList","Table.FromPartitions","Table.FromRecords","Table.FromRows","Table.FromValue","Table.Group","Table.HasColumns","Table.InsertRows","Table.IsDistinct","Table.IsEmpty","Table.Join","Table.Keys","Table.Last","Table.LastN","Table.MatchesAllRows","Table.MatchesAnyRows","Table.Max","Table.MaxN","Table.Min","Table.MinN","Table.NestedJoin","Table.Partition","Table.PartitionValues","Table.Pivot","Table.PositionOf","Table.PositionOfAny","Table.PrefixColumns","Table.Profile","Table.PromoteHeaders","Table.Range","Table.RemoveColumns","Table.RemoveFirstN","Table.RemoveLastN","Table.RemoveMatchingRows","Table.RemoveRows","Table.RemoveRowsWithErrors","Table.RenameColumns","Table.ReorderColumns","Table.Repeat","Table.ReplaceErrorValues","Table.ReplaceKeys","Table.ReplaceMatchingRows","Table.ReplaceRelationshipIdentity","Table.ReplaceRows","Table.ReplaceValue","Table.ReverseRows","Table.RowCount","Table.Schema","Table.SelectColumns","Table.SelectRows","Table.SelectRowsWithErrors","Table.SingleRow","Table.Skip","Table.Sort","Table.SplitColumn","Table.ToColumns","Table.ToList","Table.ToRecords","Table.ToRows","Table.TransformColumnNames","Table.TransformColumnTypes","Table.TransformColumns","Table.TransformRows","Table.Transpose","Table.Unpivot","Table.UnpivotOtherColumns","Table.View","Table.ViewFunction","TableAction.DeleteRows","TableAction.InsertRows","TableAction.UpdateRows","Tables.GetRelationships","Teradata.Database","Text.AfterDelimiter","Text.At","Text.BeforeDelimiter","Text.BetweenDelimiters","Text.Clean","Text.Combine","Text.Contains","Text.End","Text.EndsWith","Text.Format","Text.From","Text.FromBinary","Text.Insert","Text.Length","Text.Lower","Text.Middle","Text.NewGuid","Text.PadEnd","Text.PadStart","Text.PositionOf","Text.PositionOfAny","Text.Proper","Text.Range","Text.Remove","Text.RemoveRange","Text.Repeat","Text.Replace","Text.ReplaceRange","Text.Select","Text.Split","Text.SplitAny","Text.Start","Text.StartsWith","Text.ToBinary","Text.ToList","Text.Trim","Text.TrimEnd","Text.TrimStart","Text.Upper","Time.EndOfHour","Time.From","Time.FromText","Time.Hour","Time.Minute","Time.Second","Time.StartOfHour","Time.ToRecord","Time.ToText","Type.AddTableKey","Type.ClosedRecord","Type.Facets","Type.ForFunction","Type.ForRecord","Type.FunctionParameters","Type.FunctionRequiredParameters","Type.FunctionReturn","Type.Is","Type.IsNullable","Type.IsOpenRecord","Type.ListItem","Type.NonNullable","Type.OpenRecord","Type.RecordFields","Type.ReplaceFacets","Type.ReplaceTableKeys","Type.TableColumn","Type.TableKeys","Type.TableRow","Type.TableSchema","Type.Union","Uri.BuildQueryString","Uri.Combine","Uri.EscapeDataString","Uri.Parts","Value.Add","Value.As","Value.Compare","Value.Divide","Value.Equals","Value.Firewall","Value.FromText","Value.Is","Value.Metadata","Value.Multiply","Value.NativeQuery","Value.NullableEquals","Value.RemoveMetadata","Value.ReplaceMetadata","Value.ReplaceType","Value.Subtract","Value.Type","ValueAction.NativeStatement","ValueAction.Replace","Variable.Value","Web.Contents","Web.Page","WebAction.Request","Xml.Document","Xml.Tables"],builtinConstants:["BinaryEncoding.Base64","BinaryEncoding.Hex","BinaryOccurrence.Optional","BinaryOccurrence.Repeating","BinaryOccurrence.Required","ByteOrder.BigEndian","ByteOrder.LittleEndian","Compression.Deflate","Compression.GZip","CsvStyle.QuoteAfterDelimiter","CsvStyle.QuoteAlways","Culture.Current","Day.Friday","Day.Monday","Day.Saturday","Day.Sunday","Day.Thursday","Day.Tuesday","Day.Wednesday","ExtraValues.Error","ExtraValues.Ignore","ExtraValues.List","GroupKind.Global","GroupKind.Local","JoinAlgorithm.Dynamic","JoinAlgorithm.LeftHash","JoinAlgorithm.LeftIndex","JoinAlgorithm.PairwiseHash","JoinAlgorithm.RightHash","JoinAlgorithm.RightIndex","JoinAlgorithm.SortMerge","JoinKind.FullOuter","JoinKind.Inner","JoinKind.LeftAnti","JoinKind.LeftOuter","JoinKind.RightAnti","JoinKind.RightOuter","JoinSide.Left","JoinSide.Right","MissingField.Error","MissingField.Ignore","MissingField.UseNull","Number.E","Number.Epsilon","Number.NaN","Number.NegativeInfinity","Number.PI","Number.PositiveInfinity","Occurrence.All","Occurrence.First","Occurrence.Last","Occurrence.Optional","Occurrence.Repeating","Occurrence.Required","Order.Ascending","Order.Descending","Precision.Decimal","Precision.Double","QuoteStyle.Csv","QuoteStyle.None","RelativePosition.FromEnd","RelativePosition.FromStart","RoundingMode.AwayFromZero","RoundingMode.Down","RoundingMode.ToEven","RoundingMode.TowardZero","RoundingMode.Up","SapHanaDistribution.All","SapHanaDistribution.Connection","SapHanaDistribution.Off","SapHanaDistribution.Statement","SapHanaRangeOperator.Equals","SapHanaRangeOperator.GreaterThan","SapHanaRangeOperator.GreaterThanOrEquals","SapHanaRangeOperator.LessThan","SapHanaRangeOperator.LessThanOrEquals","SapHanaRangeOperator.NotEquals","TextEncoding.Ascii","TextEncoding.BigEndianUnicode","TextEncoding.Unicode","TextEncoding.Utf16","TextEncoding.Utf8","TextEncoding.Windows","TraceLevel.Critical","TraceLevel.Error","TraceLevel.Information","TraceLevel.Verbose","TraceLevel.Warning","WebMethod.Delete","WebMethod.Get","WebMethod.Head","WebMethod.Patch","WebMethod.Post","WebMethod.Put"],builtinTypes:["Action.Type","Any.Type","Binary.Type","BinaryEncoding.Type","BinaryOccurrence.Type","Byte.Type","ByteOrder.Type","Character.Type","Compression.Type","CsvStyle.Type","Currency.Type","Date.Type","DateTime.Type","DateTimeZone.Type","Day.Type","Decimal.Type","Double.Type","Duration.Type","ExtraValues.Type","Function.Type","GroupKind.Type","Guid.Type","Int16.Type","Int32.Type","Int64.Type","Int8.Type","JoinAlgorithm.Type","JoinKind.Type","JoinSide.Type","List.Type","Logical.Type","MissingField.Type","None.Type","Null.Type","Number.Type","Occurrence.Type","Order.Type","Password.Type","Percentage.Type","Precision.Type","QuoteStyle.Type","Record.Type","RelativePosition.Type","RoundingMode.Type","SapHanaDistribution.Type","SapHanaRangeOperator.Type","Single.Type","Table.Type","Text.Type","TextEncoding.Type","Time.Type","TraceLevel.Type","Type.Type","Uri.Type","WebMethod.Type"],tokenizer:{root:[[/#"[\w \.]+"/,"identifier.quote"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F]+/,"number.hex"],[/\d+([eE][\-+]?\d+)?/,"number"],[/(#?[a-z]+)\b/,{cases:{"@typeKeywords":"type","@keywords":"keyword","@constants":"constant","@constructors":"constructor","@operatorKeywords":"operators","@default":"identifier"}}],[/\b([A-Z][a-zA-Z0-9]+\.Type)\b/,{cases:{"@builtinTypes":"type","@default":"identifier"}}],[/\b([A-Z][a-zA-Z0-9]+\.[A-Z][a-zA-Z0-9]+)\b/,{cases:{"@builtinFunctions":"keyword.function","@builtinConstants":"constant","@default":"identifier"}}],[/\b([a-zA-Z_][\w\.]*)\b/,"identifier"],{include:"@whitespace"},{include:"@comments"},{include:"@strings"},[/[{}()\[\]]/,"@brackets"],[/([=\+<>\-\*&@\?\/!])|([<>]=)|(<>)|(=>)|(\.\.\.)|(\.\.)/,"operators"],[/[,;]/,"delimiter"]],whitespace:[[/\s+/,"white"]],comments:[["\\/\\*","comment","@comment"],["\\/\\/+.*","comment"]],comment:[["\\*\\/","comment","@pop"],[".","comment"]],strings:[['"',"string","@string"]],string:[['""',"string.escape"],['"',"string","@pop"],[".","string"]]}}});var oNe={};nt(oNe,{conf:()=>SUe,language:()=>xUe});var SUe,xUe,sNe=x(()=>{SUe={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#%\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"#",blockComment:["<#","#>"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*#region\\b"),end:new RegExp("^\\s*#endregion\\b")}}},xUe={defaultToken:"",ignoreCase:!0,tokenPostfix:".ps1",brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.square",open:"[",close:"]"},{token:"delimiter.parenthesis",open:"(",close:")"}],keywords:["begin","break","catch","class","continue","data","define","do","dynamicparam","else","elseif","end","exit","filter","finally","for","foreach","from","function","if","in","param","process","return","switch","throw","trap","try","until","using","var","while","workflow","parallel","sequence","inlinescript","configuration"],helpKeywords:/SYNOPSIS|DESCRIPTION|PARAMETER|EXAMPLE|INPUTS|OUTPUTS|NOTES|LINK|COMPONENT|ROLE|FUNCTIONALITY|FORWARDHELPTARGETNAME|FORWARDHELPCATEGORY|REMOTEHELPRUNSPACE|EXTERNALHELP/,symbols:/[=>/,"comment","@pop"],[/(\.)(@helpKeywords)(?!\w)/,{token:"comment.keyword.$2"}],[/[\.#]/,"comment"]]}}});var rNe={};nt(rNe,{conf:()=>LUe,language:()=>IUe});var kUe,LUe,IUe,aNe=x(()=>{kUe=["true","false"],LUe={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"],["<",">"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"}],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string"]}],autoCloseBefore:`.,=}])>' + `,indentationRules:{increaseIndentPattern:new RegExp("^((?!\\/\\/).)*(\\{[^}\"'`]*|\\([^)\"'`]*|\\[[^\\]\"'`]*)$"),decreaseIndentPattern:new RegExp("^((?!.*?\\/\\*).*\\*/)?\\s*[\\}\\]].*$")}},IUe={defaultToken:"",tokenPostfix:".proto",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],symbols:/[=>/,{token:"@brackets",bracket:"@close",switchTo:"identifier"}]],field:[{include:"@whitespace"},["group",{cases:{"$S2==proto2":{token:"keyword",switchTo:"@groupDecl.$S2"}}}],[/(@identifier)(\s*)(=)/,["identifier","white",{token:"delimiter",next:"@pop"}]],[/@fullIdentifier|\./,{cases:{"@builtinTypes":"keyword","@default":"type.identifier"}}]],groupDecl:[{include:"@whitespace"},[/@identifier/,"identifier"],["=","operator"],[/{/,{token:"@brackets",bracket:"@open",switchTo:"@messageBody.$S2"}],{include:"@constant"}],type:[{include:"@whitespace"},[/@identifier/,"type.identifier","@pop"],[/./,"delimiter"]],identifier:[{include:"@whitespace"},[/@identifier/,"identifier","@pop"]],serviceDecl:[{include:"@whitespace"},[/@identifier/,"identifier"],[/{/,{token:"@brackets",bracket:"@open",switchTo:"@serviceBody.$S2"}]],serviceBody:[{include:"@whitespace"},{include:"@constant"},[/;/,"delimiter"],[/option\b/,"keyword","@option.$S2"],[/rpc\b/,"keyword","@rpc.$S2"],[/\[/,{token:"@brackets",bracket:"@open",next:"@options.$S2"}],[/}/,{token:"@brackets",bracket:"@close",next:"@pop"}]],rpc:[{include:"@whitespace"},[/@identifier/,"identifier"],[/\(/,{token:"@brackets",bracket:"@open",switchTo:"@request.$S2"}],[/{/,{token:"@brackets",bracket:"@open",next:"@methodOptions.$S2"}],[/;/,"delimiter","@pop"]],request:[{include:"@whitespace"},[/@messageType/,{cases:{stream:{token:"keyword",next:"@type.$S2"},"@default":"type.identifier"}}],[/\)/,{token:"@brackets",bracket:"@close",switchTo:"@returns.$S2"}]],returns:[{include:"@whitespace"},[/returns\b/,"keyword"],[/\(/,{token:"@brackets",bracket:"@open",switchTo:"@response.$S2"}]],response:[{include:"@whitespace"},[/@messageType/,{cases:{stream:{token:"keyword",next:"@type.$S2"},"@default":"type.identifier"}}],[/\)/,{token:"@brackets",bracket:"@close",switchTo:"@rpc.$S2"}]],methodOptions:[{include:"@whitespace"},{include:"@constant"},[/;/,"delimiter"],["option","keyword"],[/@optionName/,"annotation"],[/[()]/,"annotation.brackets"],[/=/,"operator"],[/}/,{token:"@brackets",bracket:"@close",next:"@pop"}]],comment:[[/[^\/*]+/,"comment"],[/\/\*/,"comment","@push"],["\\*/","comment","@pop"],[/[\/*]/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",bracket:"@close",next:"@pop"}]],stringSingle:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,{token:"string.quote",bracket:"@close",next:"@pop"}]],constant:[["@boolLit","keyword.constant"],["@hexLit","number.hex"],["@octalLit","number.octal"],["@decimalLit","number"],["@floatLit","number.float"],[/("([^"\\]|\\.)*|'([^'\\]|\\.)*)$/,"string.invalid"],[/"/,{token:"string.quote",bracket:"@open",next:"@string"}],[/'/,{token:"string.quote",bracket:"@open",next:"@stringSingle"}],[/{/,{token:"@brackets",bracket:"@open",next:"@prototext"}],[/identifier/,"identifier"]],whitespace:[[/[ \t\r\n]+/,"white"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],prototext:[{include:"@whitespace"},{include:"@constant"},[/@identifier/,"identifier"],[/[:;]/,"delimiter"],[/}/,{token:"@brackets",bracket:"@close",next:"@pop"}]]}}});var lNe={};nt(lNe,{conf:()=>EUe,language:()=>TUe});var EUe,TUe,cNe=x(()=>{EUe={comments:{lineComment:"//"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:'"',close:'"',notIn:["string","comment"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]}],folding:{offSide:!0}},TUe={defaultToken:"",tokenPostfix:".pug",ignoreCase:!0,brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.array",open:"[",close:"]"},{token:"delimiter.parenthesis",open:"(",close:")"}],keywords:["append","block","case","default","doctype","each","else","extends","for","if","in","include","mixin","typeof","unless","var","when"],tags:["a","abbr","acronym","address","area","article","aside","audio","b","base","basefont","bdi","bdo","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","command","datalist","dd","del","details","dfn","div","dl","dt","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","keygen","kbd","label","li","link","map","mark","menu","meta","meter","nav","noframes","noscript","object","ol","optgroup","option","output","p","param","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strike","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","tracks","tt","u","ul","video","wbr"],symbols:/[\+\-\*\%\&\|\!\=\/\.\,\:]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/^(\s*)([a-zA-Z_-][\w-]*)/,{cases:{"$2@tags":{cases:{"@eos":["","tag"],"@default":["",{token:"tag",next:"@tag.$1"}]}},"$2@keywords":["",{token:"keyword.$2"}],"@default":["",""]}}],[/^(\s*)(#[a-zA-Z_-][\w-]*)/,{cases:{"@eos":["","tag.id"],"@default":["",{token:"tag.id",next:"@tag.$1"}]}}],[/^(\s*)(\.[a-zA-Z_-][\w-]*)/,{cases:{"@eos":["","tag.class"],"@default":["",{token:"tag.class",next:"@tag.$1"}]}}],[/^(\s*)(\|.*)$/,""],{include:"@whitespace"},[/[a-zA-Z_$][\w$]*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":""}}],[/[{}()\[\]]/,"@brackets"],[/@symbols/,"delimiter"],[/\d+\.\d+([eE][\-+]?\d+)?/,"number.float"],[/\d+/,"number"],[/"/,"string",'@string."'],[/'/,"string","@string.'"]],tag:[[/(\.)(\s*$)/,[{token:"delimiter",next:"@blockText.$S2."},""]],[/\s+/,{token:"",next:"@simpleText"}],[/#[a-zA-Z_-][\w-]*/,{cases:{"@eos":{token:"tag.id",next:"@pop"},"@default":"tag.id"}}],[/\.[a-zA-Z_-][\w-]*/,{cases:{"@eos":{token:"tag.class",next:"@pop"},"@default":"tag.class"}}],[/\(/,{token:"delimiter.parenthesis",next:"@attributeList"}]],simpleText:[[/[^#]+$/,{token:"",next:"@popall"}],[/[^#]+/,{token:""}],[/(#{)([^}]*)(})/,{cases:{"@eos":["interpolation.delimiter","interpolation",{token:"interpolation.delimiter",next:"@popall"}],"@default":["interpolation.delimiter","interpolation","interpolation.delimiter"]}}],[/#$/,{token:"",next:"@popall"}],[/#/,""]],attributeList:[[/\s+/,""],[/(\w+)(\s*=\s*)("|')/,["attribute.name","delimiter",{token:"attribute.value",next:"@value.$3"}]],[/\w+/,"attribute.name"],[/,/,{cases:{"@eos":{token:"attribute.delimiter",next:"@popall"},"@default":"attribute.delimiter"}}],[/\)$/,{token:"delimiter.parenthesis",next:"@popall"}],[/\)/,{token:"delimiter.parenthesis",next:"@pop"}]],whitespace:[[/^(\s*)(\/\/.*)$/,{token:"comment",next:"@blockText.$1.comment"}],[/[ \t\r\n]+/,""],[//,{token:"comment",next:"@pop"}],[/"]},brackets:[[""],["<",">"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${pNe.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:Ei.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${pNe.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:Ei.IndentAction.Indent}}]},FUe={defaultToken:"",tokenPostfix:"",tokenizer:{root:[[/@@@@/],[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.root"}],[/)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)(script)/,["delimiter.html",{token:"tag.html",next:"@script"}]],[/(<)(style)/,["delimiter.html",{token:"tag.html",next:"@style"}]],[/(<)([:\w\-]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)([\w\-]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/]+/,"metatag.content.html"],[/>/,"metatag.html","@pop"]],comment:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.comment"}],[/-->/,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.styleWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],razorInSimpleState:[[/@\*/,"comment.cs","@razorBlockCommentTopLevel"],[/@[{(]/,"metatag.cs","@razorRootTopLevel"],[/(@)(\s*[\w]+)/,["metatag.cs",{token:"identifier.cs",switchTo:"@$S2.$S3"}]],[/[})]/,{token:"metatag.cs",switchTo:"@$S2.$S3"}],[/\*@/,{token:"comment.cs",switchTo:"@$S2.$S3"}]],razorInEmbeddedState:[[/@\*/,"comment.cs","@razorBlockCommentTopLevel"],[/@[{(]/,"metatag.cs","@razorRootTopLevel"],[/(@)(\s*[\w]+)/,["metatag.cs",{token:"identifier.cs",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}]],[/[})]/,{token:"metatag.cs",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],[/\*@/,{token:"comment.cs",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}]],razorBlockCommentTopLevel:[[/\*@/,"@rematch","@pop"],[/[^*]+/,"comment.cs"],[/./,"comment.cs"]],razorBlockComment:[[/\*@/,"comment.cs","@pop"],[/[^*]+/,"comment.cs"],[/./,"comment.cs"]],razorRootTopLevel:[[/\{/,"delimiter.bracket.cs","@razorRoot"],[/\(/,"delimiter.parenthesis.cs","@razorRoot"],[/[})]/,"@rematch","@pop"],{include:"razorCommon"}],razorRoot:[[/\{/,"delimiter.bracket.cs","@razorRoot"],[/\(/,"delimiter.parenthesis.cs","@razorRoot"],[/\}/,"delimiter.bracket.cs","@pop"],[/\)/,"delimiter.parenthesis.cs","@pop"],{include:"razorCommon"}],razorCommon:[[/[a-zA-Z_]\w*/,{cases:{"@razorKeywords":{token:"keyword.cs"},"@default":"identifier.cs"}}],[/[\[\]]/,"delimiter.array.cs"],[/[ \t\r\n]+/],[/\/\/.*$/,"comment.cs"],[/@\*/,"comment.cs","@razorBlockComment"],[/"([^"]*)"/,"string.cs"],[/'([^']*)'/,"string.cs"],[/(<)([\w\-]+)(\/>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)([\w\-]+)(>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<\/)([\w\-]+)(>)/,["delimiter.html","tag.html","delimiter.html"]],[/[\+\-\*\%\&\|\^\~\!\=\<\>\/\?\;\:\.\,]/,"delimiter.cs"],[/\d*\d+[eE]([\-+]?\d+)?/,"number.float.cs"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float.cs"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F]/,"number.hex.cs"],[/0[0-7']*[0-7]/,"number.octal.cs"],[/0[bB][0-1']*[0-1]/,"number.binary.cs"],[/\d[\d']*/,"number.cs"],[/\d/,"number.cs"]]},razorKeywords:["abstract","as","async","await","base","bool","break","by","byte","case","catch","char","checked","class","const","continue","decimal","default","delegate","do","double","descending","explicit","event","extern","else","enum","false","finally","fixed","float","for","foreach","from","goto","group","if","implicit","in","int","interface","internal","into","is","lock","long","nameof","new","null","namespace","object","operator","out","override","orderby","params","private","protected","public","readonly","ref","return","switch","struct","sbyte","sealed","short","sizeof","stackalloc","static","string","select","this","throw","true","try","typeof","uint","ulong","unchecked","unsafe","ushort","using","var","virtual","volatile","void","when","while","where","yield","model","inject"],escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/}});var vNe={};nt(vNe,{conf:()=>BUe,language:()=>WUe});var BUe,WUe,wNe=x(()=>{BUe={brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},WUe={defaultToken:"",tokenPostfix:".redis",ignoreCase:!0,brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],keywords:["APPEND","AUTH","BGREWRITEAOF","BGSAVE","BITCOUNT","BITFIELD","BITOP","BITPOS","BLPOP","BRPOP","BRPOPLPUSH","CLIENT","KILL","LIST","GETNAME","PAUSE","REPLY","SETNAME","CLUSTER","ADDSLOTS","COUNT-FAILURE-REPORTS","COUNTKEYSINSLOT","DELSLOTS","FAILOVER","FORGET","GETKEYSINSLOT","INFO","KEYSLOT","MEET","NODES","REPLICATE","RESET","SAVECONFIG","SET-CONFIG-EPOCH","SETSLOT","SLAVES","SLOTS","COMMAND","COUNT","GETKEYS","CONFIG","GET","REWRITE","SET","RESETSTAT","DBSIZE","DEBUG","OBJECT","SEGFAULT","DECR","DECRBY","DEL","DISCARD","DUMP","ECHO","EVAL","EVALSHA","EXEC","EXISTS","EXPIRE","EXPIREAT","FLUSHALL","FLUSHDB","GEOADD","GEOHASH","GEOPOS","GEODIST","GEORADIUS","GEORADIUSBYMEMBER","GETBIT","GETRANGE","GETSET","HDEL","HEXISTS","HGET","HGETALL","HINCRBY","HINCRBYFLOAT","HKEYS","HLEN","HMGET","HMSET","HSET","HSETNX","HSTRLEN","HVALS","INCR","INCRBY","INCRBYFLOAT","KEYS","LASTSAVE","LINDEX","LINSERT","LLEN","LPOP","LPUSH","LPUSHX","LRANGE","LREM","LSET","LTRIM","MGET","MIGRATE","MONITOR","MOVE","MSET","MSETNX","MULTI","PERSIST","PEXPIRE","PEXPIREAT","PFADD","PFCOUNT","PFMERGE","PING","PSETEX","PSUBSCRIBE","PUBSUB","PTTL","PUBLISH","PUNSUBSCRIBE","QUIT","RANDOMKEY","READONLY","READWRITE","RENAME","RENAMENX","RESTORE","ROLE","RPOP","RPOPLPUSH","RPUSH","RPUSHX","SADD","SAVE","SCARD","SCRIPT","FLUSH","LOAD","SDIFF","SDIFFSTORE","SELECT","SETBIT","SETEX","SETNX","SETRANGE","SHUTDOWN","SINTER","SINTERSTORE","SISMEMBER","SLAVEOF","SLOWLOG","SMEMBERS","SMOVE","SORT","SPOP","SRANDMEMBER","SREM","STRLEN","SUBSCRIBE","SUNION","SUNIONSTORE","SWAPDB","SYNC","TIME","TOUCH","TTL","TYPE","UNSUBSCRIBE","UNLINK","UNWATCH","WAIT","WATCH","ZADD","ZCARD","ZCOUNT","ZINCRBY","ZINTERSTORE","ZLEXCOUNT","ZRANGE","ZRANGEBYLEX","ZREVRANGEBYLEX","ZRANGEBYSCORE","ZRANK","ZREM","ZREMRANGEBYLEX","ZREMRANGEBYRANK","ZREMRANGEBYSCORE","ZREVRANGE","ZREVRANGEBYSCORE","ZREVRANK","ZSCORE","ZUNIONSTORE","SCAN","SSCAN","HSCAN","ZSCAN"],operators:[],builtinFunctions:[],builtinVariables:[],pseudoColumns:[],tokenizer:{root:[{include:"@whitespace"},{include:"@pseudoColumns"},{include:"@numbers"},{include:"@strings"},{include:"@scopes"},[/[;,.]/,"delimiter"],[/[()]/,"@brackets"],[/[\w@#$]+/,{cases:{"@keywords":"keyword","@operators":"operator","@builtinVariables":"predefined","@builtinFunctions":"predefined","@default":"identifier"}}],[/[<>=!%&+\-*/|~^]/,"operator"]],whitespace:[[/\s+/,"white"]],pseudoColumns:[[/[$][A-Za-z_][\w@#$]*/,{cases:{"@pseudoColumns":"predefined","@default":"identifier"}}]],numbers:[[/0[xX][0-9a-fA-F]*/,"number"],[/[$][+-]*\d*(\.\d*)?/,"number"],[/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/,"number"]],strings:[[/'/,{token:"string",next:"@string"}],[/"/,{token:"string.double",next:"@stringDouble"}]],string:[[/[^']+/,"string"],[/''/,"string"],[/'/,{token:"string",next:"@pop"}]],stringDouble:[[/[^"]+/,"string.double"],[/""/,"string.double"],[/"/,{token:"string.double",next:"@pop"}]],scopes:[]}}});var CNe={};nt(CNe,{conf:()=>HUe,language:()=>VUe});var HUe,VUe,yNe=x(()=>{HUe={comments:{lineComment:"--",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},VUe={defaultToken:"",tokenPostfix:".sql",ignoreCase:!0,brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],keywords:["AES128","AES256","ALL","ALLOWOVERWRITE","ANALYSE","ANALYZE","AND","ANY","ARRAY","AS","ASC","AUTHORIZATION","AZ64","BACKUP","BETWEEN","BINARY","BLANKSASNULL","BOTH","BYTEDICT","BZIP2","CASE","CAST","CHECK","COLLATE","COLUMN","CONSTRAINT","CREATE","CREDENTIALS","CROSS","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURRENT_USER_ID","DEFAULT","DEFERRABLE","DEFLATE","DEFRAG","DELTA","DELTA32K","DESC","DISABLE","DISTINCT","DO","ELSE","EMPTYASNULL","ENABLE","ENCODE","ENCRYPT","ENCRYPTION","END","EXCEPT","EXPLICIT","FALSE","FOR","FOREIGN","FREEZE","FROM","FULL","GLOBALDICT256","GLOBALDICT64K","GRANT","GROUP","GZIP","HAVING","IDENTITY","IGNORE","ILIKE","IN","INITIALLY","INNER","INTERSECT","INTO","IS","ISNULL","JOIN","LANGUAGE","LEADING","LEFT","LIKE","LIMIT","LOCALTIME","LOCALTIMESTAMP","LUN","LUNS","LZO","LZOP","MINUS","MOSTLY16","MOSTLY32","MOSTLY8","NATURAL","NEW","NOT","NOTNULL","NULL","NULLS","OFF","OFFLINE","OFFSET","OID","OLD","ON","ONLY","OPEN","OR","ORDER","OUTER","OVERLAPS","PARALLEL","PARTITION","PERCENT","PERMISSIONS","PLACING","PRIMARY","RAW","READRATIO","RECOVER","REFERENCES","RESPECT","REJECTLOG","RESORT","RESTORE","RIGHT","SELECT","SESSION_USER","SIMILAR","SNAPSHOT","SOME","SYSDATE","SYSTEM","TABLE","TAG","TDES","TEXT255","TEXT32K","THEN","TIMESTAMP","TO","TOP","TRAILING","TRUE","TRUNCATECOLUMNS","UNION","UNIQUE","USER","USING","VERBOSE","WALLET","WHEN","WHERE","WITH","WITHOUT"],operators:["AND","BETWEEN","IN","LIKE","NOT","OR","IS","NULL","INTERSECT","UNION","INNER","JOIN","LEFT","OUTER","RIGHT"],builtinFunctions:["current_schema","current_schemas","has_database_privilege","has_schema_privilege","has_table_privilege","age","current_time","current_timestamp","localtime","isfinite","now","ascii","get_bit","get_byte","set_bit","set_byte","to_ascii","approximate percentile_disc","avg","count","listagg","max","median","min","percentile_cont","stddev_samp","stddev_pop","sum","var_samp","var_pop","bit_and","bit_or","bool_and","bool_or","cume_dist","first_value","lag","last_value","lead","nth_value","ratio_to_report","dense_rank","ntile","percent_rank","rank","row_number","case","coalesce","decode","greatest","least","nvl","nvl2","nullif","add_months","at time zone","convert_timezone","current_date","date_cmp","date_cmp_timestamp","date_cmp_timestamptz","date_part_year","dateadd","datediff","date_part","date_trunc","extract","getdate","interval_cmp","last_day","months_between","next_day","sysdate","timeofday","timestamp_cmp","timestamp_cmp_date","timestamp_cmp_timestamptz","timestamptz_cmp","timestamptz_cmp_date","timestamptz_cmp_timestamp","timezone","to_timestamp","trunc","abs","acos","asin","atan","atan2","cbrt","ceil","ceiling","checksum","cos","cot","degrees","dexp","dlog1","dlog10","exp","floor","ln","log","mod","pi","power","radians","random","round","sin","sign","sqrt","tan","to_hex","bpcharcmp","btrim","bttext_pattern_cmp","char_length","character_length","charindex","chr","concat","crc32","func_sha1","initcap","left and rights","len","length","lower","lpad and rpads","ltrim","md5","octet_length","position","quote_ident","quote_literal","regexp_count","regexp_instr","regexp_replace","regexp_substr","repeat","replace","replicate","reverse","rtrim","split_part","strpos","strtol","substring","textlen","translate","trim","upper","cast","convert","to_char","to_date","to_number","json_array_length","json_extract_array_element_text","json_extract_path_text","current_setting","pg_cancel_backend","pg_terminate_backend","set_config","current_database","current_user","current_user_id","pg_backend_pid","pg_last_copy_count","pg_last_copy_id","pg_last_query_id","pg_last_unload_count","session_user","slice_num","user","version","abbrev","acosd","any","area","array_agg","array_append","array_cat","array_dims","array_fill","array_length","array_lower","array_ndims","array_position","array_positions","array_prepend","array_remove","array_replace","array_to_json","array_to_string","array_to_tsvector","array_upper","asind","atan2d","atand","bit","bit_length","bound_box","box","brin_summarize_new_values","broadcast","cardinality","center","circle","clock_timestamp","col_description","concat_ws","convert_from","convert_to","corr","cosd","cotd","covar_pop","covar_samp","current_catalog","current_query","current_role","currval","cursor_to_xml","diameter","div","encode","enum_first","enum_last","enum_range","every","family","format","format_type","generate_series","generate_subscripts","get_current_ts_config","gin_clean_pending_list","grouping","has_any_column_privilege","has_column_privilege","has_foreign_data_wrapper_privilege","has_function_privilege","has_language_privilege","has_sequence_privilege","has_server_privilege","has_tablespace_privilege","has_type_privilege","height","host","hostmask","inet_client_addr","inet_client_port","inet_merge","inet_same_family","inet_server_addr","inet_server_port","isclosed","isempty","isopen","json_agg","json_object","json_object_agg","json_populate_record","json_populate_recordset","json_to_record","json_to_recordset","jsonb_agg","jsonb_object_agg","justify_days","justify_hours","justify_interval","lastval","left","line","localtimestamp","lower_inc","lower_inf","lpad","lseg","make_date","make_interval","make_time","make_timestamp","make_timestamptz","masklen","mode","netmask","network","nextval","npoints","num_nonnulls","num_nulls","numnode","obj_description","overlay","parse_ident","path","pclose","percentile_disc","pg_advisory_lock","pg_advisory_lock_shared","pg_advisory_unlock","pg_advisory_unlock_all","pg_advisory_unlock_shared","pg_advisory_xact_lock","pg_advisory_xact_lock_shared","pg_backup_start_time","pg_blocking_pids","pg_client_encoding","pg_collation_is_visible","pg_column_size","pg_conf_load_time","pg_control_checkpoint","pg_control_init","pg_control_recovery","pg_control_system","pg_conversion_is_visible","pg_create_logical_replication_slot","pg_create_physical_replication_slot","pg_create_restore_point","pg_current_xlog_flush_location","pg_current_xlog_insert_location","pg_current_xlog_location","pg_database_size","pg_describe_object","pg_drop_replication_slot","pg_export_snapshot","pg_filenode_relation","pg_function_is_visible","pg_get_constraintdef","pg_get_expr","pg_get_function_arguments","pg_get_function_identity_arguments","pg_get_function_result","pg_get_functiondef","pg_get_indexdef","pg_get_keywords","pg_get_object_address","pg_get_owned_sequence","pg_get_ruledef","pg_get_serial_sequence","pg_get_triggerdef","pg_get_userbyid","pg_get_viewdef","pg_has_role","pg_identify_object","pg_identify_object_as_address","pg_index_column_has_property","pg_index_has_property","pg_indexam_has_property","pg_indexes_size","pg_is_in_backup","pg_is_in_recovery","pg_is_other_temp_schema","pg_is_xlog_replay_paused","pg_last_committed_xact","pg_last_xact_replay_timestamp","pg_last_xlog_receive_location","pg_last_xlog_replay_location","pg_listening_channels","pg_logical_emit_message","pg_logical_slot_get_binary_changes","pg_logical_slot_get_changes","pg_logical_slot_peek_binary_changes","pg_logical_slot_peek_changes","pg_ls_dir","pg_my_temp_schema","pg_notification_queue_usage","pg_opclass_is_visible","pg_operator_is_visible","pg_opfamily_is_visible","pg_options_to_table","pg_postmaster_start_time","pg_read_binary_file","pg_read_file","pg_relation_filenode","pg_relation_filepath","pg_relation_size","pg_reload_conf","pg_replication_origin_create","pg_replication_origin_drop","pg_replication_origin_oid","pg_replication_origin_progress","pg_replication_origin_session_is_setup","pg_replication_origin_session_progress","pg_replication_origin_session_reset","pg_replication_origin_session_setup","pg_replication_origin_xact_reset","pg_replication_origin_xact_setup","pg_rotate_logfile","pg_size_bytes","pg_size_pretty","pg_sleep","pg_sleep_for","pg_sleep_until","pg_start_backup","pg_stat_file","pg_stop_backup","pg_switch_xlog","pg_table_is_visible","pg_table_size","pg_tablespace_databases","pg_tablespace_location","pg_tablespace_size","pg_total_relation_size","pg_trigger_depth","pg_try_advisory_lock","pg_try_advisory_lock_shared","pg_try_advisory_xact_lock","pg_try_advisory_xact_lock_shared","pg_ts_config_is_visible","pg_ts_dict_is_visible","pg_ts_parser_is_visible","pg_ts_template_is_visible","pg_type_is_visible","pg_typeof","pg_xact_commit_timestamp","pg_xlog_location_diff","pg_xlog_replay_pause","pg_xlog_replay_resume","pg_xlogfile_name","pg_xlogfile_name_offset","phraseto_tsquery","plainto_tsquery","point","polygon","popen","pqserverversion","query_to_xml","querytree","quote_nullable","radius","range_merge","regexp_matches","regexp_split_to_array","regexp_split_to_table","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","right","row_security_active","row_to_json","rpad","scale","set_masklen","setseed","setval","setweight","shobj_description","sind","sprintf","statement_timestamp","stddev","string_agg","string_to_array","strip","substr","table_to_xml","table_to_xml_and_xmlschema","tand","text","to_json","to_regclass","to_regnamespace","to_regoper","to_regoperator","to_regproc","to_regprocedure","to_regrole","to_regtype","to_tsquery","to_tsvector","transaction_timestamp","ts_debug","ts_delete","ts_filter","ts_headline","ts_lexize","ts_parse","ts_rank","ts_rank_cd","ts_rewrite","ts_stat","ts_token_type","tsquery_phrase","tsvector_to_array","tsvector_update_trigger","tsvector_update_trigger_column","txid_current","txid_current_snapshot","txid_snapshot_xip","txid_snapshot_xmax","txid_snapshot_xmin","txid_visible_in_snapshot","unnest","upper_inc","upper_inf","variance","width","width_bucket","xml_is_well_formed","xml_is_well_formed_content","xml_is_well_formed_document","xmlagg","xmlcomment","xmlconcat","xmlelement","xmlexists","xmlforest","xmlparse","xmlpi","xmlroot","xmlserialize","xpath","xpath_exists"],builtinVariables:[],pseudoColumns:[],tokenizer:{root:[{include:"@comments"},{include:"@whitespace"},{include:"@pseudoColumns"},{include:"@numbers"},{include:"@strings"},{include:"@complexIdentifiers"},{include:"@scopes"},[/[;,.]/,"delimiter"],[/[()]/,"@brackets"],[/[\w@#$]+/,{cases:{"@keywords":"keyword","@operators":"operator","@builtinVariables":"predefined","@builtinFunctions":"predefined","@default":"identifier"}}],[/[<>=!%&+\-*/|~^]/,"operator"]],whitespace:[[/\s+/,"white"]],comments:[[/--+.*/,"comment"],[/\/\*/,{token:"comment.quote",next:"@comment"}]],comment:[[/[^*/]+/,"comment"],[/\*\//,{token:"comment.quote",next:"@pop"}],[/./,"comment"]],pseudoColumns:[[/[$][A-Za-z_][\w@#$]*/,{cases:{"@pseudoColumns":"predefined","@default":"identifier"}}]],numbers:[[/0[xX][0-9a-fA-F]*/,"number"],[/[$][+-]*\d*(\.\d*)?/,"number"],[/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/,"number"]],strings:[[/'/,{token:"string",next:"@string"}]],string:[[/[^']+/,"string"],[/''/,"string"],[/'/,{token:"string",next:"@pop"}]],complexIdentifiers:[[/"/,{token:"identifier.quote",next:"@quotedIdentifier"}]],quotedIdentifier:[[/[^"]+/,"identifier"],[/""/,"identifier"],[/"/,{token:"identifier.quote",next:"@pop"}]],scopes:[]}}});var SNe={};nt(SNe,{conf:()=>zUe,language:()=>UUe});var zUe,UUe,xNe=x(()=>{zUe={brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">",notIn:["string"]}],surroundingPairs:[{open:"(",close:")"},{open:"[",close:"]"},{open:"`",close:"`"}],folding:{markers:{start:new RegExp("^\\s*"),end:new RegExp("^\\s*")}}},UUe={defaultToken:"",tokenPostfix:".rst",control:/[\\`*_\[\]{}()#+\-\.!]/,escapes:/\\(?:@control)/,empty:["area","base","basefont","br","col","frame","hr","img","input","isindex","link","meta","param"],alphanumerics:/[A-Za-z0-9]/,simpleRefNameWithoutBq:/(?:@alphanumerics[-_+:.]*@alphanumerics)+|(?:@alphanumerics+)/,simpleRefName:/(?:`@phrase`|@simpleRefNameWithoutBq)/,phrase:/@simpleRefNameWithoutBq(?:\s@simpleRefNameWithoutBq)*/,citationName:/[A-Za-z][A-Za-z0-9-_.]*/,blockLiteralStart:/(?:[!"#$%&'()*+,-./:;<=>?@\[\]^_`{|}~]|[\s])/,precedingChars:/(?:[ -:/'"<([{])/,followingChars:/(?:[ -.,:;!?/'")\]}>]|$)/,punctuation:/(=|-|~|`|#|"|\^|\+|\*|:|\.|'|_|\+)/,tokenizer:{root:[[/^(@punctuation{3,}$){1,1}?/,"keyword"],[/^\s*([\*\-+‣•]|[a-zA-Z0-9]+\.|\([a-zA-Z0-9]+\)|[a-zA-Z0-9]+\))\s/,"keyword"],[/([ ]::)\s*$/,"keyword","@blankLineOfLiteralBlocks"],[/(::)\s*$/,"keyword","@blankLineOfLiteralBlocks"],{include:"@tables"},{include:"@explicitMarkupBlocks"},{include:"@inlineMarkup"}],explicitMarkupBlocks:[{include:"@citations"},{include:"@footnotes"},[/^(\.\.\s)(@simpleRefName)(::\s)(.*)$/,[{token:"",next:"subsequentLines"},"keyword","",""]],[/^(\.\.)(\s+)(_)(@simpleRefName)(:)(\s+)(.*)/,[{token:"",next:"hyperlinks"},"","","string.link","","","string.link"]],[/^((?:(?:\.\.)(?:\s+))?)(__)(:)(\s+)(.*)/,[{token:"",next:"subsequentLines"},"","","","string.link"]],[/^(__\s+)(.+)/,["","string.link"]],[/^(\.\.)( \|)([^| ]+[^|]*[^| ]*)(\| )(@simpleRefName)(:: .*)/,[{token:"",next:"subsequentLines"},"","string.link","","keyword",""],"@rawBlocks"],[/(\|)([^| ]+[^|]*[^| ]*)(\|_{0,2})/,["","string.link",""]],[/^(\.\.)([ ].*)$/,[{token:"",next:"@comments"},"comment"]]],inlineMarkup:[{include:"@citationsReference"},{include:"@footnotesReference"},[/(@simpleRefName)(_{1,2})/,["string.link",""]],[/(`)([^<`]+\s+)(<)(.*)(>)(`)(_)/,["","string.link","","string.link","","",""]],[/\*\*([^\\*]|\*(?!\*))+\*\*/,"strong"],[/\*[^*]+\*/,"emphasis"],[/(``)((?:[^`]|\`(?!`))+)(``)/,["","keyword",""]],[/(__\s+)(.+)/,["","keyword"]],[/(:)((?:@simpleRefNameWithoutBq)?)(:`)([^`]+)(`)/,["","keyword","","",""]],[/(`)([^`]+)(`:)((?:@simpleRefNameWithoutBq)?)(:)/,["","","","keyword",""]],[/(`)([^`]+)(`)/,""],[/(_`)(@phrase)(`)/,["","string.link",""]]],citations:[[/^(\.\.\s+\[)((?:@citationName))(\]\s+)(.*)/,[{token:"",next:"@subsequentLines"},"string.link","",""]]],citationsReference:[[/(\[)(@citationName)(\]_)/,["","string.link",""]]],footnotes:[[/^(\.\.\s+\[)((?:[0-9]+))(\]\s+.*)/,[{token:"",next:"@subsequentLines"},"string.link",""]],[/^(\.\.\s+\[)((?:#@simpleRefName?))(\]\s+)(.*)/,[{token:"",next:"@subsequentLines"},"string.link","",""]],[/^(\.\.\s+\[)((?:\*))(\]\s+)(.*)/,[{token:"",next:"@subsequentLines"},"string.link","",""]]],footnotesReference:[[/(\[)([0-9]+)(\])(_)/,["","string.link","",""]],[/(\[)(#@simpleRefName?)(\])(_)/,["","string.link","",""]],[/(\[)(\*)(\])(_)/,["","string.link","",""]]],blankLineOfLiteralBlocks:[[/^$/,"","@subsequentLinesOfLiteralBlocks"],[/^.*$/,"","@pop"]],subsequentLinesOfLiteralBlocks:[[/(@blockLiteralStart+)(.*)/,["keyword",""]],[/^(?!blockLiteralStart)/,"","@popall"]],subsequentLines:[[/^[\s]+.*/,""],[/^(?!\s)/,"","@pop"]],hyperlinks:[[/^[\s]+.*/,"string.link"],[/^(?!\s)/,"","@pop"]],comments:[[/^[\s]+.*/,"comment"],[/^(?!\s)/,"","@pop"]],tables:[[/\+-[+-]+/,"keyword"],[/\+=[+=]+/,"keyword"]]}}});var kNe={};nt(kNe,{conf:()=>$Ue,language:()=>qUe});var $Ue,qUe,LNe=x(()=>{$Ue={comments:{lineComment:"#",blockComment:["=begin","=end"]},brackets:[["(",")"],["{","}"],["[","]"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],indentationRules:{increaseIndentPattern:new RegExp(`^\\s*((begin|class|(private|protected)\\s+def|def|else|elsif|ensure|for|if|module|rescue|unless|until|when|while|case)|([^#]*\\sdo\\b)|([^#]*=\\s*(case|if|unless)))\\b([^#\\{;]|("|'|/).*\\4)*(#.*)?$`),decreaseIndentPattern:new RegExp("^\\s*([}\\]]([,)]?\\s*(#|$)|\\.[a-zA-Z_]\\w*\\b)|(end|rescue|ensure|else|elsif|when)\\b)")}},qUe={tokenPostfix:".ruby",keywords:["__LINE__","__ENCODING__","__FILE__","BEGIN","END","alias","and","begin","break","case","class","def","defined?","do","else","elsif","end","ensure","for","false","if","in","module","next","nil","not","or","redo","rescue","retry","return","self","super","then","true","undef","unless","until","when","while","yield"],keywordops:["::","..","...","?",":","=>"],builtins:["require","public","private","include","extend","attr_reader","protected","private_class_method","protected_class_method","new"],declarations:["module","class","def","case","do","begin","for","if","while","until","unless"],linedecls:["def","case","do","begin","for","if","while","until","unless"],operators:["^","&","|","<=>","==","===","!~","=~",">",">=","<","<=","<<",">>","+","-","*","/","%","**","~","+@","-@","[]","[]=","`","+=","-=","*=","**=","/=","^=","%=","<<=",">>=","&=","&&=","||=","|="],brackets:[{open:"(",close:")",token:"delimiter.parenthesis"},{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"}],symbols:/[=>"}],[/%([qws])(@delim)/,{token:"string.$1.delim",switchTo:"@qstring.$1.$2.$2"}],[/%r\(/,{token:"regexp.delim",switchTo:"@pregexp.(.)"}],[/%r\[/,{token:"regexp.delim",switchTo:"@pregexp.[.]"}],[/%r\{/,{token:"regexp.delim",switchTo:"@pregexp.{.}"}],[/%r"}],[/%r(@delim)/,{token:"regexp.delim",switchTo:"@pregexp.$1.$1"}],[/%(x|W|Q?)\(/,{token:"string.$1.delim",switchTo:"@qqstring.$1.(.)"}],[/%(x|W|Q?)\[/,{token:"string.$1.delim",switchTo:"@qqstring.$1.[.]"}],[/%(x|W|Q?)\{/,{token:"string.$1.delim",switchTo:"@qqstring.$1.{.}"}],[/%(x|W|Q?)"}],[/%(x|W|Q?)(@delim)/,{token:"string.$1.delim",switchTo:"@qqstring.$1.$2.$2"}],[/%([rqwsxW]|Q?)./,{token:"invalid",next:"@pop"}],[/./,{token:"invalid",next:"@pop"}]],qstring:[[/\\$/,"string.$S2.escape"],[/\\./,"string.$S2.escape"],[/./,{cases:{"$#==$S4":{token:"string.$S2.delim",next:"@pop"},"$#==$S3":{token:"string.$S2.delim",next:"@push"},"@default":"string.$S2"}}]],qqstring:[[/#/,"string.$S2.escape","@interpolated"],{include:"@qstring"}],whitespace:[[/[ \t\r\n]+/,""],[/^\s*=begin\b/,"comment","@comment"],[/#.*$/,"comment"]],comment:[[/[^=]+/,"comment"],[/^\s*=begin\b/,"comment.invalid"],[/^\s*=end\b.*/,"comment","@pop"],[/[=]/,"comment"]]}}});var INe={};nt(INe,{conf:()=>jUe,language:()=>KUe});var jUe,KUe,ENe=x(()=>{jUe={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"[",close:"]"},{open:"{",close:"}"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*#pragma\\s+region\\b"),end:new RegExp("^\\s*#pragma\\s+endregion\\b")}}},KUe={tokenPostfix:".rust",defaultToken:"invalid",keywords:["as","async","await","box","break","const","continue","crate","dyn","else","enum","extern","false","fn","for","if","impl","in","let","loop","match","mod","move","mut","pub","ref","return","self","static","struct","super","trait","true","try","type","unsafe","use","where","while","catch","default","union","static","abstract","alignof","become","do","final","macro","offsetof","override","priv","proc","pure","sizeof","typeof","unsized","virtual","yield"],typeKeywords:["Self","m32","m64","m128","f80","f16","f128","int","uint","float","char","bool","u8","u16","u32","u64","f32","f64","i8","i16","i32","i64","str","Option","Either","c_float","c_double","c_void","FILE","fpos_t","DIR","dirent","c_char","c_schar","c_uchar","c_short","c_ushort","c_int","c_uint","c_long","c_ulong","size_t","ptrdiff_t","clock_t","time_t","c_longlong","c_ulonglong","intptr_t","uintptr_t","off_t","dev_t","ino_t","pid_t","mode_t","ssize_t"],constants:["true","false","Some","None","Left","Right","Ok","Err"],supportConstants:["EXIT_FAILURE","EXIT_SUCCESS","RAND_MAX","EOF","SEEK_SET","SEEK_CUR","SEEK_END","_IOFBF","_IONBF","_IOLBF","BUFSIZ","FOPEN_MAX","FILENAME_MAX","L_tmpnam","TMP_MAX","O_RDONLY","O_WRONLY","O_RDWR","O_APPEND","O_CREAT","O_EXCL","O_TRUNC","S_IFIFO","S_IFCHR","S_IFBLK","S_IFDIR","S_IFREG","S_IFMT","S_IEXEC","S_IWRITE","S_IREAD","S_IRWXU","S_IXUSR","S_IWUSR","S_IRUSR","F_OK","R_OK","W_OK","X_OK","STDIN_FILENO","STDOUT_FILENO","STDERR_FILENO"],supportMacros:["format!","print!","println!","panic!","format_args!","unreachable!","write!","writeln!"],operators:["!","!=","%","%=","&","&=","&&","*","*=","+","+=","-","-=","->",".","..","...","/","/=",":",";","<<","<<=","<","<=","=","==","=>",">",">=",">>",">>=","@","^","^=","|","|=","||","_","?","#"],escapes:/\\([nrt0\"''\\]|x\h{2}|u\{\h{1,6}\})/,delimiters:/[,]/,symbols:/[\#\!\%\&\*\+\-\.\/\:\;\<\=\>\@\^\|_\?]+/,intSuffixes:/[iu](8|16|32|64|128|size)/,floatSuffixes:/f(32|64)/,tokenizer:{root:[[/r(#*)"/,{token:"string.quote",bracket:"@open",next:"@stringraw.$1"}],[/[a-zA-Z][a-zA-Z0-9_]*!?|_[a-zA-Z0-9_]+/,{cases:{"@typeKeywords":"keyword.type","@keywords":"keyword","@supportConstants":"keyword","@supportMacros":"keyword","@constants":"keyword","@default":"identifier"}}],[/\$/,"identifier"],[/'[a-zA-Z_][a-zA-Z0-9_]*(?=[^\'])/,"identifier"],[/'(\S|@escapes)'/,"string.byteliteral"],[/"/,{token:"string.quote",bracket:"@open",next:"@string"}],{include:"@numbers"},{include:"@whitespace"},[/@delimiters/,{cases:{"@keywords":"keyword","@default":"delimiter"}}],[/[{}()\[\]<>]/,"@brackets"],[/@symbols/,{cases:{"@operators":"operator","@default":""}}]],whitespace:[[/[ \t\r\n]+/,"white"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\/\*/,"comment","@push"],["\\*/","comment","@pop"],[/[\/*]/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",bracket:"@close",next:"@pop"}]],stringraw:[[/[^"#]+/,{token:"string"}],[/"(#*)/,{cases:{"$1==$S2":{token:"string.quote",bracket:"@close",next:"@pop"},"@default":{token:"string"}}}],[/["#]/,{token:"string"}]],numbers:[[/(0o[0-7_]+)(@intSuffixes)?/,{token:"number"}],[/(0b[0-1_]+)(@intSuffixes)?/,{token:"number"}],[/[\d][\d_]*(\.[\d][\d_]*)?[eE][+-][\d_]+(@floatSuffixes)?/,{token:"number"}],[/\b(\d\.?[\d_]*)(@floatSuffixes)?\b/,{token:"number"}],[/(0x[\da-fA-F]+)_?(@intSuffixes)?/,{token:"number"}],[/[\d][\d_]*(@intSuffixes?)?/,{token:"number"}]]}}});var TNe={};nt(TNe,{conf:()=>GUe,language:()=>YUe});var GUe,YUe,DNe=x(()=>{GUe={comments:{lineComment:"'"},brackets:[["(",")"],["[","]"],["If","EndIf"],["While","EndWhile"],["For","EndFor"],["Sub","EndSub"]],autoClosingPairs:[{open:'"',close:'"',notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]}]},YUe={defaultToken:"",tokenPostfix:".sb",ignoreCase:!0,brackets:[{token:"delimiter.array",open:"[",close:"]"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"keyword.tag-if",open:"If",close:"EndIf"},{token:"keyword.tag-while",open:"While",close:"EndWhile"},{token:"keyword.tag-for",open:"For",close:"EndFor"},{token:"keyword.tag-sub",open:"Sub",close:"EndSub"}],keywords:["Else","ElseIf","EndFor","EndIf","EndSub","EndWhile","For","Goto","If","Step","Sub","Then","To","While"],tagwords:["If","Sub","While","For"],operators:[">","<","<>","<=",">=","And","Or","+","-","*","/","="],identifier:/[a-zA-Z_][\w]*/,symbols:/[=><:+\-*\/%\.,]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[{include:"@whitespace"},[/(@identifier)(?=[.])/,"type"],[/@identifier/,{cases:{"@keywords":{token:"keyword.$0"},"@operators":"operator","@default":"variable.name"}}],[/([.])(@identifier)/,{cases:{$2:["delimiter","type.member"],"@default":""}}],[/\d*\.\d+/,"number.float"],[/\d+/,"number"],[/[()\[\]]/,"@brackets"],[/@symbols/,{cases:{"@operators":"operator","@default":"delimiter"}}],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"]],whitespace:[[/[ \t\r\n]+/,""],[/(\').*$/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"C?/,"string","@pop"]]}}});var NNe={};nt(NNe,{conf:()=>ZUe,language:()=>XUe});var ZUe,XUe,RNe=x(()=>{ZUe={wordPattern:/(unary_[@~!#%^&*()\-=+\\|:<>\/?]+)|([a-zA-Z_$][\w$]*?_=)|(`[^`]+`)|([a-zA-Z_$][\w$]*)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*//\\s*(?:(?:#?region\\b)|(?:))")}}},XUe={tokenPostfix:".scala",keywords:["asInstanceOf","catch","class","classOf","def","do","else","extends","finally","for","foreach","forSome","if","import","isInstanceOf","macro","match","new","object","package","return","throw","trait","try","type","until","val","var","while","with","yield","given","enum","then"],softKeywords:["as","export","extension","end","derives","on"],constants:["true","false","null","this","super"],modifiers:["abstract","final","implicit","lazy","override","private","protected","sealed"],softModifiers:["inline","opaque","open","transparent","using"],name:/(?:[a-z_$][\w$]*|`[^`]+`)/,type:/(?:[A-Z][\w$]*)/,symbols:/[=>))/,["@brackets","white","variable"]],[/@name/,{cases:{"@keywords":"keyword","@softKeywords":"keyword","@modifiers":"keyword.modifier","@softModifiers":"keyword.modifier","@constants":{token:"constant",next:"@allowMethod"},"@default":{token:"identifier",next:"@allowMethod"}}}],[/@type/,"type","@allowMethod"],{include:"@whitespace"},[/@[a-zA-Z_$][\w$]*(?:\.[a-zA-Z_$][\w$]*)*/,"annotation"],[/[{(]/,"@brackets"],[/[})]/,"@brackets","@allowMethod"],[/\[/,"operator.square"],[/](?!\s*(?:va[rl]|def|type)\b)/,"operator.square","@allowMethod"],[/]/,"operator.square"],[/([=-]>|<-|>:|<:|:>|<%)(?=[\s\w()[\]{},\."'`])/,"keyword"],[/@symbols/,"operator"],[/[;,\.]/,"delimiter"],[/'[a-zA-Z$][\w$]*(?!')/,"attribute.name"],[/'[^\\']'/,"string","@allowMethod"],[/(')(@escapes)(')/,["string","string.escape",{token:"string",next:"@allowMethod"}]],[/'/,"string.invalid"]],import:[[/;/,"delimiter","@pop"],[/^|$/,"","@pop"],[/[ \t]+/,"white"],[/[\n\r]+/,"white","@pop"],[/\/\*/,"comment","@comment"],[/@name|@type/,"type"],[/[(){}]/,"@brackets"],[/[[\]]/,"operator.square"],[/[\.,]/,"delimiter"]],allowMethod:[[/^|$/,"","@pop"],[/[ \t]+/,"white"],[/[\n\r]+/,"white","@pop"],[/\/\*/,"comment","@comment"],[/(?==>[\s\w([{])/,"keyword","@pop"],[/(@name|@symbols)(?=[ \t]*[[({"'`]|[ \t]+(?:[+-]?\.?\d|\w))/,{cases:{"@keywords":{token:"keyword",next:"@pop"},"->|<-|>:|<:|<%":{token:"keyword",next:"@pop"},"@default":{token:"@rematch",next:"@pop"}}}],["","","@pop"]],comment:[[/[^\/*]+/,"comment"],[/\/\*/,"comment","@push"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],case:[[/\b_\*/,"key"],[/\b(_|true|false|null|this|super)\b/,"keyword","@allowMethod"],[/\bif\b|=>/,"keyword","@pop"],[/`[^`]+`/,"identifier","@allowMethod"],[/@name/,"variable","@allowMethod"],[/:::?|\||@(?![a-z_$])/,"keyword"],{include:"@root"}],vardef:[[/\b_\*/,"key"],[/\b(_|true|false|null|this|super)\b/,"keyword"],[/@name/,"variable"],[/:::?|\||@(?![a-z_$])/,"keyword"],[/=|:(?!:)/,"operator","@pop"],[/$/,"white","@pop"],{include:"@root"}],string:[[/[^\\"\n\r]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}]],stringt:[[/[^\\"\n\r]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"(?=""")/,"string"],[/"""/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}],[/"/,"string"]],fstring:[[/@escapes/,"string.escape"],[/"/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}],[/\$\$/,"string"],[/(\$)([a-z_]\w*)/,["operator","identifier"]],[/\$\{/,"operator","@interp"],[/%%/,"string"],[/(%)([\-#+ 0,(])(\d+|\.\d+|\d+\.\d+)(@fstring_conv)/,["metatag","keyword.modifier","number","metatag"]],[/(%)(\d+|\.\d+|\d+\.\d+)(@fstring_conv)/,["metatag","number","metatag"]],[/(%)([\-#+ 0,(])(@fstring_conv)/,["metatag","keyword.modifier","metatag"]],[/(%)(@fstring_conv)/,["metatag","metatag"]],[/./,"string"]],fstringt:[[/@escapes/,"string.escape"],[/"(?=""")/,"string"],[/"""/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}],[/\$\$/,"string"],[/(\$)([a-z_]\w*)/,["operator","identifier"]],[/\$\{/,"operator","@interp"],[/%%/,"string"],[/(%)([\-#+ 0,(])(\d+|\.\d+|\d+\.\d+)(@fstring_conv)/,["metatag","keyword.modifier","number","metatag"]],[/(%)(\d+|\.\d+|\d+\.\d+)(@fstring_conv)/,["metatag","number","metatag"]],[/(%)([\-#+ 0,(])(@fstring_conv)/,["metatag","keyword.modifier","metatag"]],[/(%)(@fstring_conv)/,["metatag","metatag"]],[/./,"string"]],sstring:[[/@escapes/,"string.escape"],[/"/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}],[/\$\$/,"string"],[/(\$)([a-z_]\w*)/,["operator","identifier"]],[/\$\{/,"operator","@interp"],[/./,"string"]],sstringt:[[/@escapes/,"string.escape"],[/"(?=""")/,"string"],[/"""/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}],[/\$\$/,"string"],[/(\$)([a-z_]\w*)/,["operator","identifier"]],[/\$\{/,"operator","@interp"],[/./,"string"]],interp:[[/{/,"operator","@push"],[/}/,"operator","@pop"],{include:"@root"}],rawstring:[[/[^"]/,"string"],[/"/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}]],rawstringt:[[/[^"]/,"string"],[/"(?=""")/,"string"],[/"""/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}],[/"/,"string"]],whitespace:[[/[ \t\r\n]+/,"white"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]]}}});var ANe={};nt(ANe,{conf:()=>QUe,language:()=>JUe});var QUe,JUe,MNe=x(()=>{QUe={comments:{lineComment:";",blockComment:["#|","|#"]},brackets:[["(",")"],["{","}"],["[","]"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}]},JUe={defaultToken:"",ignoreCase:!0,tokenPostfix:".scheme",brackets:[{open:"(",close:")",token:"delimiter.parenthesis"},{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"}],keywords:["case","do","let","loop","if","else","when","cons","car","cdr","cond","lambda","lambda*","syntax-rules","format","set!","quote","eval","append","list","list?","member?","load"],constants:["#t","#f"],operators:["eq?","eqv?","equal?","and","or","not","null?"],tokenizer:{root:[[/#[xXoObB][0-9a-fA-F]+/,"number.hex"],[/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?/,"number.float"],[/(?:\b(?:(define|define-syntax|define-macro))\b)(\s+)((?:\w|\-|\!|\?)*)/,["keyword","white","variable"]],{include:"@whitespace"},{include:"@strings"},[/[a-zA-Z_#][a-zA-Z0-9_\-\?\!\*]*/,{cases:{"@keywords":"keyword","@constants":"constant","@operators":"operators","@default":"identifier"}}]],comment:[[/[^\|#]+/,"comment"],[/#\|/,"comment","@push"],[/\|#/,"comment","@pop"],[/[\|#]/,"comment"]],whitespace:[[/[ \t\r\n]+/,"white"],[/#\|/,"comment","@comment"],[/;.*$/,"comment"]],strings:[[/"$/,"string","@popall"],[/"(?=.)/,"string","@multiLineString"]],multiLineString:[[/[^\\"]+$/,"string","@popall"],[/[^\\"]+/,"string"],[/\\./,"string.escape"],[/"/,"string","@popall"],[/\\$/,"string"]]}}});var ONe={};nt(ONe,{conf:()=>e$e,language:()=>t$e});var e$e,t$e,PNe=x(()=>{e$e={wordPattern:/(#?-?\d*\.\d\w*%?)|([@$#!.:]?[\w-?]+%?)|[@#!.]/g,comments:{blockComment:["/*","*/"],lineComment:"//"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/"),end:new RegExp("^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/")}}},t$e={defaultToken:"",tokenPostfix:".scss",ws:`[ +\r\f]*`,identifier:"-?-?([a-zA-Z]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],tokenizer:{root:[{include:"@selector"}],selector:[{include:"@comments"},{include:"@import"},{include:"@variabledeclaration"},{include:"@warndebug"},["[@](include)",{token:"keyword",next:"@includedeclaration"}],["[@](keyframes|-webkit-keyframes|-moz-keyframes|-o-keyframes)",{token:"keyword",next:"@keyframedeclaration"}],["[@](page|content|font-face|-moz-document)",{token:"keyword"}],["[@](charset|namespace)",{token:"keyword",next:"@declarationbody"}],["[@](function)",{token:"keyword",next:"@functiondeclaration"}],["[@](mixin)",{token:"keyword",next:"@mixindeclaration"}],["url(\\-prefix)?\\(",{token:"meta",next:"@urldeclaration"}],{include:"@controlstatement"},{include:"@selectorname"},["[&\\*]","tag"],["[>\\+,]","delimiter"],["\\[",{token:"delimiter.bracket",next:"@selectorattribute"}],["{",{token:"delimiter.curly",next:"@selectorbody"}]],selectorbody:[["[*_]?@identifier@ws:(?=(\\s|\\d|[^{;}]*[;}]))","attribute.name","@rulevalue"],{include:"@selector"},["[@](extend)",{token:"keyword",next:"@extendbody"}],["[@](return)",{token:"keyword",next:"@declarationbody"}],["}",{token:"delimiter.curly",next:"@pop"}]],selectorname:[["#{",{token:"meta",next:"@variableinterpolation"}],["(\\.|#(?=[^{])|%|(@identifier)|:)+","tag"]],selectorattribute:[{include:"@term"},["]",{token:"delimiter.bracket",next:"@pop"}]],term:[{include:"@comments"},["url(\\-prefix)?\\(",{token:"meta",next:"@urldeclaration"}],{include:"@functioninvocation"},{include:"@numbers"},{include:"@strings"},{include:"@variablereference"},["(and\\b|or\\b|not\\b)","operator"],{include:"@name"},["([<>=\\+\\-\\*\\/\\^\\|\\~,])","operator"],[",","delimiter"],["!default","literal"],["\\(",{token:"delimiter.parenthesis",next:"@parenthizedterm"}]],rulevalue:[{include:"@term"},["!important","literal"],[";","delimiter","@pop"],["{",{token:"delimiter.curly",switchTo:"@nestedproperty"}],["(?=})",{token:"",next:"@pop"}]],nestedproperty:[["[*_]?@identifier@ws:","attribute.name","@rulevalue"],{include:"@comments"},["}",{token:"delimiter.curly",next:"@pop"}]],warndebug:[["[@](warn|debug)",{token:"keyword",next:"@declarationbody"}]],import:[["[@](import)",{token:"keyword",next:"@declarationbody"}]],variabledeclaration:[["\\$@identifier@ws:","variable.decl","@declarationbody"]],urldeclaration:[{include:"@strings"},[`[^)\r +]+`,"string"],["\\)",{token:"meta",next:"@pop"}]],parenthizedterm:[{include:"@term"},["\\)",{token:"delimiter.parenthesis",next:"@pop"}]],declarationbody:[{include:"@term"},[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],extendbody:[{include:"@selectorname"},["!optional","literal"],[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],variablereference:[["\\$@identifier","variable.ref"],["\\.\\.\\.","operator"],["#{",{token:"meta",next:"@variableinterpolation"}]],variableinterpolation:[{include:"@variablereference"},["}",{token:"meta",next:"@pop"}]],comments:[["\\/\\*","comment","@comment"],["\\/\\/+.*","comment"]],comment:[["\\*\\/","comment","@pop"],[".","comment"]],name:[["@identifier","attribute.value"]],numbers:[["(\\d*\\.)?\\d+([eE][\\-+]?\\d+)?",{token:"number",next:"@units"}],["#[0-9a-fA-F_]+(?!\\w)","number.hex"]],units:[["(em|ex|ch|rem|fr|vmin|vmax|vw|vh|vm|cm|mm|in|px|pt|pc|deg|grad|rad|turn|s|ms|Hz|kHz|%)?","number","@pop"]],functiondeclaration:[["@identifier@ws\\(",{token:"meta",next:"@parameterdeclaration"}],["{",{token:"delimiter.curly",switchTo:"@functionbody"}]],mixindeclaration:[["@identifier@ws\\(",{token:"meta",next:"@parameterdeclaration"}],["@identifier","meta"],["{",{token:"delimiter.curly",switchTo:"@selectorbody"}]],parameterdeclaration:[["\\$@identifier@ws:","variable.decl"],["\\.\\.\\.","operator"],[",","delimiter"],{include:"@term"},["\\)",{token:"meta",next:"@pop"}]],includedeclaration:[{include:"@functioninvocation"},["@identifier","meta"],[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}],["{",{token:"delimiter.curly",switchTo:"@selectorbody"}]],keyframedeclaration:[["@identifier","meta"],["{",{token:"delimiter.curly",switchTo:"@keyframebody"}]],keyframebody:[{include:"@term"},["{",{token:"delimiter.curly",next:"@selectorbody"}],["}",{token:"delimiter.curly",next:"@pop"}]],controlstatement:[["[@](if|else|for|while|each|media)",{token:"keyword.flow",next:"@controlstatementdeclaration"}]],controlstatementdeclaration:[["(in|from|through|if|to)\\b",{token:"keyword.flow"}],{include:"@term"},["{",{token:"delimiter.curly",switchTo:"@selectorbody"}]],functionbody:[["[@](return)",{token:"keyword"}],{include:"@variabledeclaration"},{include:"@term"},{include:"@controlstatement"},[";","delimiter"],["}",{token:"delimiter.curly",next:"@pop"}]],functioninvocation:[["@identifier\\(",{token:"meta",next:"@functionarguments"}]],functionarguments:[["\\$@identifier@ws:","attribute.name"],["[,]","delimiter"],{include:"@term"},["\\)",{token:"meta",next:"@pop"}]],strings:[['~?"',{token:"string.delimiter",next:"@stringenddoublequote"}],["~?'",{token:"string.delimiter",next:"@stringendquote"}]],stringenddoublequote:[["\\\\.","string"],['"',{token:"string.delimiter",next:"@pop"}],[".","string"]],stringendquote:[["\\\\.","string"],["'",{token:"string.delimiter",next:"@pop"}],[".","string"]]}}});var FNe={};nt(FNe,{conf:()=>i$e,language:()=>n$e});var i$e,n$e,BNe=x(()=>{i$e={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}]},n$e={defaultToken:"",ignoreCase:!0,tokenPostfix:".shell",brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"}],keywords:["if","then","do","else","elif","while","until","for","in","esac","fi","fin","fil","done","exit","set","unset","export","function"],builtins:["ab","awk","bash","beep","cat","cc","cd","chown","chmod","chroot","clear","cp","curl","cut","diff","echo","find","gawk","gcc","get","git","grep","hg","kill","killall","ln","ls","make","mkdir","openssl","mv","nc","node","npm","ping","ps","restart","rm","rmdir","sed","service","sh","shopt","shred","source","sort","sleep","ssh","start","stop","su","sudo","svn","tee","telnet","top","touch","vi","vim","wall","wc","wget","who","write","yes","zsh"],startingWithDash:/\-+\w+/,identifiersWithDashes:/[a-zA-Z]\w+(?:@startingWithDash)+/,symbols:/[=>o$e,language:()=>s$e});var o$e,s$e,HNe=x(()=>{o$e={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"],["<",">"]],autoClosingPairs:[{open:'"',close:'"',notIn:["string","comment"]},{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]}]},s$e={defaultToken:"",tokenPostfix:".sol",brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"},{token:"delimiter.angle",open:"<",close:">"}],keywords:["pragma","solidity","contract","library","using","struct","function","modifier","constructor","address","string","bool","Int","Uint","Byte","Fixed","Ufixed","int","int8","int16","int24","int32","int40","int48","int56","int64","int72","int80","int88","int96","int104","int112","int120","int128","int136","int144","int152","int160","int168","int176","int184","int192","int200","int208","int216","int224","int232","int240","int248","int256","uint","uint8","uint16","uint24","uint32","uint40","uint48","uint56","uint64","uint72","uint80","uint88","uint96","uint104","uint112","uint120","uint128","uint136","uint144","uint152","uint160","uint168","uint176","uint184","uint192","uint200","uint208","uint216","uint224","uint232","uint240","uint248","uint256","byte","bytes","bytes1","bytes2","bytes3","bytes4","bytes5","bytes6","bytes7","bytes8","bytes9","bytes10","bytes11","bytes12","bytes13","bytes14","bytes15","bytes16","bytes17","bytes18","bytes19","bytes20","bytes21","bytes22","bytes23","bytes24","bytes25","bytes26","bytes27","bytes28","bytes29","bytes30","bytes31","bytes32","fixed","fixed0x8","fixed0x16","fixed0x24","fixed0x32","fixed0x40","fixed0x48","fixed0x56","fixed0x64","fixed0x72","fixed0x80","fixed0x88","fixed0x96","fixed0x104","fixed0x112","fixed0x120","fixed0x128","fixed0x136","fixed0x144","fixed0x152","fixed0x160","fixed0x168","fixed0x176","fixed0x184","fixed0x192","fixed0x200","fixed0x208","fixed0x216","fixed0x224","fixed0x232","fixed0x240","fixed0x248","fixed0x256","fixed8x8","fixed8x16","fixed8x24","fixed8x32","fixed8x40","fixed8x48","fixed8x56","fixed8x64","fixed8x72","fixed8x80","fixed8x88","fixed8x96","fixed8x104","fixed8x112","fixed8x120","fixed8x128","fixed8x136","fixed8x144","fixed8x152","fixed8x160","fixed8x168","fixed8x176","fixed8x184","fixed8x192","fixed8x200","fixed8x208","fixed8x216","fixed8x224","fixed8x232","fixed8x240","fixed8x248","fixed16x8","fixed16x16","fixed16x24","fixed16x32","fixed16x40","fixed16x48","fixed16x56","fixed16x64","fixed16x72","fixed16x80","fixed16x88","fixed16x96","fixed16x104","fixed16x112","fixed16x120","fixed16x128","fixed16x136","fixed16x144","fixed16x152","fixed16x160","fixed16x168","fixed16x176","fixed16x184","fixed16x192","fixed16x200","fixed16x208","fixed16x216","fixed16x224","fixed16x232","fixed16x240","fixed24x8","fixed24x16","fixed24x24","fixed24x32","fixed24x40","fixed24x48","fixed24x56","fixed24x64","fixed24x72","fixed24x80","fixed24x88","fixed24x96","fixed24x104","fixed24x112","fixed24x120","fixed24x128","fixed24x136","fixed24x144","fixed24x152","fixed24x160","fixed24x168","fixed24x176","fixed24x184","fixed24x192","fixed24x200","fixed24x208","fixed24x216","fixed24x224","fixed24x232","fixed32x8","fixed32x16","fixed32x24","fixed32x32","fixed32x40","fixed32x48","fixed32x56","fixed32x64","fixed32x72","fixed32x80","fixed32x88","fixed32x96","fixed32x104","fixed32x112","fixed32x120","fixed32x128","fixed32x136","fixed32x144","fixed32x152","fixed32x160","fixed32x168","fixed32x176","fixed32x184","fixed32x192","fixed32x200","fixed32x208","fixed32x216","fixed32x224","fixed40x8","fixed40x16","fixed40x24","fixed40x32","fixed40x40","fixed40x48","fixed40x56","fixed40x64","fixed40x72","fixed40x80","fixed40x88","fixed40x96","fixed40x104","fixed40x112","fixed40x120","fixed40x128","fixed40x136","fixed40x144","fixed40x152","fixed40x160","fixed40x168","fixed40x176","fixed40x184","fixed40x192","fixed40x200","fixed40x208","fixed40x216","fixed48x8","fixed48x16","fixed48x24","fixed48x32","fixed48x40","fixed48x48","fixed48x56","fixed48x64","fixed48x72","fixed48x80","fixed48x88","fixed48x96","fixed48x104","fixed48x112","fixed48x120","fixed48x128","fixed48x136","fixed48x144","fixed48x152","fixed48x160","fixed48x168","fixed48x176","fixed48x184","fixed48x192","fixed48x200","fixed48x208","fixed56x8","fixed56x16","fixed56x24","fixed56x32","fixed56x40","fixed56x48","fixed56x56","fixed56x64","fixed56x72","fixed56x80","fixed56x88","fixed56x96","fixed56x104","fixed56x112","fixed56x120","fixed56x128","fixed56x136","fixed56x144","fixed56x152","fixed56x160","fixed56x168","fixed56x176","fixed56x184","fixed56x192","fixed56x200","fixed64x8","fixed64x16","fixed64x24","fixed64x32","fixed64x40","fixed64x48","fixed64x56","fixed64x64","fixed64x72","fixed64x80","fixed64x88","fixed64x96","fixed64x104","fixed64x112","fixed64x120","fixed64x128","fixed64x136","fixed64x144","fixed64x152","fixed64x160","fixed64x168","fixed64x176","fixed64x184","fixed64x192","fixed72x8","fixed72x16","fixed72x24","fixed72x32","fixed72x40","fixed72x48","fixed72x56","fixed72x64","fixed72x72","fixed72x80","fixed72x88","fixed72x96","fixed72x104","fixed72x112","fixed72x120","fixed72x128","fixed72x136","fixed72x144","fixed72x152","fixed72x160","fixed72x168","fixed72x176","fixed72x184","fixed80x8","fixed80x16","fixed80x24","fixed80x32","fixed80x40","fixed80x48","fixed80x56","fixed80x64","fixed80x72","fixed80x80","fixed80x88","fixed80x96","fixed80x104","fixed80x112","fixed80x120","fixed80x128","fixed80x136","fixed80x144","fixed80x152","fixed80x160","fixed80x168","fixed80x176","fixed88x8","fixed88x16","fixed88x24","fixed88x32","fixed88x40","fixed88x48","fixed88x56","fixed88x64","fixed88x72","fixed88x80","fixed88x88","fixed88x96","fixed88x104","fixed88x112","fixed88x120","fixed88x128","fixed88x136","fixed88x144","fixed88x152","fixed88x160","fixed88x168","fixed96x8","fixed96x16","fixed96x24","fixed96x32","fixed96x40","fixed96x48","fixed96x56","fixed96x64","fixed96x72","fixed96x80","fixed96x88","fixed96x96","fixed96x104","fixed96x112","fixed96x120","fixed96x128","fixed96x136","fixed96x144","fixed96x152","fixed96x160","fixed104x8","fixed104x16","fixed104x24","fixed104x32","fixed104x40","fixed104x48","fixed104x56","fixed104x64","fixed104x72","fixed104x80","fixed104x88","fixed104x96","fixed104x104","fixed104x112","fixed104x120","fixed104x128","fixed104x136","fixed104x144","fixed104x152","fixed112x8","fixed112x16","fixed112x24","fixed112x32","fixed112x40","fixed112x48","fixed112x56","fixed112x64","fixed112x72","fixed112x80","fixed112x88","fixed112x96","fixed112x104","fixed112x112","fixed112x120","fixed112x128","fixed112x136","fixed112x144","fixed120x8","fixed120x16","fixed120x24","fixed120x32","fixed120x40","fixed120x48","fixed120x56","fixed120x64","fixed120x72","fixed120x80","fixed120x88","fixed120x96","fixed120x104","fixed120x112","fixed120x120","fixed120x128","fixed120x136","fixed128x8","fixed128x16","fixed128x24","fixed128x32","fixed128x40","fixed128x48","fixed128x56","fixed128x64","fixed128x72","fixed128x80","fixed128x88","fixed128x96","fixed128x104","fixed128x112","fixed128x120","fixed128x128","fixed136x8","fixed136x16","fixed136x24","fixed136x32","fixed136x40","fixed136x48","fixed136x56","fixed136x64","fixed136x72","fixed136x80","fixed136x88","fixed136x96","fixed136x104","fixed136x112","fixed136x120","fixed144x8","fixed144x16","fixed144x24","fixed144x32","fixed144x40","fixed144x48","fixed144x56","fixed144x64","fixed144x72","fixed144x80","fixed144x88","fixed144x96","fixed144x104","fixed144x112","fixed152x8","fixed152x16","fixed152x24","fixed152x32","fixed152x40","fixed152x48","fixed152x56","fixed152x64","fixed152x72","fixed152x80","fixed152x88","fixed152x96","fixed152x104","fixed160x8","fixed160x16","fixed160x24","fixed160x32","fixed160x40","fixed160x48","fixed160x56","fixed160x64","fixed160x72","fixed160x80","fixed160x88","fixed160x96","fixed168x8","fixed168x16","fixed168x24","fixed168x32","fixed168x40","fixed168x48","fixed168x56","fixed168x64","fixed168x72","fixed168x80","fixed168x88","fixed176x8","fixed176x16","fixed176x24","fixed176x32","fixed176x40","fixed176x48","fixed176x56","fixed176x64","fixed176x72","fixed176x80","fixed184x8","fixed184x16","fixed184x24","fixed184x32","fixed184x40","fixed184x48","fixed184x56","fixed184x64","fixed184x72","fixed192x8","fixed192x16","fixed192x24","fixed192x32","fixed192x40","fixed192x48","fixed192x56","fixed192x64","fixed200x8","fixed200x16","fixed200x24","fixed200x32","fixed200x40","fixed200x48","fixed200x56","fixed208x8","fixed208x16","fixed208x24","fixed208x32","fixed208x40","fixed208x48","fixed216x8","fixed216x16","fixed216x24","fixed216x32","fixed216x40","fixed224x8","fixed224x16","fixed224x24","fixed224x32","fixed232x8","fixed232x16","fixed232x24","fixed240x8","fixed240x16","fixed248x8","ufixed","ufixed0x8","ufixed0x16","ufixed0x24","ufixed0x32","ufixed0x40","ufixed0x48","ufixed0x56","ufixed0x64","ufixed0x72","ufixed0x80","ufixed0x88","ufixed0x96","ufixed0x104","ufixed0x112","ufixed0x120","ufixed0x128","ufixed0x136","ufixed0x144","ufixed0x152","ufixed0x160","ufixed0x168","ufixed0x176","ufixed0x184","ufixed0x192","ufixed0x200","ufixed0x208","ufixed0x216","ufixed0x224","ufixed0x232","ufixed0x240","ufixed0x248","ufixed0x256","ufixed8x8","ufixed8x16","ufixed8x24","ufixed8x32","ufixed8x40","ufixed8x48","ufixed8x56","ufixed8x64","ufixed8x72","ufixed8x80","ufixed8x88","ufixed8x96","ufixed8x104","ufixed8x112","ufixed8x120","ufixed8x128","ufixed8x136","ufixed8x144","ufixed8x152","ufixed8x160","ufixed8x168","ufixed8x176","ufixed8x184","ufixed8x192","ufixed8x200","ufixed8x208","ufixed8x216","ufixed8x224","ufixed8x232","ufixed8x240","ufixed8x248","ufixed16x8","ufixed16x16","ufixed16x24","ufixed16x32","ufixed16x40","ufixed16x48","ufixed16x56","ufixed16x64","ufixed16x72","ufixed16x80","ufixed16x88","ufixed16x96","ufixed16x104","ufixed16x112","ufixed16x120","ufixed16x128","ufixed16x136","ufixed16x144","ufixed16x152","ufixed16x160","ufixed16x168","ufixed16x176","ufixed16x184","ufixed16x192","ufixed16x200","ufixed16x208","ufixed16x216","ufixed16x224","ufixed16x232","ufixed16x240","ufixed24x8","ufixed24x16","ufixed24x24","ufixed24x32","ufixed24x40","ufixed24x48","ufixed24x56","ufixed24x64","ufixed24x72","ufixed24x80","ufixed24x88","ufixed24x96","ufixed24x104","ufixed24x112","ufixed24x120","ufixed24x128","ufixed24x136","ufixed24x144","ufixed24x152","ufixed24x160","ufixed24x168","ufixed24x176","ufixed24x184","ufixed24x192","ufixed24x200","ufixed24x208","ufixed24x216","ufixed24x224","ufixed24x232","ufixed32x8","ufixed32x16","ufixed32x24","ufixed32x32","ufixed32x40","ufixed32x48","ufixed32x56","ufixed32x64","ufixed32x72","ufixed32x80","ufixed32x88","ufixed32x96","ufixed32x104","ufixed32x112","ufixed32x120","ufixed32x128","ufixed32x136","ufixed32x144","ufixed32x152","ufixed32x160","ufixed32x168","ufixed32x176","ufixed32x184","ufixed32x192","ufixed32x200","ufixed32x208","ufixed32x216","ufixed32x224","ufixed40x8","ufixed40x16","ufixed40x24","ufixed40x32","ufixed40x40","ufixed40x48","ufixed40x56","ufixed40x64","ufixed40x72","ufixed40x80","ufixed40x88","ufixed40x96","ufixed40x104","ufixed40x112","ufixed40x120","ufixed40x128","ufixed40x136","ufixed40x144","ufixed40x152","ufixed40x160","ufixed40x168","ufixed40x176","ufixed40x184","ufixed40x192","ufixed40x200","ufixed40x208","ufixed40x216","ufixed48x8","ufixed48x16","ufixed48x24","ufixed48x32","ufixed48x40","ufixed48x48","ufixed48x56","ufixed48x64","ufixed48x72","ufixed48x80","ufixed48x88","ufixed48x96","ufixed48x104","ufixed48x112","ufixed48x120","ufixed48x128","ufixed48x136","ufixed48x144","ufixed48x152","ufixed48x160","ufixed48x168","ufixed48x176","ufixed48x184","ufixed48x192","ufixed48x200","ufixed48x208","ufixed56x8","ufixed56x16","ufixed56x24","ufixed56x32","ufixed56x40","ufixed56x48","ufixed56x56","ufixed56x64","ufixed56x72","ufixed56x80","ufixed56x88","ufixed56x96","ufixed56x104","ufixed56x112","ufixed56x120","ufixed56x128","ufixed56x136","ufixed56x144","ufixed56x152","ufixed56x160","ufixed56x168","ufixed56x176","ufixed56x184","ufixed56x192","ufixed56x200","ufixed64x8","ufixed64x16","ufixed64x24","ufixed64x32","ufixed64x40","ufixed64x48","ufixed64x56","ufixed64x64","ufixed64x72","ufixed64x80","ufixed64x88","ufixed64x96","ufixed64x104","ufixed64x112","ufixed64x120","ufixed64x128","ufixed64x136","ufixed64x144","ufixed64x152","ufixed64x160","ufixed64x168","ufixed64x176","ufixed64x184","ufixed64x192","ufixed72x8","ufixed72x16","ufixed72x24","ufixed72x32","ufixed72x40","ufixed72x48","ufixed72x56","ufixed72x64","ufixed72x72","ufixed72x80","ufixed72x88","ufixed72x96","ufixed72x104","ufixed72x112","ufixed72x120","ufixed72x128","ufixed72x136","ufixed72x144","ufixed72x152","ufixed72x160","ufixed72x168","ufixed72x176","ufixed72x184","ufixed80x8","ufixed80x16","ufixed80x24","ufixed80x32","ufixed80x40","ufixed80x48","ufixed80x56","ufixed80x64","ufixed80x72","ufixed80x80","ufixed80x88","ufixed80x96","ufixed80x104","ufixed80x112","ufixed80x120","ufixed80x128","ufixed80x136","ufixed80x144","ufixed80x152","ufixed80x160","ufixed80x168","ufixed80x176","ufixed88x8","ufixed88x16","ufixed88x24","ufixed88x32","ufixed88x40","ufixed88x48","ufixed88x56","ufixed88x64","ufixed88x72","ufixed88x80","ufixed88x88","ufixed88x96","ufixed88x104","ufixed88x112","ufixed88x120","ufixed88x128","ufixed88x136","ufixed88x144","ufixed88x152","ufixed88x160","ufixed88x168","ufixed96x8","ufixed96x16","ufixed96x24","ufixed96x32","ufixed96x40","ufixed96x48","ufixed96x56","ufixed96x64","ufixed96x72","ufixed96x80","ufixed96x88","ufixed96x96","ufixed96x104","ufixed96x112","ufixed96x120","ufixed96x128","ufixed96x136","ufixed96x144","ufixed96x152","ufixed96x160","ufixed104x8","ufixed104x16","ufixed104x24","ufixed104x32","ufixed104x40","ufixed104x48","ufixed104x56","ufixed104x64","ufixed104x72","ufixed104x80","ufixed104x88","ufixed104x96","ufixed104x104","ufixed104x112","ufixed104x120","ufixed104x128","ufixed104x136","ufixed104x144","ufixed104x152","ufixed112x8","ufixed112x16","ufixed112x24","ufixed112x32","ufixed112x40","ufixed112x48","ufixed112x56","ufixed112x64","ufixed112x72","ufixed112x80","ufixed112x88","ufixed112x96","ufixed112x104","ufixed112x112","ufixed112x120","ufixed112x128","ufixed112x136","ufixed112x144","ufixed120x8","ufixed120x16","ufixed120x24","ufixed120x32","ufixed120x40","ufixed120x48","ufixed120x56","ufixed120x64","ufixed120x72","ufixed120x80","ufixed120x88","ufixed120x96","ufixed120x104","ufixed120x112","ufixed120x120","ufixed120x128","ufixed120x136","ufixed128x8","ufixed128x16","ufixed128x24","ufixed128x32","ufixed128x40","ufixed128x48","ufixed128x56","ufixed128x64","ufixed128x72","ufixed128x80","ufixed128x88","ufixed128x96","ufixed128x104","ufixed128x112","ufixed128x120","ufixed128x128","ufixed136x8","ufixed136x16","ufixed136x24","ufixed136x32","ufixed136x40","ufixed136x48","ufixed136x56","ufixed136x64","ufixed136x72","ufixed136x80","ufixed136x88","ufixed136x96","ufixed136x104","ufixed136x112","ufixed136x120","ufixed144x8","ufixed144x16","ufixed144x24","ufixed144x32","ufixed144x40","ufixed144x48","ufixed144x56","ufixed144x64","ufixed144x72","ufixed144x80","ufixed144x88","ufixed144x96","ufixed144x104","ufixed144x112","ufixed152x8","ufixed152x16","ufixed152x24","ufixed152x32","ufixed152x40","ufixed152x48","ufixed152x56","ufixed152x64","ufixed152x72","ufixed152x80","ufixed152x88","ufixed152x96","ufixed152x104","ufixed160x8","ufixed160x16","ufixed160x24","ufixed160x32","ufixed160x40","ufixed160x48","ufixed160x56","ufixed160x64","ufixed160x72","ufixed160x80","ufixed160x88","ufixed160x96","ufixed168x8","ufixed168x16","ufixed168x24","ufixed168x32","ufixed168x40","ufixed168x48","ufixed168x56","ufixed168x64","ufixed168x72","ufixed168x80","ufixed168x88","ufixed176x8","ufixed176x16","ufixed176x24","ufixed176x32","ufixed176x40","ufixed176x48","ufixed176x56","ufixed176x64","ufixed176x72","ufixed176x80","ufixed184x8","ufixed184x16","ufixed184x24","ufixed184x32","ufixed184x40","ufixed184x48","ufixed184x56","ufixed184x64","ufixed184x72","ufixed192x8","ufixed192x16","ufixed192x24","ufixed192x32","ufixed192x40","ufixed192x48","ufixed192x56","ufixed192x64","ufixed200x8","ufixed200x16","ufixed200x24","ufixed200x32","ufixed200x40","ufixed200x48","ufixed200x56","ufixed208x8","ufixed208x16","ufixed208x24","ufixed208x32","ufixed208x40","ufixed208x48","ufixed216x8","ufixed216x16","ufixed216x24","ufixed216x32","ufixed216x40","ufixed224x8","ufixed224x16","ufixed224x24","ufixed224x32","ufixed232x8","ufixed232x16","ufixed232x24","ufixed240x8","ufixed240x16","ufixed248x8","event","enum","let","mapping","private","public","external","inherited","payable","true","false","var","import","constant","if","else","for","else","for","while","do","break","continue","throw","returns","return","suicide","new","is","this","super"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/\d*\d+[eE]([\-+]?\d+)?(@floatsuffix)/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?(@floatsuffix)/,"number.float"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F](@integersuffix)/,"number.hex"],[/0[0-7']*[0-7](@integersuffix)/,"number.octal"],[/0[bB][0-1']*[0-1](@integersuffix)/,"number.binary"],[/\d[\d']*\d(@integersuffix)/,"number"],[/\d(@integersuffix)/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@doccomment"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],doccomment:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]]}}});var VNe={};nt(VNe,{conf:()=>r$e,language:()=>a$e});var r$e,a$e,zNe=x(()=>{r$e={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"],["<",">"]],autoClosingPairs:[{open:'"',close:'"',notIn:["string","comment"]},{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]}]},a$e={defaultToken:"",tokenPostfix:".aes",brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"},{token:"delimiter.angle",open:"<",close:">"}],keywords:["contract","library","entrypoint","function","stateful","state","hash","signature","tuple","list","address","string","bool","int","record","datatype","type","option","oracle","oracle_query","Call","Bits","Bytes","Oracle","String","Crypto","Address","Auth","Chain","None","Some","bits","bytes","event","let","map","private","public","true","false","var","if","else","throw"],operators:["=",">","<","!","~","?","::",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/\d*\d+[eE]([\-+]?\d+)?(@floatsuffix)/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?(@floatsuffix)/,"number.float"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F](@integersuffix)/,"number.hex"],[/0[0-7']*[0-7](@integersuffix)/,"number.octal"],[/0[bB][0-1']*[0-1](@integersuffix)/,"number.binary"],[/\d[\d']*\d(@integersuffix)/,"number"],[/\d(@integersuffix)/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@doccomment"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],doccomment:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]]}}});var UNe={};nt(UNe,{conf:()=>l$e,language:()=>c$e});var l$e,c$e,$Ne=x(()=>{l$e={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"'",close:"'",notIn:["string"]},{open:'"',close:'"',notIn:["string"]},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"}]},c$e={defaultToken:"",tokenPostfix:".rq",brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"},{token:"delimiter.angle",open:"<",close:">"}],keywords:["add","as","asc","ask","base","by","clear","construct","copy","create","data","delete","desc","describe","distinct","drop","false","filter","from","graph","group","having","in","insert","limit","load","minus","move","named","not","offset","optional","order","prefix","reduced","select","service","silent","to","true","undef","union","using","values","where","with"],builtinFunctions:["a","abs","avg","bind","bnode","bound","ceil","coalesce","concat","contains","count","datatype","day","encode_for_uri","exists","floor","group_concat","hours","if","iri","isblank","isiri","isliteral","isnumeric","isuri","lang","langmatches","lcase","max","md5","min","minutes","month","now","rand","regex","replace","round","sameterm","sample","seconds","sha1","sha256","sha384","sha512","str","strafter","strbefore","strdt","strends","strlang","strlen","strstarts","struuid","substr","sum","timezone","tz","ucase","uri","uuid","year"],ignoreCase:!0,tokenizer:{root:[[/<[^\s\u00a0>]*>?/,"tag"],{include:"@strings"},[/#.*/,"comment"],[/[{}()\[\]]/,"@brackets"],[/[;,.]/,"delimiter"],[/[_\w\d]+:(\.(?=[\w_\-\\%])|[:\w_-]|\\[-\\_~.!$&'()*+,;=/?#@%]|%[a-f\d][a-f\d])*/,"tag"],[/:(\.(?=[\w_\-\\%])|[:\w_-]|\\[-\\_~.!$&'()*+,;=/?#@%]|%[a-f\d][a-f\d])+/,"tag"],[/[$?]?[_\w\d]+/,{cases:{"@keywords":{token:"keyword"},"@builtinFunctions":{token:"predefined.sql"},"@default":"identifier"}}],[/\^\^/,"operator.sql"],[/\^[*+\-<>=&|^\/!?]*/,"operator.sql"],[/[*+\-<>=&|\/!?]/,"operator.sql"],[/@[a-z\d\-]*/,"metatag.html"],[/\s+/,"white"]],strings:[[/'([^'\\]|\\.)*$/,"string.invalid"],[/'$/,"string.sql","@pop"],[/'/,"string.sql","@stringBody"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"$/,"string.sql","@pop"],[/"/,"string.sql","@dblStringBody"]],stringBody:[[/[^\\']+/,"string.sql"],[/\\./,"string.escape"],[/'/,"string.sql","@pop"]],dblStringBody:[[/[^\\"]+/,"string.sql"],[/\\./,"string.escape"],[/"/,"string.sql","@pop"]]}}});var qNe={};nt(qNe,{conf:()=>d$e,language:()=>h$e});var d$e,h$e,jNe=x(()=>{d$e={comments:{lineComment:"--",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},h$e={defaultToken:"",tokenPostfix:".sql",ignoreCase:!0,brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],keywords:["ABORT","ABSOLUTE","ACTION","ADA","ADD","AFTER","ALL","ALLOCATE","ALTER","ALWAYS","ANALYZE","AND","ANY","ARE","AS","ASC","ASSERTION","AT","ATTACH","AUTHORIZATION","AUTOINCREMENT","AVG","BACKUP","BEFORE","BEGIN","BETWEEN","BIT","BIT_LENGTH","BOTH","BREAK","BROWSE","BULK","BY","CASCADE","CASCADED","CASE","CAST","CATALOG","CHAR","CHARACTER","CHARACTER_LENGTH","CHAR_LENGTH","CHECK","CHECKPOINT","CLOSE","CLUSTERED","COALESCE","COLLATE","COLLATION","COLUMN","COMMIT","COMPUTE","CONFLICT","CONNECT","CONNECTION","CONSTRAINT","CONSTRAINTS","CONTAINS","CONTAINSTABLE","CONTINUE","CONVERT","CORRESPONDING","COUNT","CREATE","CROSS","CURRENT","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURSOR","DATABASE","DATE","DAY","DBCC","DEALLOCATE","DEC","DECIMAL","DECLARE","DEFAULT","DEFERRABLE","DEFERRED","DELETE","DENY","DESC","DESCRIBE","DESCRIPTOR","DETACH","DIAGNOSTICS","DISCONNECT","DISK","DISTINCT","DISTRIBUTED","DO","DOMAIN","DOUBLE","DROP","DUMP","EACH","ELSE","END","END-EXEC","ERRLVL","ESCAPE","EXCEPT","EXCEPTION","EXCLUDE","EXCLUSIVE","EXEC","EXECUTE","EXISTS","EXIT","EXPLAIN","EXTERNAL","EXTRACT","FAIL","FALSE","FETCH","FILE","FILLFACTOR","FILTER","FIRST","FLOAT","FOLLOWING","FOR","FOREIGN","FORTRAN","FOUND","FREETEXT","FREETEXTTABLE","FROM","FULL","FUNCTION","GENERATED","GET","GLOB","GLOBAL","GO","GOTO","GRANT","GROUP","GROUPS","HAVING","HOLDLOCK","HOUR","IDENTITY","IDENTITYCOL","IDENTITY_INSERT","IF","IGNORE","IMMEDIATE","IN","INCLUDE","INDEX","INDEXED","INDICATOR","INITIALLY","INNER","INPUT","INSENSITIVE","INSERT","INSTEAD","INT","INTEGER","INTERSECT","INTERVAL","INTO","IS","ISNULL","ISOLATION","JOIN","KEY","KILL","LANGUAGE","LAST","LEADING","LEFT","LEVEL","LIKE","LIMIT","LINENO","LOAD","LOCAL","LOWER","MATCH","MATERIALIZED","MAX","MERGE","MIN","MINUTE","MODULE","MONTH","NAMES","NATIONAL","NATURAL","NCHAR","NEXT","NO","NOCHECK","NONCLUSTERED","NONE","NOT","NOTHING","NOTNULL","NULL","NULLIF","NULLS","NUMERIC","OCTET_LENGTH","OF","OFF","OFFSET","OFFSETS","ON","ONLY","OPEN","OPENDATASOURCE","OPENQUERY","OPENROWSET","OPENXML","OPTION","OR","ORDER","OTHERS","OUTER","OUTPUT","OVER","OVERLAPS","PAD","PARTIAL","PARTITION","PASCAL","PERCENT","PIVOT","PLAN","POSITION","PRAGMA","PRECEDING","PRECISION","PREPARE","PRESERVE","PRIMARY","PRINT","PRIOR","PRIVILEGES","PROC","PROCEDURE","PUBLIC","QUERY","RAISE","RAISERROR","RANGE","READ","READTEXT","REAL","RECONFIGURE","RECURSIVE","REFERENCES","REGEXP","REINDEX","RELATIVE","RELEASE","RENAME","REPLACE","REPLICATION","RESTORE","RESTRICT","RETURN","RETURNING","REVERT","REVOKE","RIGHT","ROLLBACK","ROW","ROWCOUNT","ROWGUIDCOL","ROWS","RULE","SAVE","SAVEPOINT","SCHEMA","SCROLL","SECOND","SECTION","SECURITYAUDIT","SELECT","SEMANTICKEYPHRASETABLE","SEMANTICSIMILARITYDETAILSTABLE","SEMANTICSIMILARITYTABLE","SESSION","SESSION_USER","SET","SETUSER","SHUTDOWN","SIZE","SMALLINT","SOME","SPACE","SQL","SQLCA","SQLCODE","SQLERROR","SQLSTATE","SQLWARNING","STATISTICS","SUBSTRING","SUM","SYSTEM_USER","TABLE","TABLESAMPLE","TEMP","TEMPORARY","TEXTSIZE","THEN","TIES","TIME","TIMESTAMP","TIMEZONE_HOUR","TIMEZONE_MINUTE","TO","TOP","TRAILING","TRAN","TRANSACTION","TRANSLATE","TRANSLATION","TRIGGER","TRIM","TRUE","TRUNCATE","TRY_CONVERT","TSEQUAL","UNBOUNDED","UNION","UNIQUE","UNKNOWN","UNPIVOT","UPDATE","UPDATETEXT","UPPER","USAGE","USE","USER","USING","VACUUM","VALUE","VALUES","VARCHAR","VARYING","VIEW","VIRTUAL","WAITFOR","WHEN","WHENEVER","WHERE","WHILE","WINDOW","WITH","WITHIN GROUP","WITHOUT","WORK","WRITE","WRITETEXT","YEAR","ZONE"],operators:["ALL","AND","ANY","BETWEEN","EXISTS","IN","LIKE","NOT","OR","SOME","EXCEPT","INTERSECT","UNION","APPLY","CROSS","FULL","INNER","JOIN","LEFT","OUTER","RIGHT","CONTAINS","FREETEXT","IS","NULL","PIVOT","UNPIVOT","MATCHED"],builtinFunctions:["AVG","CHECKSUM_AGG","COUNT","COUNT_BIG","GROUPING","GROUPING_ID","MAX","MIN","SUM","STDEV","STDEVP","VAR","VARP","CUME_DIST","FIRST_VALUE","LAG","LAST_VALUE","LEAD","PERCENTILE_CONT","PERCENTILE_DISC","PERCENT_RANK","COLLATE","COLLATIONPROPERTY","TERTIARY_WEIGHTS","FEDERATION_FILTERING_VALUE","CAST","CONVERT","PARSE","TRY_CAST","TRY_CONVERT","TRY_PARSE","ASYMKEY_ID","ASYMKEYPROPERTY","CERTPROPERTY","CERT_ID","CRYPT_GEN_RANDOM","DECRYPTBYASYMKEY","DECRYPTBYCERT","DECRYPTBYKEY","DECRYPTBYKEYAUTOASYMKEY","DECRYPTBYKEYAUTOCERT","DECRYPTBYPASSPHRASE","ENCRYPTBYASYMKEY","ENCRYPTBYCERT","ENCRYPTBYKEY","ENCRYPTBYPASSPHRASE","HASHBYTES","IS_OBJECTSIGNED","KEY_GUID","KEY_ID","KEY_NAME","SIGNBYASYMKEY","SIGNBYCERT","SYMKEYPROPERTY","VERIFYSIGNEDBYCERT","VERIFYSIGNEDBYASYMKEY","CURSOR_STATUS","DATALENGTH","IDENT_CURRENT","IDENT_INCR","IDENT_SEED","IDENTITY","SQL_VARIANT_PROPERTY","CURRENT_TIMESTAMP","DATEADD","DATEDIFF","DATEFROMPARTS","DATENAME","DATEPART","DATETIME2FROMPARTS","DATETIMEFROMPARTS","DATETIMEOFFSETFROMPARTS","DAY","EOMONTH","GETDATE","GETUTCDATE","ISDATE","MONTH","SMALLDATETIMEFROMPARTS","SWITCHOFFSET","SYSDATETIME","SYSDATETIMEOFFSET","SYSUTCDATETIME","TIMEFROMPARTS","TODATETIMEOFFSET","YEAR","CHOOSE","COALESCE","IIF","NULLIF","ABS","ACOS","ASIN","ATAN","ATN2","CEILING","COS","COT","DEGREES","EXP","FLOOR","LOG","LOG10","PI","POWER","RADIANS","RAND","ROUND","SIGN","SIN","SQRT","SQUARE","TAN","APP_NAME","APPLOCK_MODE","APPLOCK_TEST","ASSEMBLYPROPERTY","COL_LENGTH","COL_NAME","COLUMNPROPERTY","DATABASE_PRINCIPAL_ID","DATABASEPROPERTYEX","DB_ID","DB_NAME","FILE_ID","FILE_IDEX","FILE_NAME","FILEGROUP_ID","FILEGROUP_NAME","FILEGROUPPROPERTY","FILEPROPERTY","FULLTEXTCATALOGPROPERTY","FULLTEXTSERVICEPROPERTY","INDEX_COL","INDEXKEY_PROPERTY","INDEXPROPERTY","OBJECT_DEFINITION","OBJECT_ID","OBJECT_NAME","OBJECT_SCHEMA_NAME","OBJECTPROPERTY","OBJECTPROPERTYEX","ORIGINAL_DB_NAME","PARSENAME","SCHEMA_ID","SCHEMA_NAME","SCOPE_IDENTITY","SERVERPROPERTY","STATS_DATE","TYPE_ID","TYPE_NAME","TYPEPROPERTY","DENSE_RANK","NTILE","RANK","ROW_NUMBER","PUBLISHINGSERVERNAME","OPENDATASOURCE","OPENQUERY","OPENROWSET","OPENXML","CERTENCODED","CERTPRIVATEKEY","CURRENT_USER","HAS_DBACCESS","HAS_PERMS_BY_NAME","IS_MEMBER","IS_ROLEMEMBER","IS_SRVROLEMEMBER","LOGINPROPERTY","ORIGINAL_LOGIN","PERMISSIONS","PWDENCRYPT","PWDCOMPARE","SESSION_USER","SESSIONPROPERTY","SUSER_ID","SUSER_NAME","SUSER_SID","SUSER_SNAME","SYSTEM_USER","USER","USER_ID","USER_NAME","ASCII","CHAR","CHARINDEX","CONCAT","DIFFERENCE","FORMAT","LEFT","LEN","LOWER","LTRIM","NCHAR","PATINDEX","QUOTENAME","REPLACE","REPLICATE","REVERSE","RIGHT","RTRIM","SOUNDEX","SPACE","STR","STUFF","SUBSTRING","UNICODE","UPPER","BINARY_CHECKSUM","CHECKSUM","CONNECTIONPROPERTY","CONTEXT_INFO","CURRENT_REQUEST_ID","ERROR_LINE","ERROR_NUMBER","ERROR_MESSAGE","ERROR_PROCEDURE","ERROR_SEVERITY","ERROR_STATE","FORMATMESSAGE","GETANSINULL","GET_FILESTREAM_TRANSACTION_CONTEXT","HOST_ID","HOST_NAME","ISNULL","ISNUMERIC","MIN_ACTIVE_ROWVERSION","NEWID","NEWSEQUENTIALID","ROWCOUNT_BIG","XACT_STATE","TEXTPTR","TEXTVALID","COLUMNS_UPDATED","EVENTDATA","TRIGGER_NESTLEVEL","UPDATE","CHANGETABLE","CHANGE_TRACKING_CONTEXT","CHANGE_TRACKING_CURRENT_VERSION","CHANGE_TRACKING_IS_COLUMN_IN_MASK","CHANGE_TRACKING_MIN_VALID_VERSION","CONTAINSTABLE","FREETEXTTABLE","SEMANTICKEYPHRASETABLE","SEMANTICSIMILARITYDETAILSTABLE","SEMANTICSIMILARITYTABLE","FILETABLEROOTPATH","GETFILENAMESPACEPATH","GETPATHLOCATOR","PATHNAME","GET_TRANSMISSION_STATUS"],builtinVariables:["@@DATEFIRST","@@DBTS","@@LANGID","@@LANGUAGE","@@LOCK_TIMEOUT","@@MAX_CONNECTIONS","@@MAX_PRECISION","@@NESTLEVEL","@@OPTIONS","@@REMSERVER","@@SERVERNAME","@@SERVICENAME","@@SPID","@@TEXTSIZE","@@VERSION","@@CURSOR_ROWS","@@FETCH_STATUS","@@DATEFIRST","@@PROCID","@@ERROR","@@IDENTITY","@@ROWCOUNT","@@TRANCOUNT","@@CONNECTIONS","@@CPU_BUSY","@@IDLE","@@IO_BUSY","@@PACKET_ERRORS","@@PACK_RECEIVED","@@PACK_SENT","@@TIMETICKS","@@TOTAL_ERRORS","@@TOTAL_READ","@@TOTAL_WRITE"],pseudoColumns:["$ACTION","$IDENTITY","$ROWGUID","$PARTITION"],tokenizer:{root:[{include:"@comments"},{include:"@whitespace"},{include:"@pseudoColumns"},{include:"@numbers"},{include:"@strings"},{include:"@complexIdentifiers"},{include:"@scopes"},[/[;,.]/,"delimiter"],[/[()]/,"@brackets"],[/[\w@#$]+/,{cases:{"@operators":"operator","@builtinVariables":"predefined","@builtinFunctions":"predefined","@keywords":"keyword","@default":"identifier"}}],[/[<>=!%&+\-*/|~^]/,"operator"]],whitespace:[[/\s+/,"white"]],comments:[[/--+.*/,"comment"],[/\/\*/,{token:"comment.quote",next:"@comment"}]],comment:[[/[^*/]+/,"comment"],[/\*\//,{token:"comment.quote",next:"@pop"}],[/./,"comment"]],pseudoColumns:[[/[$][A-Za-z_][\w@#$]*/,{cases:{"@pseudoColumns":"predefined","@default":"identifier"}}]],numbers:[[/0[xX][0-9a-fA-F]*/,"number"],[/[$][+-]*\d*(\.\d*)?/,"number"],[/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/,"number"]],strings:[[/N'/,{token:"string",next:"@string"}],[/'/,{token:"string",next:"@string"}]],string:[[/[^']+/,"string"],[/''/,"string"],[/'/,{token:"string",next:"@pop"}]],complexIdentifiers:[[/\[/,{token:"identifier.quote",next:"@bracketedIdentifier"}],[/"/,{token:"identifier.quote",next:"@quotedIdentifier"}]],bracketedIdentifier:[[/[^\]]+/,"identifier"],[/]]/,"identifier"],[/]/,{token:"identifier.quote",next:"@pop"}]],quotedIdentifier:[[/[^"]+/,"identifier"],[/""/,"identifier"],[/"/,{token:"identifier.quote",next:"@pop"}]],scopes:[[/BEGIN\s+(DISTRIBUTED\s+)?TRAN(SACTION)?\b/i,"keyword"],[/BEGIN\s+TRY\b/i,{token:"keyword.try"}],[/END\s+TRY\b/i,{token:"keyword.try"}],[/BEGIN\s+CATCH\b/i,{token:"keyword.catch"}],[/END\s+CATCH\b/i,{token:"keyword.catch"}],[/(BEGIN|CASE)\b/i,{token:"keyword.block"}],[/END\b/i,{token:"keyword.block"}],[/WHEN\b/i,{token:"keyword.choice"}],[/THEN\b/i,{token:"keyword.choice"}]]}}});var KNe={};nt(KNe,{conf:()=>u$e,language:()=>f$e});var u$e,f$e,GNe=x(()=>{u$e={comments:{lineComment:"//",blockComment:["(*","*)"]},brackets:[["{","}"],["[","]"],["(",")"],["var","end_var"],["var_input","end_var"],["var_output","end_var"],["var_in_out","end_var"],["var_temp","end_var"],["var_global","end_var"],["var_access","end_var"],["var_external","end_var"],["type","end_type"],["struct","end_struct"],["program","end_program"],["function","end_function"],["function_block","end_function_block"],["action","end_action"],["step","end_step"],["initial_step","end_step"],["transaction","end_transaction"],["configuration","end_configuration"],["tcp","end_tcp"],["recource","end_recource"],["channel","end_channel"],["library","end_library"],["folder","end_folder"],["binaries","end_binaries"],["includes","end_includes"],["sources","end_sources"]],autoClosingPairs:[{open:"[",close:"]"},{open:"{",close:"}"},{open:"(",close:")"},{open:"/*",close:"*/"},{open:"'",close:"'",notIn:["string_sq"]},{open:'"',close:'"',notIn:["string_dq"]},{open:"var_input",close:"end_var"},{open:"var_output",close:"end_var"},{open:"var_in_out",close:"end_var"},{open:"var_temp",close:"end_var"},{open:"var_global",close:"end_var"},{open:"var_access",close:"end_var"},{open:"var_external",close:"end_var"},{open:"type",close:"end_type"},{open:"struct",close:"end_struct"},{open:"program",close:"end_program"},{open:"function",close:"end_function"},{open:"function_block",close:"end_function_block"},{open:"action",close:"end_action"},{open:"step",close:"end_step"},{open:"initial_step",close:"end_step"},{open:"transaction",close:"end_transaction"},{open:"configuration",close:"end_configuration"},{open:"tcp",close:"end_tcp"},{open:"recource",close:"end_recource"},{open:"channel",close:"end_channel"},{open:"library",close:"end_library"},{open:"folder",close:"end_folder"},{open:"binaries",close:"end_binaries"},{open:"includes",close:"end_includes"},{open:"sources",close:"end_sources"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"var",close:"end_var"},{open:"var_input",close:"end_var"},{open:"var_output",close:"end_var"},{open:"var_in_out",close:"end_var"},{open:"var_temp",close:"end_var"},{open:"var_global",close:"end_var"},{open:"var_access",close:"end_var"},{open:"var_external",close:"end_var"},{open:"type",close:"end_type"},{open:"struct",close:"end_struct"},{open:"program",close:"end_program"},{open:"function",close:"end_function"},{open:"function_block",close:"end_function_block"},{open:"action",close:"end_action"},{open:"step",close:"end_step"},{open:"initial_step",close:"end_step"},{open:"transaction",close:"end_transaction"},{open:"configuration",close:"end_configuration"},{open:"tcp",close:"end_tcp"},{open:"recource",close:"end_recource"},{open:"channel",close:"end_channel"},{open:"library",close:"end_library"},{open:"folder",close:"end_folder"},{open:"binaries",close:"end_binaries"},{open:"includes",close:"end_includes"},{open:"sources",close:"end_sources"}],folding:{markers:{start:new RegExp("^\\s*#pragma\\s+region\\b"),end:new RegExp("^\\s*#pragma\\s+endregion\\b")}}},f$e={defaultToken:"",tokenPostfix:".st",ignoreCase:!0,brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"}],keywords:["if","end_if","elsif","else","case","of","to","__try","__catch","__finally","do","with","by","while","repeat","end_while","end_repeat","end_case","for","end_for","task","retain","non_retain","constant","with","at","exit","return","interval","priority","address","port","on_channel","then","iec","file","uses","version","packagetype","displayname","copyright","summary","vendor","common_source","from","extends","implements"],constant:["false","true","null"],defineKeywords:["var","var_input","var_output","var_in_out","var_temp","var_global","var_access","var_external","end_var","type","end_type","struct","end_struct","program","end_program","function","end_function","function_block","end_function_block","interface","end_interface","method","end_method","property","end_property","namespace","end_namespace","configuration","end_configuration","tcp","end_tcp","resource","end_resource","channel","end_channel","library","end_library","folder","end_folder","binaries","end_binaries","includes","end_includes","sources","end_sources","action","end_action","step","initial_step","end_step","transaction","end_transaction"],typeKeywords:["int","sint","dint","lint","usint","uint","udint","ulint","real","lreal","time","date","time_of_day","date_and_time","string","bool","byte","word","dword","array","pointer","lword"],operators:["=",">","<",":",":=","<=",">=","<>","&","+","-","*","**","MOD","^","or","and","not","xor","abs","acos","asin","atan","cos","exp","expt","ln","log","sin","sqrt","tan","sel","max","min","limit","mux","shl","shr","rol","ror","indexof","sizeof","adr","adrinst","bitadr","is_valid","ref","ref_to"],builtinVariables:[],builtinFunctions:["sr","rs","tp","ton","tof","eq","ge","le","lt","ne","round","trunc","ctd","\u0441tu","ctud","r_trig","f_trig","move","concat","delete","find","insert","left","len","replace","right","rtc"],symbols:/[=>g$e,language:()=>m$e});var g$e,m$e,ZNe=x(()=>{g$e={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}]},m$e={defaultToken:"",tokenPostfix:".swift",identifier:/[a-zA-Z_][\w$]*/,attributes:["@GKInspectable","@IBAction","@IBDesignable","@IBInspectable","@IBOutlet","@IBSegueAction","@NSApplicationMain","@NSCopying","@NSManaged","@Sendable","@UIApplicationMain","@autoclosure","@actorIndependent","@asyncHandler","@available","@convention","@derivative","@differentiable","@discardableResult","@dynamicCallable","@dynamicMemberLookup","@escaping","@frozen","@globalActor","@inlinable","@inline","@main","@noDerivative","@nonobjc","@noreturn","@objc","@objcMembers","@preconcurrency","@propertyWrapper","@requires_stored_property_inits","@resultBuilder","@testable","@unchecked","@unknown","@usableFromInline","@warn_unqualified_access"],accessmodifiers:["open","public","internal","fileprivate","private"],keywords:["#available","#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning","Any","Protocol","Self","Type","actor","as","assignment","associatedtype","associativity","async","await","break","case","catch","class","continue","convenience","default","defer","deinit","didSet","do","dynamic","dynamicType","else","enum","extension","fallthrough","false","fileprivate","final","for","func","get","guard","higherThan","if","import","in","indirect","infix","init","inout","internal","is","isolated","lazy","left","let","lowerThan","mutating","nil","none","nonisolated","nonmutating","open","operator","optional","override","postfix","precedence","precedencegroup","prefix","private","protocol","public","repeat","required","rethrows","return","right","safe","self","set","some","static","struct","subscript","super","switch","throw","throws","true","try","typealias","unowned","unsafe","var","weak","where","while","willSet","__consuming","__owned"],symbols:/[=(){}\[\].,:;@#\_&\-<>`?!+*\\\/]/,operatorstart:/[\/=\-+!*%<>&|^~?\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-\u3030]/,operatorend:/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE00-\uFE0F\uFE20-\uFE2F\uE0100-\uE01EF]/,operators:/(@operatorstart)((@operatorstart)|(@operatorend))*/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[{include:"@whitespace"},{include:"@comment"},{include:"@attribute"},{include:"@literal"},{include:"@keyword"},{include:"@invokedmethod"},{include:"@symbol"}],whitespace:[[/\s+/,"white"],[/"""/,"string.quote","@endDblDocString"]],endDblDocString:[[/[^"]+/,"string"],[/\\"/,"string"],[/"""/,"string.quote","@popall"],[/"/,"string"]],symbol:[[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/[.]/,"delimiter"],[/@operators/,"operator"],[/@symbols/,"operator"]],comment:[[/\/\/\/.*$/,"comment.doc"],[/\/\*\*/,"comment.doc","@commentdocbody"],[/\/\/.*$/,"comment"],[/\/\*/,"comment","@commentbody"]],commentdocbody:[[/\/\*/,"comment","@commentbody"],[/\*\//,"comment.doc","@pop"],[/\:[a-zA-Z]+\:/,"comment.doc.param"],[/./,"comment.doc"]],commentbody:[[/\/\*/,"comment","@commentbody"],[/\*\//,"comment","@pop"],[/./,"comment"]],attribute:[[/@@@identifier/,{cases:{"@attributes":"keyword.control","@default":""}}]],literal:[[/"/,{token:"string.quote",next:"@stringlit"}],[/0[b]([01]_?)+/,"number.binary"],[/0[o]([0-7]_?)+/,"number.octal"],[/0[x]([0-9a-fA-F]_?)+([pP][\-+](\d_?)+)?/,"number.hex"],[/(\d_?)*\.(\d_?)+([eE][\-+]?(\d_?)+)?/,"number.float"],[/(\d_?)+/,"number"]],stringlit:[[/\\\(/,{token:"operator",next:"@interpolatedexpression"}],[/@escapes/,"string"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",next:"@pop"}],[/./,"string"]],interpolatedexpression:[[/\(/,{token:"operator",next:"@interpolatedexpression"}],[/\)/,{token:"operator",next:"@pop"}],{include:"@literal"},{include:"@keyword"},{include:"@symbol"}],keyword:[[/`/,{token:"operator",next:"@escapedkeyword"}],[/@identifier/,{cases:{"@keywords":"keyword","[A-Z][a-zA-Z0-9$]*":"type.identifier","@default":"identifier"}}]],escapedkeyword:[[/`/,{token:"operator",next:"@pop"}],[/./,"identifier"]],invokedmethod:[[/([.])(@identifier)/,{cases:{$2:["delimeter","type.identifier"],"@default":""}}]]}}});var Rse={};nt(Rse,{conf:()=>p$e,language:()=>_$e});var p$e,_$e,Ase=x(()=>{p$e={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"],["begin","end"],["case","endcase"],["casex","endcase"],["casez","endcase"],["checker","endchecker"],["class","endclass"],["clocking","endclocking"],["config","endconfig"],["function","endfunction"],["generate","endgenerate"],["group","endgroup"],["interface","endinterface"],["module","endmodule"],["package","endpackage"],["primitive","endprimitive"],["program","endprogram"],["property","endproperty"],["specify","endspecify"],["sequence","endsequence"],["table","endtable"],["task","endtask"]],autoClosingPairs:[{open:"[",close:"]"},{open:"{",close:"}"},{open:"(",close:")"},{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{offSide:!1,markers:{start:new RegExp("^(?:\\s*|.*(?!\\/[\\/\\*])[^\\w])(?:begin|case(x|z)?|class|clocking|config|covergroup|function|generate|interface|module|package|primitive|property|program|sequence|specify|table|task)\\b"),end:new RegExp("^(?:\\s*|.*(?!\\/[\\/\\*])[^\\w])(?:end|endcase|endclass|endclocking|endconfig|endgroup|endfunction|endgenerate|endinterface|endmodule|endpackage|endprimitive|endproperty|endprogram|endsequence|endspecify|endtable|endtask)\\b")}}},_$e={defaultToken:"",tokenPostfix:".sv",brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"},{token:"delimiter.angle",open:"<",close:">"}],keywords:["accept_on","alias","always","always_comb","always_ff","always_latch","and","assert","assign","assume","automatic","before","begin","bind","bins","binsof","bit","break","buf","bufif0","bufif1","byte","case","casex","casez","cell","chandle","checker","class","clocking","cmos","config","const","constraint","context","continue","cover","covergroup","coverpoint","cross","deassign","default","defparam","design","disable","dist","do","edge","else","end","endcase","endchecker","endclass","endclocking","endconfig","endfunction","endgenerate","endgroup","endinterface","endmodule","endpackage","endprimitive","endprogram","endproperty","endspecify","endsequence","endtable","endtask","enum","event","eventually","expect","export","extends","extern","final","first_match","for","force","foreach","forever","fork","forkjoin","function","generate","genvar","global","highz0","highz1","if","iff","ifnone","ignore_bins","illegal_bins","implements","implies","import","incdir","include","initial","inout","input","inside","instance","int","integer","interconnect","interface","intersect","join","join_any","join_none","large","let","liblist","library","local","localparam","logic","longint","macromodule","matches","medium","modport","module","nand","negedge","nettype","new","nexttime","nmos","nor","noshowcancelled","not","notif0","notif1","null","or","output","package","packed","parameter","pmos","posedge","primitive","priority","program","property","protected","pull0","pull1","pulldown","pullup","pulsestyle_ondetect","pulsestyle_onevent","pure","rand","randc","randcase","randsequence","rcmos","real","realtime","ref","reg","reject_on","release","repeat","restrict","return","rnmos","rpmos","rtran","rtranif0","rtranif1","s_always","s_eventually","s_nexttime","s_until","s_until_with","scalared","sequence","shortint","shortreal","showcancelled","signed","small","soft","solve","specify","specparam","static","string","strong","strong0","strong1","struct","super","supply0","supply1","sync_accept_on","sync_reject_on","table","tagged","task","this","throughout","time","timeprecision","timeunit","tran","tranif0","tranif1","tri","tri0","tri1","triand","trior","trireg","type","typedef","union","unique","unique0","unsigned","until","until_with","untyped","use","uwire","var","vectored","virtual","void","wait","wait_order","wand","weak","weak0","weak1","while","wildcard","wire","with","within","wor","xnor","xor"],builtin_gates:["and","nand","nor","or","xor","xnor","buf","not","bufif0","bufif1","notif1","notif0","cmos","nmos","pmos","rcmos","rnmos","rpmos","tran","tranif1","tranif0","rtran","rtranif1","rtranif0"],operators:["=","+=","-=","*=","/=","%=","&=","|=","^=","<<=",">>+","<<<=",">>>=","?",":","+","-","!","~","&","~&","|","~|","^","~^","^~","+","-","*","/","%","==","!=","===","!==","==?","!=?","&&","||","**","<","<=",">",">=","&","|","^",">>","<<",">>>","<<<","++","--","->","<->","inside","dist","::","+:","-:","*>","&&&","|->","|=>","#=#"],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],{include:"@numbers"},[/[;,.]/,"delimiter"],{include:"@strings"}],identifier_or_keyword:[[/@identifier/,{cases:{"@keywords":{token:"keyword.$0"},"@default":"identifier"}}]],numbers:[[/\d+?[\d_]*(?:\.[\d_]+)?[eE][\-+]?\d+/,"number.float"],[/\d+?[\d_]*\.[\d_]+(?:\s*@timeunits)?/,"number.float"],[/(?:\d+?[\d_]*\s*)?'[sS]?[dD]\s*[0-9xXzZ?]+?[0-9xXzZ?_]*/,"number"],[/(?:\d+?[\d_]*\s*)?'[sS]?[bB]\s*[0-1xXzZ?]+?[0-1xXzZ?_]*/,"number.binary"],[/(?:\d+?[\d_]*\s*)?'[sS]?[oO]\s*[0-7xXzZ?]+?[0-7xXzZ?_]*/,"number.octal"],[/(?:\d+?[\d_]*\s*)?'[sS]?[hH]\s*[0-9a-fA-FxXzZ?]+?[0-9a-fA-FxXzZ?_]*/,"number.hex"],[/1step/,"number"],[/[\dxXzZ]+?[\dxXzZ_]*(?:\s*@timeunits)?/,"number"],[/'[01xXzZ]+/,"number"]],module_instance:[{include:"@whitespace"},[/(#?)(\()/,["",{token:"@brackets",next:"@port_connection"}]],[/@identifier\s*[;={}\[\],]/,{token:"@rematch",next:"@pop"}],[/@symbols|[;={}\[\],]/,{token:"@rematch",next:"@pop"}],[/@identifier/,"type"],[/;/,"delimiter","@pop"]],port_connection:[{include:"@identifier_or_keyword"},{include:"@whitespace"},[/@systemcall/,"variable.predefined"],{include:"@numbers"},{include:"@strings"},[/[,]/,"delimiter"],[/\(/,"@brackets","@port_connection"],[/\)/,"@brackets","@pop"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],strings:[[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],include:[[/(\s*)(")([\w*\/*]*)(.\w*)(")/,["","string.include.identifier","string.include.identifier","string.include.identifier",{token:"string.include.identifier",next:"@pop"}]],[/(\s*)(<)([\w*\/*]*)(.\w*)(>)/,["","string.include.identifier","string.include.identifier","string.include.identifier",{token:"string.include.identifier",next:"@pop"}]]],table:[{include:"@whitespace"},[/[()]/,"@brackets"],[/[:;]/,"delimiter"],[/[01\-*?xXbBrRfFpPnN]/,"variable.predefined"],["endtable","keyword.endtable","@pop"]]}}});var XNe={};nt(XNe,{conf:()=>b$e,language:()=>v$e});var b$e,v$e,QNe=x(()=>{b$e={brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},v$e={tokenPostfix:".tcl",specialFunctions:["set","unset","rename","variable","proc","coroutine","foreach","incr","append","lappend","linsert","lreplace"],mainFunctions:["if","then","elseif","else","case","switch","while","for","break","continue","return","package","namespace","catch","exit","eval","expr","uplevel","upvar"],builtinFunctions:["file","info","concat","join","lindex","list","llength","lrange","lsearch","lsort","split","array","parray","binary","format","regexp","regsub","scan","string","subst","dict","cd","clock","exec","glob","pid","pwd","close","eof","fblocked","fconfigure","fcopy","fileevent","flush","gets","open","puts","read","seek","socket","tell","interp","after","auto_execok","auto_load","auto_mkindex","auto_reset","bgerror","error","global","history","load","source","time","trace","unknown","unset","update","vwait","winfo","wm","bind","event","pack","place","grid","font","bell","clipboard","destroy","focus","grab","lower","option","raise","selection","send","tk","tkwait","tk_bisque","tk_focusNext","tk_focusPrev","tk_focusFollowsMouse","tk_popup","tk_setPalette"],symbols:/[=>w$e,language:()=>C$e});var w$e,C$e,eRe=x(()=>{w$e={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["{#","#}"]},brackets:[["{#","#}"],["{%","%}"],["{{","}}"],["(",")"],["[","]"],[""],["<",">"]],autoClosingPairs:[{open:"{# ",close:" #}"},{open:"{% ",close:" %}"},{open:"{{ ",close:" }}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}]},C$e={defaultToken:"",tokenPostfix:"",ignoreCase:!0,keywords:["apply","autoescape","block","deprecated","do","embed","extends","flush","for","from","if","import","include","macro","sandbox","set","use","verbatim","with","endapply","endautoescape","endblock","endembed","endfor","endif","endmacro","endsandbox","endset","endwith","true","false"],tokenizer:{root:[[/\s+/],[/{#/,"comment.twig","@commentState"],[/{%[-~]?/,"delimiter.twig","@blockState"],[/{{[-~]?/,"delimiter.twig","@variableState"],[/)/,["delimiter.html","tag.html","","delimiter.html"]],[/(<)(script)/,["delimiter.html",{token:"tag.html",next:"@script"}]],[/(<)(style)/,["delimiter.html",{token:"tag.html",next:"@style"}]],[/(<)((?:[\w\-]+:)?[\w\-]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)((?:[\w\-]+:)?[\w\-]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/|>=|<=/,"operators.twig"],[/(starts with|ends with|matches)(\s+)/,["operators.twig",""]],[/(in)(\s+)/,["operators.twig",""]],[/(is)(\s+)/,["operators.twig",""]],[/\||~|:|\.{1,2}|\?{1,2}/,"operators.twig"],[/[^\W\d][\w]*/,{cases:{"@keywords":"keyword.twig","@default":"variable.twig"}}],[/\d+(\.\d+)?/,"number.twig"],[/\(|\)|\[|\]|{|}|,/,"delimiter.twig"],[/"([^#"\\]*(?:\\.[^#"\\]*)*)"|\'([^\'\\]*(?:\\.[^\'\\]*)*)\'/,"string.twig"],[/"/,"string.twig","@stringState"],[/=>/,"operators.twig"],[/=/,"operators.twig"]],doctype:[[/[^>]+/,"metatag.content.html"],[/>/,"metatag.html","@pop"]],comment:[[/-->/,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value.html"],[/'([^']*)'/,"attribute.value.html"],[/[\w\-]+/,"attribute.name.html"],[/=/,"delimiter.html"],[/[ \t\r\n]+/]],script:[[/type/,"attribute.name.html","@scriptAfterType"],[/"([^"]*)"/,"attribute.value.html"],[/'([^']*)'/,"attribute.value.html"],[/[\w\-]+/,"attribute.name.html"],[/=/,"delimiter.html"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/=/,"delimiter.html","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value.html",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value.html",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value.html"],[/'([^']*)'/,"attribute.value.html"],[/[\w\-]+/,"attribute.name.html"],[/=/,"delimiter.html"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]],style:[[/type/,"attribute.name.html","@styleAfterType"],[/"([^"]*)"/,"attribute.value.html"],[/'([^']*)'/,"attribute.value.html"],[/[\w\-]+/,"attribute.name.html"],[/=/,"delimiter.html"],[/>/,{token:"delimiter.html",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/=/,"delimiter.html","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value.html",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value.html",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value.html"],[/'([^']*)'/,"attribute.value.html"],[/[\w\-]+/,"attribute.name.html"],[/=/,"delimiter.html"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]]}}});var oRe={};nt(oRe,{conf:()=>T$e,language:()=>D$e});var nRe,tRe,y$e,S$e,iRe,x$e,k$e,L$e,I$e,E$e,T$e,D$e,sRe=x(()=>{nRe=o=>`\\b${o}\\b`,tRe=o=>`(?!${o})`,y$e="[_a-zA-Z]",S$e="[_a-zA-Z0-9]",iRe=nRe(`${y$e}${S$e}*`),x$e=nRe("[_a-zA-Z-0-9]+"),k$e=["import","model","scalar","namespace","op","interface","union","using","is","extends","enum","alias","return","void","if","else","projection","dec","extern","fn"],L$e=["true","false","null","unknown","never"],I$e="[ \\t\\r\\n]",E$e="[0-9]+",T$e={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"/**",close:" */",notIn:["string"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],indentationRules:{decreaseIndentPattern:new RegExp("^((?!.*?/\\*).*\\*/)?\\s*[\\}\\]].*$"),increaseIndentPattern:new RegExp("^((?!//).)*(\\{([^}\"'`/]*|(\\t|[ ])*//.*)|\\([^)\"'`/]*|\\[[^\\]\"'`/]*)$"),unIndentedLinePattern:new RegExp("^(\\t|[ ])*[ ]\\*[^/]*\\*/\\s*$|^(\\t|[ ])*[ ]\\*/\\s*$|^(\\t|[ ])*[ ]\\*([ ]([^\\*]|\\*(?!/))*)?$")}},D$e={defaultToken:"",tokenPostfix:".tsp",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],symbols:/[=:;<>]+/,keywords:k$e,namedLiterals:L$e,escapes:'\\\\(u{[0-9A-Fa-f]+}|n|r|t|\\\\|"|\\${)',tokenizer:{root:[{include:"@expression"},{include:"@whitespace"}],stringVerbatim:[{regex:'(|"|"")[^"]',action:{token:"string"}},{regex:`"""${tRe('"')}`,action:{token:"string",next:"@pop"}}],stringLiteral:[{regex:"\\${",action:{token:"delimiter.bracket",next:"@bracketCounting"}},{regex:'[^\\\\"$]+',action:{token:"string"}},{regex:"@escapes",action:{token:"string.escape"}},{regex:"\\\\.",action:{token:"string.escape.invalid"}},{regex:'"',action:{token:"string",next:"@pop"}}],bracketCounting:[{regex:"{",action:{token:"delimiter.bracket",next:"@bracketCounting"}},{regex:"}",action:{token:"delimiter.bracket",next:"@pop"}},{include:"@expression"}],comment:[{regex:"[^\\*]+",action:{token:"comment"}},{regex:"\\*\\/",action:{token:"comment",next:"@pop"}},{regex:"[\\/*]",action:{token:"comment"}}],whitespace:[{regex:I$e},{regex:"\\/\\*",action:{token:"comment",next:"@comment"}},{regex:"\\/\\/.*$",action:{token:"comment"}}],expression:[{regex:'"""',action:{token:"string",next:"@stringVerbatim"}},{regex:`"${tRe('""')}`,action:{token:"string",next:"@stringLiteral"}},{regex:E$e,action:{token:"number"}},{regex:iRe,action:{cases:{"@keywords":{token:"keyword"},"@namedLiterals":{token:"keyword"},"@default":{token:"identifier"}}}},{regex:`@${iRe}`,action:{token:"tag"}},{regex:`#${x$e}`,action:{token:"directive"}}]}}});var rRe={};nt(rRe,{conf:()=>N$e,language:()=>R$e});var N$e,R$e,aRe=x(()=>{N$e={comments:{lineComment:"'",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"],["<",">"],["addhandler","end addhandler"],["class","end class"],["enum","end enum"],["event","end event"],["function","end function"],["get","end get"],["if","end if"],["interface","end interface"],["module","end module"],["namespace","end namespace"],["operator","end operator"],["property","end property"],["raiseevent","end raiseevent"],["removehandler","end removehandler"],["select","end select"],["set","end set"],["structure","end structure"],["sub","end sub"],["synclock","end synclock"],["try","end try"],["while","end while"],["with","end with"],["using","end using"],["do","loop"],["for","next"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]},{open:"<",close:">",notIn:["string","comment"]}],folding:{markers:{start:new RegExp("^\\s*#Region\\b"),end:new RegExp("^\\s*#End Region\\b")}}},R$e={defaultToken:"",tokenPostfix:".vb",ignoreCase:!0,brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.array",open:"[",close:"]"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.angle",open:"<",close:">"},{token:"keyword.tag-addhandler",open:"addhandler",close:"end addhandler"},{token:"keyword.tag-class",open:"class",close:"end class"},{token:"keyword.tag-enum",open:"enum",close:"end enum"},{token:"keyword.tag-event",open:"event",close:"end event"},{token:"keyword.tag-function",open:"function",close:"end function"},{token:"keyword.tag-get",open:"get",close:"end get"},{token:"keyword.tag-if",open:"if",close:"end if"},{token:"keyword.tag-interface",open:"interface",close:"end interface"},{token:"keyword.tag-module",open:"module",close:"end module"},{token:"keyword.tag-namespace",open:"namespace",close:"end namespace"},{token:"keyword.tag-operator",open:"operator",close:"end operator"},{token:"keyword.tag-property",open:"property",close:"end property"},{token:"keyword.tag-raiseevent",open:"raiseevent",close:"end raiseevent"},{token:"keyword.tag-removehandler",open:"removehandler",close:"end removehandler"},{token:"keyword.tag-select",open:"select",close:"end select"},{token:"keyword.tag-set",open:"set",close:"end set"},{token:"keyword.tag-structure",open:"structure",close:"end structure"},{token:"keyword.tag-sub",open:"sub",close:"end sub"},{token:"keyword.tag-synclock",open:"synclock",close:"end synclock"},{token:"keyword.tag-try",open:"try",close:"end try"},{token:"keyword.tag-while",open:"while",close:"end while"},{token:"keyword.tag-with",open:"with",close:"end with"},{token:"keyword.tag-using",open:"using",close:"end using"},{token:"keyword.tag-do",open:"do",close:"loop"},{token:"keyword.tag-for",open:"for",close:"next"}],keywords:["AddHandler","AddressOf","Alias","And","AndAlso","As","Async","Boolean","ByRef","Byte","ByVal","Call","Case","Catch","CBool","CByte","CChar","CDate","CDbl","CDec","Char","CInt","Class","CLng","CObj","Const","Continue","CSByte","CShort","CSng","CStr","CType","CUInt","CULng","CUShort","Date","Decimal","Declare","Default","Delegate","Dim","DirectCast","Do","Double","Each","Else","ElseIf","End","EndIf","Enum","Erase","Error","Event","Exit","False","Finally","For","Friend","Function","Get","GetType","GetXMLNamespace","Global","GoSub","GoTo","Handles","If","Implements","Imports","In","Inherits","Integer","Interface","Is","IsNot","Let","Lib","Like","Long","Loop","Me","Mod","Module","MustInherit","MustOverride","MyBase","MyClass","NameOf","Namespace","Narrowing","New","Next","Not","Nothing","NotInheritable","NotOverridable","Object","Of","On","Operator","Option","Optional","Or","OrElse","Out","Overloads","Overridable","Overrides","ParamArray","Partial","Private","Property","Protected","Public","RaiseEvent","ReadOnly","ReDim","RemoveHandler","Resume","Return","SByte","Select","Set","Shadows","Shared","Short","Single","Static","Step","Stop","String","Structure","Sub","SyncLock","Then","Throw","To","True","Try","TryCast","TypeOf","UInteger","ULong","UShort","Using","Variant","Wend","When","While","Widening","With","WithEvents","WriteOnly","Xor"],tagwords:["If","Sub","Select","Try","Class","Enum","Function","Get","Interface","Module","Namespace","Operator","Set","Structure","Using","While","With","Do","Loop","For","Next","Property","Continue","AddHandler","RemoveHandler","Event","RaiseEvent","SyncLock"],symbols:/[=>A$e,language:()=>$$e});function $p(o){let e=[],t=o.split(/\t+|\r+|\n+| +/);for(let i=0;i0&&e.push(t[i]);return e}var A$e,M$e,O$e,P$e,F$e,B$e,W$e,H$e,V$e,z$e,U$e,lRe,Qk,$$e,dRe=x(()=>{A$e={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"[",close:"]"},{open:"{",close:"}"},{open:"(",close:")"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"}]};M$e=$p("true false"),O$e=$p(` + alias + break + case + const + const_assert + continue + continuing + default + diagnostic + discard + else + enable + fn + for + if + let + loop + override + requires + return + struct + switch + var + while + `),P$e=$p(` + NULL + Self + abstract + active + alignas + alignof + as + asm + asm_fragment + async + attribute + auto + await + become + binding_array + cast + catch + class + co_await + co_return + co_yield + coherent + column_major + common + compile + compile_fragment + concept + const_cast + consteval + constexpr + constinit + crate + debugger + decltype + delete + demote + demote_to_helper + do + dynamic_cast + enum + explicit + export + extends + extern + external + fallthrough + filter + final + finally + friend + from + fxgroup + get + goto + groupshared + highp + impl + implements + import + inline + instanceof + interface + layout + lowp + macro + macro_rules + match + mediump + meta + mod + module + move + mut + mutable + namespace + new + nil + noexcept + noinline + nointerpolation + noperspective + null + nullptr + of + operator + package + packoffset + partition + pass + patch + pixelfragment + precise + precision + premerge + priv + protected + pub + public + readonly + ref + regardless + register + reinterpret_cast + require + resource + restrict + self + set + shared + sizeof + smooth + snorm + static + static_assert + static_cast + std + subroutine + super + target + template + this + thread_local + throw + trait + try + type + typedef + typeid + typename + typeof + union + unless + unorm + unsafe + unsized + use + using + varying + virtual + volatile + wgsl + where + with + writeonly + yield + `),F$e=$p(` + read write read_write + function private workgroup uniform storage + perspective linear flat + center centroid sample + vertex_index instance_index position front_facing frag_depth + local_invocation_id local_invocation_index + global_invocation_id workgroup_id num_workgroups + sample_index sample_mask + rgba8unorm + rgba8snorm + rgba8uint + rgba8sint + rgba16uint + rgba16sint + rgba16float + r32uint + r32sint + r32float + rg32uint + rg32sint + rg32float + rgba32uint + rgba32sint + rgba32float + bgra8unorm +`),B$e=$p(` + bool + f16 + f32 + i32 + sampler sampler_comparison + texture_depth_2d + texture_depth_2d_array + texture_depth_cube + texture_depth_cube_array + texture_depth_multisampled_2d + texture_external + texture_external + u32 + `),W$e=$p(` + array + atomic + mat2x2 + mat2x3 + mat2x4 + mat3x2 + mat3x3 + mat3x4 + mat4x2 + mat4x3 + mat4x4 + ptr + texture_1d + texture_2d + texture_2d_array + texture_3d + texture_cube + texture_cube_array + texture_multisampled_2d + texture_storage_1d + texture_storage_2d + texture_storage_2d_array + texture_storage_3d + vec2 + vec3 + vec4 + `),H$e=$p(` + vec2i vec3i vec4i + vec2u vec3u vec4u + vec2f vec3f vec4f + vec2h vec3h vec4h + mat2x2f mat2x3f mat2x4f + mat3x2f mat3x3f mat3x4f + mat4x2f mat4x3f mat4x4f + mat2x2h mat2x3h mat2x4h + mat3x2h mat3x3h mat3x4h + mat4x2h mat4x3h mat4x4h + `),V$e=$p(` + bitcast all any select arrayLength abs acos acosh asin asinh atan atanh atan2 + ceil clamp cos cosh countLeadingZeros countOneBits countTrailingZeros cross + degrees determinant distance dot exp exp2 extractBits faceForward firstLeadingBit + firstTrailingBit floor fma fract frexp inverseBits inverseSqrt ldexp length + log log2 max min mix modf normalize pow quantizeToF16 radians reflect refract + reverseBits round saturate sign sin sinh smoothstep sqrt step tan tanh transpose + trunc dpdx dpdxCoarse dpdxFine dpdy dpdyCoarse dpdyFine fwidth fwidthCoarse fwidthFine + textureDimensions textureGather textureGatherCompare textureLoad textureNumLayers + textureNumLevels textureNumSamples textureSample textureSampleBias textureSampleCompare + textureSampleCompareLevel textureSampleGrad textureSampleLevel textureSampleBaseClampToEdge + textureStore atomicLoad atomicStore atomicAdd atomicSub atomicMax atomicMin + atomicAnd atomicOr atomicXor atomicExchange atomicCompareExchangeWeak pack4x8snorm + pack4x8unorm pack2x16snorm pack2x16unorm pack2x16float unpack4x8snorm unpack4x8unorm + unpack2x16snorm unpack2x16unorm unpack2x16float storageBarrier workgroupBarrier + workgroupUniformLoad +`),z$e=$p(` + & + && + -> + / + = + == + != + > + >= + < + <= + % + - + -- + + + ++ + | + || + * + << + >> + += + -= + *= + /= + %= + &= + |= + ^= + >>= + <<= + `),U$e=/enable|requires|diagnostic/,lRe=/[_\p{XID_Start}]\p{XID_Continue}*/u,Qk="variable.predefined",$$e={tokenPostfix:".wgsl",defaultToken:"invalid",unicode:!0,atoms:M$e,keywords:O$e,reserved:P$e,predeclared_enums:F$e,predeclared_types:B$e,predeclared_type_generators:W$e,predeclared_type_aliases:H$e,predeclared_intrinsics:V$e,operators:z$e,symbols:/[!%&*+\-\.\/:;<=>^|_~,]+/,tokenizer:{root:[[U$e,"keyword","@directive"],[lRe,{cases:{"@atoms":Qk,"@keywords":"keyword","@reserved":"invalid","@predeclared_enums":Qk,"@predeclared_types":Qk,"@predeclared_type_generators":Qk,"@predeclared_type_aliases":Qk,"@predeclared_intrinsics":Qk,"@default":"identifier"}}],{include:"@commentOrSpace"},{include:"@numbers"},[/[{}()\[\]]/,"@brackets"],["@","annotation","@attribute"],[/@symbols/,{cases:{"@operators":"operator","@default":"delimiter"}}],[/./,"invalid"]],commentOrSpace:[[/\s+/,"white"],[/\/\*/,"comment","@blockComment"],[/\/\/.*$/,"comment"]],blockComment:[[/[^\/*]+/,"comment"],[/\/\*/,"comment","@push"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],attribute:[{include:"@commentOrSpace"},[/\w+/,"annotation","@pop"]],directive:[{include:"@commentOrSpace"},[/[()]/,"@brackets"],[/,/,"delimiter"],[lRe,"meta.content"],[/;/,"delimiter","@pop"]],numbers:[[/0[fh]/,"number.float"],[/[1-9][0-9]*[fh]/,"number.float"],[/[0-9]*\.[0-9]+([eE][+-]?[0-9]+)?[fh]?/,"number.float"],[/[0-9]+\.[0-9]*([eE][+-]?[0-9]+)?[fh]?/,"number.float"],[/[0-9]+[eE][+-]?[0-9]+[fh]?/,"number.float"],[/0[xX][0-9a-fA-F]*\.[0-9a-fA-F]+(?:[pP][+-]?[0-9]+[fh]?)?/,"number.hex"],[/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*(?:[pP][+-]?[0-9]+[fh]?)?/,"number.hex"],[/0[xX][0-9a-fA-F]+[pP][+-]?[0-9]+[fh]?/,"number.hex"],[/0[xX][0-9a-fA-F]+[iu]?/,"number.hex"],[/[1-9][0-9]*[iu]?/,"number"],[/0[iu]?/,"number"]]}}});var hRe={};nt(hRe,{conf:()=>q$e,language:()=>j$e});var q$e,j$e,uRe=x(()=>{md();q$e={comments:{blockComment:[""]},brackets:[["<",">"]],autoClosingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],surroundingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],onEnterRules:[{beforeText:new RegExp("<([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$","i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:Ei.IndentAction.IndentOutdent}},{beforeText:new RegExp("<(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),action:{indentAction:Ei.IndentAction.Indent}}]},j$e={defaultToken:"",tokenPostfix:".xml",ignoreCase:!0,qualifiedName:/(?:[\w\.\-]+:)?[\w\.\-]+/,tokenizer:{root:[[/[^<&]+/,""],{include:"@whitespace"},[/(<)(@qualifiedName)/,[{token:"delimiter"},{token:"tag",next:"@tag"}]],[/(<\/)(@qualifiedName)(\s*)(>)/,[{token:"delimiter"},{token:"tag"},"",{token:"delimiter"}]],[/(<\?)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/(<\!)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/<\!\[CDATA\[/,{token:"delimiter.cdata",next:"@cdata"}],[/&\w+;/,"string.escape"]],cdata:[[/[^\]]+/,""],[/\]\]>/,{token:"delimiter.cdata",next:"@pop"}],[/\]/,""]],tag:[[/[ \t\r\n]+/,""],[/(@qualifiedName)(\s*=\s*)("[^"]*"|'[^']*')/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">?\/]*|'[^'>?\/]*)(?=[\?\/]\>)/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">]*|'[^'>]*)/,["attribute.name","","attribute.value"]],[/@qualifiedName/,"attribute.name"],[/\?>/,{token:"delimiter",next:"@pop"}],[/(\/)(>)/,[{token:"tag"},{token:"delimiter",next:"@pop"}]],[/>/,{token:"delimiter",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,""],[//,{token:"comment",next:"@pop"}],[/=0&&a.resolve(Xe.None)}return e}};Xhe=cOe([aM(5,YL)],Xhe);var Qhe=class extends T{constructor(e,t,i,n){super(),this._languageFeatureService=e,this._clipboardService=t,this._suggestMemoryService=i,this._editorService=n,this._store.add(e.inlineCompletionsProvider.register("*",this))}async provideInlineCompletions(e,t,i,n){if(i.selectedSuggestionInfo)return;let s;for(let f of this._editorService.listCodeEditors())if(f.getModel()===e){s=f;break}if(!s)return;let r=s.getOption(102);if(nm.isAllOff(r))return;e.tokenization.tokenizeIfCheap(t.lineNumber);let a=e.tokenization.getLineTokens(t.lineNumber),l=a.getStandardTokenType(a.findTokenIndexAtOffset(Math.max(t.column-1-1,0)));if(nm.valueFor(r,l)!=="inline")return;let c=e.getWordAtPosition(t),d;if(c?.word||(d=this._getTriggerCharacterInfo(e,t)),!c?.word&&!d||(c||(c=e.getWordUntilPosition(t)),c.endColumn!==t.column))return;let h,u=e.getValueInRange(new S(t.lineNumber,1,t.lineNumber,t.column));if(!d&&this._lastResult?.canBeReused(e,t.lineNumber,c)){let f=new EA(u,t.column-this._lastResult.word.endColumn);this._lastResult.completionModel.lineContext=f,this._lastResult.acquire(),h=this._lastResult}else{let f=await aA(this._languageFeatureService.completionProvider,e,t,new DS(void 0,JL.createSuggestFilter(s).itemKind,d?.providers),d&&{triggerKind:1,triggerCharacter:d.ch},n),g;f.needsClipboard&&(g=await this._clipboardService.readText());let p=new ZL(f.items,t.column,new EA(u,0),QL.None,s.getOption(134),s.getOption(128),{boostFullMatch:!1,firstMatchCanBeWeak:!1},g);h=new Xhe(e,t.lineNumber,c,p,f,this._suggestMemoryService)}return this._lastResult=h,h}handleItemDidShow(e,t){t.completion.resolve(Xe.None)}disposeInlineCompletions(e){e.release()}_getTriggerCharacterInfo(e,t){let i=e.getValueInRange(S.fromPositions({lineNumber:t.lineNumber,column:t.column-1},t)),n=new Set;for(let s of this._languageFeatureService.completionProvider.all(e))s.triggerCharacters?.includes(i)&&n.add(s);if(n.size!==0)return{providers:n,ch:i}}};Qhe=cOe([aM(0,be),aM(1,Lo),aM(2,YL),aM(3,ot)],Qhe);eu(Qhe);lt();gv();Mg();Kc();Yne();var Jhe=class extends ve{constructor(){super({id:"editor.action.toggleHighContrast",label:I9.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(e,t){let i=e.get(cr),n=i.getColorTheme();ga(n.type)?(i.setTheme(this._originalThemeName||(_c(n.type)?Ky:Bg)),this._originalThemeName=null):(i.setTheme(_c(n.type)?_v:bv),this._originalThemeName=n.themeName)}};oe(Jhe);hs();pF();le();yi();var eue=class o extends Cn{static{this.ID="editor.action.toggleTabFocusMode"}constructor(){super({id:o.ID,title:U(1582,"Toggle Tab Key Moves Focus"),precondition:void 0,keybinding:{primary:2091,mac:{primary:1323},weight:100},metadata:{description:U(1583,"Determines whether the tab key moves focus around the workbench or inserts the tab character in the current editor. This is also called tab trapping, tab navigation, or tab focus mode.")},f1:!0})}run(){let t=!Gm.getTabFocusMode();Gm.setTabFocusMode(t),t?qn(m(1580,"Pressing Tab will now move focus to the next focusable element")):qn(m(1581,"Pressing Tab will now insert the tab character"))}};Wt(eue);qa();lt();le();var tue=class extends ve{constructor(){super({id:"editor.action.forceRetokenize",label:U(1584,"Developer: Force Retokenize"),precondition:void 0})}run(e,t){if(!t.hasModel())return;let i=t.getModel();i.tokenization.resetTokenization();let n=new cn;i.tokenization.forceTokenization(i.getLineCount()),n.stop(),console.log(`tokenization took ${n.elapsed()}`)}};oe(tue);Ze();ti();Rr();W();rt();He();lt();Uo();Kn();XG();Ou();le();re();Yh();ys();W();Kh();Ie();re();Yf();wr();Bl();ae();W();eh();xc();ol();var ZZe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},dOe=function(o,e){return function(t,i){e(t,i,o)}},mq=class extends T{get enabled(){return this._enabled}set enabled(e){e?(this.el.setAttribute("aria-disabled","false"),this.el.tabIndex=0,this.el.style.pointerEvents="auto",this.el.style.opacity="1",this.el.style.cursor="pointer",this._enabled=!1):(this.el.setAttribute("aria-disabled","true"),this.el.tabIndex=-1,this.el.style.pointerEvents="none",this.el.style.opacity="0.4",this.el.style.cursor="default",this._enabled=!0),this._enabled=e}constructor(e,t,i={},n,s){super(),this._link=t,this._hoverService=n,this._enabled=!0,this.el=X(e,j("a.monaco-link",{tabIndex:t.tabIndex??0,href:t.href},t.label)),this.hoverDelegate=i.hoverDelegate??Yr("mouse"),this.setTooltip(t.title),this.el.setAttribute("role","button");let r=this._register(new Xt(this.el,"click")),a=this._register(new Xt(this.el,"keydown")),l=Q.chain(a.event,h=>h.map(u=>new Mt(u)).filter(u=>u.keyCode===3||u.keyCode===10)),c=this._register(new Xt(this.el,vi.Tap)).event;this._register(jn.addTarget(this.el));let d=Q.any(r.event,l,c);this._register(d(h=>{this.enabled&&(vt.stop(h,!0),i?.opener?i.opener(this._link.href):s.open(this._link.href,{allowCommands:!0}))})),this.enabled=!0}setTooltip(e){!this.hover&&e?this.hover=this._register(this._hoverService.setupManagedHover(this.hoverDelegate,this.el,e)):this.hover&&this.hover.update(e)}};mq=ZZe([dOe(3,Jn),dOe(4,Ar)],mq);Ec();Li();var hOe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},iue=function(o,e){return function(t,i){e(t,i,o)}},XZe=26,pq=class extends T{constructor(e,t){super(),this._editor=e,this.instantiationService=t,this.banner=this._register(this.instantiationService.createInstance(nue))}hide(){this._editor.setBanner(null,0),this.banner.clear()}show(e){this.banner.show({...e,onClose:()=>{this.hide(),e.onClose?.()}}),this._editor.setBanner(this.banner.element,XZe)}};pq=hOe([iue(1,ie)],pq);var nue=class extends T{constructor(e,t){super(),this.instantiationService=e,this.markdownRendererService=t,this.element=j("div.editor-banner"),this.element.tabIndex=0}getAriaLabel(e){if(e.ariaLabel)return e.ariaLabel;if(typeof e.message=="string")return e.message}getBannerMessage(e){if(typeof e=="string"){let t=j("span");return t.innerText=e,t}return this.markdownRendererService.render(e).element}clear(){pn(this.element)}show(e){pn(this.element);let t=this.getAriaLabel(e);t&&this.element.setAttribute("aria-label",t);let i=X(this.element,j("div.icon-container"));i.setAttribute("aria-hidden","true"),e.icon&&i.appendChild(j(`div${Ee.asCSSSelector(e.icon)}`));let n=X(this.element,j("div.message-container"));if(n.setAttribute("aria-hidden","true"),n.appendChild(this.getBannerMessage(e.message)),this.messageActionsContainer=X(this.element,j("div.message-actions-container")),e.actions)for(let r of e.actions)this._register(this.instantiationService.createInstance(mq,this.messageActionsContainer,{...r,tabIndex:-1},{}));let s=X(this.element,j("div.action-container"));this.actionBar=this._register(new Vo(s)),this.actionBar.push(this._register(new Cs("banner.close",m(1585,"Close Banner"),Ee.asClassName(nH),!0,()=>{typeof e.onClose=="function"&&e.onClose()})),{icon:!0,label:!1}),this.actionBar.setFocusable(!1)}};nue=hOe([iue(0,ie),iue(1,ar)],nue);le();oi();Ie();Mr();Ec();sne();yi();Ox();R5();Kh();var hue=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},lM=function(o,e){return function(t,i){e(t,i,o)}},QZe=wi("extensions-warning-message",$.warning,m(1586,"Icon shown with a warning message in the extensions editor.")),cM=class extends T{static{this.ID="editor.contrib.unicodeHighlighter"}constructor(e,t,i,n){super(),this._editor=e,this._editorWorkerService=t,this._workspaceTrustService=i,this._highlighter=null,this._bannerClosed=!1,this._updateState=s=>{if(s&&s.hasMore){if(this._bannerClosed)return;let r=Math.max(s.ambiguousCharacterCount,s.nonBasicAsciiCharacterCount,s.invisibleCharacterCount),a;if(s.nonBasicAsciiCharacterCount>=r)a={message:m(1587,"This document contains many non-basic ASCII unicode characters"),command:new hM};else if(s.ambiguousCharacterCount>=r)a={message:m(1588,"This document contains many ambiguous unicode characters"),command:new zS};else if(s.invisibleCharacterCount>=r)a={message:m(1589,"This document contains many invisible unicode characters"),command:new dM};else throw new Error("Unreachable");this._bannerController.show({id:"unicodeHighlightBanner",message:a.message,icon:QZe,actions:[{label:a.command.shortLabel,href:`command:${a.command.desc.id}`}],onClose:()=>{this._bannerClosed=!0}})}else this._bannerController.hide()},this._bannerController=this._register(n.createInstance(pq,e)),this._register(this._editor.onDidChangeModel(()=>{this._bannerClosed=!1,this._updateHighlighter()})),this._options=e.getOption(142),this._register(i.onDidChangeTrust(s=>{this._updateHighlighter()})),this._register(e.onDidChangeConfiguration(s=>{s.hasChanged(142)&&(this._options=e.getOption(142),this._updateHighlighter())})),this._updateHighlighter()}dispose(){this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),super.dispose()}_updateHighlighter(){if(this._updateState(null),this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),!this._editor.hasModel())return;let e=JZe(this._workspaceTrustService.isWorkspaceTrusted(),this._options);if([e.nonBasicASCII,e.ambiguousCharacters,e.invisibleCharacters].every(i=>i===!1))return;let t={nonBasicASCII:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments,includeStrings:e.includeStrings,allowedCodePoints:Object.keys(e.allowedCharacters).map(i=>i.codePointAt(0)),allowedLocales:Object.keys(e.allowedLocales).map(i=>i==="_os"?Mh.NumberFormat().value.resolvedOptions().locale:i==="_vscode"?zfe:i)};this._editorWorkerService.canComputeUnicodeHighlights(this._editor.getModel().uri)?this._highlighter=new sue(this._editor,t,this._updateState,this._editorWorkerService):this._highlighter=new rue(this._editor,t,this._updateState)}getDecorationInfo(e){return this._highlighter?this._highlighter.getDecorationInfo(e):null}};cM=hue([lM(1,Jo),lM(2,c9),lM(3,ie)],cM);function JZe(o,e){return{nonBasicASCII:e.nonBasicASCII===ic?!o:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments===ic?!o:e.includeComments,includeStrings:e.includeStrings===ic?!o:e.includeStrings,allowedCharacters:e.allowedCharacters,allowedLocales:e.allowedLocales}}var sue=class extends T{constructor(e,t,i,n){super(),this._editor=e,this._options=t,this._updateState=i,this._editorWorkerService=n,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new at(()=>this._update(),250)),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII()){this._decorations.clear();return}let e=this._model.getVersionId();this._editorWorkerService.computedUnicodeHighlights(this._model.uri,this._options).then(t=>{if(this._model.isDisposed()||this._model.getVersionId()!==e)return;this._updateState(t);let i=[];if(!t.hasMore)for(let n of t.ranges)i.push({range:n,options:_q.instance.getDecorationFromOptions(this._options)});this._decorations.set(i)})}getDecorationInfo(e){if(!this._decorations.has(e))return null;let t=this._editor.getModel();if(!kT(t,e))return null;let i=t.getValueInRange(e.range);return{reason:fOe(i,this._options),inComment:D5(t,e),inString:N5(t,e)}}};sue=hue([lM(3,Jo)],sue);var rue=class extends T{constructor(e,t,i){super(),this._editor=e,this._options=t,this._updateState=i,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new at(()=>this._update(),250)),this._register(this._editor.onDidLayoutChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidScrollChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeHiddenAreas(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII()){this._decorations.clear();return}let e=this._editor.getVisibleRanges(),t=[],i={ranges:[],ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0,hasMore:!1};for(let n of e){let s=eC.computeUnicodeHighlights(this._model,this._options,n);for(let r of s.ranges)i.ranges.push(r);i.ambiguousCharacterCount+=i.ambiguousCharacterCount,i.invisibleCharacterCount+=i.invisibleCharacterCount,i.nonBasicAsciiCharacterCount+=i.nonBasicAsciiCharacterCount,i.hasMore=i.hasMore||s.hasMore}if(!i.hasMore)for(let n of i.ranges)t.push({range:n,options:_q.instance.getDecorationFromOptions(this._options)});this._updateState(i),this._decorations.set(t)}getDecorationInfo(e){if(!this._decorations.has(e))return null;let t=this._editor.getModel(),i=t.getValueInRange(e.range);return kT(t,e)?{reason:fOe(i,this._options),inComment:D5(t,e),inString:N5(t,e)}:null}},uOe=m(1590,"Configure Unicode Highlight Options"),aue=class{constructor(e,t){this._editor=e,this._markdownRendererService=t,this.hoverOrdinal=5}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1)return[];let i=this._editor.getModel(),n=this._editor.getContribution(cM.ID);if(!n)return[];let s=[],r=new Set,a=300;for(let l of t){let c=n.getDecorationInfo(l);if(!c)continue;let h=i.getValueInRange(l.range).codePointAt(0),u=oue(h),f;switch(c.reason.kind){case 0:{wf(c.reason.confusableWith)?f=m(1591,"The character {0} could be confused with the ASCII character {1}, which is more common in source code.",u,oue(c.reason.confusableWith.codePointAt(0))):f=m(1592,"The character {0} could be confused with the character {1}, which is more common in source code.",u,oue(c.reason.confusableWith.codePointAt(0)));break}case 1:f=m(1593,"The character {0} is invisible.",u);break;case 2:f=m(1594,"The character {0} is not a basic ASCII character.",u);break}if(r.has(f))continue;r.add(f);let g={codePoint:h,reason:c.reason,inComment:c.inComment,inString:c.inString},p=m(1595,"Adjust settings"),_=VW(bq.ID,g),b=new Gn("",!0).appendMarkdown(f).appendText(" ").appendLink(_,p,uOe);s.push(new Zl(this,l.range,[b],!1,a++))}return s}renderHoverParts(e,t){return _Ae(e,t,this._editor,this._markdownRendererService)}getAccessibleContent(e){return e.contents.map(t=>t.value).join(` +`)}};aue=hue([lM(1,ar)],aue);function lue(o){return`U+${o.toString(16).padStart(4,"0")}`}function oue(o){let e=`\`${lue(o)}\``;return Em.isInvisibleCharacter(o)||(e+=` "${`${eXe(o)}`}"`),e}function eXe(o){return o===96?"`` ` ``":"`"+String.fromCodePoint(o)+"`"}function fOe(o,e){return eC.computeUnicodeHighlightReason(o,e)}var _q=class o{constructor(){this.map=new Map}static{this.instance=new o}getDecorationFromOptions(e){return this.getDecoration(!e.includeComments,!e.includeStrings)}getDecoration(e,t){let i=`${e}${t}`,n=this.map.get(i);return n||(n=Ve.createDynamic({description:"unicode-highlight",stickiness:1,className:"unicode-highlight",showIfCollapsed:!0,overviewRuler:null,minimap:null,hideInCommentTokens:e,hideInStringTokens:t}),this.map.set(i,n)),n}},cue=class extends ve{constructor(){super({id:zS.ID,label:U(1604,"Disable highlighting of characters in comments"),precondition:void 0}),this.shortLabel=m(1596,"Disable Highlight In Comments")}async run(e,t){let i=e.get(Me);i&&this.runAction(i)}async runAction(e){await e.updateValue(ja.includeComments,!1,2)}},due=class extends ve{constructor(){super({id:zS.ID,label:U(1605,"Disable highlighting of characters in strings"),precondition:void 0}),this.shortLabel=m(1597,"Disable Highlight In Strings")}async run(e,t){let i=e.get(Me);i&&this.runAction(i)}async runAction(e){await e.updateValue(ja.includeStrings,!1,2)}},zS=class o extends Cn{static{this.ID="editor.action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters"}constructor(){super({id:o.ID,title:U(1606,"Disable highlighting of ambiguous characters"),precondition:void 0,f1:!1}),this.shortLabel=m(1598,"Disable Ambiguous Highlight")}async run(e,t){let i=e.get(Me);i&&this.runAction(i)}async runAction(e){await e.updateValue(ja.ambiguousCharacters,!1,2)}},dM=class o extends Cn{static{this.ID="editor.action.unicodeHighlight.disableHighlightingOfInvisibleCharacters"}constructor(){super({id:o.ID,title:U(1607,"Disable highlighting of invisible characters"),precondition:void 0,f1:!1}),this.shortLabel=m(1599,"Disable Invisible Highlight")}async run(e,t){let i=e.get(Me);i&&this.runAction(i)}async runAction(e){await e.updateValue(ja.invisibleCharacters,!1,2)}},hM=class o extends Cn{static{this.ID="editor.action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters"}constructor(){super({id:o.ID,title:U(1608,"Disable highlighting of non basic ASCII characters"),precondition:void 0,f1:!1}),this.shortLabel=m(1600,"Disable Non ASCII Highlight")}async run(e,t){let i=e.get(Me);i&&this.runAction(i)}async runAction(e){await e.updateValue(ja.nonBasicASCII,!1,2)}},bq=class o extends Cn{static{this.ID="editor.action.unicodeHighlight.showExcludeOptions"}constructor(){super({id:o.ID,title:U(1609,"Show Exclude Options"),precondition:void 0,f1:!1})}async run(e,t){let{codePoint:i,reason:n,inString:s,inComment:r}=t,a=String.fromCodePoint(i),l=e.get(Mn),c=e.get(Me);function d(g){return Em.isInvisibleCharacter(g)?m(1601,"Exclude {0} (invisible character) from being highlighted",lue(g)):m(1602,"Exclude {0} from being highlighted",`${lue(g)} "${a}"`)}let h=[];if(n.kind===0)for(let g of n.notAmbiguousInLocales)h.push({label:m(1603,'Allow unicode characters that are more common in the language "{0}".',g),run:async()=>{iXe(c,[g])}});if(h.push({label:d(i),run:()=>tXe(c,[i])}),r){let g=new cue;h.push({label:g.label,run:async()=>g.runAction(c)})}else if(s){let g=new due;h.push({label:g.label,run:async()=>g.runAction(c)})}function u(g){return typeof g.desc.title=="string"?g.desc.title:g.desc.title.value}if(n.kind===0){let g=new zS;h.push({label:u(g),run:async()=>g.runAction(c)})}else if(n.kind===1){let g=new dM;h.push({label:u(g),run:async()=>g.runAction(c)})}else if(n.kind===2){let g=new hM;h.push({label:u(g),run:async()=>g.runAction(c)})}else nXe(n);let f=await l.pick(h,{title:uOe});f&&await f.run()}};async function tXe(o,e){let t=o.getValue(ja.allowedCharacters),i;typeof t=="object"&&t?i=t:i={};for(let n of e)i[String.fromCodePoint(n)]=!0;await o.updateValue(ja.allowedCharacters,i,2)}async function iXe(o,e){let t=o.inspect(ja.allowedLocales).user?.value,i;typeof t=="object"&&t?i=Object.assign({},t):i={};for(let n of e)i[n]=!0;await o.updateValue(ja.allowedLocales,i,2)}function nXe(o){throw new Error(`Unexpected value: ${o}`)}Wt(zS);Wt(dM);Wt(hM);Wt(bq);Ue(cM.ID,cM,1);hh.register(aue);W();Xo();lt();ao();le();W0();var oXe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},gOe=function(o,e){return function(t,i){e(t,i,o)}},mOe="ignoreUnusualLineTerminators";function sXe(o,e,t){o.setModelProperty(e.uri,mOe,t)}function rXe(o,e){return o.getModelProperty(e.uri,mOe)}var vq=class extends T{static{this.ID="editor.contrib.unusualLineTerminatorsDetector"}constructor(e,t,i){super(),this._editor=e,this._dialogService=t,this._codeEditorService=i,this._isPresentingDialog=!1,this._config=this._editor.getOption(143),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(143)&&(this._config=this._editor.getOption(143),this._checkForUnusualLineTerminators())})),this._register(this._editor.onDidChangeModel(()=>{this._checkForUnusualLineTerminators()})),this._register(this._editor.onDidChangeModelContent(n=>{n.isUndoing||this._checkForUnusualLineTerminators()})),this._checkForUnusualLineTerminators()}async _checkForUnusualLineTerminators(){if(this._config==="off"||!this._editor.hasModel())return;let e=this._editor.getModel();if(!e.mightContainUnusualLineTerminators()||rXe(this._codeEditorService,e)===!0||this._editor.getOption(104))return;if(this._config==="auto"){e.removeUnusualLineTerminators(this._editor.getSelections());return}if(this._isPresentingDialog)return;let i;try{this._isPresentingDialog=!0,i=await this._dialogService.confirm({title:m(1610,"Unusual Line Terminators"),message:m(1611,"Detected unusual line terminators"),detail:m(1612,"The file '{0}' contains one or more unusual line terminator characters, like Line Separator (LS) or Paragraph Separator (PS).\n\nIt is recommended to remove them from the file. This can be configured via `editor.unusualLineTerminators`.",Os(e.uri)),primaryButton:m(1613,"&&Remove Unusual Line Terminators"),cancelButton:m(1614,"Ignore")})}finally{this._isPresentingDialog=!1}if(!i.confirmed){sXe(this._codeEditorService,e,!0);return}e.removeUnusualLineTerminators(this._editor.getSelections())}};vq=oXe([gOe(1,yg),gOe(2,ot)],vq);Ue(vq.ID,vq,1);le();hs();Ze();Vt();Ae();W();yo();jo();Xo();oi();je();So();Qy();lt();ao();ue();li();fv();Wee();ho();Ut();Il();_w();Ut();Ci();W();yo();var aXe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},lXe=function(o,e){return function(t,i){e(t,i,o)}},wq=class{constructor(){this.selector={language:"*"}}provideDocumentHighlights(e,t,i){if(e.isDisposed())return;let n=[],s=e.getWordAtPosition({lineNumber:t.lineNumber,column:t.column});return s?e.findMatches(s.word,!0,!1,!0,rx,!1).map(a=>({range:a.range,kind:E_.Text})):Promise.resolve(n)}provideMultiDocumentHighlights(e,t,i,n){if(e.isDisposed())return;let s=new un,r=e.getWordAtPosition({lineNumber:t.lineNumber,column:t.column});if(!r)return Promise.resolve(s);for(let a of[e,...i]){if(a.isDisposed())continue;let c=a.findMatches(r.word,!0,!1,!0,rx,!1).map(d=>({range:d.range,kind:E_.Text}));c&&s.set(a.uri,c)}return s}},Cq=class extends T{constructor(e){super(),this._register(e.documentHighlightProvider.register("*",new wq)),this._register(e.multiDocumentHighlightProvider.register("*",new wq))}};Cq=aXe([lXe(0,be)],Cq);var pOe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},lm=function(o,e){return function(t,i){e(t,i,o)}},wo,uue,vue=new fe("hasWordHighlights",!1);function _Oe(o,e,t,i){let n=o.ordered(e);return oE(n.map(s=>()=>Promise.resolve(s.provideDocumentHighlights(e,t,i)).then(void 0,ni)),s=>s!=null).then(s=>{if(s){let r=new un;return r.set(e.uri,s),r}return new un})}function cXe(o,e,t,i,n){let s=o.ordered(e);return oE(s.map(r=>()=>{let a=n.filter(l=>BP(l)).filter(l=>WD(r.selector,l.uri,l.getLanguageId(),!0,void 0,void 0)>0);return Promise.resolve(r.provideMultiDocumentHighlights(e,t,a,i)).then(void 0,ni)}),r=>r!=null)}var yq=class{constructor(e,t,i){this._model=e,this._selection=t,this._wordSeparators=i,this._wordRange=this._getCurrentWordRange(e,t),this._result=null}get result(){return this._result||(this._result=Bi(e=>this._compute(this._model,this._selection,this._wordSeparators,e))),this._result}_getCurrentWordRange(e,t){let i=e.getWordAtPosition(t.getPosition());return i?new S(t.startLineNumber,i.startColumn,t.startLineNumber,i.endColumn):null}cancel(){this.result.cancel()}},fue=class extends yq{constructor(e,t,i,n){super(e,t,i),this._providers=n}_compute(e,t,i,n){return _Oe(this._providers,e,t.getPosition(),n).then(s=>s||new un)}},gue=class extends yq{constructor(e,t,i,n,s){super(e,t,i),this._providers=n,this._otherModels=s}_compute(e,t,i,n){return cXe(this._providers,e,t.getPosition(),n,this._otherModels).then(s=>s||new un)}};function dXe(o,e,t,i){return new fue(e,t,i,o)}function hXe(o,e,t,i,n){return new gue(e,t,i,o,n)}Sr("_executeDocumentHighlights",async(o,e,t)=>{let i=o.get(be);return(await _Oe(i.documentHighlightProvider,e,t,Xe.None))?.get(e.uri)});var mue=class{static{wo=this}static{this.storedDecorationIDs=new un}static{this.query=null}constructor(e,t,i,n,s,r,a,l){this.toUnhook=new F,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=new un,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=void 0,this.runDelayer=this.toUnhook.add(new qo(50)),this.editor=e,this.providers=t,this.multiDocumentProviders=i,this.codeEditorService=r,this.textModelService=s,this.configurationService=a,this.logService=l,this._hasWordHighlights=vue.bindTo(n),this._ignorePositionChangeEvent=!1,this.occurrencesHighlightEnablement=this.editor.getOption(90),this.occurrencesHighlightDelay=this.configurationService.getValue("editor.occurrencesHighlightDelay"),this.model=this.editor.getModel(),this.toUnhook.add(e.onDidChangeCursorPosition(c=>{this._ignorePositionChangeEvent||this.occurrencesHighlightEnablement!=="off"&&this.runDelayer.trigger(()=>{this._onPositionChanged(c)}).catch(De)})),this.toUnhook.add(e.onDidFocusEditorText(c=>{this.occurrencesHighlightEnablement!=="off"&&(this.workerRequest||this.runDelayer.trigger(()=>{this._run()}).catch(De))})),this.toUnhook.add(e.onDidChangeModelContent(c=>{Rw(this.model.uri,"output")||this._stopAll()})),this.toUnhook.add(e.onDidChangeModel(c=>{!c.newModelUrl&&c.oldModelUrl?this._stopSingular():wo.query&&this._run()})),this.toUnhook.add(e.onDidChangeConfiguration(c=>{let d=this.editor.getOption(90);if(this.occurrencesHighlightEnablement!==d)switch(this.occurrencesHighlightEnablement=d,d){case"off":this._stopAll();break;case"singleFile":this._stopAll(wo.query?.modelInfo?.modelURI);break;case"multiFile":wo.query&&this._run(!0);break;default:console.warn("Unknown occurrencesHighlight setting value:",d);break}})),this.toUnhook.add(this.configurationService.onDidChangeConfiguration(c=>{if(c.affectsConfiguration("editor.occurrencesHighlightDelay")){let d=a.getValue("editor.occurrencesHighlightDelay");this.occurrencesHighlightDelay!==d&&(this.occurrencesHighlightDelay=d)}})),this.toUnhook.add(e.onDidBlurEditorWidget(()=>{let c=this.codeEditorService.getFocusedCodeEditor();c?c.getModel()?.uri.scheme===Fe.vscodeNotebookCell&&this.editor.getModel()?.uri.scheme!==Fe.vscodeNotebookCell&&this._stopAll():this._stopAll()})),this.decorations=this.editor.createDecorationsCollection(),this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=void 0,wo.query&&this._run()}hasDecorations(){return this.decorations.length>0}restore(e){this.occurrencesHighlightEnablement!=="off"&&(this.runDelayer.cancel(),this.runDelayer.trigger(()=>{this._run(!1,e)}).catch(De))}stop(){this.occurrencesHighlightEnablement!=="off"&&this._stopAll()}_getSortedHighlights(){return this.decorations.getRanges().sort(S.compareRangesUsingStarts)}moveNext(){let e=this._getSortedHighlights(),i=(e.findIndex(s=>s.containsPosition(this.editor.getPosition()))+1)%e.length,n=e[i];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(n.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(n);let s=this._getWord();if(s){let r=this.editor.getModel().getLineContent(n.startLineNumber);qn(`${r}, ${i+1} of ${e.length} for '${s.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){let e=this._getSortedHighlights(),i=(e.findIndex(s=>s.containsPosition(this.editor.getPosition()))-1+e.length)%e.length,n=e[i];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(n.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(n);let s=this._getWord();if(s){let r=this.editor.getModel().getLineContent(n.startLineNumber);qn(`${r}, ${i+1} of ${e.length} for '${s.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeSingleDecorations(){if(!this.editor.hasModel())return;let e=wo.storedDecorationIDs.get(this.editor.getModel().uri);e&&(this.editor.removeDecorations(e),wo.storedDecorationIDs.delete(this.editor.getModel().uri),this.decorations.length>0&&(this.decorations.clear(),this._hasWordHighlights.set(!1)))}_removeAllDecorations(e){let t=this.codeEditorService.listCodeEditors(),i=[];for(let n of t){if(!n.hasModel()||Nl(n.getModel().uri,e))continue;let s=wo.storedDecorationIDs.get(n.getModel().uri);if(!s)continue;n.removeDecorations(s),i.push(n.getModel().uri);let r=lw.get(n);r?.wordHighlighter&&r.wordHighlighter.decorations.length>0&&(r.wordHighlighter.decorations.clear(),r.wordHighlighter.workerRequest=null,r.wordHighlighter._hasWordHighlights.set(!1))}for(let n of i)wo.storedDecorationIDs.delete(n)}_stopSingular(){this._removeSingleDecorations(),this.editor.hasTextFocus()&&(this.editor.getModel()?.uri.scheme!==Fe.vscodeNotebookCell&&wo.query?.modelInfo?.modelURI.scheme!==Fe.vscodeNotebookCell?(wo.query=null,this._run()):wo.query?.modelInfo&&(wo.query.modelInfo=null)),this.renderDecorationsTimer!==void 0&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=void 0),this.workerRequest!==null&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_stopAll(e){this._removeAllDecorations(e),this.renderDecorationsTimer!==void 0&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=void 0),this.workerRequest!==null&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_onPositionChanged(e){if(this.occurrencesHighlightEnablement==="off"){this._stopAll();return}if(e.source!=="api"&&e.reason!==3){this._stopAll();return}this._run()}_getWord(){let e=this.editor.getSelection(),t=e.startLineNumber,i=e.startColumn;return this.model.isDisposed()?null:this.model.getWordAtPosition({lineNumber:t,column:i})}getOtherModelsToHighlight(e){if(!e)return[];if(e.uri.scheme===Fe.vscodeNotebookCell){let s=[],r=this.codeEditorService.listCodeEditors();for(let a of r){let l=a.getModel();l&&l!==e&&l.uri.scheme===Fe.vscodeNotebookCell&&s.push(l)}return s}let i=[],n=this.codeEditorService.listCodeEditors();for(let s of n){if(!jN(s))continue;let r=s.getModel();r&&e===r.modified&&i.push(r.modified)}if(i.length)return i;if(this.occurrencesHighlightEnablement==="singleFile")return[];for(let s of n){let r=s.getModel();r&&r!==e&&i.push(r)}return i}async _run(e,t){if(this.editor.hasTextFocus()){let n=this.editor.getSelection();if(!n||n.startLineNumber!==n.endLineNumber){wo.query=null,this._stopAll();return}let s=n.startColumn,r=n.endColumn,a=this._getWord();if(!a||a.startColumn>s||a.endColumn{n===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=a||[],this._beginRenderDecorations(t??this.occurrencesHighlightDelay))},De)}catch(a){this.logService.error("Unexpected error during occurrence request. Log: ",a)}finally{r.dispose()}}else if(this.model.uri.scheme===Fe.vscodeNotebookCell){let n=++this.workerRequestTokenId;if(this.workerRequestCompleted=!1,!wo.query||!wo.query.modelInfo)return;let s=await this.textModelService.createModelReference(wo.query.modelInfo.modelURI);try{this.workerRequest=this.computeWithModel(s.object.textEditorModel,wo.query.modelInfo.selection,[this.model]),this.workerRequest?.result.then(r=>{n===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=r||[],this._beginRenderDecorations(t??this.occurrencesHighlightDelay))},De)}catch(r){this.logService.error("Unexpected error during occurrence request. Log: ",r)}finally{s.dispose()}}}computeWithModel(e,t,i){return i.length?hXe(this.multiDocumentProviders,e,t,this.editor.getOption(148),i):dXe(this.providers,e,t,this.editor.getOption(148))}_beginRenderDecorations(e){let t=new Date().getTime(),i=this.lastCursorPositionChangeTime+e;t>=i?(this.renderDecorationsTimer=void 0,this.renderDecorations()):this.renderDecorationsTimer=setTimeout(()=>{this.renderDecorations()},i-t)}renderDecorations(){this.renderDecorationsTimer=void 0;let e=this.codeEditorService.listCodeEditors();for(let t of e){let i=lw.get(t);if(!i)continue;let n=[],s=t.getModel()?.uri;if(s&&this.workerRequestValue.has(s)){let r=wo.storedDecorationIDs.get(s),a=this.workerRequestValue.get(s);if(a)for(let c of a)c.range&&n.push({range:c.range,options:z2e(c.kind)});let l=[];t.changeDecorations(c=>{l=c.deltaDecorations(r??[],n)}),wo.storedDecorationIDs=wo.storedDecorationIDs.set(s,l),n.length>0&&(i.wordHighlighter?.decorations.set(n),i.wordHighlighter?._hasWordHighlights.set(!0))}}this.workerRequest=null}dispose(){this._stopSingular(),this.toUnhook.dispose()}};mue=wo=pOe([lm(4,Hn),lm(5,ot),lm(6,Me),lm(7,Ot)],mue);var lw=class extends T{static{uue=this}static{this.ID="editor.contrib.wordHighlighter"}static get(e){return e.getContribution(uue.ID)}constructor(e,t,i,n,s,r,a){super(),this._wordHighlighter=null;let l=()=>{e.hasModel()&&!e.getModel().isTooLargeForTokenization()&&e.getModel().uri.scheme!==Fe.accessibleView&&(this._wordHighlighter=new mue(e,i.documentHighlightProvider,i.multiDocumentHighlightProvider,t,s,n,r,a))};this._register(e.onDidChangeModel(c=>{this._wordHighlighter&&(!c.newModelUrl&&c.oldModelUrl?.scheme!==Fe.vscodeNotebookCell&&this.wordHighlighter?.stop(),this._wordHighlighter.dispose(),this._wordHighlighter=null),l()})),l()}get wordHighlighter(){return this._wordHighlighter}saveViewState(){return!!(this._wordHighlighter&&this._wordHighlighter.hasDecorations())}moveNext(){this._wordHighlighter?.moveNext()}moveBack(){this._wordHighlighter?.moveBack()}restoreViewState(e){this._wordHighlighter&&e&&this._wordHighlighter.restore(250)}dispose(){this._wordHighlighter&&(this._wordHighlighter.dispose(),this._wordHighlighter=null),super.dispose()}};lw=uue=pOe([lm(1,Ce),lm(2,be),lm(3,ot),lm(4,Hn),lm(5,Me),lm(6,Ot)],lw);var Sq=class extends ve{constructor(e,t){super(t),this._isNext=e}run(e,t){let i=lw.get(t);i&&(this._isNext?i.moveNext():i.moveBack())}},pue=class extends Sq{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:U(1624,"Go to Next Symbol Highlight"),precondition:vue,kbOpts:{kbExpr:R.editorTextFocus,primary:65,weight:100}})}},_ue=class extends Sq{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:U(1625,"Go to Previous Symbol Highlight"),precondition:vue,kbOpts:{kbExpr:R.editorTextFocus,primary:1089,weight:100}})}},bue=class extends ve{constructor(){super({id:"editor.action.wordHighlight.trigger",label:U(1626,"Trigger Symbol Highlight"),precondition:void 0,kbOpts:{kbExpr:R.editorTextFocus,primary:0,weight:100}})}run(e,t){let i=lw.get(t);i&&i.restoreViewState(!0)}};Ue(lw.ID,lw,0);oe(pue);oe(_ue);oe(bue);eu(Cq);le();us();je();xy();lt();RC();Uo();Pe();ue();gi();Px();mT();Yc();li();Do();var US=class extends Gi{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){if(!t.hasModel())return;let n=Ma(t.getOption(148),t.getOption(147)),s=t.getModel(),r=t.getSelections(),a=r.length>1,l=r.map(c=>{let d=new M(c.positionLineNumber,c.positionColumn),h=this._move(n,s,d,this._wordNavigationType,a);return this._moveTo(c,h,this._inSelectionMode)});if(s.pushStackElement(),t._getViewModel().setCursorStates("moveWordCommand",3,l.map(c=>At.fromModelSelection(c))),l.length===1){let c=new M(l[0].positionLineNumber,l[0].positionColumn);t.revealPosition(c,0)}}_moveTo(e,t,i){return i?new me(e.selectionStartLineNumber,e.selectionStartColumn,t.lineNumber,t.column):new me(t.lineNumber,t.column,t.lineNumber,t.column)}},cm=class extends US{_move(e,t,i,n,s){return fs.moveWordLeft(e,t,i,n,s)}},dm=class extends US{_move(e,t,i,n,s){return fs.moveWordRight(e,t,i,n)}},wue=class extends cm{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}},Cue=class extends cm{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}},yue=class extends cm{constructor(){super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:G.and(R.textInputFocus,G.and(Ym,$D)?.negate()),primary:2063,mac:{primary:527},weight:100}})}},Sue=class extends cm{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}},xue=class extends cm{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}},kue=class extends cm{constructor(){super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:G.and(R.textInputFocus,G.and(Ym,$D)?.negate()),primary:3087,mac:{primary:1551},weight:100}})}},Lue=class extends cm{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(e,t,i,n,s){return super._move(Ma(bs.wordSeparators.defaultValue,e.intlSegmenterLocales),t,i,n,s)}},Iue=class extends cm{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(e,t,i,n,s){return super._move(Ma(bs.wordSeparators.defaultValue,e.intlSegmenterLocales),t,i,n,s)}},Eue=class extends dm{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}},Tue=class extends dm{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:G.and(R.textInputFocus,G.and(Ym,$D)?.negate()),primary:2065,mac:{primary:529},weight:100}})}},Due=class extends dm{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}},Nue=class extends dm{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}},Rue=class extends dm{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:G.and(R.textInputFocus,G.and(Ym,$D)?.negate()),primary:3089,mac:{primary:1553},weight:100}})}},Aue=class extends dm{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}},Mue=class extends dm{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(e,t,i,n,s){return super._move(Ma(bs.wordSeparators.defaultValue,e.intlSegmenterLocales),t,i,n,s)}},Oue=class extends dm{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(e,t,i,n,s){return super._move(Ma(bs.wordSeparators.defaultValue,e.intlSegmenterLocales),t,i,n,s)}},$S=class extends Gi{constructor(e){super({canTriggerInlineEdits:!0,...e}),this._whitespaceHeuristics=e.whitespaceHeuristics,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){let n=e?.get(zt);if(!t.hasModel()||!n)return;let s=Ma(t.getOption(148),t.getOption(147)),r=t.getModel(),a=t.getSelections(),l=t.getOption(10),c=t.getOption(15),d=n.getLanguageConfiguration(r.getLanguageId()).getAutoClosingPairs(),h=t._getViewModel(),u=a.map(f=>{let g=this._delete({wordSeparators:s,model:r,selection:f,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:t.getOption(13),autoClosingBrackets:l,autoClosingQuotes:c,autoClosingPairs:d,autoClosedCharacters:h.getCursorAutoClosedCharacters()},this._wordNavigationType);return new No(g,"")});t.pushUndoStop(),t.executeCommands(this.id,u),t.pushUndoStop()}},uM=class extends $S{_delete(e,t){let i=fs.deleteWordLeft(e,t);return i||new S(1,1,1,1)}},fM=class extends $S{_delete(e,t){let i=fs.deleteWordRight(e,t);if(i)return i;let n=e.model.getLineCount(),s=e.model.getLineMaxColumn(n);return new S(n,s,n,s)}},Pue=class extends uM{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:R.writable})}},Fue=class extends uM{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:R.writable})}},Bue=class extends uM{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:R.writable,kbOpts:{kbExpr:R.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}},Wue=class extends fM{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:R.writable})}},Hue=class extends fM{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:R.writable})}},Vue=class extends fM{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:R.writable,kbOpts:{kbExpr:R.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}},zue=class extends ve{constructor(){super({id:"deleteInsideWord",precondition:R.writable,label:U(1628,"Delete Word"),metadata:{description:U(1629,"Delete the word at the cursor"),args:[{name:"args",schema:{type:"object",properties:{onlyWord:{type:"boolean",default:!1,description:m(1627,"Delete only the word and leave surrounding whitespace")}}}}]}})}run(e,t,i){if(!t.hasModel())return;let n=!!(i&&typeof i=="object"&&i.onlyWord),s=Ma(t.getOption(148),t.getOption(147)),r=t.getModel(),l=t.getSelections().map(c=>{let d=fs.deleteInsideWord(s,r,c,n);return new No(d,"")});t.pushUndoStop(),t.executeCommands(this.id,l),t.pushUndoStop()}};ye(new wue);ye(new Cue);ye(new yue);ye(new Sue);ye(new xue);ye(new kue);ye(new Eue);ye(new Tue);ye(new Due);ye(new Nue);ye(new Rue);ye(new Aue);ye(new Lue);ye(new Iue);ye(new Mue);ye(new Oue);ye(new Pue);ye(new Fue);ye(new Bue);ye(new Wue);ye(new Hue);ye(new Vue);oe(zue);lt();mT();ue();li();Ii();var Uue=class extends $S{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:R.writable,kbOpts:{kbExpr:R.textInputFocus,primary:0,mac:{primary:769},weight:100}})}_delete(e,t){let i=AC.deleteWordPartLeft(e);return i||new S(1,1,1,1)}},$ue=class extends $S{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:R.writable,kbOpts:{kbExpr:R.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(e,t){let i=AC.deleteWordPartRight(e);if(i)return i;let n=e.model.getLineCount(),s=e.model.getLineMaxColumn(n);return new S(n,s,n,s)}},xq=class extends US{_move(e,t,i,n,s){return AC.moveWordPartLeft(e,t,i,s)}},que=class extends xq{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:R.textInputFocus,primary:0,mac:{primary:783},weight:100}})}};st.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");var jue=class extends xq{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:R.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}};st.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");var kq=class extends US{_move(e,t,i,n,s){return AC.moveWordPartRight(e,t,i)}},Kue=class extends kq{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:R.textInputFocus,primary:0,mac:{primary:785},weight:100}})}},Gue=class extends kq{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:R.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}};ye(new Uue);ye(new $ue);ye(new que);ye(new jue);ye(new Kue);ye(new Gue);wT();lt();li();ue();gi();var Lq=class{constructor(e,t){this._selection=e,this._isMovingLeft=t}getEditOperations(e,t){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;let i=this._selection.startLineNumber,n=this._selection.startColumn,s=this._selection.endColumn;if(!(this._isMovingLeft&&n===1)&&!(!this._isMovingLeft&&s===e.getLineMaxColumn(i)))if(this._isMovingLeft){let r=new S(i,n-1,i,n),a=e.getValueInRange(r);t.addEditOperation(r,null),t.addEditOperation(new S(i,s,i,s),a)}else{let r=new S(i,s,i,s+1),a=e.getValueInRange(r);t.addEditOperation(r,null),t.addEditOperation(new S(i,n,i,n),a)}}computeCursorState(e,t){return this._isMovingLeft?new me(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new me(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}};le();var Iq=class extends ve{constructor(e,t){super(t),this.left=e}run(e,t){if(!t.hasModel())return;let i=[],n=t.getSelections();for(let s of n)i.push(new Lq(s,this.left));t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop()}},Yue=class extends Iq{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:U(846,"Move Selected Text Left"),precondition:R.writable})}},Zue=class extends Iq{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:U(847,"Move Selected Text Right"),precondition:R.writable})}};oe(Yue);oe(Zue);le();lt();li();fv();var uXe="editor.action.pasteAs";Ue(of.ID,of,0);eu(r7);ye(new class extends Gi{constructor(){super({id:cre,precondition:u7,kbOpts:{weight:100,primary:2137}})}runEditorCommand(o,e){return of.get(e)?.changePasteType()}});ye(new class extends Gi{constructor(){super({id:"editor.hidePasteWidget",precondition:u7,kbOpts:{weight:100,primary:9}})}runEditorCommand(o,e){of.get(e)?.clearWidgets()}});oe(class bOe extends ve{static{this.argsSchema={oneOf:[{type:"object",required:["kind"],properties:{kind:{type:"string",description:m(952,`The kind of the paste edit to try pasting with. +If there are multiple edits for this kind, the editor will show a picker. If there are no edits of this kind, the editor will show an error message.`)}}},{type:"object",required:["preferences"],properties:{preferences:{type:"array",description:m(953,`List of preferred paste edit kind to try applying. +The first edit matching the preferences will be applied.`),items:{type:"string"}}}}]}}constructor(){super({id:uXe,label:U(954,"Paste As..."),precondition:R.writable,metadata:{description:"Paste as",args:[{name:"args",schema:bOe.argsSchema}]},canTriggerInlineEdits:!0})}run(e,t,i){let n;return i&&("kind"in i?n={only:new zi(i.kind)}:"preferences"in i&&(n={preferences:i.preferences.map(s=>new zi(s))})),of.get(t)?.pasteAs(n)}});oe(class extends ve{constructor(){super({id:"editor.action.pasteAsText",label:U(955,"Paste as Text"),precondition:R.writable,canTriggerInlineEdits:!0})}run(o,e){return of.get(e)?.pasteAs({providerId:qp.id})}});W();Xo();lt();ue();li();je();Xu();var fXe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},vOe=function(o,e){return function(t,i){e(t,i,o)}},Eq=class extends T{static{this.ID="editor.contrib.markerSelectionStatus"}constructor(e,t,i){super(),this._editor=e,this._markerService=i,this._ctxHasDiagnostics=R.selectionHasDiagnostics.bindTo(t),this._store.add(this._editor.onDidChangeCursorSelection(()=>this._update())),this._store.add(this._editor.onDidChangeModel(()=>this._update())),this._store.add(this._markerService.onMarkerChanged(n=>{let s=this._editor.getModel();s&&n.some(r=>Nl(r,s.uri))&&this._update()})),this._update()}dispose(){this._ctxHasDiagnostics.reset(),super.dispose()}_update(){let e=this._editor.getModel(),t=this._editor.getSelection();if(!e||!t){this._ctxHasDiagnostics.reset();return}let n=this._markerService.read({resource:e.uri,severities:tn.Error|tn.Warning|tn.Info}).some(s=>S.areIntersecting({startLineNumber:s.startLineNumber,startColumn:s.startColumn,endLineNumber:s.endLineNumber,endColumn:s.endColumn},t));this._ctxHasDiagnostics.set(n)}};Eq=fXe([vOe(1,Ce),vOe(2,za)],Eq);Ue(Eq.ID,Eq,1);Ze();Vt();Ae();W();yo();qa();oi();Kt();fv();th();Ut();Ra();y8();S8();var wOe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},hm=function(o,e){return function(t,i){e(t,i,o)}},cw,Xue=class extends T{constructor(e,t,i,n,s,r){super(),this._watchers=new un,this._providerChangeListeners=this._register(new F);let a=r.documentSemanticTokensProvider,l=u=>{this._watchers.get(u.uri)?.dispose(),this._watchers.set(u.uri,new Que(u,e,i,s,r))},c=(u,f)=>{f.dispose(),this._watchers.delete(u.uri)},d=()=>{for(let u of t.getModels()){let f=this._watchers.get(u.uri);yI(u,i,n)?f||l(u):f&&c(u,f)}},h=()=>{this._providerChangeListeners.clear();for(let u of a.allNoModel())typeof u.onDidChange=="function"&&this._providerChangeListeners.add(u.onDidChange(()=>{for(let f of this._watchers.values())f.handleProviderDidChange(u)}))};t.getModels().forEach(u=>{yI(u,i,n)&&l(u)}),this._register(t.onModelAdded(u=>{yI(u,i,n)&&l(u)})),this._register(t.onModelRemoved(u=>{let f=this._watchers.get(u.uri);f&&c(u,f)})),this._register(n.onDidChangeConfiguration(u=>{u.affectsConfiguration(oM)&&d()})),this._register(i.onDidColorThemeChange(d)),h(),this._register(a.onDidChange(()=>{h();for(let u of this._watchers.values())u.handleRegistryChange()}))}dispose(){Ct(this._watchers.values()),this._watchers.clear(),super.dispose()}};Xue=wOe([hm(0,yy),hm(1,ui),hm(2,yt),hm(3,Me),hm(4,Is),hm(5,be)],Xue);var Que=class extends T{static{cw=this}static{this.REQUEST_MIN_DELAY=300}static{this.REQUEST_MAX_DELAY=2e3}constructor(e,t,i,n,s){super(),this._semanticTokensStylingService=t,this._relevantProviders=new Set,this._isDisposed=!1,this._model=e,this._provider=s.documentSemanticTokensProvider,this._debounceInformation=n.for(this._provider,"DocumentSemanticTokens",{min:cw.REQUEST_MIN_DELAY,max:cw.REQUEST_MAX_DELAY}),this._fetchDocumentSemanticTokens=this._register(new at(()=>this._fetchDocumentSemanticTokensNow(),cw.REQUEST_MIN_DELAY)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._providersChangedDuringRequest=!1,this._updateRelevantProviders(),this._register(this._model.onDidChangeContent(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(this._model.onDidChangeAttached(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(this._model.onDidChangeLanguage(()=>{this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._updateRelevantProviders(),this._fetchDocumentSemanticTokens.schedule(0)})),this._register(i.onDidColorThemeChange(r=>{this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._fetchDocumentSemanticTokens.schedule(0)}handleRegistryChange(){this._updateRelevantProviders(),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))}handleProviderDidChange(e){if(this._relevantProviders.has(e)){if(this._currentDocumentRequestCancellationTokenSource){this._providersChangedDuringRequest=!0;return}this._fetchDocumentSemanticTokens.schedule(0)}}_updateRelevantProviders(){this._relevantProviders=new Set(this._provider.all(this._model))}dispose(){this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;if(!$he(this._provider,this._model)){this._currentDocumentResponse&&this._model.tokenization.setSemanticTokens(null,!1);return}if(!this._model.isAttachedToEditor())return;let e=new Lt,t=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,i=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,n=qhe(this._provider,this._model,t,i,e.token);this._currentDocumentRequestCancellationTokenSource=e,this._providersChangedDuringRequest=!1;let s=[],r=this._model.onDidChangeContent(l=>{s.push(l)}),a=new cn(!1);n.then(l=>{if(this._debounceInformation.update(this._model,a.elapsed()),this._currentDocumentRequestCancellationTokenSource=null,r.dispose(),!l)this._setDocumentSemanticTokens(null,null,null,s);else{let{provider:c,tokens:d}=l,h=this._semanticTokensStylingService.getStyling(c);this._setDocumentSemanticTokens(c,d||null,h,s)}},l=>{l&&(Io(l)||typeof l.message=="string"&&l.message.indexOf("busy")!==-1)||De(l),this._currentDocumentRequestCancellationTokenSource=null,r.dispose(),(s.length>0||this._providersChangedDuringRequest)&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model)))})}static _copy(e,t,i,n,s){s=Math.min(s,i.length-n,e.length-t);for(let r=0;r{(n.length>0||this._providersChangedDuringRequest)&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))};if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed){e&&t&&e.releaseDocumentSemanticTokens(t.resultId);return}if(!e||!i){this._model.tokenization.setSemanticTokens(null,!1);return}if(!t){this._model.tokenization.setSemanticTokens(null,!0),r();return}if(Uhe(t)){if(!s){this._model.tokenization.setSemanticTokens(null,!0);return}if(t.edits.length===0)t={resultId:t.resultId,data:s.data};else{let a=0;for(let u of t.edits)a+=(u.data?u.data.length:0)-u.deleteCount;let l=s.data,c=new Uint32Array(l.length+a),d=l.length,h=c.length;for(let u=t.edits.length-1;u>=0;u--){let f=t.edits[u];if(f.start>l.length){i.warnInvalidEditStart(s.resultId,t.resultId,u,f.start,l.length),this._model.tokenization.setSemanticTokens(null,!0);return}let g=d-(f.start+f.deleteCount);g>0&&(cw._copy(l,d-g,c,h-g,g),h-=g),f.data&&(cw._copy(f.data,0,c,h-f.data.length,f.data.length),h-=f.data.length),d=f.start}d>0&&cw._copy(l,0,c,0,d),t={resultId:t.resultId,data:c}}}if(nM(t)){this._currentDocumentResponse=new Jue(e,t.resultId,t.data);let a=C8(t,i,this._model.getLanguageId());if(n.length>0)for(let l of n)for(let c of a)for(let d of l.changes)c.applyEdit(d.range,d.text);this._model.tokenization.setSemanticTokens(a,!0)}else this._model.tokenization.setSemanticTokens(null,!0);r()}};Que=cw=wOe([hm(1,yy),hm(2,yt),hm(3,Is),hm(4,be)],Que);var Jue=class{constructor(e,t,i){this.provider=e,this.resultId=t,this.data=i}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}};eu(Xue);Mg();md();md();ON();gv();Ie();hse();mH();Qoe();ud();ei();Es();Gt();var efe=class{constructor(e,t,i){this.documentDiffItem=e,this.collapsed=_e(this,!1),this.lastTemplateData=_e(this,{contentHeight:e.estimatedHeight,selections:void 0}),this.isActive=V(this,s=>t.activeDiffItem.read(s)===this),this._isFocusedSource=_e(this,ht(!1)),this.isFocused=V(this,s=>this._isFocusedSource.read(s).read(s)),this.isAlive=ht(!0);let n=i.createInstance(jk,e.options);this.diffEditorViewModelRef=Vp.create(i.createInstance(Uk,{original:e.original,modified:e.modified},n))}get originalUri(){return this.documentDiffItem.original?.uri}get modifiedUri(){return this.documentDiffItem.modified?.uri}setIsFocused(e,t){this._isFocusedSource.set(e,t)}getKey(){return JSON.stringify([this.originalUri?.toString(),this.modifiedUri?.toString()])}dispose(){this.diffEditorViewModelRef.dispose()}},tfe=class{constructor(e,t){this.instantiationService=t,this.activeDiffItem=_e(this,void 0),this.activeDiffItem.setCache=(i,n)=>this.activeDiffItem.set(i,n),this.items=_e(this,[]),this.setDocuments(e),this.isLoading=ht(!1),this.contextKeys=void 0}setDocuments(e){let t=this.items.get(),i=e.map(n=>t.find(s=>s.documentDiffItem.modified===n.modified)??new efe(n,this,this.instantiationService));this.items.set(i,void 0),i.includes(this.activeDiffItem.get())||this.activeDiffItem.set(i[0],void 0);for(let n of t)i.includes(n)||n.dispose()}dispose(){for(let e of this.items.get())e.dispose()}};function gXe(o,e){let t=it.get(ie),i=it.get(cr).registerEditorContainer(o),n=new tfe(e,t),s=new Map(e.map(d=>[d.modified.uri.toString(),d.label])),r=_e("dimension",void 0),a=_e("viewModel",void 0),l=t.createInstance(Gk,o,r,a,{headerClickToCollapse:!0,createResourceLabel:d=>({setUri(h,u){d.textContent=h===void 0?"":s.get(h.toString())??h.path,d.style.textDecoration=u?.strikethrough?"line-through":""},dispose(){}})}),c=new ResizeObserver(()=>r.set({width:o.clientWidth,height:o.clientHeight},void 0));return c.observe(o),a.set(n,void 0),{update(d){s=new Map(d.map(h=>[h.modified.uri.toString(),h.label])),n.setDocuments(d)},dispose(){c.disconnect(),l.dispose(),i.dispose(),n.dispose()}}}export{XEe as CancellationTokenSource,QEe as Emitter,JEe as KeyCode,eTe as KeyMod,sTe as MarkerSeverity,rTe as MarkerTag,tTe as Position,iTe as Range,nTe as Selection,oTe as SelectionDirection,lTe as Token,aTe as Uri,gXe as createMultiDiffEditor,cTe as editor,Ei as languages,dTe as monaco}; +/*! Bundled license information: + +monaco-editor/esm/vs/base/browser/dompurify/dompurify.js: + (*! @license DOMPurify 3.4.8 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.8/LICENSE *) + +monaco-editor/esm/vs/languages/definitions/swift/swift.js: + (*!--------------------------------------------------------------------------------------------- + * Copyright (C) David Owens II, owensd.io. All rights reserved. + *--------------------------------------------------------------------------------------------*) +*/ diff --git a/plugins/diff-explorer/monaco/editor.worker.js b/plugins/diff-explorer/monaco/editor.worker.js new file mode 100644 index 0000000..8118233 --- /dev/null +++ b/plugins/diff-explorer/monaco/editor.worker.js @@ -0,0 +1,30 @@ +var $n=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?wt.isErrorNoTelemetry(e)?new wt(e.message+` + +`+e.stack):new Error(e.message+` + +`+e.stack):e},0)}}emit(e){this.listeners.forEach(n=>{n(e)})}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}},rs=new $n;function We(t){Hn(t)||rs.onUnexpectedError(t)}function ss(t){Hn(t)||rs.onUnexpectedExternalError(t)}function Wt(t){if(t instanceof Error){let{name:e,message:n,cause:r}=t,s=t.stacktrace||t.stack;return{$isError:!0,name:e,message:n,stack:s,noTelemetry:wt.isErrorNoTelemetry(t),cause:r?Wt(r):void 0,code:t.code}}return t}var zn="Canceled";function Hn(t){return t instanceof bt?!0:t instanceof Error&&t.name===zn&&t.message===zn}var bt=class extends Error{constructor(){super(zn),this.name=this.message}};var wt=class t extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof t)return e;let n=new t;return n.message=e.message,n.stack=e.stack,n}static isErrorNoTelemetry(e){return e.name==="CodeExpectedError"}},H=class t extends Error{constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,t.prototype)}};function is(t,e="Unreachable"){throw new Error(e)}function jn(t,e="unexpected state"){if(!t)throw typeof e=="string"?new H(`Assertion Failed: ${e}`):e}function xe(t){if(!t()){debugger;t(),We(new H("Assertion Failed"))}}function et(t,e){let n=0;for(;n=0;_--)yield x[_]}t.reverse=l;function u(x){return!x||x[Symbol.iterator]().next().done===!0}t.isEmpty=u;function c(x){return x[Symbol.iterator]().next().value}t.first=c;function f(x,_){let S=0;for(let V of x)if(_(V,S++))return!0;return!1}t.some=f;function h(x,_){let S=0;for(let V of x)if(!_(V,S++))return!1;return!0}t.every=h;function m(x,_){for(let S of x)if(_(S))return S}t.find=m;function*b(x,_){for(let S of x)_(S)&&(yield S)}t.filter=b;function*g(x,_){let S=0;for(let V of x)yield _(V,S++)}t.map=g;function*d(x,_){let S=0;for(let V of x)yield*_(V,S++)}t.flatMap=d;function*w(...x){for(let _ of x)as(_)?yield*_:yield _}t.concat=w;function L(x,_,S){let V=S;for(let W of x)V=_(V,W);return V}t.reduce=L;function v(x){let _=0;for(let S of x)_++;return _}t.length=v;function*y(x,_,S=x.length){for(_<-x.length&&(_=0),_<0&&(_+=x.length),S<0?S+=x.length:S>x.length&&(S=x.length);_1)throw new AggregateError(e,"Encountered errors while disposing of store");return Array.isArray(t)?[]:t}else if(t)return t.dispose(),t}function ls(...t){return _e(()=>Xn(t))}var Gn=class{constructor(e){this._isDisposed=!1,this._fn=e}dispose(){if(!this._isDisposed){if(!this._fn)throw new Error("Unbound disposable context: Need to use an arrow function to preserve the value of this");this._isDisposed=!0,this._fn()}}};function _e(t){return new Gn(t)}var Oe=class t{static{this.DISABLE_DISPOSED_WARNING=!1}constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{Xn(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e||e===ce.None)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?t.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}delete(e){if(e){if(e===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(e),e.dispose()}}},ce=class{static{this.None=Object.freeze({dispose(){}})}constructor(){this._store=new Oe,this._store}dispose(){this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};var X=class t{static{this.Undefined=new t(void 0)}constructor(e){this.element=e,this.next=t.Undefined,this.prev=t.Undefined}},xt=class{constructor(){this._first=X.Undefined,this._last=X.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===X.Undefined}clear(){let e=this._first;for(;e!==X.Undefined;){let n=e.next;e.prev=X.Undefined,e.next=X.Undefined,e=n}this._first=X.Undefined,this._last=X.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,n){let r=new X(e);if(this._first===X.Undefined)this._first=r,this._last=r;else if(n){let i=this._last;this._last=r,r.prev=i,i.next=r}else{let i=this._first;this._first=r,r.next=i,i.prev=r}this._size+=1;let s=!1;return()=>{s||(s=!0,this._remove(r))}}shift(){if(this._first!==X.Undefined){let e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==X.Undefined){let e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==X.Undefined&&e.next!==X.Undefined){let n=e.prev;n.next=e.next,e.next.prev=n}else e.prev===X.Undefined&&e.next===X.Undefined?(this._first=X.Undefined,this._last=X.Undefined):e.next===X.Undefined?(this._last=this._last.prev,this._last.next=X.Undefined):e.prev===X.Undefined&&(this._first=this._first.next,this._first.prev=X.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==X.Undefined;)yield e.element,e=e.next}};function to(){return globalThis._VSCODE_NLS_MESSAGES}function Qn(){return globalThis._VSCODE_NLS_LANGUAGE}var no=Qn()==="pseudo"||typeof document<"u"&&document.location&&typeof document.location.hash=="string"&&document.location.hash.indexOf("pseudo=true")>=0;function us(t,e){let n;return e.length===0?n=t:n=t.replace(/\{(\d+)\}/g,(r,s)=>{let i=s[0],a=e[i],l=r;return typeof a=="string"?l=a:(typeof a=="number"||typeof a=="boolean"||a===void 0||a===null)&&(l=String(a)),l}),no&&(n="\uFF3B"+n.replace(/[aouei]/g,"$&$&")+"\uFF3D"),n}function P(t,e,...n){return us(typeof t=="number"?ro(t,e):e,n)}function ro(t,e){let n=to()?.[t];if(typeof n!="string"){if(typeof e=="string")return e;throw new Error(`!!! NLS MISSING: ${t} !!!`)}return n}var $e="en",zt=!1,Ht=!1,$t=!1,hs=!1,Zn=!1,so=!1,io=!1,Ot,Jn=$e,cs=$e,oo,ye,Le=globalThis,ae;typeof Le.vscode<"u"&&typeof Le.vscode.process<"u"?ae=Le.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(ae=process);var ao=typeof ae?.versions?.electron=="string",lo=ao&&ae?.type==="renderer";if(typeof ae=="object"){zt=ae.platform==="win32",Ht=ae.platform==="darwin",$t=ae.platform==="linux",$t&&ae.env.SNAP&&ae.env.SNAP_REVISION,ae.env.CI||ae.env.BUILD_ARTIFACTSTAGINGDIRECTORY||ae.env.GITHUB_WORKSPACE,Ot=$e,Jn=$e;let t=ae.env.VSCODE_NLS_CONFIG;if(t)try{let e=JSON.parse(t);Ot=e.userLocale,cs=e.osLocale,Jn=e.resolvedLanguage||$e,oo=e.languagePack?.translationsConfigFile}catch{}hs=!0}else typeof navigator=="object"&&!lo?(ye=navigator.userAgent,zt=ye.indexOf("Windows")>=0,Ht=ye.indexOf("Macintosh")>=0,so=(ye.indexOf("Macintosh")>=0||ye.indexOf("iPad")>=0||ye.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,$t=ye.indexOf("Linux")>=0,io=ye?.indexOf("Mobi")>=0,Zn=!0,Jn=Qn()||$e,Ot=navigator.language.toLowerCase(),cs=Ot):console.error("Unable to resolve platform.");var Yn=0;Ht?Yn=1:zt?Yn=3:$t&&(Yn=2);var ze=zt,fs=Ht;var ms=hs,Kn=Zn,uo=Zn&&typeof Le.importScripts=="function",ds=uo?Le.origin:void 0;var de=ye;var co=typeof Le.postMessage=="function"&&!Le.importScripts,gs=(()=>{if(co){let t=[];Le.addEventListener("message",n=>{if(n.data&&n.data.vscodeScheduleAsyncWork)for(let r=0,s=t.length;r{let r=++e;t.push({id:r,callback:n}),Le.postMessage({vscodeScheduleAsyncWork:r},"*")}}return t=>setTimeout(t)})();var ho=!!(de&&de.indexOf("Chrome")>=0),Ia=!!(de&&de.indexOf("Firefox")>=0),Ba=!!(!ho&&de&&de.indexOf("Safari")>=0),Va=!!(de&&de.indexOf("Edg/")>=0),qa=!!(de&&de.indexOf("Android")>=0);var nt,er=globalThis.vscode;if(typeof er<"u"&&typeof er.process<"u"){let t=er.process;nt={get platform(){return t.platform},get arch(){return t.arch},get env(){return t.env},cwd(){return t.cwd()}}}else typeof process<"u"&&typeof process?.versions?.node=="string"?nt={get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env.VSCODE_CWD||process.cwd()}}:nt={get platform(){return ze?"win32":fs?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};var _t=nt.cwd,jt=nt.env,ps=nt.platform;var fo=globalThis.performance.now.bind(globalThis.performance),rt=class t{static create(e){return new t(e)}constructor(e){this._now=e===!1?Date.now:fo,this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}};var mo=100,bs=6e4;function ws(){return!!jt.VSCODE_DEV}var Gt;(function(t){t.None=()=>ce.None;function e(C,N,A){return m(C,()=>{},0,void 0,N??!0,void 0,A)}t.defer=e;function n(C){return(N,A=null,k)=>{let E=!1,I;return I=C(z=>{if(!E)return I?I.dispose():E=!0,N.call(A,z)},null,k),E&&I.dispose(),I}}t.once=n;function r(C,N){return t.once(t.filter(C,N))}t.onceIf=r;function s(C,N,A){return f((k,E=null,I)=>C(z=>k.call(E,N(z)),null,I),A)}t.map=s;function i(C,N,A){return f((k,E=null,I)=>C(z=>{N(z),k.call(E,z)},null,I),A)}t.forEach=i;function a(C,N,A){return f((k,E=null,I)=>C(z=>N(z)&&k.call(E,z),null,I),A)}t.filter=a;function l(C){return C}t.signal=l;function u(...C){return(N,A=null,k)=>{let E=ls(...C.map(I=>I(z=>N.call(A,z))));return h(E,k)}}t.any=u;function c(C,N,A,k){let E=A;return s(C,I=>(E=N(E,I),E),k)}t.reduce=c;function f(C,N){let A,k={onWillAddFirstListener(){A=C(E.fire,E)},onDidRemoveLastListener(){A?.dispose()}},E=new te(k);return N?.add(E),E.event}function h(C,N){return N instanceof Array?N.push(C):N&&N.add(C),C}function m(C,N,A=100,k=!1,E=!1,I,z){let K,G,re,ee=0,oe,Ue={leakWarningThreshold:I,onWillAddFirstListener(){K=C(K1=>{ee++,G=N(G,K1),k&&!re&&(Ke.fire(G),G=void 0),oe=()=>{let eo=G;G=void 0,re=void 0,(!k||ee>1)&&Ke.fire(eo),ee=0},typeof A=="number"?(re&&clearTimeout(re),re=setTimeout(oe,A)):re===void 0&&(re=null,queueMicrotask(oe))})},onWillRemoveListener(){E&&ee>0&&oe?.()},onDidRemoveLastListener(){oe=void 0,K.dispose()}},Ke=new te(Ue);return z?.add(Ke),Ke.event}t.debounce=m;function b(C,N=0,A,k){return t.debounce(C,(E,I)=>E?(E.push(I),E):[I],N,void 0,A??!0,void 0,k)}t.accumulate=b;function g(C,N,A=100,k=!0,E=!0,I,z){let K,G,re,ee=0,oe={leakWarningThreshold:I,onWillAddFirstListener(){K=C(Ke=>{ee++,G=N(G,Ke),re===void 0&&(k&&(Ue.fire(G),G=void 0,ee=0),typeof A=="number"?re=setTimeout(()=>{E&&ee>0&&Ue.fire(G),G=void 0,re=void 0,ee=0},A):(re=0,queueMicrotask(()=>{E&&ee>0&&Ue.fire(G),G=void 0,re=void 0,ee=0})))})},onDidRemoveLastListener(){K.dispose()}},Ue=new te(oe);return z?.add(Ue),Ue.event}t.throttle=g;function d(C,N=(k,E)=>k===E,A){let k=!0,E;return a(C,I=>{let z=k||!N(I,E);return k=!1,E=I,z},A)}t.latch=d;function w(C,N,A){return[t.filter(C,N,A),t.filter(C,k=>!N(k),A)]}t.split=w;function L(C,N,A=!1,k=[],E){let I=k.slice(),z;ws()&&(z={stack:Xt.create(),timerId:setTimeout(()=>{I&&I.length>0&&z&&!z.warned&&(z.warned=!0,console.warn(`[Event.buffer][${N}] potential LEAK detected: ${I.length} events buffered for ${bs/1e3}s without being consumed. Buffered here:`),z.stack.print())},bs),warned:!1},E&&E.add(_e(()=>clearTimeout(z.timerId))));let K=()=>{z&&clearTimeout(z.timerId)},G=C(oe=>{I?(I.push(oe),ws()&&z&&!z.warned&&I.length>=mo&&(z.warned=!0,console.warn(`[Event.buffer][${N}] potential LEAK detected: ${I.length} events buffered without being consumed. Buffered here:`),z.stack.print())):ee.fire(oe)});E&&E.add(G);let re=()=>{I?.forEach(oe=>ee.fire(oe)),I=null,K()},ee=new te({onWillAddFirstListener(){G||(G=C(oe=>ee.fire(oe)),E&&E.add(G))},onDidAddFirstListener(){I&&(A?setTimeout(re):re())},onDidRemoveLastListener(){G&&G.dispose(),G=null,K()}});return E&&E.add(ee),ee.event}t.buffer=L;function v(C,N){return(k,E,I)=>{let z=N(new M);return C(function(K){let G=z.evaluate(K);G!==y&&k.call(E,G)},void 0,I)}}t.chain=v;let y=Symbol("HaltChainable");class M{constructor(){this.steps=[]}map(N){return this.steps.push(N),this}forEach(N){return this.steps.push(A=>(N(A),A)),this}filter(N){return this.steps.push(A=>N(A)?A:y),this}reduce(N,A){let k=A;return this.steps.push(E=>(k=N(k,E),k)),this}latch(N=(A,k)=>A===k){let A=!0,k;return this.steps.push(E=>{let I=A||!N(E,k);return A=!1,k=E,I?E:y}),this}evaluate(N){for(let A of this.steps)if(N=A(N),N===y)break;return N}}function D(C,N,A=k=>k){let k=(...K)=>z.fire(A(...K)),E=()=>C.on(N,k),I=()=>C.removeListener(N,k),z=new te({onWillAddFirstListener:E,onDidRemoveLastListener:I});return z.event}t.fromNodeEventEmitter=D;function $(C,N,A=k=>k){let k=(...K)=>z.fire(A(...K)),E=()=>C.addEventListener(N,k),I=()=>C.removeEventListener(N,k),z=new te({onWillAddFirstListener:E,onDidRemoveLastListener:I});return z.event}t.fromDOMEventEmitter=$;function x(C,N){let A,k,E=new Promise(I=>{k=n(C)(I),ir(k,N),A=()=>{xs(k,N)}});return E.cancel=A,N&&E.finally(()=>xs(k,N)),E}t.toPromise=x;function _(C,N){return C(A=>N.fire(A))}t.forward=_;function S(C,N,A){return N(A),C(k=>N(k))}t.runAndSubscribe=S;class V{constructor(N,A){this._observable=N,this._counter=0,this._hasChanged=!1;let k={onWillAddFirstListener:()=>{N.addObserver(this),this._observable.reportChanges()},onDidRemoveLastListener:()=>{N.removeObserver(this)}};this.emitter=new te(k),A&&A.add(this.emitter)}beginUpdate(N){this._counter++}handlePossibleChange(N){}handleChange(N,A){this._hasChanged=!0}endUpdate(N){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function W(C,N){return new V(C,N).emitter.event}t.fromObservable=W;function q(C){return(N,A,k)=>{let E=0,I=!1,z={beginUpdate(){E++},endUpdate(){E--,E===0&&(C.reportChanges(),I&&(I=!1,N.call(A)))},handlePossibleChange(){},handleChange(){I=!0}};C.addObserver(z),C.reportChanges();let K={dispose(){C.removeObserver(z)}};return ir(K,k),K}}t.fromObservableLight=q})(Gt||(Gt={}));var tr=class t{static{this.all=new Set}static{this._idPool=0}constructor(e){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${e}_${t._idPool++}`,t.all.add(this)}start(e){this._stopWatch=new rt,this.listenerCount=e}stop(){if(this._stopWatch){let e=this._stopWatch.elapsed();this.durations.push(e),this.elapsedOverall+=e,this.invocationCount+=1,this._stopWatch=void 0}}},go=-1,nr=class t{static{this._idPool=1}constructor(e,n,r=(t._idPool++).toString(16).padStart(3,"0")){this._errorHandler=e,this.threshold=n,this.name=r,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(e,n){let r=this.threshold;if(r<=0||n.3?"dominated":"popular",f=new Qt(c,u,i,n,l);this._errorHandler(f)}return()=>{let i=this._stacks.get(e.value)||0;this._stacks.set(e.value,i-1)}}getMostFrequentStack(){if(!this._stacks)return;let e,n=0;for(let[r,s]of this._stacks)(!e||n{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let l=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(l);let u=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],c=u[1]/this._size>.3?"dominated":"popular",f=new rr(c,`${l}. HINT: Stack shows most frequent listener (${u[1]}-times)`,u[0],this._size,this._options?.leakWarningName);return(this._options?.onListenerError||We)(f),ce.None}if(this._disposed)return ce.None;n&&(e=e.bind(n));let s=new yt(e),i;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(s.stack=Xt.create(),i=this._leakageMon.check(s.stack,this._size+1)),this._listeners?this._listeners instanceof yt?(this._deliveryQueue??=new sr,this._listeners=[this._listeners,s]):this._listeners.push(s):(this._options?.onWillAddFirstListener?.(this),this._listeners=s,this._options?.onDidAddFirstListener?.(this)),this._options?.onDidAddListener?.(this),this._size++;let a=_e(()=>{i?.(),this._removeListener(s)});return ir(a,r),a},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let n=this._listeners,r=n.indexOf(e);if(r===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,n[r]=void 0;let s=this._deliveryQueue.current===this;if(this._size*po<=n.length){let i=0;for(let a=0;a0}};var sr=class{constructor(){this.i=-1,this.end=0}enqueue(e,n,r){this.i=0,this.end=r,this.current=e,this.value=n}reset(){this.i=this.end,this.current=void 0,this.value=void 0}};function ir(t,e){e instanceof Oe?e.add(t):Array.isArray(e)&&e.push(t)}function xs(t,e){if(e instanceof Oe)e.delete(t);else if(Array.isArray(e)){let n=e.indexOf(t);n!==-1&&e.splice(n,1)}t.dispose()}function bo(t){return t}var Jt=class{constructor(e,n){this.lastCache=void 0,this.lastArgKey=void 0,typeof e=="function"?(this._fn=e,this._computeKey=bo):(this._fn=n,this._computeKey=e.getCacheKey)}get(e){let n=this._computeKey(e);return this.lastArgKey!==n&&(this.lastArgKey=n,this.lastCache=this._fn(e)),this.lastCache}};var He;(function(t){t[t.Uninitialized=0]="Uninitialized",t[t.Running=1]="Running",t[t.Completed=2]="Completed"})(He||(He={}));var Me=class{constructor(e){this.executor=e,this._state=He.Uninitialized}get value(){if(this._state===He.Uninitialized){this._state=He.Running;try{this._value=this.executor()}catch(e){this._error=e}finally{this._state=He.Completed}}else if(this._state===He.Running)throw new Error("Cannot read the value of a lazy that is being initialized");if(this._error)throw this._error;return this._value}get rawValue(){return this._value}};function ys(t){return t.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function Ls(t){return t.source==="^"||t.source==="^$"||t.source==="$"||t.source==="^\\s*$"?!1:!!(t.exec("")&&t.lastIndex===0)}function vs(t){return t.split(/\r\n|\r|\n/)}function Ns(t){for(let e=0,n=t.length;e=0;n--){let r=t.charCodeAt(n);if(r!==32&&r!==9)return n}return-1}function or(t){return t>=65&&t<=90}function Lt(t,e){let n=Math.min(t.length,e.length),r;for(r=0;rn[3*s+1])s=2*s+1;else return n[3*s+2];return 0}};function xo(){return JSON.parse("[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,71101,5,71230,71230,7,71351,71351,5,71737,71738,5,72000,72000,7,72160,72160,5,72273,72278,5,72752,72758,5,72882,72883,5,73031,73031,5,73461,73462,7,94192,94193,7,119149,119149,7,121403,121452,5,122915,122916,5,126980,126980,14,127358,127359,14,127535,127535,14,127759,127759,14,127771,127771,14,127792,127793,14,127825,127867,14,127897,127899,14,127945,127945,14,127985,127986,14,128000,128007,14,128021,128021,14,128066,128100,14,128184,128235,14,128249,128252,14,128266,128276,14,128335,128335,14,128379,128390,14,128407,128419,14,128444,128444,14,128481,128481,14,128499,128499,14,128526,128526,14,128536,128536,14,128543,128543,14,128556,128556,14,128564,128564,14,128577,128580,14,128643,128645,14,128649,128649,14,128654,128654,14,128660,128660,14,128664,128664,14,128675,128675,14,128686,128689,14,128695,128696,14,128705,128709,14,128717,128719,14,128725,128725,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129009,129023,14,129160,129167,14,129296,129304,14,129320,129327,14,129340,129342,14,129356,129356,14,129388,129392,14,129399,129400,14,129404,129407,14,129432,129442,14,129454,129455,14,129473,129474,14,129485,129487,14,129648,129651,14,129659,129660,14,129671,129679,14,129709,129711,14,129728,129730,14,129751,129753,14,129776,129782,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2274,2274,1,2363,2363,7,2377,2380,7,2402,2403,5,2494,2494,5,2507,2508,7,2558,2558,5,2622,2624,7,2641,2641,5,2691,2691,7,2759,2760,5,2786,2787,5,2876,2876,5,2881,2884,5,2901,2902,5,3006,3006,5,3014,3016,7,3072,3072,5,3134,3136,5,3157,3158,5,3260,3260,5,3266,3266,5,3274,3275,7,3328,3329,5,3391,3392,7,3405,3405,5,3457,3457,5,3536,3537,7,3551,3551,5,3636,3642,5,3764,3772,5,3895,3895,5,3967,3967,7,3993,4028,5,4146,4151,5,4182,4183,7,4226,4226,5,4253,4253,5,4957,4959,5,5940,5940,7,6070,6070,7,6087,6088,7,6158,6158,4,6432,6434,5,6448,6449,7,6679,6680,5,6742,6742,5,6754,6754,5,6783,6783,5,6912,6915,5,6966,6970,5,6978,6978,5,7042,7042,7,7080,7081,5,7143,7143,7,7150,7150,7,7212,7219,5,7380,7392,5,7412,7412,5,8203,8203,4,8232,8232,4,8265,8265,14,8400,8412,5,8421,8432,5,8617,8618,14,9167,9167,14,9200,9200,14,9410,9410,14,9723,9726,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9774,14,9786,9786,14,9794,9794,14,9823,9823,14,9828,9828,14,9833,9850,14,9855,9855,14,9875,9875,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9935,9935,14,9939,9939,14,9962,9962,14,9972,9972,14,9978,9978,14,9986,9986,14,9997,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10133,10135,14,10548,10549,14,11093,11093,14,12330,12333,5,12441,12442,5,42608,42610,5,43010,43010,5,43045,43046,5,43188,43203,7,43302,43309,5,43392,43394,5,43446,43449,5,43493,43493,5,43571,43572,7,43597,43597,7,43703,43704,5,43756,43757,5,44003,44004,7,44009,44010,7,44033,44059,12,44089,44115,12,44145,44171,12,44201,44227,12,44257,44283,12,44313,44339,12,44369,44395,12,44425,44451,12,44481,44507,12,44537,44563,12,44593,44619,12,44649,44675,12,44705,44731,12,44761,44787,12,44817,44843,12,44873,44899,12,44929,44955,12,44985,45011,12,45041,45067,12,45097,45123,12,45153,45179,12,45209,45235,12,45265,45291,12,45321,45347,12,45377,45403,12,45433,45459,12,45489,45515,12,45545,45571,12,45601,45627,12,45657,45683,12,45713,45739,12,45769,45795,12,45825,45851,12,45881,45907,12,45937,45963,12,45993,46019,12,46049,46075,12,46105,46131,12,46161,46187,12,46217,46243,12,46273,46299,12,46329,46355,12,46385,46411,12,46441,46467,12,46497,46523,12,46553,46579,12,46609,46635,12,46665,46691,12,46721,46747,12,46777,46803,12,46833,46859,12,46889,46915,12,46945,46971,12,47001,47027,12,47057,47083,12,47113,47139,12,47169,47195,12,47225,47251,12,47281,47307,12,47337,47363,12,47393,47419,12,47449,47475,12,47505,47531,12,47561,47587,12,47617,47643,12,47673,47699,12,47729,47755,12,47785,47811,12,47841,47867,12,47897,47923,12,47953,47979,12,48009,48035,12,48065,48091,12,48121,48147,12,48177,48203,12,48233,48259,12,48289,48315,12,48345,48371,12,48401,48427,12,48457,48483,12,48513,48539,12,48569,48595,12,48625,48651,12,48681,48707,12,48737,48763,12,48793,48819,12,48849,48875,12,48905,48931,12,48961,48987,12,49017,49043,12,49073,49099,12,49129,49155,12,49185,49211,12,49241,49267,12,49297,49323,12,49353,49379,12,49409,49435,12,49465,49491,12,49521,49547,12,49577,49603,12,49633,49659,12,49689,49715,12,49745,49771,12,49801,49827,12,49857,49883,12,49913,49939,12,49969,49995,12,50025,50051,12,50081,50107,12,50137,50163,12,50193,50219,12,50249,50275,12,50305,50331,12,50361,50387,12,50417,50443,12,50473,50499,12,50529,50555,12,50585,50611,12,50641,50667,12,50697,50723,12,50753,50779,12,50809,50835,12,50865,50891,12,50921,50947,12,50977,51003,12,51033,51059,12,51089,51115,12,51145,51171,12,51201,51227,12,51257,51283,12,51313,51339,12,51369,51395,12,51425,51451,12,51481,51507,12,51537,51563,12,51593,51619,12,51649,51675,12,51705,51731,12,51761,51787,12,51817,51843,12,51873,51899,12,51929,51955,12,51985,52011,12,52041,52067,12,52097,52123,12,52153,52179,12,52209,52235,12,52265,52291,12,52321,52347,12,52377,52403,12,52433,52459,12,52489,52515,12,52545,52571,12,52601,52627,12,52657,52683,12,52713,52739,12,52769,52795,12,52825,52851,12,52881,52907,12,52937,52963,12,52993,53019,12,53049,53075,12,53105,53131,12,53161,53187,12,53217,53243,12,53273,53299,12,53329,53355,12,53385,53411,12,53441,53467,12,53497,53523,12,53553,53579,12,53609,53635,12,53665,53691,12,53721,53747,12,53777,53803,12,53833,53859,12,53889,53915,12,53945,53971,12,54001,54027,12,54057,54083,12,54113,54139,12,54169,54195,12,54225,54251,12,54281,54307,12,54337,54363,12,54393,54419,12,54449,54475,12,54505,54531,12,54561,54587,12,54617,54643,12,54673,54699,12,54729,54755,12,54785,54811,12,54841,54867,12,54897,54923,12,54953,54979,12,55009,55035,12,55065,55091,12,55121,55147,12,55177,55203,12,65024,65039,5,65520,65528,4,66422,66426,5,68152,68154,5,69291,69292,5,69633,69633,5,69747,69748,5,69811,69814,5,69826,69826,5,69932,69932,7,70016,70017,5,70079,70080,7,70095,70095,5,70196,70196,5,70367,70367,5,70402,70403,7,70464,70464,5,70487,70487,5,70709,70711,7,70725,70725,7,70833,70834,7,70843,70844,7,70849,70849,7,71090,71093,5,71103,71104,5,71227,71228,7,71339,71339,5,71344,71349,5,71458,71461,5,71727,71735,5,71985,71989,7,71998,71998,5,72002,72002,7,72154,72155,5,72193,72202,5,72251,72254,5,72281,72283,5,72344,72345,5,72766,72766,7,72874,72880,5,72885,72886,5,73023,73029,5,73104,73105,5,73111,73111,5,92912,92916,5,94095,94098,5,113824,113827,4,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,125252,125258,5,127183,127183,14,127340,127343,14,127377,127386,14,127491,127503,14,127548,127551,14,127744,127756,14,127761,127761,14,127769,127769,14,127773,127774,14,127780,127788,14,127796,127797,14,127820,127823,14,127869,127869,14,127894,127895,14,127902,127903,14,127943,127943,14,127947,127950,14,127972,127972,14,127988,127988,14,127992,127994,14,128009,128011,14,128019,128019,14,128023,128041,14,128064,128064,14,128102,128107,14,128174,128181,14,128238,128238,14,128246,128247,14,128254,128254,14,128264,128264,14,128278,128299,14,128329,128330,14,128348,128359,14,128371,128377,14,128392,128393,14,128401,128404,14,128421,128421,14,128433,128434,14,128450,128452,14,128476,128478,14,128483,128483,14,128495,128495,14,128506,128506,14,128519,128520,14,128528,128528,14,128534,128534,14,128538,128538,14,128540,128542,14,128544,128549,14,128552,128555,14,128557,128557,14,128560,128563,14,128565,128565,14,128567,128576,14,128581,128591,14,128641,128642,14,128646,128646,14,128648,128648,14,128650,128651,14,128653,128653,14,128655,128655,14,128657,128659,14,128661,128661,14,128663,128663,14,128665,128666,14,128674,128674,14,128676,128677,14,128679,128685,14,128690,128690,14,128694,128694,14,128697,128702,14,128704,128704,14,128710,128714,14,128716,128716,14,128720,128720,14,128723,128724,14,128726,128727,14,128733,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129008,129008,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129661,129663,14,129667,129670,14,129680,129685,14,129705,129708,14,129712,129718,14,129723,129727,14,129731,129733,14,129744,129750,14,129754,129759,14,129768,129775,14,129783,129791,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2192,2193,1,2250,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3132,3132,5,3137,3140,7,3146,3149,5,3170,3171,5,3202,3203,7,3262,3262,7,3264,3265,7,3267,3268,7,3271,3272,7,3276,3277,5,3298,3299,5,3330,3331,7,3390,3390,5,3393,3396,5,3402,3404,7,3406,3406,1,3426,3427,5,3458,3459,7,3535,3535,5,3538,3540,5,3544,3550,7,3570,3571,7,3635,3635,7,3655,3662,5,3763,3763,7,3784,3789,5,3893,3893,5,3897,3897,5,3953,3966,5,3968,3972,5,3981,3991,5,4038,4038,5,4145,4145,7,4153,4154,5,4157,4158,5,4184,4185,5,4209,4212,5,4228,4228,7,4237,4237,5,4352,4447,8,4520,4607,10,5906,5908,5,5938,5939,5,5970,5971,5,6068,6069,5,6071,6077,5,6086,6086,5,6089,6099,5,6155,6157,5,6159,6159,5,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6862,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7679,5,8204,8204,5,8206,8207,4,8233,8233,4,8252,8252,14,8288,8292,4,8294,8303,4,8413,8416,5,8418,8420,5,8482,8482,14,8596,8601,14,8986,8987,14,9096,9096,14,9193,9196,14,9199,9199,14,9201,9202,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9729,14,9732,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9775,9775,14,9784,9785,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9874,14,9876,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9934,14,9936,9936,14,9938,9938,14,9940,9940,14,9961,9961,14,9963,9967,14,9970,9971,14,9973,9973,14,9975,9977,14,9979,9980,14,9982,9985,14,9987,9988,14,9992,9996,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10083,14,10085,10087,14,10145,10145,14,10175,10175,14,11013,11015,14,11088,11088,14,11503,11505,5,11744,11775,5,12334,12335,5,12349,12349,14,12951,12951,14,42607,42607,5,42612,42621,5,42736,42737,5,43014,43014,5,43043,43044,7,43047,43047,7,43136,43137,7,43204,43205,5,43263,43263,5,43335,43345,5,43360,43388,8,43395,43395,7,43444,43445,7,43450,43451,7,43454,43456,7,43561,43566,5,43569,43570,5,43573,43574,5,43596,43596,5,43644,43644,5,43698,43700,5,43710,43711,5,43755,43755,7,43758,43759,7,43766,43766,5,44005,44005,5,44008,44008,5,44012,44012,7,44032,44032,11,44060,44060,11,44088,44088,11,44116,44116,11,44144,44144,11,44172,44172,11,44200,44200,11,44228,44228,11,44256,44256,11,44284,44284,11,44312,44312,11,44340,44340,11,44368,44368,11,44396,44396,11,44424,44424,11,44452,44452,11,44480,44480,11,44508,44508,11,44536,44536,11,44564,44564,11,44592,44592,11,44620,44620,11,44648,44648,11,44676,44676,11,44704,44704,11,44732,44732,11,44760,44760,11,44788,44788,11,44816,44816,11,44844,44844,11,44872,44872,11,44900,44900,11,44928,44928,11,44956,44956,11,44984,44984,11,45012,45012,11,45040,45040,11,45068,45068,11,45096,45096,11,45124,45124,11,45152,45152,11,45180,45180,11,45208,45208,11,45236,45236,11,45264,45264,11,45292,45292,11,45320,45320,11,45348,45348,11,45376,45376,11,45404,45404,11,45432,45432,11,45460,45460,11,45488,45488,11,45516,45516,11,45544,45544,11,45572,45572,11,45600,45600,11,45628,45628,11,45656,45656,11,45684,45684,11,45712,45712,11,45740,45740,11,45768,45768,11,45796,45796,11,45824,45824,11,45852,45852,11,45880,45880,11,45908,45908,11,45936,45936,11,45964,45964,11,45992,45992,11,46020,46020,11,46048,46048,11,46076,46076,11,46104,46104,11,46132,46132,11,46160,46160,11,46188,46188,11,46216,46216,11,46244,46244,11,46272,46272,11,46300,46300,11,46328,46328,11,46356,46356,11,46384,46384,11,46412,46412,11,46440,46440,11,46468,46468,11,46496,46496,11,46524,46524,11,46552,46552,11,46580,46580,11,46608,46608,11,46636,46636,11,46664,46664,11,46692,46692,11,46720,46720,11,46748,46748,11,46776,46776,11,46804,46804,11,46832,46832,11,46860,46860,11,46888,46888,11,46916,46916,11,46944,46944,11,46972,46972,11,47000,47000,11,47028,47028,11,47056,47056,11,47084,47084,11,47112,47112,11,47140,47140,11,47168,47168,11,47196,47196,11,47224,47224,11,47252,47252,11,47280,47280,11,47308,47308,11,47336,47336,11,47364,47364,11,47392,47392,11,47420,47420,11,47448,47448,11,47476,47476,11,47504,47504,11,47532,47532,11,47560,47560,11,47588,47588,11,47616,47616,11,47644,47644,11,47672,47672,11,47700,47700,11,47728,47728,11,47756,47756,11,47784,47784,11,47812,47812,11,47840,47840,11,47868,47868,11,47896,47896,11,47924,47924,11,47952,47952,11,47980,47980,11,48008,48008,11,48036,48036,11,48064,48064,11,48092,48092,11,48120,48120,11,48148,48148,11,48176,48176,11,48204,48204,11,48232,48232,11,48260,48260,11,48288,48288,11,48316,48316,11,48344,48344,11,48372,48372,11,48400,48400,11,48428,48428,11,48456,48456,11,48484,48484,11,48512,48512,11,48540,48540,11,48568,48568,11,48596,48596,11,48624,48624,11,48652,48652,11,48680,48680,11,48708,48708,11,48736,48736,11,48764,48764,11,48792,48792,11,48820,48820,11,48848,48848,11,48876,48876,11,48904,48904,11,48932,48932,11,48960,48960,11,48988,48988,11,49016,49016,11,49044,49044,11,49072,49072,11,49100,49100,11,49128,49128,11,49156,49156,11,49184,49184,11,49212,49212,11,49240,49240,11,49268,49268,11,49296,49296,11,49324,49324,11,49352,49352,11,49380,49380,11,49408,49408,11,49436,49436,11,49464,49464,11,49492,49492,11,49520,49520,11,49548,49548,11,49576,49576,11,49604,49604,11,49632,49632,11,49660,49660,11,49688,49688,11,49716,49716,11,49744,49744,11,49772,49772,11,49800,49800,11,49828,49828,11,49856,49856,11,49884,49884,11,49912,49912,11,49940,49940,11,49968,49968,11,49996,49996,11,50024,50024,11,50052,50052,11,50080,50080,11,50108,50108,11,50136,50136,11,50164,50164,11,50192,50192,11,50220,50220,11,50248,50248,11,50276,50276,11,50304,50304,11,50332,50332,11,50360,50360,11,50388,50388,11,50416,50416,11,50444,50444,11,50472,50472,11,50500,50500,11,50528,50528,11,50556,50556,11,50584,50584,11,50612,50612,11,50640,50640,11,50668,50668,11,50696,50696,11,50724,50724,11,50752,50752,11,50780,50780,11,50808,50808,11,50836,50836,11,50864,50864,11,50892,50892,11,50920,50920,11,50948,50948,11,50976,50976,11,51004,51004,11,51032,51032,11,51060,51060,11,51088,51088,11,51116,51116,11,51144,51144,11,51172,51172,11,51200,51200,11,51228,51228,11,51256,51256,11,51284,51284,11,51312,51312,11,51340,51340,11,51368,51368,11,51396,51396,11,51424,51424,11,51452,51452,11,51480,51480,11,51508,51508,11,51536,51536,11,51564,51564,11,51592,51592,11,51620,51620,11,51648,51648,11,51676,51676,11,51704,51704,11,51732,51732,11,51760,51760,11,51788,51788,11,51816,51816,11,51844,51844,11,51872,51872,11,51900,51900,11,51928,51928,11,51956,51956,11,51984,51984,11,52012,52012,11,52040,52040,11,52068,52068,11,52096,52096,11,52124,52124,11,52152,52152,11,52180,52180,11,52208,52208,11,52236,52236,11,52264,52264,11,52292,52292,11,52320,52320,11,52348,52348,11,52376,52376,11,52404,52404,11,52432,52432,11,52460,52460,11,52488,52488,11,52516,52516,11,52544,52544,11,52572,52572,11,52600,52600,11,52628,52628,11,52656,52656,11,52684,52684,11,52712,52712,11,52740,52740,11,52768,52768,11,52796,52796,11,52824,52824,11,52852,52852,11,52880,52880,11,52908,52908,11,52936,52936,11,52964,52964,11,52992,52992,11,53020,53020,11,53048,53048,11,53076,53076,11,53104,53104,11,53132,53132,11,53160,53160,11,53188,53188,11,53216,53216,11,53244,53244,11,53272,53272,11,53300,53300,11,53328,53328,11,53356,53356,11,53384,53384,11,53412,53412,11,53440,53440,11,53468,53468,11,53496,53496,11,53524,53524,11,53552,53552,11,53580,53580,11,53608,53608,11,53636,53636,11,53664,53664,11,53692,53692,11,53720,53720,11,53748,53748,11,53776,53776,11,53804,53804,11,53832,53832,11,53860,53860,11,53888,53888,11,53916,53916,11,53944,53944,11,53972,53972,11,54000,54000,11,54028,54028,11,54056,54056,11,54084,54084,11,54112,54112,11,54140,54140,11,54168,54168,11,54196,54196,11,54224,54224,11,54252,54252,11,54280,54280,11,54308,54308,11,54336,54336,11,54364,54364,11,54392,54392,11,54420,54420,11,54448,54448,11,54476,54476,11,54504,54504,11,54532,54532,11,54560,54560,11,54588,54588,11,54616,54616,11,54644,54644,11,54672,54672,11,54700,54700,11,54728,54728,11,54756,54756,11,54784,54784,11,54812,54812,11,54840,54840,11,54868,54868,11,54896,54896,11,54924,54924,11,54952,54952,11,54980,54980,11,55008,55008,11,55036,55036,11,55064,55064,11,55092,55092,11,55120,55120,11,55148,55148,11,55176,55176,11,55216,55238,9,64286,64286,5,65056,65071,5,65438,65439,5,65529,65531,4,66272,66272,5,68097,68099,5,68108,68111,5,68159,68159,5,68900,68903,5,69446,69456,5,69632,69632,7,69634,69634,7,69744,69744,5,69759,69761,5,69808,69810,7,69815,69816,7,69821,69821,1,69837,69837,1,69927,69931,5,69933,69940,5,70003,70003,5,70018,70018,7,70070,70078,5,70082,70083,1,70094,70094,7,70188,70190,7,70194,70195,7,70197,70197,7,70206,70206,5,70368,70370,7,70400,70401,5,70459,70460,5,70463,70463,7,70465,70468,7,70475,70477,7,70498,70499,7,70512,70516,5,70712,70719,5,70722,70724,5,70726,70726,5,70832,70832,5,70835,70840,5,70842,70842,5,70845,70845,5,70847,70848,5,70850,70851,5,71088,71089,7,71096,71099,7,71102,71102,7,71132,71133,5,71219,71226,5,71229,71229,5,71231,71232,5,71340,71340,7,71342,71343,7,71350,71350,7,71453,71455,5,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,118528,118573,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123566,123566,5,125136,125142,5,126976,126979,14,126981,127182,14,127184,127231,14,127279,127279,14,127344,127345,14,127374,127374,14,127405,127461,14,127489,127490,14,127514,127514,14,127538,127546,14,127561,127567,14,127570,127743,14,127757,127758,14,127760,127760,14,127762,127762,14,127766,127768,14,127770,127770,14,127772,127772,14,127775,127776,14,127778,127779,14,127789,127791,14,127794,127795,14,127798,127798,14,127819,127819,14,127824,127824,14,127868,127868,14,127870,127871,14,127892,127893,14,127896,127896,14,127900,127901,14,127904,127940,14,127942,127942,14,127944,127944,14,127946,127946,14,127951,127955,14,127968,127971,14,127973,127984,14,127987,127987,14,127989,127989,14,127991,127991,14,127995,127999,5,128008,128008,14,128012,128014,14,128017,128018,14,128020,128020,14,128022,128022,14,128042,128042,14,128063,128063,14,128065,128065,14,128101,128101,14,128108,128109,14,128173,128173,14,128182,128183,14,128236,128237,14,128239,128239,14,128245,128245,14,128248,128248,14,128253,128253,14,128255,128258,14,128260,128263,14,128265,128265,14,128277,128277,14,128300,128301,14,128326,128328,14,128331,128334,14,128336,128347,14,128360,128366,14,128369,128370,14,128378,128378,14,128391,128391,14,128394,128397,14,128400,128400,14,128405,128406,14,128420,128420,14,128422,128423,14,128425,128432,14,128435,128443,14,128445,128449,14,128453,128464,14,128468,128475,14,128479,128480,14,128482,128482,14,128484,128487,14,128489,128494,14,128496,128498,14,128500,128505,14,128507,128511,14,128513,128518,14,128521,128525,14,128527,128527,14,128529,128529,14,128533,128533,14,128535,128535,14,128537,128537,14]")}var st=class t{static{this.ambiguousCharacterData=new Me(()=>JSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,1523,96,8242,96,1370,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,118002,50,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,118003,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,118004,52,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,118005,53,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,118006,54,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,118007,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,118008,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,118009,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,117974,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,117975,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71913,67,71922,67,65315,67,8557,67,8450,67,8493,67,117976,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,117977,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,117978,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,117979,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,117980,71,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,117981,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,117983,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,117984,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,118001,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,117982,108,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,117985,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,117986,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,117987,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,118000,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,117988,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,117989,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,117990,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,117991,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,117992,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,117993,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,117994,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,117995,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71910,87,71919,87,117996,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,117997,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,117998,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,71909,90,66293,90,65338,90,8484,90,8488,90,117999,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65283,35,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],"_default":[160,32,8211,45,65374,126,8218,44,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"cs":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"es":[8211,45,65374,126,8218,44,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"fr":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"it":[160,32,8211,45,65374,126,8218,44,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"ja":[8211,45,8218,44,65281,33,8216,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65292,44,65297,49,65307,59],"ko":[8211,45,65374,126,8218,44,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"pt-BR":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"ru":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,8218,44,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"zh-hans":[160,32,65374,126,8218,44,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65297,49],"zh-hant":[8211,45,65374,126,8218,44,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89]}'))}static{this.cache=new Jt(e=>{let n=e.split(",");function r(h){let m=new Map;for(let b=0;b!h.startsWith("_")&&Object.hasOwn(a,h));l.length===0&&(l=["_default"]);let u;for(let h of l){let m=r(a[h]);u=i(u,m)}let c=r(a._common),f=s(c,u);return new t(f)})}static getInstance(e){return t.cache.get(Array.from(e).join(","))}static{this._locales=new Me(()=>Object.keys(t.ambiguousCharacterData.value).filter(e=>!e.startsWith("_")))}static getLocales(){return t._locales.value}constructor(e){this.confusableDictionary=e}isAmbiguous(e){return this.confusableDictionary.has(e)}getPrimaryConfusable(e){return this.confusableDictionary.get(e)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}},it=class t{static getRawData(){return JSON.parse('{"_common":[11,12,13,127,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999],"cs":[173,8203,12288],"de":[173,8203,12288],"es":[8203,12288],"fr":[173,8203,12288],"it":[160,173,12288],"ja":[173],"ko":[173,12288],"pl":[173,8203,12288],"pt-BR":[173,8203,12288],"qps-ploc":[160,173,8203,12288],"ru":[173,12288],"tr":[160,173,8203,12288],"zh-hans":[160,173,8203,12288],"zh-hant":[173,12288]}')}static{this._data=void 0}static getData(){return this._data||(this._data=new Set([...Object.values(t.getRawData())].flat())),this._data}static isInvisibleCharacter(e){return t.getData().has(e)}static get codePoints(){return t.getData()}};var lr="default",_o="$initialize";var ur=class{constructor(e,n,r,s,i){this.vsWorker=e,this.req=n,this.channel=r,this.method=s,this.args=i,this.type=0}},Zt=class{constructor(e,n,r,s){this.vsWorker=e,this.seq=n,this.res=r,this.err=s,this.type=1}},cr=class{constructor(e,n,r,s,i){this.vsWorker=e,this.req=n,this.channel=r,this.eventName=s,this.arg=i,this.type=2}},hr=class{constructor(e,n,r){this.vsWorker=e,this.req=n,this.event=r,this.type=3}},fr=class{constructor(e,n){this.vsWorker=e,this.req=n,this.type=4}},mr=class{constructor(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(e){this._workerId=e}async sendMessage(e,n,r){let s=String(++this._lastSentReq);return new Promise((i,a)=>{this._pendingReplies[s]={resolve:i,reject:a},this._send(new ur(this._workerId,s,e,n,r))})}listen(e,n,r){let s=null,i=new te({onWillAddFirstListener:()=>{s=String(++this._lastSentReq),this._pendingEmitters.set(s,i),this._send(new cr(this._workerId,s,e,n,r))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(s),this._send(new fr(this._workerId,s)),s=null}});return i.event}handleMessage(e){!e||!e.vsWorker||this._workerId!==-1&&e.vsWorker!==this._workerId||this._handleMessage(e)}createProxyToRemoteChannel(e,n){let r={get:(s,i)=>(typeof i=="string"&&!s[i]&&(Es(i)?s[i]=a=>this.listen(e,i,a):As(i)?s[i]=this.listen(e,i,void 0):i.charCodeAt(0)===36&&(s[i]=async(...a)=>(await n?.(),this.sendMessage(e,i,a)))),s[i])};return new Proxy(Object.create(null),r)}_handleMessage(e){switch(e.type){case 1:return this._handleReplyMessage(e);case 0:return this._handleRequestMessage(e);case 2:return this._handleSubscribeEventMessage(e);case 3:return this._handleEventMessage(e);case 4:return this._handleUnsubscribeEventMessage(e)}}_handleReplyMessage(e){if(!this._pendingReplies[e.seq]){console.warn("Got reply to unknown seq");return}let n=this._pendingReplies[e.seq];if(delete this._pendingReplies[e.seq],e.err){let r=e.err;if(e.err.$isError){let s=new Error;s.name=e.err.name,s.message=e.err.message,s.stack=e.err.stack,r=s}n.reject(r);return}n.resolve(e.res)}_handleRequestMessage(e){let n=e.req;this._handler.handleMessage(e.channel,e.method,e.args).then(s=>{this._send(new Zt(this._workerId,n,s,void 0))},s=>{s.detail instanceof Error&&(s.detail=Wt(s.detail)),this._send(new Zt(this._workerId,n,void 0,Wt(s)))})}_handleSubscribeEventMessage(e){let n=e.req,r=this._handler.handleEvent(e.channel,e.eventName,e.arg)(s=>{this._send(new hr(this._workerId,n,s))});this._pendingEvents.set(n,r)}_handleEventMessage(e){let n=this._pendingEmitters.get(e.req);if(n===void 0){console.warn("Got event for unknown req");return}n.fire(e.event)}_handleUnsubscribeEventMessage(e){let n=this._pendingEvents.get(e.req);if(n===void 0){console.warn("Got unsubscribe for unknown req");return}n.dispose(),this._pendingEvents.delete(e.req)}_send(e){let n=[];if(e.type===0)for(let r=0;r{e(r,s)},handleMessage:(r,s,i)=>this._handleMessage(r,s,i),handleEvent:(r,s,i)=>this._handleEvent(r,s,i)}),this.requestHandler=n(this)}onmessage(e){this._protocol.handleMessage(e)}_handleMessage(e,n,r){if(e===lr&&n===_o)return this.initialize(r[0]);let s=e===lr?this.requestHandler:this._localChannels.get(e);if(!s)return Promise.reject(new Error(`Missing channel ${e} on worker thread`));let i=s[n];if(typeof i!="function")return Promise.reject(new Error(`Missing method ${n} on worker thread channel ${e}`));try{return Promise.resolve(i.apply(s,r))}catch(a){return Promise.reject(a)}}_handleEvent(e,n,r){let s=e===lr?this.requestHandler:this._localChannels.get(e);if(!s)throw new Error(`Missing channel ${e} on worker thread`);if(Es(n)){let i=s[n];if(typeof i!="function")throw new Error(`Missing dynamic event ${n} on request handler.`);let a=i.call(s,r);if(typeof a!="function")throw new Error(`Missing dynamic event ${n} on request handler.`);return a}if(As(n)){let i=s[n];if(typeof i!="function")throw new Error(`Missing event ${n} on request handler.`);return i}throw new Error(`Malformed event name ${n}`)}getChannel(e){let n=this._remoteChannels.get(e);return n===void 0&&(n=this._protocol.createProxyToRemoteChannel(e),this._remoteChannels.set(e,n)),n}async initialize(e){this._protocol.setWorkerId(e)}};var Ms=!1;function ks(t){if(Ms)throw new Error("WebWorker already initialized!");Ms=!0;let e=new Kt(n=>globalThis.postMessage(n),n=>t(n));return globalThis.onmessage=n=>{e.onmessage(n.data)},e}var he=class{constructor(e,n,r,s){this.originalStart=e,this.originalLength=n,this.modifiedStart=r,this.modifiedLength=s}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}};var Ts=typeof Buffer<"u";new Me(()=>new Uint8Array(256));var dr,en=class t{static wrap(e){return Ts&&!Buffer.isBuffer(e)&&(e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)),new t(e)}constructor(e){this.buffer=e,this.byteLength=this.buffer.byteLength}toString(){return Ts?this.buffer.toString():(dr||(dr=new TextDecoder(void 0,{ignoreBOM:!0})),dr.decode(this.buffer))}};var Ps="0123456789abcdef";function Fs({buffer:t}){let e="";for(let n=0;n>>4],e+=Ps[r&15]}return e}function Ds(t,e){return(e<<5)-e+t|0}function Bs(t,e){e=Ds(149417,e);for(let n=0,r=t.length;n>>r)>>>0}function Nt(t,e=32){return t instanceof ArrayBuffer?Fs(en.wrap(new Uint8Array(t))):(t>>>0).toString(16).padStart(e/4,"0")}var Is=class t{static{this._bigBlock32=new DataView(new ArrayBuffer(320))}constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(e){let n=e.length;if(n===0)return;let r=this._buff,s=this._buffLen,i=this._leftoverHighSurrogate,a,l;for(i!==0?(a=i,l=-1,i=0):(a=e.charCodeAt(0),l=0);;){let u=a;if(ot(a))if(l+1>>6,e[n++]=128|(r&63)>>>0):r<65536?(e[n++]=224|(r&61440)>>>12,e[n++]=128|(r&4032)>>>6,e[n++]=128|(r&63)>>>0):(e[n++]=240|(r&1835008)>>>18,e[n++]=128|(r&258048)>>>12,e[n++]=128|(r&4032)>>>6,e[n++]=128|(r&63)>>>0),n>=64&&(this._step(),n-=64,this._totalLen+=64,e[0]=e[64],e[1]=e[65],e[2]=e[66]),n}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),Nt(this._h0)+Nt(this._h1)+Nt(this._h2)+Nt(this._h3)+Nt(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,this._buff.subarray(this._buffLen).fill(0),this._buffLen>56&&(this._step(),this._buff.fill(0));let e=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(e/4294967296),!1),this._buffDV.setUint32(60,e%4294967296,!1),this._step()}_step(){let e=t._bigBlock32,n=this._buffDV;for(let h=0;h<64;h+=4)e.setUint32(h,n.getUint32(h,!1),!1);for(let h=64;h<320;h+=4)e.setUint32(h,gr(e.getUint32(h-12,!1)^e.getUint32(h-32,!1)^e.getUint32(h-56,!1)^e.getUint32(h-64,!1),1),!1);let r=this._h0,s=this._h1,i=this._h2,a=this._h3,l=this._h4,u,c,f;for(let h=0;h<80;h++)h<20?(u=s&i|~s&a,c=1518500249):h<40?(u=s^i^a,c=1859775393):h<60?(u=s&i|s&a|i&a,c=2400959708):(u=s^i^a,c=3395469782),f=gr(r,5)+u+l+c+e.getUint32(h*4,!1)&4294967295,l=a,a=i,i=gr(s,30),s=r,r=f;this._h0=this._h0+r&4294967295,this._h1=this._h1+s&4294967295,this._h2=this._h2+i&4294967295,this._h3=this._h3+a&4294967295,this._h4=this._h4+l&4294967295}};var tn=class{constructor(e){this.source=e}getElements(){let e=this.source,n=new Int32Array(e.length);for(let r=0,s=e.length;r0||this.m_modifiedCount>0)&&this.m_changes.push(new he(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(e,n){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,n),this.m_originalCount++}AddModifiedElement(e,n){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,n),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}},St=class t{constructor(e,n,r=null){this.ContinueProcessingPredicate=r,this._originalSequence=e,this._modifiedSequence=n;let[s,i,a]=t._getElements(e),[l,u,c]=t._getElements(n);this._hasStrings=a&&c,this._originalStringElements=s,this._originalElementsOrHash=i,this._modifiedStringElements=l,this._modifiedElementsOrHash=u,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(e){return e.length>0&&typeof e[0]=="string"}static _getElements(e){let n=e.getElements();if(t._isStringArray(n)){let r=new Int32Array(n.length);for(let s=0,i=n.length;s=e&&s>=r&&this.ElementsAreEqual(n,s);)n--,s--;if(e>n||r>s){let h;return r<=s?(ke.Assert(e===n+1,"originalStart should only be one more than originalEnd"),h=[new he(e,0,r,s-r+1)]):e<=n?(ke.Assert(r===s+1,"modifiedStart should only be one more than modifiedEnd"),h=[new he(e,n-e+1,r,0)]):(ke.Assert(e===n+1,"originalStart should only be one more than originalEnd"),ke.Assert(r===s+1,"modifiedStart should only be one more than modifiedEnd"),h=[]),h}let a=[0],l=[0],u=this.ComputeRecursionPoint(e,n,r,s,a,l,i),c=a[0],f=l[0];if(u!==null)return u;if(!i[0]){let h=this.ComputeDiffRecursive(e,c,r,f,i),m=[];return i[0]?m=[new he(c+1,n-(c+1)+1,f+1,s-(f+1)+1)]:m=this.ComputeDiffRecursive(c+1,n,f+1,s,i),this.ConcatenateChanges(h,m)}return[new he(e,n-e+1,r,s-r+1)]}WALKTRACE(e,n,r,s,i,a,l,u,c,f,h,m,b,g,d,w,L,v){let y=null,M=null,D=new nn,$=n,x=r,_=b[0]-w[0]-s,S=-1073741824,V=this.m_forwardHistory.length-1;do{let W=_+e;W===$||W=0&&(c=this.m_forwardHistory[V],e=c[0],$=1,x=c.length-1)}while(--V>=-1);if(y=D.getReverseChanges(),v[0]){let W=b[0]+1,q=w[0]+1;if(y!==null&&y.length>0){let C=y[y.length-1];W=Math.max(W,C.getOriginalEnd()),q=Math.max(q,C.getModifiedEnd())}M=[new he(W,m-W+1,q,d-q+1)]}else{D=new nn,$=a,x=l,_=b[0]-w[0]-u,S=1073741824,V=L?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{let W=_+i;W===$||W=f[W+1]?(h=f[W+1]-1,g=h-_-u,h>S&&D.MarkNextChange(),S=h+1,D.AddOriginalElement(h+1,g+1),_=W+1-i):(h=f[W-1],g=h-_-u,h>S&&D.MarkNextChange(),S=h,D.AddModifiedElement(h+1,g+1),_=W-1-i),V>=0&&(f=this.m_reverseHistory[V],i=f[0],$=1,x=f.length-1)}while(--V>=-1);M=D.getChanges()}return this.ConcatenateChanges(y,M)}ComputeRecursionPoint(e,n,r,s,i,a,l){let u=0,c=0,f=0,h=0,m=0,b=0;e--,r--,i[0]=0,a[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];let g=n-e+(s-r),d=g+1,w=new Int32Array(d),L=new Int32Array(d),v=s-r,y=n-e,M=e-r,D=n-s,x=(y-v)%2===0;w[v]=e,L[y]=n,l[0]=!1;for(let _=1;_<=g/2+1;_++){let S=0,V=0;f=this.ClipDiagonalBound(v-_,_,v,d),h=this.ClipDiagonalBound(v+_,_,v,d);for(let q=f;q<=h;q+=2){q===f||qS+V&&(S=u,V=c),!x&&Math.abs(q-y)<=_-1&&u>=L[q])return i[0]=u,a[0]=c,C<=L[q]&&_<=1448?this.WALKTRACE(v,f,h,M,y,m,b,D,w,L,u,n,i,c,s,a,x,l):null}let W=(S-e+(V-r)-_)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(S,W))return l[0]=!0,i[0]=S,a[0]=V,W>0&&_<=1448?this.WALKTRACE(v,f,h,M,y,m,b,D,w,L,u,n,i,c,s,a,x,l):(e++,r++,[new he(e,n-e+1,r,s-r+1)]);m=this.ClipDiagonalBound(y-_,_,y,d),b=this.ClipDiagonalBound(y+_,_,y,d);for(let q=m;q<=b;q+=2){q===m||q=L[q+1]?u=L[q+1]-1:u=L[q-1],c=u-(q-y)-D;let C=u;for(;u>e&&c>r&&this.ElementsAreEqual(u,c);)u--,c--;if(L[q]=u,x&&Math.abs(q-v)<=_&&u<=w[q])return i[0]=u,a[0]=c,C>=w[q]&&_<=1448?this.WALKTRACE(v,f,h,M,y,m,b,D,w,L,u,n,i,c,s,a,x,l):null}if(_<=1447){let q=new Int32Array(h-f+2);q[0]=v-f+1,Te.Copy2(w,f,q,1,h-f+1),this.m_forwardHistory.push(q),q=new Int32Array(b-m+2),q[0]=y-m+1,Te.Copy2(L,m,q,1,b-m+1),this.m_reverseHistory.push(q)}}return this.WALKTRACE(v,f,h,M,y,m,b,D,w,L,u,n,i,c,s,a,x,l)}PrettifyChanges(e){for(let n=0;n0,l=r.modifiedLength>0;for(;r.originalStart+r.originalLength=0;n--){let r=e[n],s=0,i=0;if(n>0){let h=e[n-1];s=h.originalStart+h.originalLength,i=h.modifiedStart+h.modifiedLength}let a=r.originalLength>0,l=r.modifiedLength>0,u=0,c=this._boundaryScore(r.originalStart,r.originalLength,r.modifiedStart,r.modifiedLength);for(let h=1;;h++){let m=r.originalStart-h,b=r.modifiedStart-h;if(mc&&(c=d,u=h)}r.originalStart-=u,r.modifiedStart-=u;let f=[null];if(n>0&&this.ChangesOverlap(e[n-1],e[n],f)){e[n-1]=f[0],e.splice(n,1),n++;continue}}if(this._hasStrings)for(let n=1,r=e.length;n0&&b>u&&(u=b,c=h,f=m)}return u>0?[c,f]:null}_contiguousSequenceScore(e,n,r){let s=0;for(let i=0;i=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}_OriginalRegionIsBoundary(e,n){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(n>0){let r=e+n;if(this._OriginalIsBoundary(r-1)||this._OriginalIsBoundary(r))return!0}return!1}_ModifiedIsBoundary(e){return e<=0||e>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}_ModifiedRegionIsBoundary(e,n){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(n>0){let r=e+n;if(this._ModifiedIsBoundary(r-1)||this._ModifiedIsBoundary(r))return!0}return!1}_boundaryScore(e,n,r,s){let i=this._OriginalRegionIsBoundary(e,n)?1:0,a=this._ModifiedRegionIsBoundary(r,s)?1:0;return i+a}ConcatenateChanges(e,n){let r=[];if(e.length===0||n.length===0)return n.length>0?n:e;if(this.ChangesOverlap(e[e.length-1],n[0],r)){let s=new Array(e.length+n.length-1);return Te.Copy(e,0,s,0,e.length-1),s[e.length-1]=r[0],Te.Copy(n,1,s,e.length,n.length-1),s}else{let s=new Array(e.length+n.length);return Te.Copy(e,0,s,0,e.length),Te.Copy(n,0,s,e.length,n.length),s}}ChangesOverlap(e,n,r){if(ke.Assert(e.originalStart<=n.originalStart,"Left change is not less than or equal to right change"),ke.Assert(e.modifiedStart<=n.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=n.originalStart||e.modifiedStart+e.modifiedLength>=n.modifiedStart){let s=e.originalStart,i=e.originalLength,a=e.modifiedStart,l=e.modifiedLength;return e.originalStart+e.originalLength>=n.originalStart&&(i=n.originalStart+n.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=n.modifiedStart&&(l=n.modifiedStart+n.modifiedLength-e.modifiedStart),r[0]=new he(s,i,a,l),!0}else return r[0]=null,!1}ClipDiagonalBound(e,n,r,s){if(e>=0&&er||e===r&&n>s?(this.startLineNumber=r,this.startColumn=s,this.endLineNumber=e,this.endColumn=n):(this.startLineNumber=e,this.startColumn=n,this.endLineNumber=r,this.endColumn=s)}isEmpty(){return t.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return t.containsPosition(this,e)}static containsPosition(e,n){return!(n.lineNumbere.endLineNumber||n.lineNumber===e.startLineNumber&&n.columne.endColumn)}static strictContainsPosition(e,n){return!(n.lineNumbere.endLineNumber||n.lineNumber===e.startLineNumber&&n.column<=e.startColumn||n.lineNumber===e.endLineNumber&&n.column>=e.endColumn)}containsRange(e){return t.containsRange(this,e)}static containsRange(e,n){return!(n.startLineNumbere.endLineNumber||n.endLineNumber>e.endLineNumber||n.startLineNumber===e.startLineNumber&&n.startColumne.endColumn)}strictContainsRange(e){return t.strictContainsRange(this,e)}static strictContainsRange(e,n){return!(n.startLineNumbere.endLineNumber||n.endLineNumber>e.endLineNumber||n.startLineNumber===e.startLineNumber&&n.startColumn<=e.startColumn||n.endLineNumber===e.endLineNumber&&n.endColumn>=e.endColumn)}plusRange(e){return t.plusRange(this,e)}static plusRange(e,n){let r,s,i,a;return n.startLineNumbere.endLineNumber?(i=n.endLineNumber,a=n.endColumn):n.endLineNumber===e.endLineNumber?(i=n.endLineNumber,a=Math.max(n.endColumn,e.endColumn)):(i=e.endLineNumber,a=e.endColumn),new t(r,s,i,a)}intersectRanges(e){return t.intersectRanges(this,e)}static intersectRanges(e,n){let r=e.startLineNumber,s=e.startColumn,i=e.endLineNumber,a=e.endColumn,l=n.startLineNumber,u=n.startColumn,c=n.endLineNumber,f=n.endColumn;return rc?(i=c,a=f):i===c&&(a=Math.min(a,f)),r>i||r===i&&s>a?null:new t(r,s,i,a)}equalsRange(e){return t.equalsRange(this,e)}static equalsRange(e,n){return!e&&!n?!0:!!e&&!!n&&e.startLineNumber===n.startLineNumber&&e.startColumn===n.startColumn&&e.endLineNumber===n.endLineNumber&&e.endColumn===n.endColumn}getEndPosition(){return t.getEndPosition(this)}static getEndPosition(e){return new B(e.endLineNumber,e.endColumn)}getStartPosition(){return t.getStartPosition(this)}static getStartPosition(e){return new B(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,n){return new t(this.startLineNumber,this.startColumn,e,n)}setStartPosition(e,n){return new t(e,n,this.endLineNumber,this.endColumn)}collapseToStart(){return t.collapseToStart(this)}static collapseToStart(e){return new t(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}collapseToEnd(){return t.collapseToEnd(this)}static collapseToEnd(e){return new t(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn)}delta(e){return new t(this.startLineNumber+e,this.startColumn,this.endLineNumber+e,this.endColumn)}isSingleLine(){return this.startLineNumber===this.endLineNumber}static fromPositions(e,n=e){return new t(e.lineNumber,e.column,n.lineNumber,n.column)}static lift(e){return e?new t(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return!!e&&typeof e.startLineNumber=="number"&&typeof e.startColumn=="number"&&typeof e.endLineNumber=="number"&&typeof e.endColumn=="number"}static areIntersectingOrTouching(e,n){return!(e.endLineNumbere.startLineNumber}toJSON(){return this}};function pr(t){return t<0?0:t>255?255:t|0}function je(t){return t<0?0:t>4294967295?4294967295:t|0}var Rt=class t{constructor(e){let n=pr(e);this._defaultValue=n,this._asciiMap=t._createAsciiMap(n),this._map=new Map}static _createAsciiMap(e){let n=new Uint8Array(256);return n.fill(e),n}set(e,n){let r=pr(n);e>=0&&e<256?this._asciiMap[e]=r:this._map.set(e,r)}get(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}clear(){this._asciiMap.fill(this._defaultValue),this._map.clear()}};var wr=class{constructor(e,n,r){let s=new Uint8Array(e*n);for(let i=0,a=e*n;in&&(n=u),l>r&&(r=l),c>r&&(r=c)}n++,r++;let s=new wr(r,n,0);for(let i=0,a=e.length;i=this._maxCharCode?0:this._states.get(e,n)}},br=null;function yo(){return br===null&&(br=new xr([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),br}var Ct=null;function Lo(){if(Ct===null){Ct=new Rt(0);let t=` <>'"\u3001\u3002\uFF61\uFF64\uFF0C\uFF0E\uFF1A\uFF1B\u2018\u3008\u300C\u300E\u3014\uFF08\uFF3B\uFF5B\uFF62\uFF63\uFF5D\uFF3D\uFF09\u3015\u300F\u300D\u3009\u2019\uFF40\uFF5E\u2026|`;for(let n=0;ns);if(s>0){let l=n.charCodeAt(s-1),u=n.charCodeAt(a);(l===40&&u===41||l===91&&u===93||l===123&&u===125)&&a--}return{range:{startLineNumber:r,startColumn:s+1,endLineNumber:r,endColumn:a+2},url:n.substring(s,a+1)}}static computeLinks(e,n=yo()){let r=Lo(),s=[];for(let i=1,a=e.getLineCount();i<=a;i++){let l=e.getLineContent(i),u=l.length,c=0,f=0,h=0,m=1,b=!1,g=!1,d=!1,w=!1;for(;c=0?(s+=r?1:-1,s<0?s=e.length-1:s%=e.length,e[s]):null}};var Us=Object.freeze(function(t,e){let n=setTimeout(t.bind(e),0);return{dispose(){clearTimeout(n)}}}),sn;(function(t){function e(n){return n===t.None||n===t.Cancelled||n instanceof at?!0:!n||typeof n!="object"?!1:typeof n.isCancellationRequested=="boolean"&&typeof n.onCancellationRequested=="function"}t.isCancellationToken=e,t.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:Gt.None}),t.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Us})})(sn||(sn={}));var at=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?Us:(this._emitter||(this._emitter=new te),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}},At=class{constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new at),this._token}cancel(){this._token?this._token instanceof at&&this._token.cancel():this._token=sn.Cancelled}dispose(e=!1){e&&this.cancel(),this._parentListener?.dispose(),this._token?this._token instanceof at&&this._token.dispose():this._token=sn.None}};var Et=class{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,n){this._keyCodeToStr[e]=n,this._strToKeyCode[n.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}},on=new Et,yr=new Et,Lr=new Et,vo=new Array(230),No=Object.create(null),So=Object.create(null),Os=[];for(let t=0;t<=193;t++)Os[t]=-1;(function(){let e=[[1,0,"None",0,"unknown",0,"VK_UNKNOWN","",""],[1,1,"Hyper",0,"",0,"","",""],[1,2,"Super",0,"",0,"","",""],[1,3,"Fn",0,"",0,"","",""],[1,4,"FnLock",0,"",0,"","",""],[1,5,"Suspend",0,"",0,"","",""],[1,6,"Resume",0,"",0,"","",""],[1,7,"Turbo",0,"",0,"","",""],[1,8,"Sleep",0,"",0,"VK_SLEEP","",""],[1,9,"WakeUp",0,"",0,"","",""],[0,10,"KeyA",31,"A",65,"VK_A","",""],[0,11,"KeyB",32,"B",66,"VK_B","",""],[0,12,"KeyC",33,"C",67,"VK_C","",""],[0,13,"KeyD",34,"D",68,"VK_D","",""],[0,14,"KeyE",35,"E",69,"VK_E","",""],[0,15,"KeyF",36,"F",70,"VK_F","",""],[0,16,"KeyG",37,"G",71,"VK_G","",""],[0,17,"KeyH",38,"H",72,"VK_H","",""],[0,18,"KeyI",39,"I",73,"VK_I","",""],[0,19,"KeyJ",40,"J",74,"VK_J","",""],[0,20,"KeyK",41,"K",75,"VK_K","",""],[0,21,"KeyL",42,"L",76,"VK_L","",""],[0,22,"KeyM",43,"M",77,"VK_M","",""],[0,23,"KeyN",44,"N",78,"VK_N","",""],[0,24,"KeyO",45,"O",79,"VK_O","",""],[0,25,"KeyP",46,"P",80,"VK_P","",""],[0,26,"KeyQ",47,"Q",81,"VK_Q","",""],[0,27,"KeyR",48,"R",82,"VK_R","",""],[0,28,"KeyS",49,"S",83,"VK_S","",""],[0,29,"KeyT",50,"T",84,"VK_T","",""],[0,30,"KeyU",51,"U",85,"VK_U","",""],[0,31,"KeyV",52,"V",86,"VK_V","",""],[0,32,"KeyW",53,"W",87,"VK_W","",""],[0,33,"KeyX",54,"X",88,"VK_X","",""],[0,34,"KeyY",55,"Y",89,"VK_Y","",""],[0,35,"KeyZ",56,"Z",90,"VK_Z","",""],[0,36,"Digit1",22,"1",49,"VK_1","",""],[0,37,"Digit2",23,"2",50,"VK_2","",""],[0,38,"Digit3",24,"3",51,"VK_3","",""],[0,39,"Digit4",25,"4",52,"VK_4","",""],[0,40,"Digit5",26,"5",53,"VK_5","",""],[0,41,"Digit6",27,"6",54,"VK_6","",""],[0,42,"Digit7",28,"7",55,"VK_7","",""],[0,43,"Digit8",29,"8",56,"VK_8","",""],[0,44,"Digit9",30,"9",57,"VK_9","",""],[0,45,"Digit0",21,"0",48,"VK_0","",""],[1,46,"Enter",3,"Enter",13,"VK_RETURN","",""],[1,47,"Escape",9,"Escape",27,"VK_ESCAPE","",""],[1,48,"Backspace",1,"Backspace",8,"VK_BACK","",""],[1,49,"Tab",2,"Tab",9,"VK_TAB","",""],[1,50,"Space",10,"Space",32,"VK_SPACE","",""],[0,51,"Minus",88,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[0,52,"Equal",86,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[0,53,"BracketLeft",92,"[",219,"VK_OEM_4","[","OEM_4"],[0,54,"BracketRight",94,"]",221,"VK_OEM_6","]","OEM_6"],[0,55,"Backslash",93,"\\",220,"VK_OEM_5","\\","OEM_5"],[0,56,"IntlHash",0,"",0,"","",""],[0,57,"Semicolon",85,";",186,"VK_OEM_1",";","OEM_1"],[0,58,"Quote",95,"'",222,"VK_OEM_7","'","OEM_7"],[0,59,"Backquote",91,"`",192,"VK_OEM_3","`","OEM_3"],[0,60,"Comma",87,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[0,61,"Period",89,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[0,62,"Slash",90,"/",191,"VK_OEM_2","/","OEM_2"],[1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL","",""],[1,64,"F1",59,"F1",112,"VK_F1","",""],[1,65,"F2",60,"F2",113,"VK_F2","",""],[1,66,"F3",61,"F3",114,"VK_F3","",""],[1,67,"F4",62,"F4",115,"VK_F4","",""],[1,68,"F5",63,"F5",116,"VK_F5","",""],[1,69,"F6",64,"F6",117,"VK_F6","",""],[1,70,"F7",65,"F7",118,"VK_F7","",""],[1,71,"F8",66,"F8",119,"VK_F8","",""],[1,72,"F9",67,"F9",120,"VK_F9","",""],[1,73,"F10",68,"F10",121,"VK_F10","",""],[1,74,"F11",69,"F11",122,"VK_F11","",""],[1,75,"F12",70,"F12",123,"VK_F12","",""],[1,76,"PrintScreen",0,"",0,"","",""],[1,77,"ScrollLock",84,"ScrollLock",145,"VK_SCROLL","",""],[1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE","",""],[1,79,"Insert",19,"Insert",45,"VK_INSERT","",""],[1,80,"Home",14,"Home",36,"VK_HOME","",""],[1,81,"PageUp",11,"PageUp",33,"VK_PRIOR","",""],[1,82,"Delete",20,"Del",46,"VK_DELETE","Delete",""],[1,83,"End",13,"End",35,"VK_END","",""],[1,84,"PageDown",12,"PageDown",34,"VK_NEXT","",""],[1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",""],[1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",""],[1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",""],[1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",""],[1,89,"NumLock",83,"NumLock",144,"VK_NUMLOCK","",""],[1,90,"NumpadDivide",113,"NumPad_Divide",111,"VK_DIVIDE","",""],[1,91,"NumpadMultiply",108,"NumPad_Multiply",106,"VK_MULTIPLY","",""],[1,92,"NumpadSubtract",111,"NumPad_Subtract",109,"VK_SUBTRACT","",""],[1,93,"NumpadAdd",109,"NumPad_Add",107,"VK_ADD","",""],[1,94,"NumpadEnter",3,"",0,"","",""],[1,95,"Numpad1",99,"NumPad1",97,"VK_NUMPAD1","",""],[1,96,"Numpad2",100,"NumPad2",98,"VK_NUMPAD2","",""],[1,97,"Numpad3",101,"NumPad3",99,"VK_NUMPAD3","",""],[1,98,"Numpad4",102,"NumPad4",100,"VK_NUMPAD4","",""],[1,99,"Numpad5",103,"NumPad5",101,"VK_NUMPAD5","",""],[1,100,"Numpad6",104,"NumPad6",102,"VK_NUMPAD6","",""],[1,101,"Numpad7",105,"NumPad7",103,"VK_NUMPAD7","",""],[1,102,"Numpad8",106,"NumPad8",104,"VK_NUMPAD8","",""],[1,103,"Numpad9",107,"NumPad9",105,"VK_NUMPAD9","",""],[1,104,"Numpad0",98,"NumPad0",96,"VK_NUMPAD0","",""],[1,105,"NumpadDecimal",112,"NumPad_Decimal",110,"VK_DECIMAL","",""],[0,106,"IntlBackslash",97,"OEM_102",226,"VK_OEM_102","",""],[1,107,"ContextMenu",58,"ContextMenu",93,"","",""],[1,108,"Power",0,"",0,"","",""],[1,109,"NumpadEqual",0,"",0,"","",""],[1,110,"F13",71,"F13",124,"VK_F13","",""],[1,111,"F14",72,"F14",125,"VK_F14","",""],[1,112,"F15",73,"F15",126,"VK_F15","",""],[1,113,"F16",74,"F16",127,"VK_F16","",""],[1,114,"F17",75,"F17",128,"VK_F17","",""],[1,115,"F18",76,"F18",129,"VK_F18","",""],[1,116,"F19",77,"F19",130,"VK_F19","",""],[1,117,"F20",78,"F20",131,"VK_F20","",""],[1,118,"F21",79,"F21",132,"VK_F21","",""],[1,119,"F22",80,"F22",133,"VK_F22","",""],[1,120,"F23",81,"F23",134,"VK_F23","",""],[1,121,"F24",82,"F24",135,"VK_F24","",""],[1,122,"Open",0,"",0,"","",""],[1,123,"Help",0,"",0,"","",""],[1,124,"Select",0,"",0,"","",""],[1,125,"Again",0,"",0,"","",""],[1,126,"Undo",0,"",0,"","",""],[1,127,"Cut",0,"",0,"","",""],[1,128,"Copy",0,"",0,"","",""],[1,129,"Paste",0,"",0,"","",""],[1,130,"Find",0,"",0,"","",""],[1,131,"AudioVolumeMute",117,"AudioVolumeMute",173,"VK_VOLUME_MUTE","",""],[1,132,"AudioVolumeUp",118,"AudioVolumeUp",175,"VK_VOLUME_UP","",""],[1,133,"AudioVolumeDown",119,"AudioVolumeDown",174,"VK_VOLUME_DOWN","",""],[1,134,"NumpadComma",110,"NumPad_Separator",108,"VK_SEPARATOR","",""],[0,135,"IntlRo",115,"ABNT_C1",193,"VK_ABNT_C1","",""],[1,136,"KanaMode",0,"",0,"","",""],[0,137,"IntlYen",0,"",0,"","",""],[1,138,"Convert",0,"",0,"","",""],[1,139,"NonConvert",0,"",0,"","",""],[1,140,"Lang1",0,"",0,"","",""],[1,141,"Lang2",0,"",0,"","",""],[1,142,"Lang3",0,"",0,"","",""],[1,143,"Lang4",0,"",0,"","",""],[1,144,"Lang5",0,"",0,"","",""],[1,145,"Abort",0,"",0,"","",""],[1,146,"Props",0,"",0,"","",""],[1,147,"NumpadParenLeft",0,"",0,"","",""],[1,148,"NumpadParenRight",0,"",0,"","",""],[1,149,"NumpadBackspace",0,"",0,"","",""],[1,150,"NumpadMemoryStore",0,"",0,"","",""],[1,151,"NumpadMemoryRecall",0,"",0,"","",""],[1,152,"NumpadMemoryClear",0,"",0,"","",""],[1,153,"NumpadMemoryAdd",0,"",0,"","",""],[1,154,"NumpadMemorySubtract",0,"",0,"","",""],[1,155,"NumpadClear",131,"Clear",12,"VK_CLEAR","",""],[1,156,"NumpadClearEntry",0,"",0,"","",""],[1,0,"",5,"Ctrl",17,"VK_CONTROL","",""],[1,0,"",4,"Shift",16,"VK_SHIFT","",""],[1,0,"",6,"Alt",18,"VK_MENU","",""],[1,0,"",57,"Meta",91,"VK_COMMAND","",""],[1,157,"ControlLeft",5,"",0,"VK_LCONTROL","",""],[1,158,"ShiftLeft",4,"",0,"VK_LSHIFT","",""],[1,159,"AltLeft",6,"",0,"VK_LMENU","",""],[1,160,"MetaLeft",57,"",0,"VK_LWIN","",""],[1,161,"ControlRight",5,"",0,"VK_RCONTROL","",""],[1,162,"ShiftRight",4,"",0,"VK_RSHIFT","",""],[1,163,"AltRight",6,"",0,"VK_RMENU","",""],[1,164,"MetaRight",57,"",0,"VK_RWIN","",""],[1,165,"BrightnessUp",0,"",0,"","",""],[1,166,"BrightnessDown",0,"",0,"","",""],[1,167,"MediaPlay",0,"",0,"","",""],[1,168,"MediaRecord",0,"",0,"","",""],[1,169,"MediaFastForward",0,"",0,"","",""],[1,170,"MediaRewind",0,"",0,"","",""],[1,171,"MediaTrackNext",124,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK","",""],[1,172,"MediaTrackPrevious",125,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK","",""],[1,173,"MediaStop",126,"MediaStop",178,"VK_MEDIA_STOP","",""],[1,174,"Eject",0,"",0,"","",""],[1,175,"MediaPlayPause",127,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE","",""],[1,176,"MediaSelect",128,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT","",""],[1,177,"LaunchMail",129,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL","",""],[1,178,"LaunchApp2",130,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2","",""],[1,179,"LaunchApp1",0,"",0,"VK_MEDIA_LAUNCH_APP1","",""],[1,180,"SelectTask",0,"",0,"","",""],[1,181,"LaunchScreenSaver",0,"",0,"","",""],[1,182,"BrowserSearch",120,"BrowserSearch",170,"VK_BROWSER_SEARCH","",""],[1,183,"BrowserHome",121,"BrowserHome",172,"VK_BROWSER_HOME","",""],[1,184,"BrowserBack",122,"BrowserBack",166,"VK_BROWSER_BACK","",""],[1,185,"BrowserForward",123,"BrowserForward",167,"VK_BROWSER_FORWARD","",""],[1,186,"BrowserStop",0,"",0,"VK_BROWSER_STOP","",""],[1,187,"BrowserRefresh",0,"",0,"VK_BROWSER_REFRESH","",""],[1,188,"BrowserFavorites",0,"",0,"VK_BROWSER_FAVORITES","",""],[1,189,"ZoomToggle",0,"",0,"","",""],[1,190,"MailReply",0,"",0,"","",""],[1,191,"MailForward",0,"",0,"","",""],[1,192,"MailSend",0,"",0,"","",""],[1,0,"",114,"KeyInComposition",229,"","",""],[1,0,"",116,"ABNT_C2",194,"VK_ABNT_C2","",""],[1,0,"",96,"OEM_8",223,"VK_OEM_8","",""],[1,0,"",0,"",0,"VK_KANA","",""],[1,0,"",0,"",0,"VK_HANGUL","",""],[1,0,"",0,"",0,"VK_JUNJA","",""],[1,0,"",0,"",0,"VK_FINAL","",""],[1,0,"",0,"",0,"VK_HANJA","",""],[1,0,"",0,"",0,"VK_KANJI","",""],[1,0,"",0,"",0,"VK_CONVERT","",""],[1,0,"",0,"",0,"VK_NONCONVERT","",""],[1,0,"",0,"",0,"VK_ACCEPT","",""],[1,0,"",0,"",0,"VK_MODECHANGE","",""],[1,0,"",0,"",0,"VK_SELECT","",""],[1,0,"",0,"",0,"VK_PRINT","",""],[1,0,"",0,"",0,"VK_EXECUTE","",""],[1,0,"",0,"",0,"VK_SNAPSHOT","",""],[1,0,"",0,"",0,"VK_HELP","",""],[1,0,"",0,"",0,"VK_APPS","",""],[1,0,"",0,"",0,"VK_PROCESSKEY","",""],[1,0,"",0,"",0,"VK_PACKET","",""],[1,0,"",0,"",0,"VK_DBE_SBCSCHAR","",""],[1,0,"",0,"",0,"VK_DBE_DBCSCHAR","",""],[1,0,"",0,"",0,"VK_ATTN","",""],[1,0,"",0,"",0,"VK_CRSEL","",""],[1,0,"",0,"",0,"VK_EXSEL","",""],[1,0,"",0,"",0,"VK_EREOF","",""],[1,0,"",0,"",0,"VK_PLAY","",""],[1,0,"",0,"",0,"VK_ZOOM","",""],[1,0,"",0,"",0,"VK_NONAME","",""],[1,0,"",0,"",0,"VK_PA1","",""],[1,0,"",0,"",0,"VK_OEM_CLEAR","",""]],n=[],r=[];for(let s of e){let[i,a,l,u,c,f,h,m,b]=s;if(r[a]||(r[a]=!0,No[l]=a,So[l.toLowerCase()]=a,i&&(Os[a]=u)),!n[u]){if(n[u]=!0,!c)throw new Error(`String representation missing for key code ${u} around scan code ${l}`);on.define(u,c),yr.define(u,m||c),Lr.define(u,b||m||c)}f&&(vo[f]=u)}})();var Ws;(function(t){function e(l){return on.keyCodeToStr(l)}t.toString=e;function n(l){return on.strToKeyCode(l)}t.fromString=n;function r(l){return yr.keyCodeToStr(l)}t.toUserSettingsUS=r;function s(l){return Lr.keyCodeToStr(l)}t.toUserSettingsGeneral=s;function i(l){return yr.strToKeyCode(l)||Lr.strToKeyCode(l)}t.fromUserSettings=i;function a(l){if(l>=98&&l<=113)return null;switch(l){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right";case 20:return"Delete"}return on.keyCodeToStr(l)}t.toElectronAccelerator=a})(Ws||(Ws={}));function $s(t,e){let n=(e&65535)<<16>>>0;return(t|n)>>>0}var Ro=65,Co=97,Ao=90,Eo=122,Ge=46,Y=47,le=92,ve=58,Mo=63,an=class extends Error{constructor(e,n,r){let s;typeof n=="string"&&n.indexOf("not ")===0?(s="must not be",n=n.replace(/^not /,"")):s="must be";let i=e.indexOf(".")!==-1?"property":"argument",a=`The "${e}" ${i} ${s} of type ${n}`;a+=`. Received type ${typeof r}`,super(a),this.code="ERR_INVALID_ARG_TYPE"}};function ko(t,e){if(t===null||typeof t!="object")throw new an(e,"Object",t)}function Q(t,e){if(typeof t!="string")throw new an(e,"string",t)}var Se=ps==="win32";function O(t){return t===Y||t===le}function vr(t){return t===Y}function Ne(t){return t>=Ro&&t<=Ao||t>=Co&&t<=Eo}function ln(t,e,n,r){let s="",i=0,a=-1,l=0,u=0;for(let c=0;c<=t.length;++c){if(c2){let f=s.lastIndexOf(n);f===-1?(s="",i=0):(s=s.slice(0,f),i=s.length-1-s.lastIndexOf(n)),a=c,l=0;continue}else if(s.length!==0){s="",i=0,a=c,l=0;continue}}e&&(s+=s.length>0?`${n}..`:"..",i=2)}else s.length>0?s+=`${n}${t.slice(a+1,c)}`:s=t.slice(a+1,c),i=c-a-1;a=c,l=0}else u===Ge&&l!==-1?++l:l=-1}return s}function To(t){return t?`${t[0]==="."?"":"."}${t}`:""}function zs(t,e){ko(e,"pathObject");let n=e.dir||e.root,r=e.base||`${e.name||""}${To(e.ext)}`;return n?n===e.root?`${n}${r}`:`${n}${t}${r}`:r}var ne={resolve(...t){let e="",n="",r=!1;for(let s=t.length-1;s>=-1;s--){let i;if(s>=0){if(i=t[s],Q(i,`paths[${s}]`),i.length===0)continue}else e.length===0?i=_t():(i=jt[`=${e}`]||_t(),(i===void 0||i.slice(0,2).toLowerCase()!==e.toLowerCase()&&i.charCodeAt(2)===le)&&(i=`${e}\\`));let a=i.length,l=0,u="",c=!1,f=i.charCodeAt(0);if(a===1)O(f)&&(l=1,c=!0);else if(O(f))if(c=!0,O(i.charCodeAt(1))){let h=2,m=h;for(;h2&&O(i.charCodeAt(2))&&(c=!0,l=3));if(u.length>0)if(e.length>0){if(u.toLowerCase()!==e.toLowerCase())continue}else e=u;if(r){if(e.length>0)break}else if(n=`${i.slice(l)}\\${n}`,r=c,c&&e.length>0)break}return n=ln(n,!r,"\\",O),r?`${e}\\${n}`:`${e}${n}`||"."},normalize(t){Q(t,"path");let e=t.length;if(e===0)return".";let n=0,r,s=!1,i=t.charCodeAt(0);if(e===1)return vr(i)?"\\":t;if(O(i))if(s=!0,O(t.charCodeAt(1))){let l=2,u=l;for(;l2&&O(t.charCodeAt(2))&&(s=!0,n=3));let a=n0&&O(t.charCodeAt(e-1))&&(a+="\\"),!s&&r===void 0&&t.includes(":")){if(a.length>=2&&Ne(a.charCodeAt(0))&&a.charCodeAt(1)===ve)return`.\\${a}`;let l=t.indexOf(":");do if(l===e-1||O(t.charCodeAt(l+1)))return`.\\${a}`;while((l=t.indexOf(":",l+1))!==-1)}return r===void 0?s?`\\${a}`:a:s?`${r}\\${a}`:`${r}${a}`},isAbsolute(t){Q(t,"path");let e=t.length;if(e===0)return!1;let n=t.charCodeAt(0);return O(n)||e>2&&Ne(n)&&t.charCodeAt(1)===ve&&O(t.charCodeAt(2))},join(...t){if(t.length===0)return".";let e,n;for(let i=0;i0&&(e===void 0?e=n=a:e+=`\\${a}`)}if(e===void 0)return".";let r=!0,s=0;if(typeof n=="string"&&O(n.charCodeAt(0))){++s;let i=n.length;i>1&&O(n.charCodeAt(1))&&(++s,i>2&&(O(n.charCodeAt(2))?++s:r=!1))}if(r){for(;s=2&&(e=`\\${e.slice(s)}`)}return ne.normalize(e)},relative(t,e){if(Q(t,"from"),Q(e,"to"),t===e)return"";let n=ne.resolve(t),r=ne.resolve(e);if(n===r||(t=n.toLowerCase(),e=r.toLowerCase(),t===e))return"";if(n.length!==t.length||r.length!==e.length){let g=n.split("\\"),d=r.split("\\");g[g.length-1]===""&&g.pop(),d[d.length-1]===""&&d.pop();let w=g.length,L=d.length,v=wv?d.slice(y).join("\\"):w>v?"..\\".repeat(w-1-y)+"..":"":"..\\".repeat(w-y)+d.slice(y).join("\\")}let s=0;for(;ss&&t.charCodeAt(i-1)===le;)i--;let a=i-s,l=0;for(;ll&&e.charCodeAt(u-1)===le;)u--;let c=u-l,f=af){if(e.charCodeAt(l+m)===le)return r.slice(l+m+1);if(m===2)return r.slice(l+m)}a>f&&(t.charCodeAt(s+m)===le?h=m:m===2&&(h=3)),h===-1&&(h=0)}let b="";for(m=s+h+1;m<=i;++m)(m===i||t.charCodeAt(m)===le)&&(b+=b.length===0?"..":"\\..");return l+=h,b.length>0?`${b}${r.slice(l,u)}`:(r.charCodeAt(l)===le&&++l,r.slice(l,u))},toNamespacedPath(t){if(typeof t!="string"||t.length===0)return t;let e=ne.resolve(t);if(e.length<=2)return t;if(e.charCodeAt(0)===le){if(e.charCodeAt(1)===le){let n=e.charCodeAt(2);if(n!==Mo&&n!==Ge)return`\\\\?\\UNC\\${e.slice(2)}`}}else if(Ne(e.charCodeAt(0))&&e.charCodeAt(1)===ve&&e.charCodeAt(2)===le)return`\\\\?\\${e}`;return e},dirname(t){Q(t,"path");let e=t.length;if(e===0)return".";let n=-1,r=0,s=t.charCodeAt(0);if(e===1)return O(s)?t:".";if(O(s)){if(n=r=1,O(t.charCodeAt(1))){let l=2,u=l;for(;l2&&O(t.charCodeAt(2))?3:2,r=n);let i=-1,a=!0;for(let l=e-1;l>=r;--l)if(O(t.charCodeAt(l))){if(!a){i=l;break}}else a=!1;if(i===-1){if(n===-1)return".";i=n}return t.slice(0,i)},basename(t,e){e!==void 0&&Q(e,"suffix"),Q(t,"path");let n=0,r=-1,s=!0,i;if(t.length>=2&&Ne(t.charCodeAt(0))&&t.charCodeAt(1)===ve&&(n=2),e!==void 0&&e.length>0&&e.length<=t.length){if(e===t)return"";let a=e.length-1,l=-1;for(i=t.length-1;i>=n;--i){let u=t.charCodeAt(i);if(O(u)){if(!s){n=i+1;break}}else l===-1&&(s=!1,l=i+1),a>=0&&(u===e.charCodeAt(a)?--a===-1&&(r=i):(a=-1,r=l))}return n===r?r=l:r===-1&&(r=t.length),t.slice(n,r)}for(i=t.length-1;i>=n;--i)if(O(t.charCodeAt(i))){if(!s){n=i+1;break}}else r===-1&&(s=!1,r=i+1);return r===-1?"":t.slice(n,r)},extname(t){Q(t,"path");let e=0,n=-1,r=0,s=-1,i=!0,a=0;t.length>=2&&t.charCodeAt(1)===ve&&Ne(t.charCodeAt(0))&&(e=r=2);for(let l=t.length-1;l>=e;--l){let u=t.charCodeAt(l);if(O(u)){if(!i){r=l+1;break}continue}s===-1&&(i=!1,s=l+1),u===Ge?n===-1?n=l:a!==1&&(a=1):n!==-1&&(a=-1)}return n===-1||s===-1||a===0||a===1&&n===s-1&&n===r+1?"":t.slice(n,s)},format:zs.bind(null,"\\"),parse(t){Q(t,"path");let e={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return e;let n=t.length,r=0,s=t.charCodeAt(0);if(n===1)return O(s)?(e.root=e.dir=t,e):(e.base=e.name=t,e);if(O(s)){if(r=1,O(t.charCodeAt(1))){let h=2,m=h;for(;h0&&(e.root=t.slice(0,r));let i=-1,a=r,l=-1,u=!0,c=t.length-1,f=0;for(;c>=r;--c){if(s=t.charCodeAt(c),O(s)){if(!u){a=c+1;break}continue}l===-1&&(u=!1,l=c+1),s===Ge?i===-1?i=c:f!==1&&(f=1):i!==-1&&(f=-1)}return l!==-1&&(i===-1||f===0||f===1&&i===l-1&&i===a+1?e.base=e.name=t.slice(a,l):(e.name=t.slice(a,i),e.base=t.slice(a,l),e.ext=t.slice(i,l))),a>0&&a!==r?e.dir=t.slice(0,a-1):e.dir=e.root,e},sep:"\\",delimiter:";",win32:null,posix:null},Po=(()=>{if(Se){let t=/\\/g;return()=>{let e=_t().replace(t,"/");return e.slice(e.indexOf("/"))}}return()=>_t()})(),Z={resolve(...t){let e="",n=!1;for(let r=t.length-1;r>=0&&!n;r--){let s=t[r];Q(s,`paths[${r}]`),s.length!==0&&(e=`${s}/${e}`,n=s.charCodeAt(0)===Y)}if(!n){let r=Po();e=`${r}/${e}`,n=r.charCodeAt(0)===Y}return e=ln(e,!n,"/",vr),n?`/${e}`:e.length>0?e:"."},normalize(t){if(Q(t,"path"),t.length===0)return".";let e=t.charCodeAt(0)===Y,n=t.charCodeAt(t.length-1)===Y;return t=ln(t,!e,"/",vr),t.length===0?e?"/":n?"./":".":(n&&(t+="/"),e?`/${t}`:t)},isAbsolute(t){return Q(t,"path"),t.length>0&&t.charCodeAt(0)===Y},join(...t){if(t.length===0)return".";let e=[];for(let n=0;n0&&e.push(r)}return e.length===0?".":Z.normalize(e.join("/"))},relative(t,e){if(Q(t,"from"),Q(e,"to"),t===e||(t=Z.resolve(t),e=Z.resolve(e),t===e))return"";let n=1,r=t.length,s=r-n,i=1,a=e.length-i,l=sl){if(e.charCodeAt(i+c)===Y)return e.slice(i+c+1);if(c===0)return e.slice(i+c)}else s>l&&(t.charCodeAt(n+c)===Y?u=c:c===0&&(u=0));let f="";for(c=n+u+1;c<=r;++c)(c===r||t.charCodeAt(c)===Y)&&(f+=f.length===0?"..":"/..");return`${f}${e.slice(i+u)}`},toNamespacedPath(t){return t},dirname(t){if(Q(t,"path"),t.length===0)return".";let e=t.charCodeAt(0)===Y,n=-1,r=!0;for(let s=t.length-1;s>=1;--s)if(t.charCodeAt(s)===Y){if(!r){n=s;break}}else r=!1;return n===-1?e?"/":".":e&&n===1?"//":t.slice(0,n)},basename(t,e){e!==void 0&&Q(e,"suffix"),Q(t,"path");let n=0,r=-1,s=!0,i;if(e!==void 0&&e.length>0&&e.length<=t.length){if(e===t)return"";let a=e.length-1,l=-1;for(i=t.length-1;i>=0;--i){let u=t.charCodeAt(i);if(u===Y){if(!s){n=i+1;break}}else l===-1&&(s=!1,l=i+1),a>=0&&(u===e.charCodeAt(a)?--a===-1&&(r=i):(a=-1,r=l))}return n===r?r=l:r===-1&&(r=t.length),t.slice(n,r)}for(i=t.length-1;i>=0;--i)if(t.charCodeAt(i)===Y){if(!s){n=i+1;break}}else r===-1&&(s=!1,r=i+1);return r===-1?"":t.slice(n,r)},extname(t){Q(t,"path");let e=-1,n=0,r=-1,s=!0,i=0;for(let a=t.length-1;a>=0;--a){let l=t[a];if(l==="/"){if(!s){n=a+1;break}continue}r===-1&&(s=!1,r=a+1),l==="."?e===-1?e=a:i!==1&&(i=1):e!==-1&&(i=-1)}return e===-1||r===-1||i===0||i===1&&e===r-1&&e===n+1?"":t.slice(e,r)},format:zs.bind(null,"/"),parse(t){Q(t,"path");let e={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return e;let n=t.charCodeAt(0)===Y,r;n?(e.root="/",r=1):r=0;let s=-1,i=0,a=-1,l=!0,u=t.length-1,c=0;for(;u>=r;--u){let f=t.charCodeAt(u);if(f===Y){if(!l){i=u+1;break}continue}a===-1&&(l=!1,a=u+1),f===Ge?s===-1?s=u:c!==1&&(c=1):s!==-1&&(c=-1)}if(a!==-1){let f=i===0&&n?1:i;s===-1||c===0||c===1&&s===a-1&&s===i+1?e.base=e.name=t.slice(f,a):(e.name=t.slice(f,s),e.base=t.slice(f,a),e.ext=t.slice(s,a))}return i>0?e.dir=t.slice(0,i-1):n&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};Z.win32=ne.win32=ne;Z.posix=ne.posix=Z;var Pl=Se?ne.normalize:Z.normalize,Hs=Se?ne.join:Z.join,Fl=Se?ne.resolve:Z.resolve,Dl=Se?ne.relative:Z.relative,Il=Se?ne.dirname:Z.dirname,Bl=Se?ne.basename:Z.basename,Vl=Se?ne.extname:Z.extname,ql=Se?ne.sep:Z.sep;var Fo=/^\w[\w\d+.-]*$/,Do=/^\//,Io=/^\/\//;function Bo(t,e){if(!t.scheme&&e)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${t.authority}", path: "${t.path}", query: "${t.query}", fragment: "${t.fragment}"}`);if(t.scheme&&!Fo.test(t.scheme)){let n=[...t.scheme.matchAll(/[^\w\d+.-]/gu)],r=n.length>0?` Found '${n[0][0]}' at index ${n[0].index} (${n.length} total)`:"";throw new Error(`[UriError]: Scheme contains illegal characters.${r} (len:${t.scheme.length})`)}if(t.path){if(t.authority){if(!Do.test(t.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(Io.test(t.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function Vo(t,e){return!t&&!e?"file":t}function qo(t,e){switch(t){case"https":case"http":case"file":e?e[0]!==fe&&(e=fe+e):e=fe;break}return e}var j="",fe="/",Uo=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,se=class t{static isUri(e){return e instanceof t?!0:!e||typeof e!="object"?!1:typeof e.authority=="string"&&typeof e.fragment=="string"&&typeof e.path=="string"&&typeof e.query=="string"&&typeof e.scheme=="string"&&typeof e.fsPath=="string"&&typeof e.with=="function"&&typeof e.toString=="function"}constructor(e,n,r,s,i,a=!1){typeof e=="object"?(this.scheme=e.scheme||j,this.authority=e.authority||j,this.path=e.path||j,this.query=e.query||j,this.fragment=e.fragment||j):(this.scheme=Vo(e,a),this.authority=n||j,this.path=qo(this.scheme,r||j),this.query=s||j,this.fragment=i||j,Bo(this,a))}get fsPath(){return Nr(this,!1)}with(e){if(!e)return this;let{scheme:n,authority:r,path:s,query:i,fragment:a}=e;return n===void 0?n=this.scheme:n===null&&(n=j),r===void 0?r=this.authority:r===null&&(r=j),s===void 0?s=this.path:s===null&&(s=j),i===void 0?i=this.query:i===null&&(i=j),a===void 0?a=this.fragment:a===null&&(a=j),n===this.scheme&&r===this.authority&&s===this.path&&i===this.query&&a===this.fragment?this:new Pe(n,r,s,i,a)}static parse(e,n=!1){let r=Uo.exec(e);return r?new Pe(r[2]||j,un(r[4]||j),un(r[5]||j),un(r[7]||j),un(r[9]||j),n):new Pe(j,j,j,j,j)}static file(e){let n=j;if(ze&&(e=e.replace(/\\/g,fe)),e[0]===fe&&e[1]===fe){let r=e.indexOf(fe,2);r===-1?(n=e.substring(2),e=fe):(n=e.substring(2,r),e=e.substring(r)||fe)}return new Pe("file",n,e,j,j)}static from(e,n){return new Pe(e.scheme,e.authority,e.path,e.query,e.fragment,n)}static joinPath(e,...n){if(!e.path)throw new Error(`[UriError]: cannot call joinPath on URI without path: ${e.toString()}`);let r;return ze&&e.scheme==="file"?r=t.file(ne.join(Nr(e,!0),...n)).path:r=Z.join(e.path,...n),e.with({path:r})}toString(e=!1){return Sr(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof t)return e;{let n=new Pe(e);return n._formatted=e.external??null,n._fsPath=e._sep===Xs?e.fsPath??null:null,n}}else return e}},Xs=ze?1:void 0,Pe=class extends se{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=Nr(this,!1)),this._fsPath}toString(e=!1){return e?Sr(this,!0):(this._formatted||(this._formatted=Sr(this,!1)),this._formatted)}toJSON(){let e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=Xs),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}},Qs={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function js(t,e,n){let r,s=-1;for(let i=0;i=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57||a===45||a===46||a===95||a===126||e&&a===47||n&&a===91||n&&a===93||n&&a===58)s!==-1&&(r+=encodeURIComponent(t.substring(s,i)),s=-1),r!==void 0&&(r+=t.charAt(i));else{r===void 0&&(r=t.substr(0,i));let l=Qs[a];l!==void 0?(s!==-1&&(r+=encodeURIComponent(t.substring(s,i)),s=-1),r+=l):s===-1&&(s=i)}}return s!==-1&&(r+=encodeURIComponent(t.substring(s))),r!==void 0?r:t}function Wo(t){let e;for(let n=0;n1&&t.scheme==="file"?n=`//${t.authority}${t.path}`:t.path.charCodeAt(0)===47&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&t.path.charCodeAt(2)===58?e?n=t.path.substr(1):n=t.path[1].toLowerCase()+t.path.substr(2):n=t.path,ze&&(n=n.replace(/\//g,"\\")),n}function Sr(t,e){let n=e?Wo:js,r="",{scheme:s,authority:i,path:a,query:l,fragment:u}=t;if(s&&(r+=s,r+=":"),(i||s==="file")&&(r+=fe,r+=fe),i){let c=i.indexOf("@");if(c!==-1){let f=i.substr(0,c);i=i.substr(c+1),c=f.lastIndexOf(":"),c===-1?r+=n(f,!1,!1):(r+=n(f.substr(0,c),!1,!1),r+=":",r+=n(f.substr(c+1),!1,!0)),r+="@"}i=i.toLowerCase(),c=i.lastIndexOf(":"),c===-1?r+=n(i,!1,!0):(r+=n(i.substr(0,c),!1,!0),r+=i.substr(c))}if(a){if(a.length>=3&&a.charCodeAt(0)===47&&a.charCodeAt(2)===58){let c=a.charCodeAt(1);c>=65&&c<=90&&(a=`/${String.fromCharCode(c+32)}:${a.substr(3)}`)}else if(a.length>=2&&a.charCodeAt(1)===58){let c=a.charCodeAt(0);c>=65&&c<=90&&(a=`${String.fromCharCode(c+32)}:${a.substr(2)}`)}r+=n(a,!0,!1)}return l&&(r+="?",r+=n(l,!1,!1)),u&&(r+="#",r+=e?u:js(u,!1,!1)),r}function Js(t){try{return decodeURIComponent(t)}catch{return t.length>3?t.substr(0,3)+Js(t.substr(3)):t}}var Gs=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function un(t){return t.match(Gs)?t.replace(Gs,e=>Js(e)):t}var cn=class t extends R{constructor(e,n,r,s){super(e,n,r,s),this.selectionStartLineNumber=e,this.selectionStartColumn=n,this.positionLineNumber=r,this.positionColumn=s}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(e){return t.selectionsEqual(this,e)}static selectionsEqual(e,n){return e.selectionStartLineNumber===n.selectionStartLineNumber&&e.selectionStartColumn===n.selectionStartColumn&&e.positionLineNumber===n.positionLineNumber&&e.positionColumn===n.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(e,n){return this.getDirection()===0?new t(this.startLineNumber,this.startColumn,e,n):new t(e,n,this.startLineNumber,this.startColumn)}getPosition(){return new B(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new B(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(e,n){return this.getDirection()===0?new t(e,n,this.endLineNumber,this.endColumn):new t(this.endLineNumber,this.endColumn,e,n)}static fromPositions(e,n=e){return new t(e.lineNumber,e.column,n.lineNumber,n.column)}static fromRange(e,n){return n===0?new t(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):new t(e.endLineNumber,e.endColumn,e.startLineNumber,e.startColumn)}static liftSelection(e){return new t(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)}static selectionsArrEqual(e,n){if(e&&!n||!e&&n)return!1;if(!e&&!n)return!0;if(e.length!==n.length)return!1;for(let r=0,s=e.length;r{this._tokenizationSupports.get(e)===n&&(this._tokenizationSupports.delete(e),this.handleChange([e]))})}get(e){return this._tokenizationSupports.get(e)||null}registerFactory(e,n){this._factories.get(e)?.dispose();let r=new Rr(this,e,n);return this._factories.set(e,r),_e(()=>{let s=this._factories.get(e);!s||s!==r||(this._factories.delete(e),s.dispose())})}async getOrCreate(e){let n=this.get(e);if(n)return n;let r=this._factories.get(e);return!r||r.isResolved?null:(await r.resolve(),this.get(e))}isResolved(e){if(this.get(e))return!0;let r=this._factories.get(e);return!!(!r||r.isResolved)}setColorMap(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Array.from(this._tokenizationSupports.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}},Rr=class extends ce{get isResolved(){return this._isResolved}constructor(e,n,r){super(),this._registry=e,this._languageId=n,this._factory=r,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}dispose(){this._isDisposed=!0,super.dispose()}async resolve(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise}async _create(){let e=await this._factory.tokenizationSupport;this._isResolved=!0,e&&!this._isDisposed&&this._register(this._registry.register(this._languageId,e))}};var fn=class{constructor(e,n,r){this.offset=e,this.type=n,this.language=r,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}};var Ks;(function(t){t[t.Increase=0]="Increase",t[t.Decrease=1]="Decrease"})(Ks||(Ks={}));var ei;(function(t){let e=new Map;e.set(0,T.symbolMethod),e.set(1,T.symbolFunction),e.set(2,T.symbolConstructor),e.set(3,T.symbolField),e.set(4,T.symbolVariable),e.set(5,T.symbolClass),e.set(6,T.symbolStruct),e.set(7,T.symbolInterface),e.set(8,T.symbolModule),e.set(9,T.symbolProperty),e.set(10,T.symbolEvent),e.set(11,T.symbolOperator),e.set(12,T.symbolUnit),e.set(13,T.symbolValue),e.set(15,T.symbolEnum),e.set(14,T.symbolConstant),e.set(15,T.symbolEnum),e.set(16,T.symbolEnumMember),e.set(17,T.symbolKeyword),e.set(28,T.symbolSnippet),e.set(18,T.symbolText),e.set(19,T.symbolColor),e.set(20,T.symbolFile),e.set(21,T.symbolReference),e.set(22,T.symbolCustomColor),e.set(23,T.symbolFolder),e.set(24,T.symbolTypeParameter),e.set(25,T.account),e.set(26,T.issues),e.set(27,T.tools);function n(a){let l=e.get(a);return l||(console.info("No codicon found for CompletionItemKind "+a),l=T.symbolProperty),l}t.toIcon=n;function r(a){switch(a){case 0:return P(763,"Method");case 1:return P(764,"Function");case 2:return P(765,"Constructor");case 3:return P(766,"Field");case 4:return P(767,"Variable");case 5:return P(768,"Class");case 6:return P(769,"Struct");case 7:return P(770,"Interface");case 8:return P(771,"Module");case 9:return P(772,"Property");case 10:return P(773,"Event");case 11:return P(774,"Operator");case 12:return P(775,"Unit");case 13:return P(776,"Value");case 14:return P(777,"Constant");case 15:return P(778,"Enum");case 16:return P(779,"Enum Member");case 17:return P(780,"Keyword");case 18:return P(781,"Text");case 19:return P(782,"Color");case 20:return P(783,"File");case 21:return P(784,"Reference");case 22:return P(785,"Custom Color");case 23:return P(786,"Folder");case 24:return P(787,"Type Parameter");case 25:return P(788,"User");case 26:return P(789,"Issue");case 27:return P(790,"Tool");case 28:return P(791,"Snippet");default:return""}}t.toLabel=r;let s=new Map;s.set("method",0),s.set("function",1),s.set("constructor",2),s.set("field",3),s.set("variable",4),s.set("class",5),s.set("struct",6),s.set("interface",7),s.set("module",8),s.set("property",9),s.set("event",10),s.set("operator",11),s.set("unit",12),s.set("value",13),s.set("constant",14),s.set("enum",15),s.set("enum-member",16),s.set("enumMember",16),s.set("keyword",17),s.set("snippet",28),s.set("text",18),s.set("color",19),s.set("file",20),s.set("reference",21),s.set("customcolor",22),s.set("folder",23),s.set("type-parameter",24),s.set("typeParameter",24),s.set("account",25),s.set("issue",26),s.set("tool",27);function i(a,l){let u=s.get(a);return typeof u>"u"&&!l&&(u=9),u}t.fromString=i})(ei||(ei={}));var ti;(function(t){t[t.Automatic=0]="Automatic",t[t.Explicit=1]="Explicit"})(ti||(ti={}));var ni;(function(t){t[t.Code=1]="Code",t[t.Label=2]="Label"})(ni||(ni={}));var ri;(function(t){t[t.Accepted=0]="Accepted",t[t.Rejected=1]="Rejected",t[t.Ignored=2]="Ignored"})(ri||(ri={}));var si;(function(t){t[t.Automatic=0]="Automatic",t[t.PasteAs=1]="PasteAs"})(si||(si={}));var ii;(function(t){t[t.Invoke=1]="Invoke",t[t.TriggerCharacter=2]="TriggerCharacter",t[t.ContentChange=3]="ContentChange"})(ii||(ii={}));var oi;(function(t){t[t.Text=0]="Text",t[t.Read=1]="Read",t[t.Write=2]="Write"})(oi||(oi={}));var lu={17:P(792,"array"),16:P(793,"boolean"),4:P(794,"class"),13:P(795,"constant"),8:P(796,"constructor"),9:P(797,"enumeration"),21:P(798,"enumeration member"),23:P(799,"event"),7:P(800,"field"),0:P(801,"file"),11:P(802,"function"),10:P(803,"interface"),19:P(804,"key"),5:P(805,"method"),1:P(806,"module"),2:P(807,"namespace"),20:P(808,"null"),15:P(809,"number"),18:P(810,"object"),24:P(811,"operator"),3:P(812,"package"),6:P(813,"property"),14:P(814,"string"),22:P(815,"struct"),25:P(816,"type parameter"),12:P(817,"variable")};var ai;(function(t){let e=new Map;e.set(0,T.symbolFile),e.set(1,T.symbolModule),e.set(2,T.symbolNamespace),e.set(3,T.symbolPackage),e.set(4,T.symbolClass),e.set(5,T.symbolMethod),e.set(6,T.symbolProperty),e.set(7,T.symbolField),e.set(8,T.symbolConstructor),e.set(9,T.symbolEnum),e.set(10,T.symbolInterface),e.set(11,T.symbolFunction),e.set(12,T.symbolVariable),e.set(13,T.symbolConstant),e.set(14,T.symbolString),e.set(15,T.symbolNumber),e.set(16,T.symbolBoolean),e.set(17,T.symbolArray),e.set(18,T.symbolObject),e.set(19,T.symbolKey),e.set(20,T.symbolNull),e.set(21,T.symbolEnumMember),e.set(22,T.symbolStruct),e.set(23,T.symbolEvent),e.set(24,T.symbolOperator),e.set(25,T.symbolTypeParameter);function n(i){let a=e.get(i);return a||(console.info("No codicon found for SymbolKind "+i),a=T.symbolProperty),a}t.toIcon=n;let r=new Map;r.set(0,20),r.set(1,8),r.set(2,8),r.set(3,8),r.set(4,5),r.set(5,0),r.set(6,9),r.set(7,3),r.set(8,2),r.set(9,15),r.set(10,7),r.set(11,1),r.set(12,4),r.set(13,14),r.set(14,18),r.set(15,13),r.set(16,13),r.set(17,13),r.set(18,13),r.set(19,17),r.set(20,13),r.set(21,16),r.set(22,6),r.set(23,10),r.set(24,11),r.set(25,24);function s(i){let a=r.get(i);return a===void 0&&(console.info("No completion kind found for SymbolKind "+i),a=20),a}t.toCompletionKind=s})(ai||(ai={}));var li=class t{static{this.Comment=new t("comment")}static{this.Imports=new t("imports")}static{this.Region=new t("region")}static fromValue(e){switch(e){case"comment":return t.Comment;case"imports":return t.Imports;case"region":return t.Region}return new t(e)}constructor(e){this.value=e}},ui;(function(t){t[t.AIGenerated=1]="AIGenerated"})(ui||(ui={}));var ci;(function(t){t[t.Invoke=0]="Invoke",t[t.Automatic=1]="Automatic"})(ci||(ci={}));var hi;(function(t){function e(n){return!n||typeof n!="object"?!1:typeof n.id=="string"&&typeof n.title=="string"}t.is=e})(hi||(hi={}));var fi;(function(t){t[t.Type=1]="Type",t[t.Parameter=2]="Parameter"})(fi||(fi={}));var uu=new hn;var mi;(function(t){t[t.Unknown=0]="Unknown",t[t.Disabled=1]="Disabled",t[t.Enabled=2]="Enabled"})(mi||(mi={}));var di;(function(t){t[t.Invoke=1]="Invoke",t[t.Auto=2]="Auto"})(di||(di={}));var gi;(function(t){t[t.None=0]="None",t[t.KeepWhitespace=1]="KeepWhitespace",t[t.InsertAsSnippet=4]="InsertAsSnippet"})(gi||(gi={}));var pi;(function(t){t[t.Method=0]="Method",t[t.Function=1]="Function",t[t.Constructor=2]="Constructor",t[t.Field=3]="Field",t[t.Variable=4]="Variable",t[t.Class=5]="Class",t[t.Struct=6]="Struct",t[t.Interface=7]="Interface",t[t.Module=8]="Module",t[t.Property=9]="Property",t[t.Event=10]="Event",t[t.Operator=11]="Operator",t[t.Unit=12]="Unit",t[t.Value=13]="Value",t[t.Constant=14]="Constant",t[t.Enum=15]="Enum",t[t.EnumMember=16]="EnumMember",t[t.Keyword=17]="Keyword",t[t.Text=18]="Text",t[t.Color=19]="Color",t[t.File=20]="File",t[t.Reference=21]="Reference",t[t.Customcolor=22]="Customcolor",t[t.Folder=23]="Folder",t[t.TypeParameter=24]="TypeParameter",t[t.User=25]="User",t[t.Issue=26]="Issue",t[t.Tool=27]="Tool",t[t.Snippet=28]="Snippet"})(pi||(pi={}));var bi;(function(t){t[t.Deprecated=1]="Deprecated"})(bi||(bi={}));var wi;(function(t){t[t.Invoke=0]="Invoke",t[t.TriggerCharacter=1]="TriggerCharacter",t[t.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(wi||(wi={}));var xi;(function(t){t[t.EXACT=0]="EXACT",t[t.ABOVE=1]="ABOVE",t[t.BELOW=2]="BELOW"})(xi||(xi={}));var _i;(function(t){t[t.NotSet=0]="NotSet",t[t.ContentFlush=1]="ContentFlush",t[t.RecoverFromMarkers=2]="RecoverFromMarkers",t[t.Explicit=3]="Explicit",t[t.Paste=4]="Paste",t[t.Undo=5]="Undo",t[t.Redo=6]="Redo"})(_i||(_i={}));var yi;(function(t){t[t.LF=1]="LF",t[t.CRLF=2]="CRLF"})(yi||(yi={}));var Li;(function(t){t[t.Text=0]="Text",t[t.Read=1]="Read",t[t.Write=2]="Write"})(Li||(Li={}));var vi;(function(t){t[t.None=0]="None",t[t.Keep=1]="Keep",t[t.Brackets=2]="Brackets",t[t.Advanced=3]="Advanced",t[t.Full=4]="Full"})(vi||(vi={}));var Ni;(function(t){t[t.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",t[t.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",t[t.accessibilitySupport=2]="accessibilitySupport",t[t.accessibilityPageSize=3]="accessibilityPageSize",t[t.allowOverflow=4]="allowOverflow",t[t.allowVariableLineHeights=5]="allowVariableLineHeights",t[t.allowVariableFonts=6]="allowVariableFonts",t[t.allowVariableFontsInAccessibilityMode=7]="allowVariableFontsInAccessibilityMode",t[t.ariaLabel=8]="ariaLabel",t[t.ariaRequired=9]="ariaRequired",t[t.autoClosingBrackets=10]="autoClosingBrackets",t[t.autoClosingComments=11]="autoClosingComments",t[t.screenReaderAnnounceInlineSuggestion=12]="screenReaderAnnounceInlineSuggestion",t[t.autoClosingDelete=13]="autoClosingDelete",t[t.autoClosingOvertype=14]="autoClosingOvertype",t[t.autoClosingQuotes=15]="autoClosingQuotes",t[t.autoIndent=16]="autoIndent",t[t.autoIndentOnPaste=17]="autoIndentOnPaste",t[t.autoIndentOnPasteWithinString=18]="autoIndentOnPasteWithinString",t[t.automaticLayout=19]="automaticLayout",t[t.autoSurround=20]="autoSurround",t[t.bracketPairColorization=21]="bracketPairColorization",t[t.guides=22]="guides",t[t.codeLens=23]="codeLens",t[t.codeLensFontFamily=24]="codeLensFontFamily",t[t.codeLensFontSize=25]="codeLensFontSize",t[t.colorDecorators=26]="colorDecorators",t[t.colorDecoratorsLimit=27]="colorDecoratorsLimit",t[t.columnSelection=28]="columnSelection",t[t.comments=29]="comments",t[t.contextmenu=30]="contextmenu",t[t.copyWithSyntaxHighlighting=31]="copyWithSyntaxHighlighting",t[t.cursorBlinking=32]="cursorBlinking",t[t.cursorSmoothCaretAnimation=33]="cursorSmoothCaretAnimation",t[t.cursorStyle=34]="cursorStyle",t[t.cursorSurroundingLines=35]="cursorSurroundingLines",t[t.cursorSurroundingLinesStyle=36]="cursorSurroundingLinesStyle",t[t.cursorWidth=37]="cursorWidth",t[t.cursorHeight=38]="cursorHeight",t[t.disableLayerHinting=39]="disableLayerHinting",t[t.disableMonospaceOptimizations=40]="disableMonospaceOptimizations",t[t.domReadOnly=41]="domReadOnly",t[t.dragAndDrop=42]="dragAndDrop",t[t.dropIntoEditor=43]="dropIntoEditor",t[t.editContext=44]="editContext",t[t.emptySelectionClipboard=45]="emptySelectionClipboard",t[t.experimentalGpuAcceleration=46]="experimentalGpuAcceleration",t[t.experimentalWhitespaceRendering=47]="experimentalWhitespaceRendering",t[t.extraEditorClassName=48]="extraEditorClassName",t[t.fastScrollSensitivity=49]="fastScrollSensitivity",t[t.find=50]="find",t[t.fixedOverflowWidgets=51]="fixedOverflowWidgets",t[t.folding=52]="folding",t[t.foldingStrategy=53]="foldingStrategy",t[t.foldingHighlight=54]="foldingHighlight",t[t.foldingImportsByDefault=55]="foldingImportsByDefault",t[t.foldingMaximumRegions=56]="foldingMaximumRegions",t[t.unfoldOnClickAfterEndOfLine=57]="unfoldOnClickAfterEndOfLine",t[t.fontFamily=58]="fontFamily",t[t.fontInfo=59]="fontInfo",t[t.fontLigatures=60]="fontLigatures",t[t.fontSize=61]="fontSize",t[t.fontWeight=62]="fontWeight",t[t.fontVariations=63]="fontVariations",t[t.formatOnPaste=64]="formatOnPaste",t[t.formatOnType=65]="formatOnType",t[t.glyphMargin=66]="glyphMargin",t[t.gotoLocation=67]="gotoLocation",t[t.hideCursorInOverviewRuler=68]="hideCursorInOverviewRuler",t[t.hover=69]="hover",t[t.inDiffEditor=70]="inDiffEditor",t[t.inlineSuggest=71]="inlineSuggest",t[t.letterSpacing=72]="letterSpacing",t[t.lightbulb=73]="lightbulb",t[t.lineDecorationsWidth=74]="lineDecorationsWidth",t[t.lineHeight=75]="lineHeight",t[t.lineNumbers=76]="lineNumbers",t[t.lineNumbersMinChars=77]="lineNumbersMinChars",t[t.linkedEditing=78]="linkedEditing",t[t.links=79]="links",t[t.matchBrackets=80]="matchBrackets",t[t.minimap=81]="minimap",t[t.mouseStyle=82]="mouseStyle",t[t.mouseWheelScrollSensitivity=83]="mouseWheelScrollSensitivity",t[t.mouseWheelZoom=84]="mouseWheelZoom",t[t.multiCursorMergeOverlapping=85]="multiCursorMergeOverlapping",t[t.multiCursorModifier=86]="multiCursorModifier",t[t.mouseMiddleClickAction=87]="mouseMiddleClickAction",t[t.multiCursorPaste=88]="multiCursorPaste",t[t.multiCursorLimit=89]="multiCursorLimit",t[t.occurrencesHighlight=90]="occurrencesHighlight",t[t.occurrencesHighlightDelay=91]="occurrencesHighlightDelay",t[t.overtypeCursorStyle=92]="overtypeCursorStyle",t[t.overtypeOnPaste=93]="overtypeOnPaste",t[t.overviewRulerBorder=94]="overviewRulerBorder",t[t.overviewRulerLanes=95]="overviewRulerLanes",t[t.padding=96]="padding",t[t.pasteAs=97]="pasteAs",t[t.parameterHints=98]="parameterHints",t[t.peekWidgetDefaultFocus=99]="peekWidgetDefaultFocus",t[t.placeholder=100]="placeholder",t[t.definitionLinkOpensInPeek=101]="definitionLinkOpensInPeek",t[t.quickSuggestions=102]="quickSuggestions",t[t.quickSuggestionsDelay=103]="quickSuggestionsDelay",t[t.readOnly=104]="readOnly",t[t.readOnlyMessage=105]="readOnlyMessage",t[t.renameOnType=106]="renameOnType",t[t.renderRichScreenReaderContent=107]="renderRichScreenReaderContent",t[t.renderControlCharacters=108]="renderControlCharacters",t[t.renderFinalNewline=109]="renderFinalNewline",t[t.renderLineHighlight=110]="renderLineHighlight",t[t.renderLineHighlightOnlyWhenFocus=111]="renderLineHighlightOnlyWhenFocus",t[t.renderValidationDecorations=112]="renderValidationDecorations",t[t.renderWhitespace=113]="renderWhitespace",t[t.revealHorizontalRightPadding=114]="revealHorizontalRightPadding",t[t.roundedSelection=115]="roundedSelection",t[t.rulers=116]="rulers",t[t.scrollbar=117]="scrollbar",t[t.scrollBeyondLastColumn=118]="scrollBeyondLastColumn",t[t.scrollBeyondLastLine=119]="scrollBeyondLastLine",t[t.scrollPredominantAxis=120]="scrollPredominantAxis",t[t.selectionClipboard=121]="selectionClipboard",t[t.selectionHighlight=122]="selectionHighlight",t[t.selectionHighlightMaxLength=123]="selectionHighlightMaxLength",t[t.selectionHighlightMultiline=124]="selectionHighlightMultiline",t[t.selectOnLineNumbers=125]="selectOnLineNumbers",t[t.showFoldingControls=126]="showFoldingControls",t[t.showUnused=127]="showUnused",t[t.snippetSuggestions=128]="snippetSuggestions",t[t.smartSelect=129]="smartSelect",t[t.smoothScrolling=130]="smoothScrolling",t[t.stickyScroll=131]="stickyScroll",t[t.stickyTabStops=132]="stickyTabStops",t[t.stopRenderingLineAfter=133]="stopRenderingLineAfter",t[t.suggest=134]="suggest",t[t.suggestFontSize=135]="suggestFontSize",t[t.suggestLineHeight=136]="suggestLineHeight",t[t.suggestOnTriggerCharacters=137]="suggestOnTriggerCharacters",t[t.suggestSelection=138]="suggestSelection",t[t.tabCompletion=139]="tabCompletion",t[t.tabIndex=140]="tabIndex",t[t.trimWhitespaceOnDelete=141]="trimWhitespaceOnDelete",t[t.unicodeHighlighting=142]="unicodeHighlighting",t[t.unusualLineTerminators=143]="unusualLineTerminators",t[t.useShadowDOM=144]="useShadowDOM",t[t.useTabStops=145]="useTabStops",t[t.wordBreak=146]="wordBreak",t[t.wordSegmenterLocales=147]="wordSegmenterLocales",t[t.wordSeparators=148]="wordSeparators",t[t.wordWrap=149]="wordWrap",t[t.wordWrapBreakAfterCharacters=150]="wordWrapBreakAfterCharacters",t[t.wordWrapBreakBeforeCharacters=151]="wordWrapBreakBeforeCharacters",t[t.wordWrapColumn=152]="wordWrapColumn",t[t.wordWrapOverride1=153]="wordWrapOverride1",t[t.wordWrapOverride2=154]="wordWrapOverride2",t[t.wrappingIndent=155]="wrappingIndent",t[t.wrappingStrategy=156]="wrappingStrategy",t[t.showDeprecated=157]="showDeprecated",t[t.inertialScroll=158]="inertialScroll",t[t.inlayHints=159]="inlayHints",t[t.wrapOnEscapedLineFeeds=160]="wrapOnEscapedLineFeeds",t[t.effectiveCursorStyle=161]="effectiveCursorStyle",t[t.editorClassName=162]="editorClassName",t[t.pixelRatio=163]="pixelRatio",t[t.tabFocusMode=164]="tabFocusMode",t[t.layoutInfo=165]="layoutInfo",t[t.wrappingInfo=166]="wrappingInfo",t[t.defaultColorDecorators=167]="defaultColorDecorators",t[t.colorDecoratorsActivatedOn=168]="colorDecoratorsActivatedOn",t[t.inlineCompletionsAccessibilityVerbose=169]="inlineCompletionsAccessibilityVerbose",t[t.effectiveEditContext=170]="effectiveEditContext",t[t.scrollOnMiddleClick=171]="scrollOnMiddleClick",t[t.effectiveAllowVariableFonts=172]="effectiveAllowVariableFonts",t[t.doubleClickSelectsBlock=173]="doubleClickSelectsBlock"})(Ni||(Ni={}));var Si;(function(t){t[t.TextDefined=0]="TextDefined",t[t.LF=1]="LF",t[t.CRLF=2]="CRLF"})(Si||(Si={}));var Ri;(function(t){t[t.LF=0]="LF",t[t.CRLF=1]="CRLF"})(Ri||(Ri={}));var Ci;(function(t){t[t.Left=1]="Left",t[t.Center=2]="Center",t[t.Right=3]="Right"})(Ci||(Ci={}));var Ai;(function(t){t[t.Increase=0]="Increase",t[t.Decrease=1]="Decrease"})(Ai||(Ai={}));var Ei;(function(t){t[t.None=0]="None",t[t.Indent=1]="Indent",t[t.IndentOutdent=2]="IndentOutdent",t[t.Outdent=3]="Outdent"})(Ei||(Ei={}));var Mi;(function(t){t[t.Both=0]="Both",t[t.Right=1]="Right",t[t.Left=2]="Left",t[t.None=3]="None"})(Mi||(Mi={}));var ki;(function(t){t[t.Type=1]="Type",t[t.Parameter=2]="Parameter"})(ki||(ki={}));var Ti;(function(t){t[t.Accepted=0]="Accepted",t[t.Rejected=1]="Rejected",t[t.Ignored=2]="Ignored"})(Ti||(Ti={}));var Pi;(function(t){t[t.Code=1]="Code",t[t.Label=2]="Label"})(Pi||(Pi={}));var Fi;(function(t){t[t.Automatic=0]="Automatic",t[t.Explicit=1]="Explicit"})(Fi||(Fi={}));var mn;(function(t){t[t.DependsOnKbLayout=-1]="DependsOnKbLayout",t[t.Unknown=0]="Unknown",t[t.Backspace=1]="Backspace",t[t.Tab=2]="Tab",t[t.Enter=3]="Enter",t[t.Shift=4]="Shift",t[t.Ctrl=5]="Ctrl",t[t.Alt=6]="Alt",t[t.PauseBreak=7]="PauseBreak",t[t.CapsLock=8]="CapsLock",t[t.Escape=9]="Escape",t[t.Space=10]="Space",t[t.PageUp=11]="PageUp",t[t.PageDown=12]="PageDown",t[t.End=13]="End",t[t.Home=14]="Home",t[t.LeftArrow=15]="LeftArrow",t[t.UpArrow=16]="UpArrow",t[t.RightArrow=17]="RightArrow",t[t.DownArrow=18]="DownArrow",t[t.Insert=19]="Insert",t[t.Delete=20]="Delete",t[t.Digit0=21]="Digit0",t[t.Digit1=22]="Digit1",t[t.Digit2=23]="Digit2",t[t.Digit3=24]="Digit3",t[t.Digit4=25]="Digit4",t[t.Digit5=26]="Digit5",t[t.Digit6=27]="Digit6",t[t.Digit7=28]="Digit7",t[t.Digit8=29]="Digit8",t[t.Digit9=30]="Digit9",t[t.KeyA=31]="KeyA",t[t.KeyB=32]="KeyB",t[t.KeyC=33]="KeyC",t[t.KeyD=34]="KeyD",t[t.KeyE=35]="KeyE",t[t.KeyF=36]="KeyF",t[t.KeyG=37]="KeyG",t[t.KeyH=38]="KeyH",t[t.KeyI=39]="KeyI",t[t.KeyJ=40]="KeyJ",t[t.KeyK=41]="KeyK",t[t.KeyL=42]="KeyL",t[t.KeyM=43]="KeyM",t[t.KeyN=44]="KeyN",t[t.KeyO=45]="KeyO",t[t.KeyP=46]="KeyP",t[t.KeyQ=47]="KeyQ",t[t.KeyR=48]="KeyR",t[t.KeyS=49]="KeyS",t[t.KeyT=50]="KeyT",t[t.KeyU=51]="KeyU",t[t.KeyV=52]="KeyV",t[t.KeyW=53]="KeyW",t[t.KeyX=54]="KeyX",t[t.KeyY=55]="KeyY",t[t.KeyZ=56]="KeyZ",t[t.Meta=57]="Meta",t[t.ContextMenu=58]="ContextMenu",t[t.F1=59]="F1",t[t.F2=60]="F2",t[t.F3=61]="F3",t[t.F4=62]="F4",t[t.F5=63]="F5",t[t.F6=64]="F6",t[t.F7=65]="F7",t[t.F8=66]="F8",t[t.F9=67]="F9",t[t.F10=68]="F10",t[t.F11=69]="F11",t[t.F12=70]="F12",t[t.F13=71]="F13",t[t.F14=72]="F14",t[t.F15=73]="F15",t[t.F16=74]="F16",t[t.F17=75]="F17",t[t.F18=76]="F18",t[t.F19=77]="F19",t[t.F20=78]="F20",t[t.F21=79]="F21",t[t.F22=80]="F22",t[t.F23=81]="F23",t[t.F24=82]="F24",t[t.NumLock=83]="NumLock",t[t.ScrollLock=84]="ScrollLock",t[t.Semicolon=85]="Semicolon",t[t.Equal=86]="Equal",t[t.Comma=87]="Comma",t[t.Minus=88]="Minus",t[t.Period=89]="Period",t[t.Slash=90]="Slash",t[t.Backquote=91]="Backquote",t[t.BracketLeft=92]="BracketLeft",t[t.Backslash=93]="Backslash",t[t.BracketRight=94]="BracketRight",t[t.Quote=95]="Quote",t[t.OEM_8=96]="OEM_8",t[t.IntlBackslash=97]="IntlBackslash",t[t.Numpad0=98]="Numpad0",t[t.Numpad1=99]="Numpad1",t[t.Numpad2=100]="Numpad2",t[t.Numpad3=101]="Numpad3",t[t.Numpad4=102]="Numpad4",t[t.Numpad5=103]="Numpad5",t[t.Numpad6=104]="Numpad6",t[t.Numpad7=105]="Numpad7",t[t.Numpad8=106]="Numpad8",t[t.Numpad9=107]="Numpad9",t[t.NumpadMultiply=108]="NumpadMultiply",t[t.NumpadAdd=109]="NumpadAdd",t[t.NUMPAD_SEPARATOR=110]="NUMPAD_SEPARATOR",t[t.NumpadSubtract=111]="NumpadSubtract",t[t.NumpadDecimal=112]="NumpadDecimal",t[t.NumpadDivide=113]="NumpadDivide",t[t.KEY_IN_COMPOSITION=114]="KEY_IN_COMPOSITION",t[t.ABNT_C1=115]="ABNT_C1",t[t.ABNT_C2=116]="ABNT_C2",t[t.AudioVolumeMute=117]="AudioVolumeMute",t[t.AudioVolumeUp=118]="AudioVolumeUp",t[t.AudioVolumeDown=119]="AudioVolumeDown",t[t.BrowserSearch=120]="BrowserSearch",t[t.BrowserHome=121]="BrowserHome",t[t.BrowserBack=122]="BrowserBack",t[t.BrowserForward=123]="BrowserForward",t[t.MediaTrackNext=124]="MediaTrackNext",t[t.MediaTrackPrevious=125]="MediaTrackPrevious",t[t.MediaStop=126]="MediaStop",t[t.MediaPlayPause=127]="MediaPlayPause",t[t.LaunchMediaPlayer=128]="LaunchMediaPlayer",t[t.LaunchMail=129]="LaunchMail",t[t.LaunchApp2=130]="LaunchApp2",t[t.Clear=131]="Clear",t[t.MAX_VALUE=132]="MAX_VALUE"})(mn||(mn={}));var dn;(function(t){t[t.Hint=1]="Hint",t[t.Info=2]="Info",t[t.Warning=4]="Warning",t[t.Error=8]="Error"})(dn||(dn={}));var gn;(function(t){t[t.Unnecessary=1]="Unnecessary",t[t.Deprecated=2]="Deprecated"})(gn||(gn={}));var Di;(function(t){t[t.Inline=1]="Inline",t[t.Gutter=2]="Gutter"})(Di||(Di={}));var Ii;(function(t){t[t.Normal=1]="Normal",t[t.Underlined=2]="Underlined"})(Ii||(Ii={}));var Bi;(function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.TEXTAREA=1]="TEXTAREA",t[t.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",t[t.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",t[t.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",t[t.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",t[t.CONTENT_TEXT=6]="CONTENT_TEXT",t[t.CONTENT_EMPTY=7]="CONTENT_EMPTY",t[t.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",t[t.CONTENT_WIDGET=9]="CONTENT_WIDGET",t[t.OVERVIEW_RULER=10]="OVERVIEW_RULER",t[t.SCROLLBAR=11]="SCROLLBAR",t[t.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",t[t.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"})(Bi||(Bi={}));var Vi;(function(t){t[t.AIGenerated=1]="AIGenerated"})(Vi||(Vi={}));var qi;(function(t){t[t.Invoke=0]="Invoke",t[t.Automatic=1]="Automatic"})(qi||(qi={}));var Ui;(function(t){t[t.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",t[t.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",t[t.TOP_CENTER=2]="TOP_CENTER"})(Ui||(Ui={}));var Wi;(function(t){t[t.Left=1]="Left",t[t.Center=2]="Center",t[t.Right=4]="Right",t[t.Full=7]="Full"})(Wi||(Wi={}));var Oi;(function(t){t[t.Word=0]="Word",t[t.Line=1]="Line",t[t.Suggest=2]="Suggest"})(Oi||(Oi={}));var $i;(function(t){t[t.Left=0]="Left",t[t.Right=1]="Right",t[t.None=2]="None",t[t.LeftOfInjectedText=3]="LeftOfInjectedText",t[t.RightOfInjectedText=4]="RightOfInjectedText"})($i||($i={}));var zi;(function(t){t[t.Off=0]="Off",t[t.On=1]="On",t[t.Relative=2]="Relative",t[t.Interval=3]="Interval",t[t.Custom=4]="Custom"})(zi||(zi={}));var Hi;(function(t){t[t.None=0]="None",t[t.Text=1]="Text",t[t.Blocks=2]="Blocks"})(Hi||(Hi={}));var ji;(function(t){t[t.Smooth=0]="Smooth",t[t.Immediate=1]="Immediate"})(ji||(ji={}));var Gi;(function(t){t[t.Auto=1]="Auto",t[t.Hidden=2]="Hidden",t[t.Visible=3]="Visible"})(Gi||(Gi={}));var pn;(function(t){t[t.LTR=0]="LTR",t[t.RTL=1]="RTL"})(pn||(pn={}));var Xi;(function(t){t.Off="off",t.OnCode="onCode",t.On="on"})(Xi||(Xi={}));var Qi;(function(t){t[t.Invoke=1]="Invoke",t[t.TriggerCharacter=2]="TriggerCharacter",t[t.ContentChange=3]="ContentChange"})(Qi||(Qi={}));var Ji;(function(t){t[t.File=0]="File",t[t.Module=1]="Module",t[t.Namespace=2]="Namespace",t[t.Package=3]="Package",t[t.Class=4]="Class",t[t.Method=5]="Method",t[t.Property=6]="Property",t[t.Field=7]="Field",t[t.Constructor=8]="Constructor",t[t.Enum=9]="Enum",t[t.Interface=10]="Interface",t[t.Function=11]="Function",t[t.Variable=12]="Variable",t[t.Constant=13]="Constant",t[t.String=14]="String",t[t.Number=15]="Number",t[t.Boolean=16]="Boolean",t[t.Array=17]="Array",t[t.Object=18]="Object",t[t.Key=19]="Key",t[t.Null=20]="Null",t[t.EnumMember=21]="EnumMember",t[t.Struct=22]="Struct",t[t.Event=23]="Event",t[t.Operator=24]="Operator",t[t.TypeParameter=25]="TypeParameter"})(Ji||(Ji={}));var Yi;(function(t){t[t.Deprecated=1]="Deprecated"})(Yi||(Yi={}));var Zi;(function(t){t[t.LTR=0]="LTR",t[t.RTL=1]="RTL"})(Zi||(Zi={}));var Ki;(function(t){t[t.Hidden=0]="Hidden",t[t.Blink=1]="Blink",t[t.Smooth=2]="Smooth",t[t.Phase=3]="Phase",t[t.Expand=4]="Expand",t[t.Solid=5]="Solid"})(Ki||(Ki={}));var e1;(function(t){t[t.Line=1]="Line",t[t.Block=2]="Block",t[t.Underline=3]="Underline",t[t.LineThin=4]="LineThin",t[t.BlockOutline=5]="BlockOutline",t[t.UnderlineThin=6]="UnderlineThin"})(e1||(e1={}));var t1;(function(t){t[t.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",t[t.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",t[t.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",t[t.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"})(t1||(t1={}));var n1;(function(t){t[t.None=0]="None",t[t.Same=1]="Same",t[t.Indent=2]="Indent",t[t.DeepIndent=3]="DeepIndent"})(n1||(n1={}));var Cr=class{static{this.CtrlCmd=2048}static{this.Shift=1024}static{this.Alt=512}static{this.WinCtrl=256}static chord(e,n){return $s(e,n)}};function r1(){return{editor:void 0,languages:void 0,CancellationTokenSource:At,Emitter:te,KeyCode:mn,KeyMod:Cr,Position:B,Range:R,Selection:cn,SelectionDirection:pn,MarkerSeverity:dn,MarkerTag:gn,Uri:se,Token:fn}}var s1,i1,o1,Ar=class{constructor(e,n){this.uri=e,this.value=n}};function $o(t){return Array.isArray(t)}var bn=class t{static{this.defaultToKey=e=>e.toString()}constructor(e,n){if(this[s1]="ResourceMap",e instanceof t)this.map=new Map(e.map),this.toKey=n??t.defaultToKey;else if($o(e)){this.map=new Map,this.toKey=n??t.defaultToKey;for(let[r,s]of e)this.set(r,s)}else this.map=new Map,this.toKey=e??t.defaultToKey}set(e,n){return this.map.set(this.toKey(e),new Ar(e,n)),this}get(e){return this.map.get(this.toKey(e))?.value}has(e){return this.map.has(this.toKey(e))}get size(){return this.map.size}clear(){this.map.clear()}delete(e){return this.map.delete(this.toKey(e))}forEach(e,n){typeof n<"u"&&(e=e.bind(n));for(let[r,s]of this.map)e(s.value,s.uri,this)}*values(){for(let e of this.map.values())yield e.value}*keys(){for(let e of this.map.values())yield e.uri}*entries(){for(let e of this.map.values())yield[e.uri,e.value]}*[(s1=Symbol.toStringTag,Symbol.iterator)](){for(let[,e]of this.map)yield[e.uri,e.value]}},a1=class{constructor(e,n){this[i1]="ResourceSet",!e||typeof e=="function"?this._map=new bn(e):(this._map=new bn(n),e.forEach(this.add,this))}get size(){return this._map.size}add(e){return this._map.set(e,e),this}clear(){this._map.clear()}delete(e){return this._map.delete(e)}forEach(e,n){this._map.forEach((r,s)=>e.call(n,s,s,this))}has(e){return this._map.has(e)}entries(){return this._map.entries()}keys(){return this._map.keys()}values(){return this._map.keys()}[(i1=Symbol.toStringTag,Symbol.iterator)](){return this.keys()}},Er=class{constructor(){this[o1]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,n=0){let r=this._map.get(e);if(r)return n!==0&&this.touch(r,n),r.value}set(e,n,r=0){let s=this._map.get(e);if(s)s.value=n,r!==0&&this.touch(s,r);else{switch(s={key:e,value:n,next:void 0,previous:void 0},r){case 0:this.addItemLast(s);break;case 1:this.addItemFirst(s);break;case 2:this.addItemLast(s);break;default:this.addItemLast(s);break}this._map.set(e,s),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){let n=this._map.get(e);if(n)return this._map.delete(e),this.removeItem(n),this._size--,n.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,n){let r=this._state,s=this._head;for(;s;){if(n?e.bind(n)(s.value,s.key,this):e(s.value,s.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");s=s.next}}keys(){let e=this,n=this._state,r=this._head,s={[Symbol.iterator](){return s},[Symbol.dispose](){},next(){if(e._state!==n)throw new Error("LinkedMap got modified during iteration.");if(r){let i={value:r.key,done:!1};return r=r.next,i}else return{value:void 0,done:!0}}};return s}values(){let e=this,n=this._state,r=this._head,s={[Symbol.iterator](){return s},[Symbol.dispose](){},next(){if(e._state!==n)throw new Error("LinkedMap got modified during iteration.");if(r){let i={value:r.value,done:!1};return r=r.next,i}else return{value:void 0,done:!0}}};return s}entries(){let e=this,n=this._state,r=this._head,s={[Symbol.iterator](){return s},[Symbol.dispose](){},next(){if(e._state!==n)throw new Error("LinkedMap got modified during iteration.");if(r){let i={value:[r.key,r.value],done:!1};return r=r.next,i}else return{value:void 0,done:!0}}};return s}[(o1=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let n=this._head,r=this.size;for(;n&&r>e;)this._map.delete(n.key),n=n.next,r--;this._head=n,this._size=r,n&&(n.previous=void 0),this._state++}trimNew(e){if(e>=this.size)return;if(e===0){this.clear();return}let n=this._tail,r=this.size;for(;n&&r>e;)this._map.delete(n.key),n=n.previous,r--;this._tail=n,this._size=r,n&&(n.next=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw new Error("Invalid list");this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw new Error("Invalid list");this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{let n=e.next,r=e.previous;if(!n||!r)throw new Error("Invalid list");n.previous=r,r.next=n}e.next=void 0,e.previous=void 0,this._state++}touch(e,n){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(n!==1&&n!==2)){if(n===1){if(e===this._head)return;let r=e.next,s=e.previous;e===this._tail?(s.next=void 0,this._tail=s):(r.previous=s,s.next=r),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(n===2){if(e===this._tail)return;let r=e.next,s=e.previous;e===this._head?(r.previous=void 0,this._head=r):(r.previous=s,s.next=r),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){let e=[];return this.forEach((n,r)=>{e.push([r,n])}),e}fromJSON(e){this.clear();for(let[n,r]of e)this.set(n,r)}},Mr=class extends Er{constructor(e,n=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,n),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get(e,n=2){return super.get(e,n)}peek(e){return super.get(e,0)}set(e,n){return super.set(e,n,2),this}checkTrim(){this.size>this._limit&&this.trim(Math.round(this._limit*this._ratio))}},wn=class extends Mr{constructor(e,n=1){super(e,n)}trim(e){this.trimOld(e)}set(e,n){return super.set(e,n),this.checkTrim(),this}};var xn=class{constructor(){this.map=new Map}add(e,n){let r=this.map.get(e);r||(r=new Set,this.map.set(e,r)),r.add(n)}delete(e,n){let r=this.map.get(e);r&&(r.delete(n),r.size===0&&this.map.delete(e))}forEach(e,n){let r=this.map.get(e);r&&r.forEach(n)}};var Mu=new wn(10);var l1;(function(t){t[t.Left=1]="Left",t[t.Center=2]="Center",t[t.Right=4]="Right",t[t.Full=7]="Full"})(l1||(l1={}));var u1;(function(t){t[t.Left=1]="Left",t[t.Center=2]="Center",t[t.Right=3]="Right"})(u1||(u1={}));var c1;(function(t){t[t.LTR=0]="LTR",t[t.RTL=1]="RTL"})(c1||(c1={}));var h1;(function(t){t[t.Both=0]="Both",t[t.Right=1]="Right",t[t.Left=2]="Left",t[t.None=3]="None"})(h1||(h1={}));function f1(t){if(!t||t.length===0)return!1;for(let e=0,n=t.length;e=n)break;let s=t.charCodeAt(e);if(s===110||s===114||s===87)return!0}}return!1}function zo(t,e,n,r,s){if(r===0)return!0;let i=e.charCodeAt(r-1);if(t.get(i)!==0||i===13||i===10)return!0;if(s>0){let a=e.charCodeAt(r);if(t.get(a)!==0)return!0}return!1}function Ho(t,e,n,r,s){if(r+s===n)return!0;let i=e.charCodeAt(r+s);if(t.get(i)!==0||i===13||i===10)return!0;if(s>0){let a=e.charCodeAt(r+s-1);if(t.get(a)!==0)return!0}return!1}function jo(t,e,n,r,s){return zo(t,e,n,r,s)&&Ho(t,e,n,r,s)}var _n=class{constructor(e,n){this._wordSeparators=e,this._searchRegex=n,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){let n=e.length,r;do{if(this._prevMatchStartIndex+this._prevMatchLength===n||(r=this._searchRegex.exec(e),!r))return null;let s=r.index,i=r[0].length;if(s===this._prevMatchStartIndex&&i===this._prevMatchLength){if(i===0){Rs(e,n,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=s,this._prevMatchLength=i,!this._wordSeparators||jo(this._wordSeparators,e,n,s,i))return r}while(r);return null}};var Go="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function Xo(t=""){let e="(-?\\d*\\.\\d\\w*)|([^";for(let n of Go)t.indexOf(n)>=0||(e+="\\"+n);return e+="\\s]+)",new RegExp(e,"g")}var kr=Xo();function Tr(t){let e=kr;if(t&&t instanceof RegExp)if(t.global)e=t;else{let n="g";t.ignoreCase&&(n+="i"),t.multiline&&(n+="m"),t.unicode&&(n+="u"),e=new RegExp(t.source,n)}return e.lastIndex=0,e}var m1=new xt;m1.unshift({maxLen:1e3,windowSize:15,timeBudget:150});function Mt(t,e,n,r,s){if(e=Tr(e),s||(s=tt.first(m1)),n.length>s.maxLen){let c=t-s.maxLen/2;return c<0?c=0:r+=c,n=n.substring(c,t+s.maxLen/2),Mt(t,e,n,r,s)}let i=Date.now(),a=t-1-r,l=-1,u=null;for(let c=1;!(Date.now()-i>=s.timeBudget);c++){let f=a-s.windowSize*c;e.lastIndex=Math.max(0,f);let h=Qo(e,n,a,l);if(!h&&u||(u=h,f<=0))break;l=f}if(u){let c={word:u[0],startColumn:r+1+u.index,endColumn:r+1+u.index+u[0].length};return e.lastIndex=0,c}return null}function Qo(t,e,n,r){let s;for(;s=t.exec(e);){let i=s.index||0;if(i<=n&&t.lastIndex>=n)return s;if(r>0&&i>r)return null}return null}var yn=class{static computeUnicodeHighlights(e,n,r){let s=r?r.startLineNumber:1,i=r?r.endLineNumber:e.getLineCount(),a=new Ln(n),l=a.getCandidateCodePoints(),u;l==="allNonBasicAscii"?u=new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):u=new RegExp(`${Jo(Array.from(l))}`,"g");let c=new _n(null,u),f=[],h=!1,m,b=0,g=0,d=0;e:for(let w=s,L=i;w<=L;w++){let v=e.getLineContent(w),y=v.length;c.reset(0);do if(m=c.next(v),m){let M=m.index,D=m.index+m[0].length;if(M>0){let S=v.charCodeAt(M-1);ot(S)&&M--}if(D+1=1e3){h=!0;break e}f.push(new R(w,M+1,w,D+1))}}while(m)}return{ranges:f,hasMore:h,ambiguousCharacterCount:b,invisibleCharacterCount:g,nonBasicAsciiCharacterCount:d}}static computeUnicodeHighlightReason(e,n){let r=new Ln(n);switch(r.shouldHighlightNonBasicASCII(e,null)){case 0:return null;case 2:return{kind:1};case 3:{let i=e.codePointAt(0),a=r.ambiguousCharacters.getPrimaryConfusable(i),l=st.getLocales().filter(u=>!st.getInstance(new Set([...n.allowedLocales,u])).isAmbiguous(i));return{kind:0,confusableWith:String.fromCodePoint(a),notAmbiguousInLocales:l}}case 1:return{kind:2}}}};function Jo(t,e){return`[${ys(t.map(r=>String.fromCodePoint(r)).join(""))}]`}var Ln=class{constructor(e){this.options=e,this.allowedCodePoints=new Set(e.allowedCodePoints),this.ambiguousCharacters=st.getInstance(new Set(e.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";let e=new Set;if(this.options.invisibleCharacters)for(let n of it.codePoints)d1(String.fromCodePoint(n))||e.add(n);if(this.options.ambiguousCharacters)for(let n of this.ambiguousCharacters.getConfusableCodePoints())e.add(n);for(let n of this.allowedCodePoints)e.delete(n);return e}shouldHighlightNonBasicASCII(e,n){let r=e.codePointAt(0);if(this.allowedCodePoints.has(r))return 0;if(this.options.nonBasicASCII)return 1;let s=!1,i=!1;if(n)for(let a of n){let l=a.codePointAt(0),u=Cs(a);s=s||u,!u&&!this.ambiguousCharacters.isAmbiguous(l)&&!it.isInvisibleCharacter(l)&&(i=!0)}return!s&&i?0:this.options.invisibleCharacters&&!d1(e)&&it.isInvisibleCharacter(r)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(r)?3:0}};function d1(t){return t===" "||t===` +`||t===" "}var ge=class{constructor(e,n,r){this.changes=e,this.moves=n,this.hitTimeout=r}},lt=class{constructor(e,n){this.lineRangeMapping=e,this.changes=n}};function p1(t,e,n=(r,s)=>r===s){if(t===e)return!0;if(!t||!e||t.length!==e.length)return!1;for(let r=0,s=t.length;r0}t.isGreaterThan=r;function s(i){return i===0}t.isNeitherLessOrGreaterThan=s,t.greaterThan=1,t.lessThan=-1,t.neitherLessOrGreaterThan=0})(Pr||(Pr={}));function Re(t,e){return(n,r)=>e(t(n),t(r))}var Xe=(t,e)=>t-e;function y1(t){return(e,n)=>-t(e,n)}var g1=class t{static{this.empty=new t(e=>{})}constructor(e){this.iterate=e}toArray(){let e=[];return this.iterate(n=>(e.push(n),!0)),e}filter(e){return new t(n=>this.iterate(r=>e(r)?n(r):!0))}map(e){return new t(n=>this.iterate(r=>n(e(r))))}findLast(e){let n;return this.iterate(r=>(e(r)&&(n=r),!0)),n}findLastMaxBy(e){let n,r=!0;return this.iterate(s=>((r||Pr.isGreaterThan(e(s,n)))&&(r=!1,n=s),!0)),n}};var F=class t{static fromTo(e,n){return new t(e,n)}static addRange(e,n){let r=0;for(;rn))return new t(e,n)}static ofLength(e){return new t(0,e)}static ofStartAndLength(e,n){return new t(e,e+n)}static emptyAt(e){return new t(e,e)}constructor(e,n){if(this.start=e,this.endExclusive=n,e>n)throw new H(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(e){return new t(this.start+e,this.endExclusive+e)}deltaStart(e){return new t(this.start+e,this.endExclusive)}deltaEnd(e){return new t(this.start,this.endExclusive+e)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}equals(e){return this.start===e.start&&this.endExclusive===e.endExclusive}containsRange(e){return this.start<=e.start&&e.endExclusive<=this.endExclusive}contains(e){return this.start<=e&&e=e.endExclusive}slice(e){return e.slice(this.start,this.endExclusive)}substring(e){return e.substring(this.start,this.endExclusive)}clip(e){if(this.isEmpty)throw new H(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,e))}clipCyclic(e){if(this.isEmpty)throw new H(`Invalid clipping range: ${this.toString()}`);return e=this.endExclusive?this.start+(e-this.start)%this.length:e}forEach(e){for(let n=this.start;ne.startLineNumber,Xe)}static joinMany(e){if(e.length===0)return[];let n=new Qe(e[0].slice());for(let r=1;rn)throw new H(`startLineNumber ${e} cannot be after endLineNumberExclusive ${n}`);this.startLineNumber=e,this.endLineNumberExclusive=n}contains(e){return this.startLineNumber<=e&&es.endLineNumberExclusive>=e.startLineNumber),r=Ae(this._normalizedRanges,s=>s.startLineNumber<=e.endLineNumberExclusive)+1;if(n===r)this._normalizedRanges.splice(n,0,e);else if(n===r-1){let s=this._normalizedRanges[n];this._normalizedRanges[n]=s.join(e)}else{let s=this._normalizedRanges[n].join(this._normalizedRanges[r-1]).join(e);this._normalizedRanges.splice(n,r-n,s)}}contains(e){let n=Ce(this._normalizedRanges,r=>r.startLineNumber<=e);return!!n&&n.endLineNumberExclusive>e}intersects(e){let n=Ce(this._normalizedRanges,r=>r.startLineNumbere.startLineNumber}getUnion(e){if(this._normalizedRanges.length===0)return e;if(e._normalizedRanges.length===0)return this;let n=[],r=0,s=0,i=null;for(;r=a.startLineNumber?i=new U(i.startLineNumber,Math.max(i.endLineNumberExclusive,a.endLineNumberExclusive)):(n.push(i),i=a)}return i!==null&&n.push(i),new t(n)}subtractFrom(e){let n=vn(this._normalizedRanges,a=>a.endLineNumberExclusive>=e.startLineNumber),r=Ae(this._normalizedRanges,a=>a.startLineNumber<=e.endLineNumberExclusive)+1;if(n===r)return new t([e]);let s=[],i=e.startLineNumber;for(let a=n;ai&&s.push(new U(i,l.startLineNumber)),i=l.endLineNumberExclusive}return ie.toString()).join(", ")}getIntersection(e){let n=[],r=0,s=0;for(;rn.delta(e)))}};var me=class t{static{this.zero=new t(0,0)}static betweenPositions(e,n){return e.lineNumber===n.lineNumber?new t(0,n.column-e.column):new t(n.lineNumber-e.lineNumber,n.column-1)}static fromPosition(e){return new t(e.lineNumber-1,e.column-1)}static ofRange(e){return t.betweenPositions(e.getStartPosition(),e.getEndPosition())}static ofText(e){let n=0,r=0;for(let s of e)s===` +`?(n++,r=0):r++;return new t(n,r)}constructor(e,n){this.lineCount=e,this.columnCount=n}isGreaterThanOrEqualTo(e){return this.lineCount!==e.lineCount?this.lineCount>e.lineCount:this.columnCount>=e.columnCount}add(e){return e.lineCount===0?new t(this.lineCount,this.columnCount+e.columnCount):new t(this.lineCount+e.lineCount,e.columnCount)}createRange(e){return this.lineCount===0?new R(e.lineNumber,e.column,e.lineNumber,e.column+this.columnCount):new R(e.lineNumber,e.column,e.lineNumber+this.lineCount,this.columnCount+1)}toRange(){return new R(1,1,this.lineCount+1,this.columnCount+1)}toLineRange(){return U.ofLength(1,this.lineCount+1)}addToPosition(e){return this.lineCount===0?new B(e.lineNumber,e.column+this.columnCount):new B(e.lineNumber+this.lineCount,this.columnCount+1)}toString(){return`${this.lineCount},${this.columnCount}`}};var Nn=class{getOffsetRange(e){return new F(this.getOffset(e.getStartPosition()),this.getOffset(e.getEndPosition()))}getRange(e){return R.fromPositions(this.getPosition(e.start),this.getPosition(e.endExclusive))}getStringReplacement(e){return new Je.deps.StringReplacement(this.getOffsetRange(e.range),e.text)}getTextReplacement(e){return new Je.deps.TextReplacement(this.getRange(e.replaceRange),e.newText)}getTextEdit(e){let n=e.replacements.map(r=>this.getTextReplacement(r));return new Je.deps.TextEdit(n)}},Je=class{static{this._deps=void 0}static get deps(){if(!this._deps)throw new Error("Dependencies not set. Call _setDependencies first.");return this._deps}};function v1(t){Je._deps=t}var ut=class extends Nn{constructor(e){super(),this.text=e}get lineStartOffsetByLineIdx(){return this._lineStartOffsetByLineIdx||this._computeLineOffsets(),this._lineStartOffsetByLineIdx}get lineEndOffsetByLineIdx(){return this._lineEndOffsetByLineIdx||this._computeLineOffsets(),this._lineEndOffsetByLineIdx}_computeLineOffsets(){this._lineStartOffsetByLineIdx=[],this._lineEndOffsetByLineIdx=[],this._lineStartOffsetByLineIdx.push(0);for(let e=0;e0&&this.text.charAt(e-1)==="\r"?this._lineEndOffsetByLineIdx.push(e-1):this._lineEndOffsetByLineIdx.push(e));this._lineEndOffsetByLineIdx.push(this.text.length)}getOffset(e){let n=this._validatePosition(e);return this.lineStartOffsetByLineIdx[n.lineNumber-1]+n.column-1}_validatePosition(e){if(e.lineNumber<1)return new B(1,1);let n=this.textLength.lineCount+1;if(e.lineNumber>n){let s=this.getLineLength(n);return new B(n,s+1)}if(e.column<1)return new B(e.lineNumber,1);let r=this.getLineLength(e.lineNumber);return e.column-1>r?new B(e.lineNumber,r+1):e}getPosition(e){let n=Ae(this.lineStartOffsetByLineIdx,i=>i<=e),r=n+1,s=e-this.lineStartOffsetByLineIdx[n]+1;return new B(r,s)}get textLength(){let e=this.lineStartOffsetByLineIdx.length-1;return new Je.deps.TextLength(e,this.text.length-this.lineStartOffsetByLineIdx[e])}getLineLength(e){return this.lineEndOffsetByLineIdx[e-1]-this.lineStartOffsetByLineIdx[e-1]}};var Sn=class{constructor(){this._transformer=void 0}get endPositionExclusive(){return this.length.addToPosition(new B(1,1))}get lineRange(){return this.length.toLineRange()}getValue(){return this.getValueOfRange(this.length.toRange())}getValueOfOffsetRange(e){return this.getValueOfRange(this.getTransformer().getRange(e))}getLineLength(e){return this.getValueOfRange(new R(e,1,e,Number.MAX_SAFE_INTEGER)).length}getTransformer(){return this._transformer||(this._transformer=new ut(this.getValue())),this._transformer}getLineAt(e){return this.getValueOfRange(new R(e,1,e,Number.MAX_SAFE_INTEGER))}},Fr=class extends Sn{constructor(e,n){jn(n>=1),super(),this._getLineContent=e,this._lineCount=n}getValueOfRange(e){if(e.startLineNumber===e.endLineNumber)return this._getLineContent(e.startLineNumber).substring(e.startColumn-1,e.endColumn-1);let n=this._getLineContent(e.startLineNumber).substring(e.startColumn-1);for(let r=e.startLineNumber+1;re[n-1],e.length)}},Fe=class extends Sn{constructor(e){super(),this.value=e,this._t=new ut(this.value)}getValueOfRange(e){return this._t.getOffsetRange(e).substring(this.value)}get length(){return this._t.textLength}getTransformer(){return this._t}};var Cn=class t{static fromStringEdit(e,n){let r=e.replacements.map(s=>De.fromStringReplacement(s,n));return new t(r)}static fromParallelReplacementsUnsorted(e){let n=e.slice().sort(Re(r=>r.range,R.compareRangesUsingStarts));return new t(n)}constructor(e){this.replacements=e,xe(()=>et(e,(n,r)=>n.range.getEndPosition().isBeforeOrEqual(r.range.getStartPosition())))}mapPosition(e){let n=0,r=0,s=0;for(let i of this.replacements){let a=i.range.getStartPosition();if(e.isBeforeOrEqual(a))break;let l=i.range.getEndPosition(),u=me.ofText(i.text);if(e.isBefore(l)){let c=new B(a.lineNumber+n,a.column+(a.lineNumber+n===r?s:0)),f=u.addToPosition(c);return Rn(c,f)}a.lineNumber+n!==r&&(s=0),n+=u.lineCount-(i.range.endLineNumber-i.range.startLineNumber),u.lineCount===0?l.lineNumber!==a.lineNumber?s+=u.columnCount-(l.column-1):s+=u.columnCount-(l.column-a.column):s=u.columnCount,r=l.lineNumber+n}return new B(e.lineNumber+n,e.column+(e.lineNumber+n===r?s:0))}mapRange(e){function n(a){return a instanceof B?a:a.getStartPosition()}function r(a){return a instanceof B?a:a.getEndPosition()}let s=n(this.mapPosition(e.getStartPosition())),i=r(this.mapPosition(e.getEndPosition()));return Rn(s,i)}apply(e){let n="",r=new B(1,1);for(let i of this.replacements){let a=i.range,l=a.getStartPosition(),u=a.getEndPosition(),c=Rn(r,l);c.isEmpty()||(n+=e.getValueOfRange(c)),n+=i.text,r=u}let s=Rn(r,e.endPositionExclusive);return s.isEmpty()||(n+=e.getValueOfRange(s)),n}applyToString(e){let n=new Fe(e);return this.apply(n)}getNewRanges(){let e=[],n=0,r=0,s=0;for(let i of this.replacements){let a=me.ofText(i.text),l=B.lift({lineNumber:i.range.startLineNumber+r,column:i.range.startColumn+(i.range.startLineNumber===n?s:0)}),u=a.createRange(l);e.push(u),r=u.endLineNumber-i.range.endLineNumber,s=u.endColumn-i.range.endColumn,n=i.range.endLineNumber}return e}toReplacement(e){if(this.replacements.length===0)throw new H;if(this.replacements.length===1)return this.replacements[0];let n=this.replacements[0].range.getStartPosition(),r=this.replacements[this.replacements.length-1].range.getEndPosition(),s="";for(let i=0;in.toString()).join(` +`):typeof e=="string"?this.toString(new Fe(e)):this.replacements.length===0?"":this.replacements.map(n=>{let s=e.getValueOfRange(n.range),i=R.fromPositions(new B(Math.max(1,n.range.startLineNumber-1),1),n.range.getStartPosition()),a=e.getValueOfRange(i);a.length>10&&(a="..."+a.substring(a.length-10));let l=R.fromPositions(n.range.getEndPosition(),new B(n.range.endLineNumber+1,1)),u=e.getValueOfRange(l);u.length>10&&(u=u.substring(0,10)+"...");let c=s;if(c.length>10){let h=Math.floor(5);c=c.substring(0,h)+"..."+c.substring(c.length-h)}let f=n.text;if(f.length>10){let h=Math.floor(5);f=f.substring(0,h)+"..."+f.substring(f.length-h)}return c.length===0?`${a}\u2770${f}\u2771${u}`:`${a}\u2770${c}\u21A6${f}\u2771${u}`}).join(` +`)}},De=class t{static joinReplacements(e,n){if(e.length===0)throw new H;if(e.length===1)return e[0];let r=e[0].range.getStartPosition(),s=e[e.length-1].range.getEndPosition(),i="";for(let a=0;a ${n.lineNumber},${n.column}): "${this.text}"`}};function Rn(t,e){if(t.lineNumber===e.lineNumber&&t.column===Number.MAX_SAFE_INTEGER)return R.fromPositions(e,e);if(!t.isBeforeOrEqual(e))throw new H("start must be before end");return new R(t.lineNumber,t.column,e.lineNumber,e.column)}var ue=class t{static inverse(e,n,r){let s=[],i=1,a=1;for(let u of e){let c=new t(new U(i,u.original.startLineNumber),new U(a,u.modified.startLineNumber));c.modified.isEmpty||s.push(c),i=u.original.endLineNumberExclusive,a=u.modified.endLineNumberExclusive}let l=new t(new U(i,n+1),new U(a,r+1));return l.modified.isEmpty||s.push(l),s}static clip(e,n,r){let s=[];for(let i of e){let a=i.original.intersect(n),l=i.modified.intersect(r);a&&!a.isEmpty&&l&&!l.isEmpty&&s.push(new t(a,l))}return s}constructor(e,n){this.original=e,this.modified=n}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new t(this.modified,this.original)}join(e){return new t(this.original.join(e.original),this.modified.join(e.modified))}toRangeMapping(){let e=this.original.toInclusiveRange(),n=this.modified.toInclusiveRange();if(e&&n)return new ie(e,n);if(this.original.startLineNumber===1||this.modified.startLineNumber===1){if(!(this.modified.startLineNumber===1&&this.original.startLineNumber===1))throw new H("not a valid diff");return new ie(new R(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new R(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1))}else return new ie(new R(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),new R(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER))}toRangeMapping2(e,n){if(N1(this.original.endLineNumberExclusive,e)&&N1(this.modified.endLineNumberExclusive,n))return new ie(new R(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new R(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1));if(!this.original.isEmpty&&!this.modified.isEmpty)return new ie(R.fromPositions(new B(this.original.startLineNumber,1),ct(new B(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),R.fromPositions(new B(this.modified.startLineNumber,1),ct(new B(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));if(this.original.startLineNumber>1&&this.modified.startLineNumber>1)return new ie(R.fromPositions(ct(new B(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER),e),ct(new B(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),R.fromPositions(ct(new B(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER),n),ct(new B(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));throw new H}};function ct(t,e){if(t.lineNumber<1)return new B(1,1);if(t.lineNumber>e.length)return new B(e.length,e[e.length-1].length+1);let n=e[t.lineNumber-1];return t.column>n.length+1?new B(t.lineNumber,n.length+1):t}function N1(t,e){return t>=1&&t<=e.length}var Ee=class t extends ue{static fromRangeMappings(e){let n=U.join(e.map(s=>U.fromRangeInclusive(s.originalRange))),r=U.join(e.map(s=>U.fromRangeInclusive(s.modifiedRange)));return new t(n,r,e)}constructor(e,n,r){super(e,n),this.innerChanges=r}flip(){return new t(this.modified,this.original,this.innerChanges?.map(e=>e.flip()))}withInnerChangesFromLineRanges(){return new t(this.original,this.modified,[this.toRangeMapping()])}},ie=class t{static fromEdit(e){let n=e.getNewRanges();return e.replacements.map((s,i)=>new t(s.range,n[i]))}static assertSorted(e){for(let n=1;n${this.modifiedRange.toString()}}`}flip(){return new t(this.modifiedRange,this.originalRange)}toTextEdit(e){let n=e.getValueOfRange(this.modifiedRange);return new De(this.originalRange,n)}};function Tt(t,e,n,r=!1){let s=[];for(let i of b1(t.map(a=>Yo(a,e,n)),(a,l)=>a.original.intersectsOrTouches(l.original)||a.modified.intersectsOrTouches(l.modified))){let a=i[0],l=i[i.length-1];s.push(new Ee(a.original.join(l.original),a.modified.join(l.modified),i.map(u=>u.innerChanges[0])))}return xe(()=>!r&&s.length>0&&(s[0].modified.startLineNumber!==s[0].original.startLineNumber||n.length.lineCount-s[s.length-1].modified.endLineNumberExclusive!==e.length.lineCount-s[s.length-1].original.endLineNumberExclusive)?!1:et(s,(i,a)=>a.original.startLineNumber-i.original.endLineNumberExclusive===a.modified.startLineNumber-i.modified.endLineNumberExclusive&&i.original.endLineNumberExclusive=n.getLineLength(t.modifiedRange.startLineNumber)&&t.originalRange.startColumn-1>=e.getLineLength(t.originalRange.startLineNumber)&&t.originalRange.startLineNumber<=t.originalRange.endLineNumber+s&&t.modifiedRange.startLineNumber<=t.modifiedRange.endLineNumber+s&&(r=1);let i=new U(t.originalRange.startLineNumber+r,t.originalRange.endLineNumber+1+s),a=new U(t.modifiedRange.startLineNumber+r,t.modifiedRange.endLineNumber+1+s);return new Ee(i,a,[t])}var Zo=3,An=class{computeDiff(e,n,r){let i=new Ir(e,n,{maxComputationTime:r.maxComputationTimeMs,shouldIgnoreTrimWhitespace:r.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}).computeDiff(),a=[],l=null;for(let u of i.changes){let c;u.originalEndLineNumber===0?c=new U(u.originalStartLineNumber+1,u.originalStartLineNumber+1):c=new U(u.originalStartLineNumber,u.originalEndLineNumber+1);let f;u.modifiedEndLineNumber===0?f=new U(u.modifiedStartLineNumber+1,u.modifiedStartLineNumber+1):f=new U(u.modifiedStartLineNumber,u.modifiedEndLineNumber+1);let h=new Ee(c,f,u.charChanges?.map(m=>new ie(new R(m.originalStartLineNumber,m.originalStartColumn,m.originalEndLineNumber,m.originalEndColumn),new R(m.modifiedStartLineNumber,m.modifiedStartColumn,m.modifiedEndLineNumber,m.modifiedEndColumn))));l&&(l.modified.endLineNumberExclusive===h.modified.startLineNumber||l.original.endLineNumberExclusive===h.original.startLineNumber)&&(h=new Ee(l.original.join(h.original),l.modified.join(h.modified),l.innerChanges&&h.innerChanges?l.innerChanges.concat(h.innerChanges):void 0),a.pop()),a.push(h),l=h}return xe(()=>et(a,(u,c)=>c.original.startLineNumber-u.original.endLineNumberExclusive===c.modified.startLineNumber-u.modified.endLineNumberExclusive&&u.original.endLineNumberExclusive(e===10?"\\n":String.fromCharCode(e))+`-(${this._lineNumbers[n]},${this._columns[n]})`).join(", ")+"]"}_assertIndex(e,n){if(e<0||e>=n.length)throw new Error("Illegal index")}getElements(){return this._charCodes}getStartLineNumber(e){return e>0&&e===this._lineNumbers.length?this.getEndLineNumber(e-1):(this._assertIndex(e,this._lineNumbers),this._lineNumbers[e])}getEndLineNumber(e){return e===-1?this.getStartLineNumber(e+1):(this._assertIndex(e,this._lineNumbers),this._charCodes[e]===10?this._lineNumbers[e]+1:this._lineNumbers[e])}getStartColumn(e){return e>0&&e===this._columns.length?this.getEndColumn(e-1):(this._assertIndex(e,this._columns),this._columns[e])}getEndColumn(e){return e===-1?this.getStartColumn(e+1):(this._assertIndex(e,this._columns),this._charCodes[e]===10?1:this._columns[e]+1)}},ht=class t{constructor(e,n,r,s,i,a,l,u){this.originalStartLineNumber=e,this.originalStartColumn=n,this.originalEndLineNumber=r,this.originalEndColumn=s,this.modifiedStartLineNumber=i,this.modifiedStartColumn=a,this.modifiedEndLineNumber=l,this.modifiedEndColumn=u}static createFromDiffChange(e,n,r){let s=n.getStartLineNumber(e.originalStart),i=n.getStartColumn(e.originalStart),a=n.getEndLineNumber(e.originalStart+e.originalLength-1),l=n.getEndColumn(e.originalStart+e.originalLength-1),u=r.getStartLineNumber(e.modifiedStart),c=r.getStartColumn(e.modifiedStart),f=r.getEndLineNumber(e.modifiedStart+e.modifiedLength-1),h=r.getEndColumn(e.modifiedStart+e.modifiedLength-1);return new t(s,i,a,l,u,c,f,h)}};function Ko(t){if(t.length<=1)return t;let e=[t[0]],n=e[0];for(let r=1,s=t.length;r0&&n.originalLength<20&&n.modifiedLength>0&&n.modifiedLength<20&&i()){let b=r.createCharSequence(e,n.originalStart,n.originalStart+n.originalLength-1),g=s.createCharSequence(e,n.modifiedStart,n.modifiedStart+n.modifiedLength-1);if(b.getElements().length>0&&g.getElements().length>0){let d=R1(b,g,i,!0).changes;l&&(d=Ko(d)),m=[];for(let w=0,L=d.length;w1&&d>1;){let w=m.charCodeAt(g-2),L=b.charCodeAt(d-2);if(w!==L)break;g--,d--}(g>1||d>1)&&this._pushTrimWhitespaceCharChange(s,i+1,1,g,a+1,1,d)}{let g=Vr(m,1),d=Vr(b,1),w=m.length+1,L=b.length+1;for(;g!0;let e=Date.now();return()=>Date.now()-e{r.push(t.fromOffsetPairs(s?s.getEndExclusives():pe.zero,i?i.getStarts():new pe(n,(s?s.seq2Range.endExclusive-s.seq1Range.endExclusive:0)+n)))}),r}static fromOffsetPairs(e,n){return new t(new F(e.offset1,n.offset1),new F(e.offset2,n.offset2))}static assertSorted(e){let n;for(let r of e){if(n&&!(n.seq1Range.endExclusive<=r.seq1Range.start&&n.seq2Range.endExclusive<=r.seq2Range.start))throw new H("Sequence diffs must be sorted");n=r}}constructor(e,n){this.seq1Range=e,this.seq2Range=n}swap(){return new t(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(e){return new t(this.seq1Range.join(e.seq1Range),this.seq2Range.join(e.seq2Range))}delta(e){return e===0?this:new t(this.seq1Range.delta(e),this.seq2Range.delta(e))}deltaStart(e){return e===0?this:new t(this.seq1Range.deltaStart(e),this.seq2Range.deltaStart(e))}deltaEnd(e){return e===0?this:new t(this.seq1Range.deltaEnd(e),this.seq2Range.deltaEnd(e))}intersect(e){let n=this.seq1Range.intersect(e.seq1Range),r=this.seq2Range.intersect(e.seq2Range);if(!(!n||!r))return new t(n,r)}getStarts(){return new pe(this.seq1Range.start,this.seq2Range.start)}getEndExclusives(){return new pe(this.seq1Range.endExclusive,this.seq2Range.endExclusive)}},pe=class t{static{this.zero=new t(0,0)}static{this.max=new t(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER)}constructor(e,n){this.offset1=e,this.offset2=n}toString(){return`${this.offset1} <-> ${this.offset2}`}delta(e){return e===0?this:new t(this.offset1+e,this.offset2+e)}equals(e){return this.offset1===e.offset1&&this.offset2===e.offset2}},Ie=class t{static{this.instance=new t}isValid(){return!0}},Mn=class{constructor(e){if(this.timeout=e,this.startTime=Date.now(),this.valid=!0,e<=0)throw new H("timeout must be positive")}isValid(){return!(Date.now()-this.startTime0&&d>0&&a.get(g-1,d-1)===3&&(v+=l.get(g-1,d-1)),v+=s?s(g,d):1):v=-1;let y=Math.max(w,L,v);if(y===v){let M=g>0&&d>0?l.get(g-1,d-1):0;l.set(g,d,M+1),a.set(g,d,3)}else y===w?(l.set(g,d,0),a.set(g,d,1)):y===L&&(l.set(g,d,0),a.set(g,d,2));i.set(g,d,y)}let u=[],c=e.length,f=n.length;function h(g,d){(g+1!==c||d+1!==f)&&u.push(new J(new F(g+1,c),new F(d+1,f))),c=g,f=d}let m=e.length-1,b=n.length-1;for(;m>=0&&b>=0;)a.get(m,b)===3?(h(m,b),m--,b--):a.get(m,b)===1?m--:b--;return h(-1,-1),u.reverse(),new be(u,!1)}};var mt=class{compute(e,n,r=Ie.instance){if(e.length===0||n.length===0)return be.trivial(e,n);let s=e,i=n;function a(d,w){for(;ds.length||M>i.length)continue;let D=a(y,M);u.set(f,D);let $=y===L?c.get(f+1):c.get(f-1);if(c.set(f,D!==y?new Tn($,y,M,D-y):$),u.get(f)===s.length&&u.get(f)-f===i.length)break e}}let h=c.get(f),m=[],b=s.length,g=i.length;for(;;){let d=h?h.x+h.length:0,w=h?h.y+h.length:0;if((d!==b||w!==g)&&m.push(new J(new F(d,b),new F(w,g))),!h)break;b=h.x,g=h.y,h=h.prev}return m.reverse(),new be(m,!1)}},Tn=class{constructor(e,n,r,s){this.prev=e,this.x=n,this.y=r,this.length=s}},qr=class{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,n){if(e<0){if(e=-e-1,e>=this.negativeArr.length){let r=this.negativeArr;this.negativeArr=new Int32Array(r.length*2),this.negativeArr.set(r)}this.negativeArr[e]=n}else{if(e>=this.positiveArr.length){let r=this.positiveArr;this.positiveArr=new Int32Array(r.length*2),this.positiveArr.set(r)}this.positiveArr[e]=n}}},Ur=class{constructor(){this.positiveArr=[],this.negativeArr=[]}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,n){e<0?(e=-e-1,this.negativeArr[e]=n):this.positiveArr[e]=n}};var Be=class{constructor(e,n,r){this.lines=e,this.range=n,this.considerWhitespaceChanges=r,this.elements=[],this.firstElementOffsetByLineIdx=[],this.lineStartOffsets=[],this.trimmedWsLengthsByLineIdx=[],this.firstElementOffsetByLineIdx.push(0);for(let s=this.range.startLineNumber;s<=this.range.endLineNumber;s++){let i=e[s-1],a=0;s===this.range.startLineNumber&&this.range.startColumn>1&&(a=this.range.startColumn-1,i=i.substring(a)),this.lineStartOffsets.push(a);let l=0;if(!r){let c=i.trimStart();l=i.length-c.length,i=c.trimEnd()}this.trimmedWsLengthsByLineIdx.push(l);let u=s===this.range.endLineNumber?Math.min(this.range.endColumn-1-a-l,i.length):i.length;for(let c=0;cString.fromCharCode(n)).join("")}getElement(e){return this.elements[e]}get length(){return this.elements.length}getBoundaryScore(e){let n=E1(e>0?this.elements[e-1]:-1),r=E1(ei<=e),s=e-this.firstElementOffsetByLineIdx[r];return new B(this.range.startLineNumber+r,1+this.lineStartOffsets[r]+s+(s===0&&n==="left"?0:this.trimmedWsLengthsByLineIdx[r]))}translateRange(e){let n=this.translateOffset(e.start,"right"),r=this.translateOffset(e.endExclusive,"left");return r.isBefore(n)?R.fromPositions(r,r):R.fromPositions(n,r)}findWordContaining(e){if(e<0||e>=this.elements.length||!dt(this.elements[e]))return;let n=e;for(;n>0&&dt(this.elements[n-1]);)n--;let r=e;for(;r=this.elements.length||!dt(this.elements[e]))return;let n=e;for(;n>0&&dt(this.elements[n-1])&&!C1(this.elements[n]);)n--;let r=e;for(;rs<=e.start)??0,r=L1(this.firstElementOffsetByLineIdx,s=>e.endExclusive<=s)??this.elements.length;return new F(n,r)}};function dt(t){return t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57}function C1(t){return t>=65&&t<=90}var ea={0:0,1:0,2:0,3:10,4:2,5:30,6:3,7:10,8:10};function A1(t){return ea[t]}function E1(t){return t===10?8:t===13?7:Dt(t)?6:t>=97&&t<=122?0:t>=65&&t<=90?1:t>=48&&t<=57?2:t===-1?3:t===44||t===59?5:4}function k1(t,e,n,r,s,i){let{moves:a,excludedChanges:l}=na(t,e,n,i);if(!i.isValid())return[];let u=t.filter(f=>!l.has(f)),c=ra(u,r,s,e,n,i);return _1(a,c),a=sa(a),a=a.filter(f=>{let h=f.original.toOffsetRange().slice(e).map(b=>b.trim());return h.join(` +`).length>=15&&ta(h,b=>b.length>=2)>=2}),a=ia(t,a),a}function ta(t,e){let n=0;for(let r of t)e(r)&&n++;return n}function na(t,e,n,r){let s=[],i=t.filter(u=>u.modified.isEmpty&&u.original.length>=3).map(u=>new Ft(u.original,e,u)),a=new Set(t.filter(u=>u.original.isEmpty&&u.modified.length>=3).map(u=>new Ft(u.modified,n,u))),l=new Set;for(let u of i){let c=-1,f;for(let h of a){let m=u.computeSimilarity(h);m>c&&(c=m,f=h)}if(c>.9&&f&&(a.delete(f),s.push(new ue(u.range,f.range)),l.add(u.source),l.add(f.source)),!r.isValid())return{moves:s,excludedChanges:l}}return{moves:s,excludedChanges:l}}function ra(t,e,n,r,s,i){let a=[],l=new xn;for(let m of t)for(let b=m.original.startLineNumber;bm.modified.startLineNumber,Xe));for(let m of t){let b=[];for(let g=m.modified.startLineNumber;g{for(let M of b)if(M.originalLineRange.endLineNumberExclusive+1===v.endLineNumberExclusive&&M.modifiedLineRange.endLineNumberExclusive+1===w.endLineNumberExclusive){M.originalLineRange=new U(M.originalLineRange.startLineNumber,v.endLineNumberExclusive),M.modifiedLineRange=new U(M.modifiedLineRange.startLineNumber,w.endLineNumberExclusive),L.push(M);return}let y={modifiedLineRange:w,originalLineRange:v};u.push(y),L.push(y)}),b=L}if(!i.isValid())return[]}u.sort(y1(Re(m=>m.modifiedLineRange.length,Xe)));let c=new Qe,f=new Qe;for(let m of u){let b=m.modifiedLineRange.startLineNumber-m.originalLineRange.startLineNumber,g=c.subtractFrom(m.modifiedLineRange),d=f.subtractFrom(m.originalLineRange).getWithDelta(b),w=g.getIntersection(d);for(let L of w.ranges){if(L.length<3)continue;let v=L,y=L.delta(-b);a.push(new ue(y,v)),c.addRange(v),f.addRange(y)}}a.sort(Re(m=>m.original.startLineNumber,Xe));let h=new kt(t);for(let m=0;m$.original.startLineNumber<=b.original.startLineNumber),d=Ce(t,$=>$.modified.startLineNumber<=b.modified.startLineNumber),w=Math.max(b.original.startLineNumber-g.original.startLineNumber,b.modified.startLineNumber-d.modified.startLineNumber),L=h.findLastMonotonous($=>$.original.startLineNumber$.modified.startLineNumberr.length||x>s.length||c.contains(x)||f.contains($)||!M1(r[$-1],s[x-1],i))break}M>0&&(f.addRange(new U(b.original.startLineNumber-M,b.original.startLineNumber)),c.addRange(new U(b.modified.startLineNumber-M,b.modified.startLineNumber)));let D;for(D=0;Dr.length||x>s.length||c.contains(x)||f.contains($)||!M1(r[$-1],s[x-1],i))break}D>0&&(f.addRange(new U(b.original.endLineNumberExclusive,b.original.endLineNumberExclusive+D)),c.addRange(new U(b.modified.endLineNumberExclusive,b.modified.endLineNumberExclusive+D))),(M>0||D>0)&&(a[m]=new ue(new U(b.original.startLineNumber-M,b.original.endLineNumberExclusive+D),new U(b.modified.startLineNumber-M,b.modified.endLineNumberExclusive+D)))}return a}function M1(t,e,n){if(t.trim()===e.trim())return!0;if(t.length>300&&e.length>300)return!1;let s=new mt().compute(new Be([t],new R(1,1,1,t.length),!1),new Be([e],new R(1,1,1,e.length),!1),n),i=0,a=J.invert(s.diffs,t.length);for(let f of a)f.seq1Range.forEach(h=>{Dt(t.charCodeAt(h))||i++});function l(f){let h=0;for(let m=0;me.length?t:e);return i/u>.6&&u>10}function sa(t){if(t.length===0)return t;t.sort(Re(n=>n.original.startLineNumber,Xe));let e=[t[0]];for(let n=1;n=0&&a>=0&&i+a<=2){e[e.length-1]=r.join(s);continue}e.push(s)}return e}function ia(t,e){let n=new kt(t);return e=e.filter(r=>{let s=n.findLastMonotonous(l=>l.original.startLineNumberl.modified.startLineNumber0&&(l=l.delta(c))}s.push(l)}return r.length>0&&s.push(r[r.length-1]),s}function oa(t,e,n){if(!t.getBoundaryScore||!e.getBoundaryScore)return n;for(let r=0;r0?n[r-1]:void 0,i=n[r],a=r+1=r.start&&t.seq2Range.start-a>=s.start&&n.isStronglyEqual(t.seq2Range.start-a,t.seq2Range.endExclusive-a)&&a<100;)a++;a--;let l=0;for(;t.seq1Range.start+lc&&(c=g,u=f)}return t.delta(u)}function F1(t,e,n){let r=[];for(let s of n){let i=r[r.length-1];if(!i){r.push(s);continue}s.seq1Range.start-i.seq1Range.endExclusive<=2||s.seq2Range.start-i.seq2Range.endExclusive<=2?r[r.length-1]=new J(i.seq1Range.join(s.seq1Range),i.seq2Range.join(s.seq2Range)):r.push(s)}return r}function Or(t,e,n,r,s=!1){let i=J.invert(n,t.length),a=[],l=new pe(0,0);function u(f,h){if(f.offset10;){let v=i[0];if(!(v.seq1Range.intersects(g.seq1Range)||v.seq2Range.intersects(g.seq2Range)))break;let M=r(t,v.seq1Range.start),D=r(e,v.seq2Range.start),$=new J(M,D),x=$.intersect(v);if(w+=x.seq1Range.length,L+=x.seq2Range.length,g=g.join($),g.seq1Range.endExclusive>=v.seq1Range.endExclusive)i.shift();else break}(s&&w+L0;){let f=i.shift();f.seq1Range.isEmpty||(u(f.getStarts(),f),u(f.getEndExclusives().delta(-1),f))}return aa(n,a)}function aa(t,e){let n=[];for(;t.length>0||e.length>0;){let r=t[0],s=e[0],i;r&&(!s||r.seq1Range.start0&&n[n.length-1].seq1Range.endExclusive>=i.seq1Range.start?n[n.length-1]=n[n.length-1].join(i):n.push(i)}return n}function D1(t,e,n){let r=n;if(r.length===0)return r;let s=0,i;do{i=!1;let a=[r[0]];for(let l=1;l5||b.seq1Range.length+b.seq2Range.length>5)},u=r[l],c=a[a.length-1];f(c,u)?(i=!0,a[a.length-1]=a[a.length-1].join(u)):a.push(u)}r=a}while(s++<10&&i);return r}function I1(t,e,n){let r=n;if(r.length===0)return r;let s=0,i;do{i=!1;let l=[r[0]];for(let u=1;u5||d.length>500)return!1;let L=t.getText(d).trim();if(L.length>20||L.split(/\r\n|\r|\n/).length>1)return!1;let v=t.countLinesIn(b.seq1Range),y=b.seq1Range.length,M=e.countLinesIn(b.seq2Range),D=b.seq2Range.length,$=t.countLinesIn(g.seq1Range),x=g.seq1Range.length,_=e.countLinesIn(g.seq2Range),S=g.seq2Range.length,V=130;function W(q){return Math.min(q,V)}return Math.pow(Math.pow(W(v*40+y),1.5)+Math.pow(W(M*40+D),1.5),1.5)+Math.pow(Math.pow(W($*40+x),1.5)+Math.pow(W(_*40+S),1.5),1.5)>(V**1.5)**1.5*1.3},c=r[u],f=l[l.length-1];h(f,c)?(i=!0,l[l.length-1]=l[l.length-1].join(c)):l.push(c)}r=l}while(s++<10&&i);let a=[];return x1(r,(l,u,c)=>{let f=u;function h(L){return L.length>0&&L.trim().length<=3&&u.seq1Range.length+u.seq2Range.length>100}let m=t.extendToFullLines(u.seq1Range),b=t.getText(new F(m.start,u.seq1Range.start));h(b)&&(f=f.deltaStart(-b.length));let g=t.getText(new F(u.seq1Range.endExclusive,m.endExclusive));h(g)&&(f=f.deltaEnd(g.length));let d=J.fromOffsetPairs(l?l.getEndExclusives():pe.zero,c?c.getStarts():pe.max),w=f.intersect(d);a.length>0&&w.getStarts().equals(a[a.length-1].getEndExclusives())?a[a.length-1]=a[a.length-1].join(w):a.push(w)}),a}var It=class{constructor(e,n){this.trimmedHash=e,this.lines=n}getElement(e){return this.trimmedHash[e]}get length(){return this.trimmedHash.length}getBoundaryScore(e){let n=e===0?0:B1(this.lines[e-1]),r=e===this.lines.length?0:B1(this.lines[e]);return 1e3-(n+r)}getText(e){return this.lines.slice(e.start,e.endExclusive).join(` +`)}isStronglyEqual(e,n){return this.lines[e]===this.lines[n]}};function B1(t){let e=0;for(;ex===_))return new ge([],[],!1);if(e.length===1&&e[0].length===0||n.length===1&&n[0].length===0)return new ge([new Ee(new U(1,e.length+1),new U(1,n.length+1),[new ie(new R(1,1,e.length,e[e.length-1].length+1),new R(1,1,n.length,n[n.length-1].length+1))])],[],!1);let s=r.maxComputationTimeMs===0?Ie.instance:new Mn(r.maxComputationTimeMs),i=!r.ignoreTrimWhitespace,a=new Map;function l(x){let _=a.get(x);return _===void 0&&(_=a.size,a.set(x,_)),_}let u=e.map(x=>l(x.trim())),c=n.map(x=>l(x.trim())),f=new It(u,e),h=new It(c,n),m=f.length+h.length<1700?this.dynamicProgrammingDiffing.compute(f,h,s,(x,_)=>e[x]===n[_]?n[_].length===0?.1:1+Math.log(1+n[_].length):.99):this.myersDiffingAlgorithm.compute(f,h,s),b=m.diffs,g=m.hitTimeout;b=Wr(f,h,b),b=D1(f,h,b);let d=[],w=x=>{if(i)for(let _=0;_x.seq1Range.start-L===x.seq2Range.start-v);let _=x.seq1Range.start-L;w(_),L=x.seq1Range.endExclusive,v=x.seq2Range.endExclusive;let S=this.refineDiff(e,n,x,s,i,r);S.hitTimeout&&(g=!0);for(let V of S.mappings)d.push(V)}w(e.length-L);let y=new Ye(e),M=new Ye(n),D=Tt(d,y,M),$=[];return r.computeMoves&&($=this.computeMoves(D,e,n,u,c,s,i,r)),xe(()=>{function x(S,V){if(S.lineNumber<1||S.lineNumber>V.length)return!1;let W=V[S.lineNumber-1];return!(S.column<1||S.column>W.length+1)}function _(S,V){return!(S.startLineNumber<1||S.startLineNumber>V.length+1||S.endLineNumberExclusive<1||S.endLineNumberExclusive>V.length+1)}for(let S of D){if(!S.innerChanges)return!1;for(let V of S.innerChanges)if(!(x(V.modifiedRange.getStartPosition(),n)&&x(V.modifiedRange.getEndPosition(),n)&&x(V.originalRange.getStartPosition(),e)&&x(V.originalRange.getEndPosition(),e)))return!1;if(!_(S.modified,n)||!_(S.original,e))return!1}return!0}),new ge(D,$,g)}computeMoves(e,n,r,s,i,a,l,u){return k1(e,n,r,s,i,a).map(h=>{let m=this.refineDiff(n,r,new J(h.original.toOffsetRange(),h.modified.toOffsetRange()),a,l,u),b=Tt(m.mappings,new Ye(n),new Ye(r),!0);return new lt(h,b)})}refineDiff(e,n,r,s,i,a){let u=la(r).toRangeMapping2(e,n),c=new Be(e,u.originalRange,i),f=new Be(n,u.modifiedRange,i),h=c.length+f.length<500?this.dynamicProgrammingDiffing.compute(c,f,s):this.myersDiffingAlgorithm.compute(c,f,s),m=h.diffs;return m=Wr(c,f,m),m=Or(c,f,m,(g,d)=>g.findWordContaining(d)),a.extendToSubwords&&(m=Or(c,f,m,(g,d)=>g.findSubWordContaining(d),!0)),m=F1(c,f,m),m=I1(c,f,m),{mappings:m.map(g=>new ie(c.translateRange(g.seq1Range),f.translateRange(g.seq2Range))),hitTimeout:h.hitTimeout}}};function la(t){return new ue(new U(t.seq1Range.start+1,t.seq1Range.endExclusive+1),new U(t.seq2Range.start+1,t.seq2Range.endExclusive+1))}var Ve;(function(t){t.inMemory="inmemory",t.vscode="vscode",t.internal="private",t.walkThrough="walkThrough",t.walkThroughSnippet="walkThroughSnippet",t.http="http",t.https="https",t.file="file",t.mailto="mailto",t.untitled="untitled",t.data="data",t.command="command",t.vscodeRemote="vscode-remote",t.vscodeRemoteResource="vscode-remote-resource",t.vscodeManagedRemoteResource="vscode-managed-remote-resource",t.vscodeUserData="vscode-userdata",t.vscodeCustomEditor="vscode-custom-editor",t.vscodeNotebookCell="vscode-notebook-cell",t.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",t.vscodeNotebookCellMetadataDiff="vscode-notebook-cell-metadata-diff",t.vscodeNotebookCellOutput="vscode-notebook-cell-output",t.vscodeNotebookCellOutputDiff="vscode-notebook-cell-output-diff",t.vscodeNotebookMetadata="vscode-notebook-metadata",t.vscodeInteractiveInput="vscode-interactive-input",t.vscodeSettings="vscode-settings",t.vscodeWorkspaceTrust="vscode-workspace-trust",t.vscodeTerminal="vscode-terminal",t.vscodeImageCarousel="vscode-image-carousel",t.vscodeChatCodeBlock="vscode-chat-code-block",t.vscodeChatCodeCompareBlock="vscode-chat-code-compare-block",t.vscodeChatEditor="vscode-chat-editor",t.vscodeChatInput="chatSessionInput",t.vscodeLocalChatSession="vscode-chat-session",t.webviewPanel="webview-panel",t.vscodeWebview="vscode-webview",t.vscodeBrowser="vscode-browser",t.extension="extension",t.vscodeFileResource="vscode-file",t.tmp="tmp",t.vsls="vsls",t.vscodeSourceControl="vscode-scm",t.commentsInput="comment",t.codeSetting="code-setting",t.outputChannel="output",t.accessibleView="accessible-view",t.chatEditingSnapshotScheme="chat-editing-snapshot-text-model",t.chatEditingModel="chat-editing-text-model",t.copilotPr="copilot-pr"})(Ve||(Ve={}));var ua="tkn",$r=class{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null,this._serverRootPath="/"}setPreferredWebSchema(e){this._preferredWebSchema=e}get _remoteResourcesPath(){return Z.join(this._serverRootPath,Ve.vscodeRemoteResource)}rewrite(e){if(this._delegate)try{return this._delegate(e)}catch(l){return ss(l),e}let n=e.authority,r=this._hosts[n];r&&r.indexOf(":")!==-1&&r.indexOf("[")===-1&&(r=`[${r}]`);let s=this._ports[n],i=this._connectionTokens[n],a=`path=${encodeURIComponent(e.path)}`;return typeof i=="string"&&(a+=`&${ua}=${encodeURIComponent(i)}`),se.from({scheme:Kn?this._preferredWebSchema:Ve.vscodeRemoteResource,authority:`${r}:${s}`,path:this._remoteResourcesPath,query:a})}},ca=new $r,q1="vs/../../node_modules",ha="vscode-app",zr=class t{static{this.FALLBACK_AUTHORITY=ha}asBrowserUri(e){let n=this.toUri(e);return this.uriToBrowserUri(n)}uriToBrowserUri(e){return e.scheme===Ve.vscodeRemote?ca.rewrite(e):e.scheme===Ve.file&&(ms||ds===`${Ve.vscodeFileResource}://${t.FALLBACK_AUTHORITY}`)?e.with({scheme:Ve.vscodeFileResource,authority:e.authority||t.FALLBACK_AUTHORITY,query:null,fragment:null}):e}toUri(e){if(se.isUri(e))return e;if(globalThis._VSCODE_FILE_ROOT){let n=globalThis._VSCODE_FILE_ROOT;if(/^\w[\w\d+.-]*:\/\//.test(n))return se.joinPath(se.parse(n,!0),e);let r=Hs(n,e);return se.file(r)}throw new Error("Cannot determine URI for module id!")}},U1=new zr,V1;(function(t){let e=new Map([["1",{"Cross-Origin-Opener-Policy":"same-origin"}],["2",{"Cross-Origin-Embedder-Policy":"require-corp"}],["3",{"Cross-Origin-Opener-Policy":"same-origin","Cross-Origin-Embedder-Policy":"require-corp"}]]);t.CoopAndCoep=Object.freeze(e.get("3"));let n="vscode-coi";function r(i){let a;typeof i=="string"?a=new URL(i).searchParams:i instanceof URL?a=i.searchParams:se.isUri(i)&&(a=new URL(i.toString(!0)).searchParams);let l=a?.get(n);if(l)return e.get(l)}t.getHeadersFromQuery=r;function s(i,a,l){if(!globalThis.crossOriginIsolated)return;let u=a&&l?"3":l?"2":"1";i instanceof URLSearchParams?i.set(n,u):i[n]=u}t.addSearchParam=s})(V1||(V1={}));function W1(t,e){(globalThis._VSCODE_PRODUCT_JSON??globalThis.vscode?.context?.configuration()?.product)?.commit;let r=`${t}/${e}`,i=`${q1}/${r}`;return U1.asBrowserUri(i).toString(!0)}var Fn=class{constructor(e){this.replacements=e;let n=-1;for(let r of e){if(!(r.replaceRange.start>=n))throw new H(`Edits must be disjoint and sorted. Found ${r} after ${n}`);n=r.replaceRange.endExclusive}}toString(){return`[${this.replacements.map(n=>n.toString()).join(", ")}]`}normalize(){let e=[],n;for(let r of this.replacements)if(!(r.getNewLength()===0&&r.replaceRange.length===0)){if(n&&n.replaceRange.endExclusive===r.replaceRange.start){let s=n.tryJoinTouching(r);if(s){n=s;continue}}n&&e.push(n),n=r}return n&&e.push(n),this._createNew(e)}compose(e){let n=this.normalize(),r=e.normalize();if(n.isEmpty())return r;if(r.isEmpty())return n;let s=[...n.replacements],i=[],a=0;for(let l of r.replacements){for(;;){let h=s[0];if(!h||h.replaceRange.start+a+h.getNewLength()>=l.replaceRange.start)break;s.shift(),i.push(h),a+=h.getNewLength()-h.replaceRange.length}let u=a,c,f;for(;;){let h=s[0];if(!h||h.replaceRange.start+a>l.replaceRange.endExclusive)break;c||(c=h),f=h,s.shift(),a+=h.getNewLength()-h.replaceRange.length}if(!c)i.push(l.delta(-a));else{let h=Math.min(c.replaceRange.start,l.replaceRange.start-u),m=l.replaceRange.start-(c.replaceRange.start+u);if(m>0){let w=c.slice(F.emptyAt(h),new F(0,m));i.push(w)}if(!f)throw new H("Invariant violation: lastIntersecting is undefined");let b=f.replaceRange.endExclusive+a-l.replaceRange.endExclusive;if(b>0){let w=f.slice(F.ofStartAndLength(f.replaceRange.endExclusive,0),new F(f.getNewLength()-b,f.getNewLength()));s.unshift(w),a-=w.getNewLength()-w.replaceRange.length}let g=new F(h,l.replaceRange.endExclusive-a),d=l.slice(g,new F(0,l.getNewLength()));i.push(d)}}for(;;){let l=s.shift();if(!l)break;i.push(l)}return this._createNew(i).normalize()}getNewRanges(){let e=[],n=0;for(let r of this.replacements)e.push(F.ofStartAndLength(r.replaceRange.start+n,r.getNewLength())),n+=r.getLengthDelta();return e}isEmpty(){return this.replacements.length===0}applyToOffsetOrUndefined(e){let n=0;for(let r of this.replacements)if(r.replaceRange.start<=e){if(e ${this.getNewLength()} }`}get isEmpty(){return this.getNewLength()===0&&this.replaceRange.length===0}getRangeAfterReplace(){return new F(this.replaceRange.start,this.replaceRange.start+this.getNewLength())}};var Hr=class extends Fn{apply(e){let n=[],r=0;for(let s of this.replacements)n.push(e.substring(r,s.replaceRange.start)),n.push(s.newText),r=s.replaceRange.endExclusive;return n.push(e.substring(r)),n.join("")}removeCommonSuffixPrefix(e){let n=[];for(let r of this.replacements){let s=r.removeCommonSuffixPrefix(e);s.isEmpty||n.push(s)}return new Bt(n)}},jr=class extends Dn{constructor(e,n){super(e),this.newText=n}getNewLength(){return this.newText.length}toString(){return`${this.replaceRange} -> ${JSON.stringify(this.newText)}`}replace(e){return e.substring(0,this.replaceRange.start)+this.newText+e.substring(this.replaceRange.endExclusive)}removeCommonSuffixPrefix(e){let n=e.substring(this.replaceRange.start,this.replaceRange.endExclusive),r=Lt(n,this.newText),s=Math.min(n.length-r,this.newText.length-r,vt(n,this.newText)),i=new F(this.replaceRange.start+r,this.replaceRange.endExclusive-s),a=this.newText.substring(r,this.newText.length-s);return new gt(i,a)}removeCommonSuffixAndPrefix(e){return this.removeCommonSuffix(e).removeCommonPrefix(e)}removeCommonPrefix(e){let n=this.replaceRange.substring(e),r=Lt(n,this.newText);return r===0?this:this.slice(this.replaceRange.deltaStart(r),new F(r,this.newText.length))}removeCommonSuffix(e){let n=this.replaceRange.substring(e),r=vt(n,this.newText);return r===0?this:this.slice(this.replaceRange.deltaEnd(-r),new F(0,this.newText.length-r))}toJson(){return{txt:this.newText,pos:this.replaceRange.start,len:this.replaceRange.length}}},Bt=class t extends Hr{static{this.empty=new t([])}static replace(e,n){return new t([new gt(e,n)])}static compose(e){if(e.length===0)return t.empty;let n=e[0];for(let r=1;re.createDiffComputer({useWasm:!0}))),Qr):(Xr||(Xr=O1().then(e=>e.createDiffComputer({useWasm:!1}))),Xr)}async function Yr(t){let e=await fa(t);return new Jr(e)}var Jr=class{constructor(e){this._computer=e}computeDiff(e,n,r){let s=new Fe(e.join(` +`)),i=new Fe(n.join(` +`)),a=this._computer.computeDiff(s.value,i.value,{ignoreTrimWhitespace:!0,computeMoves:r.computeMoves,extendToSubwords:r.extendToSubwords}),l=s.getTransformer(),u=i.getTransformer(),c=[],f=0;for(let b of a.edits.replacements){let g=b.range.start+f,d=g+b.newText.length,w=l.getRange(new F(b.range.start,b.range.endExclusive)),L=u.getRange(new F(g,d));c.push(new ie(w,L)),f+=b.newText.length-(b.range.endExclusive-b.range.start)}let h=Tt(c,s,i),m=[];if(r.computeMoves)for(let b of a.moves){let g=l.getPosition(b.range.original.start),d=l.getPosition(b.range.original.endExclusive),w=u.getPosition(b.range.modified.start),L=u.getPosition(b.range.modified.endExclusive),v=new U(g.lineNumber,d.lineNumber),y=new U(w.lineNumber,L.lineNumber);m.push(new lt(new ue(v,y),[]))}return new ge(h,m,a.hitTimeout)}};var Vt={getLegacy:()=>new An,getDefault:()=>new Pn,getAdvancedExternal:()=>Yr(!1),getAdvancedWasm:()=>Yr(!0)};function qe(t,e){let n=Math.pow(10,e);return Math.round(t*n)/n}var p=class{constructor(e,n,r,s=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,e))|0,this.g=Math.min(255,Math.max(0,n))|0,this.b=Math.min(255,Math.max(0,r))|0,this.a=qe(Math.max(Math.min(1,s),0),3)}static equals(e,n){return e.r===n.r&&e.g===n.g&&e.b===n.b&&e.a===n.a}},we=class t{constructor(e,n,r,s){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=qe(Math.max(Math.min(1,n),0),3),this.l=qe(Math.max(Math.min(1,r),0),3),this.a=qe(Math.max(Math.min(1,s),0),3)}static equals(e,n){return e.h===n.h&&e.s===n.s&&e.l===n.l&&e.a===n.a}static fromRGBA(e){let n=e.r/255,r=e.g/255,s=e.b/255,i=e.a,a=Math.max(n,r,s),l=Math.min(n,r,s),u=0,c=0,f=(l+a)/2,h=a-l;if(h>0){switch(c=Math.min(f<=.5?h/(2*f):h/(2-2*f),1),a){case n:u=(r-s)/h+(r1&&(r-=1),r<1/6?e+(n-e)*6*r:r<1/2?n:r<2/3?e+(n-e)*(2/3-r)*6:e}static toRGBA(e){let n=e.h/360,{s:r,l:s,a:i}=e,a,l,u;if(r===0)a=l=u=s;else{let c=s<.5?s*(1+r):s+r-s*r,f=2*s-c;a=t._hue2rgb(f,c,n+1/3),l=t._hue2rgb(f,c,n),u=t._hue2rgb(f,c,n-1/3)}return new p(Math.round(a*255),Math.round(l*255),Math.round(u*255),i)}},pt=class t{constructor(e,n,r,s){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=qe(Math.max(Math.min(1,n),0),3),this.v=qe(Math.max(Math.min(1,r),0),3),this.a=qe(Math.max(Math.min(1,s),0),3)}static equals(e,n){return e.h===n.h&&e.s===n.s&&e.v===n.v&&e.a===n.a}static fromRGBA(e){let n=e.r/255,r=e.g/255,s=e.b/255,i=Math.max(n,r,s),a=Math.min(n,r,s),l=i-a,u=i===0?0:l/i,c;return l===0?c=0:i===n?c=((r-s)/l%6+6)%6:i===r?c=(s-n)/l+2:c=(n-r)/l+4,new t(Math.round(c*60),u,i,e.a)}static toRGBA(e){let{h:n,s:r,v:s,a:i}=e,a=s*r,l=a*(1-Math.abs(n/60%2-1)),u=s-a,[c,f,h]=[0,0,0];return n<60?(c=a,f=l):n<120?(c=l,f=a):n<180?(f=a,h=l):n<240?(f=l,h=a):n<300?(c=l,h=a):n<=360&&(c=a,h=l),c=Math.round((c+u)*255),f=Math.round((f+u)*255),h=Math.round((h+u)*255),new p(c,f,h,i)}},Ze=class t{static fromHex(e){return t.Format.CSS.parseHex(e)||t.red}static equals(e,n){return!e&&!n?!0:!e||!n?!1:e.equals(n)}get hsla(){return this._hsla?this._hsla:we.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:pt.fromRGBA(this.rgba)}constructor(e){if(e)if(e instanceof p)this.rgba=e;else if(e instanceof we)this._hsla=e,this.rgba=we.toRGBA(e);else if(e instanceof pt)this._hsva=e,this.rgba=pt.toRGBA(e);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}equals(e){return!!e&&p.equals(this.rgba,e.rgba)&&we.equals(this.hsla,e.hsla)&&pt.equals(this.hsva,e.hsva)}getRelativeLuminance(){let e=t._relativeLuminanceForComponent(this.rgba.r),n=t._relativeLuminanceForComponent(this.rgba.g),r=t._relativeLuminanceForComponent(this.rgba.b),s=.2126*e+.7152*n+.0722*r;return qe(s,4)}static _relativeLuminanceForComponent(e){let n=e/255;return n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)}isLighter(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3>=128}isLighterThan(e){let n=this.getRelativeLuminance(),r=e.getRelativeLuminance();return n>r}isDarkerThan(e){let n=this.getRelativeLuminance(),r=e.getRelativeLuminance();return n>>0),this._toNumber32Bit}static getLighterColor(e,n,r){if(e.isLighterThan(n))return e;r=r||.5;let s=e.getRelativeLuminance(),i=n.getRelativeLuminance();return r=r*(i-s)/i,e.lighten(r)}static getDarkerColor(e,n,r){if(e.isDarkerThan(n))return e;r=r||.5;let s=e.getRelativeLuminance(),i=n.getRelativeLuminance();return r=r*(s-i)/s,e.darken(r)}static{this.white=new t(new p(255,255,255,1))}static{this.black=new t(new p(0,0,0,1))}static{this.red=new t(new p(255,0,0,1))}static{this.blue=new t(new p(0,0,255,1))}static{this.green=new t(new p(0,255,0,1))}static{this.cyan=new t(new p(0,255,255,1))}static{this.lightgrey=new t(new p(211,211,211,1))}static{this.transparent=new t(new p(0,0,0,0))}};(function(t){(function(e){(function(n){function r(d){return d.rgba.a===1?`rgb(${d.rgba.r}, ${d.rgba.g}, ${d.rgba.b})`:t.Format.CSS.formatRGBA(d)}n.formatRGB=r;function s(d){return`rgba(${d.rgba.r}, ${d.rgba.g}, ${d.rgba.b}, ${+d.rgba.a.toFixed(2)})`}n.formatRGBA=s;function i(d){return d.hsla.a===1?`hsl(${d.hsla.h}, ${Math.round(d.hsla.s*100)}%, ${Math.round(d.hsla.l*100)}%)`:t.Format.CSS.formatHSLA(d)}n.formatHSL=i;function a(d){return`hsla(${d.hsla.h}, ${Math.round(d.hsla.s*100)}%, ${Math.round(d.hsla.l*100)}%, ${d.hsla.a.toFixed(2)})`}n.formatHSLA=a;function l(d){let w=d.toString(16);return w.length!==2?"0"+w:w}function u(d){return`#${l(d.rgba.r)}${l(d.rgba.g)}${l(d.rgba.b)}`}n.formatHex=u;function c(d,w=!1){return w&&d.rgba.a===1?t.Format.CSS.formatHex(d):`#${l(d.rgba.r)}${l(d.rgba.g)}${l(d.rgba.b)}${l(Math.round(d.rgba.a*255))}`}n.formatHexA=c;function f(d){return d.isOpaque()?t.Format.CSS.formatHex(d):t.Format.CSS.formatRGBA(d)}n.format=f;function h(d){if(d==="transparent")return t.transparent;if(d.startsWith("#"))return b(d);if(d.startsWith("rgba(")){let w=d.match(/rgba\((?(?:\+|-)?\d+), *(?(?:\+|-)?\d+), *(?(?:\+|-)?\d+), *(?(?:\+|-)?\d+(\.\d+)?)\)/);if(!w)throw new Error("Invalid color format "+d);let L=parseInt(w.groups?.r??"0"),v=parseInt(w.groups?.g??"0"),y=parseInt(w.groups?.b??"0"),M=parseFloat(w.groups?.a??"0");return new t(new p(L,v,y,M))}if(d.startsWith("rgb(")){let w=d.match(/rgb\((?(?:\+|-)?\d+), *(?(?:\+|-)?\d+), *(?(?:\+|-)?\d+)\)/);if(!w)throw new Error("Invalid color format "+d);let L=parseInt(w.groups?.r??"0"),v=parseInt(w.groups?.g??"0"),y=parseInt(w.groups?.b??"0");return new t(new p(L,v,y))}return m(d)}n.parse=h;function m(d){switch(d){case"aliceblue":return new t(new p(240,248,255,1));case"antiquewhite":return new t(new p(250,235,215,1));case"aqua":return new t(new p(0,255,255,1));case"aquamarine":return new t(new p(127,255,212,1));case"azure":return new t(new p(240,255,255,1));case"beige":return new t(new p(245,245,220,1));case"bisque":return new t(new p(255,228,196,1));case"black":return new t(new p(0,0,0,1));case"blanchedalmond":return new t(new p(255,235,205,1));case"blue":return new t(new p(0,0,255,1));case"blueviolet":return new t(new p(138,43,226,1));case"brown":return new t(new p(165,42,42,1));case"burlywood":return new t(new p(222,184,135,1));case"cadetblue":return new t(new p(95,158,160,1));case"chartreuse":return new t(new p(127,255,0,1));case"chocolate":return new t(new p(210,105,30,1));case"coral":return new t(new p(255,127,80,1));case"cornflowerblue":return new t(new p(100,149,237,1));case"cornsilk":return new t(new p(255,248,220,1));case"crimson":return new t(new p(220,20,60,1));case"cyan":return new t(new p(0,255,255,1));case"darkblue":return new t(new p(0,0,139,1));case"darkcyan":return new t(new p(0,139,139,1));case"darkgoldenrod":return new t(new p(184,134,11,1));case"darkgray":return new t(new p(169,169,169,1));case"darkgreen":return new t(new p(0,100,0,1));case"darkgrey":return new t(new p(169,169,169,1));case"darkkhaki":return new t(new p(189,183,107,1));case"darkmagenta":return new t(new p(139,0,139,1));case"darkolivegreen":return new t(new p(85,107,47,1));case"darkorange":return new t(new p(255,140,0,1));case"darkorchid":return new t(new p(153,50,204,1));case"darkred":return new t(new p(139,0,0,1));case"darksalmon":return new t(new p(233,150,122,1));case"darkseagreen":return new t(new p(143,188,143,1));case"darkslateblue":return new t(new p(72,61,139,1));case"darkslategray":return new t(new p(47,79,79,1));case"darkslategrey":return new t(new p(47,79,79,1));case"darkturquoise":return new t(new p(0,206,209,1));case"darkviolet":return new t(new p(148,0,211,1));case"deeppink":return new t(new p(255,20,147,1));case"deepskyblue":return new t(new p(0,191,255,1));case"dimgray":return new t(new p(105,105,105,1));case"dimgrey":return new t(new p(105,105,105,1));case"dodgerblue":return new t(new p(30,144,255,1));case"firebrick":return new t(new p(178,34,34,1));case"floralwhite":return new t(new p(255,250,240,1));case"forestgreen":return new t(new p(34,139,34,1));case"fuchsia":return new t(new p(255,0,255,1));case"gainsboro":return new t(new p(220,220,220,1));case"ghostwhite":return new t(new p(248,248,255,1));case"gold":return new t(new p(255,215,0,1));case"goldenrod":return new t(new p(218,165,32,1));case"gray":return new t(new p(128,128,128,1));case"green":return new t(new p(0,128,0,1));case"greenyellow":return new t(new p(173,255,47,1));case"grey":return new t(new p(128,128,128,1));case"honeydew":return new t(new p(240,255,240,1));case"hotpink":return new t(new p(255,105,180,1));case"indianred":return new t(new p(205,92,92,1));case"indigo":return new t(new p(75,0,130,1));case"ivory":return new t(new p(255,255,240,1));case"khaki":return new t(new p(240,230,140,1));case"lavender":return new t(new p(230,230,250,1));case"lavenderblush":return new t(new p(255,240,245,1));case"lawngreen":return new t(new p(124,252,0,1));case"lemonchiffon":return new t(new p(255,250,205,1));case"lightblue":return new t(new p(173,216,230,1));case"lightcoral":return new t(new p(240,128,128,1));case"lightcyan":return new t(new p(224,255,255,1));case"lightgoldenrodyellow":return new t(new p(250,250,210,1));case"lightgray":return new t(new p(211,211,211,1));case"lightgreen":return new t(new p(144,238,144,1));case"lightgrey":return new t(new p(211,211,211,1));case"lightpink":return new t(new p(255,182,193,1));case"lightsalmon":return new t(new p(255,160,122,1));case"lightseagreen":return new t(new p(32,178,170,1));case"lightskyblue":return new t(new p(135,206,250,1));case"lightslategray":return new t(new p(119,136,153,1));case"lightslategrey":return new t(new p(119,136,153,1));case"lightsteelblue":return new t(new p(176,196,222,1));case"lightyellow":return new t(new p(255,255,224,1));case"lime":return new t(new p(0,255,0,1));case"limegreen":return new t(new p(50,205,50,1));case"linen":return new t(new p(250,240,230,1));case"magenta":return new t(new p(255,0,255,1));case"maroon":return new t(new p(128,0,0,1));case"mediumaquamarine":return new t(new p(102,205,170,1));case"mediumblue":return new t(new p(0,0,205,1));case"mediumorchid":return new t(new p(186,85,211,1));case"mediumpurple":return new t(new p(147,112,219,1));case"mediumseagreen":return new t(new p(60,179,113,1));case"mediumslateblue":return new t(new p(123,104,238,1));case"mediumspringgreen":return new t(new p(0,250,154,1));case"mediumturquoise":return new t(new p(72,209,204,1));case"mediumvioletred":return new t(new p(199,21,133,1));case"midnightblue":return new t(new p(25,25,112,1));case"mintcream":return new t(new p(245,255,250,1));case"mistyrose":return new t(new p(255,228,225,1));case"moccasin":return new t(new p(255,228,181,1));case"navajowhite":return new t(new p(255,222,173,1));case"navy":return new t(new p(0,0,128,1));case"oldlace":return new t(new p(253,245,230,1));case"olive":return new t(new p(128,128,0,1));case"olivedrab":return new t(new p(107,142,35,1));case"orange":return new t(new p(255,165,0,1));case"orangered":return new t(new p(255,69,0,1));case"orchid":return new t(new p(218,112,214,1));case"palegoldenrod":return new t(new p(238,232,170,1));case"palegreen":return new t(new p(152,251,152,1));case"paleturquoise":return new t(new p(175,238,238,1));case"palevioletred":return new t(new p(219,112,147,1));case"papayawhip":return new t(new p(255,239,213,1));case"peachpuff":return new t(new p(255,218,185,1));case"peru":return new t(new p(205,133,63,1));case"pink":return new t(new p(255,192,203,1));case"plum":return new t(new p(221,160,221,1));case"powderblue":return new t(new p(176,224,230,1));case"purple":return new t(new p(128,0,128,1));case"rebeccapurple":return new t(new p(102,51,153,1));case"red":return new t(new p(255,0,0,1));case"rosybrown":return new t(new p(188,143,143,1));case"royalblue":return new t(new p(65,105,225,1));case"saddlebrown":return new t(new p(139,69,19,1));case"salmon":return new t(new p(250,128,114,1));case"sandybrown":return new t(new p(244,164,96,1));case"seagreen":return new t(new p(46,139,87,1));case"seashell":return new t(new p(255,245,238,1));case"sienna":return new t(new p(160,82,45,1));case"silver":return new t(new p(192,192,192,1));case"skyblue":return new t(new p(135,206,235,1));case"slateblue":return new t(new p(106,90,205,1));case"slategray":return new t(new p(112,128,144,1));case"slategrey":return new t(new p(112,128,144,1));case"snow":return new t(new p(255,250,250,1));case"springgreen":return new t(new p(0,255,127,1));case"steelblue":return new t(new p(70,130,180,1));case"tan":return new t(new p(210,180,140,1));case"teal":return new t(new p(0,128,128,1));case"thistle":return new t(new p(216,191,216,1));case"tomato":return new t(new p(255,99,71,1));case"turquoise":return new t(new p(64,224,208,1));case"violet":return new t(new p(238,130,238,1));case"wheat":return new t(new p(245,222,179,1));case"white":return new t(new p(255,255,255,1));case"whitesmoke":return new t(new p(245,245,245,1));case"yellow":return new t(new p(255,255,0,1));case"yellowgreen":return new t(new p(154,205,50,1));default:return null}}function b(d){let w=d.length;if(w===0||d.charCodeAt(0)!==35)return null;if(w===7){let L=16*g(d.charCodeAt(1))+g(d.charCodeAt(2)),v=16*g(d.charCodeAt(3))+g(d.charCodeAt(4)),y=16*g(d.charCodeAt(5))+g(d.charCodeAt(6));return new t(new p(L,v,y,1))}if(w===9){let L=16*g(d.charCodeAt(1))+g(d.charCodeAt(2)),v=16*g(d.charCodeAt(3))+g(d.charCodeAt(4)),y=16*g(d.charCodeAt(5))+g(d.charCodeAt(6)),M=16*g(d.charCodeAt(7))+g(d.charCodeAt(8));return new t(new p(L,v,y,M/255))}if(w===4){let L=g(d.charCodeAt(1)),v=g(d.charCodeAt(2)),y=g(d.charCodeAt(3));return new t(new p(16*L+L,16*v+v,16*y+y))}if(w===5){let L=g(d.charCodeAt(1)),v=g(d.charCodeAt(2)),y=g(d.charCodeAt(3)),M=g(d.charCodeAt(4));return new t(new p(16*L+L,16*v+v,16*y+y,(16*M+M)/255))}return null}n.parseHex=b;function g(d){switch(d){case 48:return 0;case 49:return 1;case 50:return 2;case 51:return 3;case 52:return 4;case 53:return 5;case 54:return 6;case 55:return 7;case 56:return 8;case 57:return 9;case 97:return 10;case 65:return 10;case 98:return 11;case 66:return 11;case 99:return 12;case 67:return 12;case 100:return 13;case 68:return 13;case 101:return 14;case 69:return 14;case 102:return 15;case 70:return 15}return 0}})(e.CSS||(e.CSS={}))})(t.Format||(t.Format={}))})(Ze||(Ze={}));function H1(t){let e=[];for(let n of t){let r=Number(n);(r||r===0&&n.replace(/\s/g,"")!=="")&&e.push(r)}return e}function Zr(t,e,n,r){return{red:t/255,blue:n/255,green:e/255,alpha:r}}function qt(t,e){let n=e.index,r=e[0].length;if(n===void 0)return;let s=t.positionAt(n);return{startLineNumber:s.lineNumber,startColumn:s.column,endLineNumber:s.lineNumber,endColumn:s.column+r}}function ma(t,e){if(!t)return;let n=Ze.Format.CSS.parseHex(e);if(n)return{range:t,color:Zr(n.rgba.r,n.rgba.g,n.rgba.b,n.rgba.a)}}function $1(t,e,n){if(!t||e.length!==1)return;let s=e[0].values(),i=H1(s);return{range:t,color:Zr(i[0],i[1],i[2],n?i[3]:1)}}function z1(t,e,n){if(!t||e.length!==1)return;let s=e[0].values(),i=H1(s),a=new Ze(new we(i[0],i[1]/100,i[2]/100,n?i[3]:1));return{range:t,color:Zr(a.rgba.r,a.rgba.g,a.rgba.b,a.rgba.a)}}function Ut(t,e){return typeof t=="string"?[...t.matchAll(e)]:t.findMatches(e)}function da(t){let e=[],r=Ut(t,/\b(rgb|rgba|hsl|hsla)(\([0-9\s,.\%\/]*\))|^(#)([A-Fa-f0-9]{3})\b|^(#)([A-Fa-f0-9]{4})\b|^(#)([A-Fa-f0-9]{6})\b|^(#)([A-Fa-f0-9]{8})\b|(?<=['"\s])(#)([A-Fa-f0-9]{3})\b|(?<=['"\s])(#)([A-Fa-f0-9]{4})\b|(?<=['"\s])(#)([A-Fa-f0-9]{6})\b|(?<=['"\s])(#)([A-Fa-f0-9]{8})\b/gm);if(r.length>0)for(let s of r){let i=s.filter(c=>c!==void 0),a=i[1],l=i[2];if(!l)continue;let u;if(a==="rgb"){let c=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*[\s,]\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*[\s,]\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*\)$/gm;u=$1(qt(t,s),Ut(l,c),!1)}else if(a==="rgba"){let c=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*[\s,]\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*[\s,]\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*(?:[\s,]|[\s]*\/)\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;u=$1(qt(t,s),Ut(l,c),!0)}else if(a==="hsl"){let c=/^\(\s*((?:360(?:\.0+)?|(?:36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])(?:\.\d+)?))\s*[\s,]\s*(100(?:\.0+)?|\d{1,2}[.]\d*|\d{1,2})%\s*[\s,]\s*(100(?:\.0+)?|\d{1,2}[.]\d*|\d{1,2})%\s*\)$/gm;u=z1(qt(t,s),Ut(l,c),!1)}else if(a==="hsla"){let c=/^\(\s*((?:360(?:\.0+)?|(?:36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])(?:\.\d+)?))\s*[\s,]\s*(100(?:\.0+)?|\d{1,2}[.]\d*|\d{1,2})%\s*[\s,]\s*(100(?:\.0+)?|\d{1,2}[.]\d*|\d{1,2})%\s*(?:[\s,]|[\s]*\/)\s*(0[.][0-9]+|[.][0-9]+|[01][.]0*|[01])\s*\)$/gm;u=z1(qt(t,s),Ut(l,c),!0)}else a==="#"&&(u=ma(qt(t,s),a+l));u&&e.push(u)}return e}function j1(t){return!t||typeof t.getValue!="function"||typeof t.positionAt!="function"?[]:da(t)}var ga=/^-+|-+$/g,G1=100,pa=5;function X1(t,e){let n=[];if(e.findRegionSectionHeaders&&e.foldingRules?.markers){let r=ba(t,e);n=n.concat(r)}if(e.findMarkSectionHeaders){let r=wa(t,e);n=n.concat(r)}return n}function ba(t,e){let n=[],r=t.getLineCount();for(let s=1;s<=r;s++){let i=t.getLineContent(s),a=i.match(e.foldingRules.markers.start);if(a){let l={startLineNumber:s,startColumn:a[0].length+1,endLineNumber:s,endColumn:i.length+1};if(l.endColumn>l.startColumn){let u={range:l,...xa(i.substring(a[0].length)),shouldBeInComments:!1};(u.text||u.hasSeparatorLine)&&n.push(u)}}}return n}function wa(t,e){let n=[],r=t.getLineCount();if(!e.markSectionHeaderRegex||e.markSectionHeaderRegex.trim()==="")return n;let s=f1(e.markSectionHeaderRegex),i=new RegExp(e.markSectionHeaderRegex,`gdm${s?"s":""}`);if(Ls(i))return n;for(let a=1;a<=r;a+=G1-pa){let l=Math.min(a+G1-1,r),u=[];for(let h=a;h<=l;h++)u.push(t.getLineContent(h));let c=u.join(` +`);i.lastIndex=0;let f;for(;(f=i.exec(c))!==null;){let h=c.substring(0,f.index),m=(h.match(/\n/g)||[]).length,b=a+m,g=f[0].split(` +`),d=g.length,w=b+d-1,L=h.lastIndexOf(` +`)+1,v=f.index-L+1,y=g[g.length-1],M=d===1?v+f[0].length:y.length+1,D={startLineNumber:b,startColumn:v,endLineNumber:w,endColumn:M},$=(f.groups??{}).label??"",x=((f.groups??{}).separator??"")!=="",_={range:D,text:$,hasSeparatorLine:x,shouldBeInComments:!0};(_.text||_.hasSeparatorLine)&&(n.length===0||n[n.length-1].range.endLineNumber<_.range.startLineNumber)&&n.push(_),i.lastIndex=f.index+f[0].length}}return n}function xa(t){t=t.trim();let e=t.startsWith("-");return t=t.replace(ga,""),{text:t,hasSeparatorLine:e}}var _a,Kr;(function(){let t=globalThis;typeof t.requestIdleCallback!="function"||typeof t.cancelIdleCallback!="function"?Kr=(e,n,r)=>{gs(()=>{if(s)return;let i=Date.now()+15;n(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,i-Date.now())}}))});let s=!1;return{dispose(){s||(s=!0)}}}:Kr=(e,n,r)=>{let s=e.requestIdleCallback(n,typeof r=="number"?{timeout:r}:void 0),i=!1;return{dispose(){i||(i=!0,e.cancelIdleCallback(s))}}},_a=(e,n)=>Kr(globalThis,e,n)})();var In=class{get isRejected(){return this.outcome?.outcome===1}get isSettled(){return!!this.outcome}constructor(){this.p=new Promise((e,n)=>{this.completeCallback=e,this.errorCallback=n})}complete(e){return this.isSettled?Promise.resolve():new Promise(n=>{this.completeCallback(e),this.outcome={outcome:0,value:e},n()})}error(e){return this.isSettled?Promise.resolve():new Promise(n=>{this.errorCallback(e),this.outcome={outcome:1,value:e},n()})}cancel(){return this.error(new bt)}},Q1;(function(t){async function e(r){let s,i=await Promise.all(r.map(a=>a.then(l=>l,l=>{s||(s=l)})));if(typeof s<"u")throw s;return i}t.settled=e;function n(r){return new Promise(async(s,i)=>{try{await r(s,i)}catch(a){i(a)}})}t.withAsyncBody=n})(Q1||(Q1={}));var es=class{constructor(){this._unsatisfiedConsumers=[],this._unconsumedValues=[]}get hasFinalValue(){return!!this._finalValue}produce(e){if(this._ensureNoFinalValue(),this._unsatisfiedConsumers.length>0){let n=this._unsatisfiedConsumers.shift();this._resolveOrRejectDeferred(n,e)}else this._unconsumedValues.push(e)}produceFinal(e){this._ensureNoFinalValue(),this._finalValue=e;for(let n of this._unsatisfiedConsumers)this._resolveOrRejectDeferred(n,e);this._unsatisfiedConsumers.length=0}_ensureNoFinalValue(){if(this._finalValue)throw new H("ProducerConsumer: cannot produce after final value has been set")}_resolveOrRejectDeferred(e,n){n.ok?e.complete(n.value):e.error(n.error)}consume(){if(this._unconsumedValues.length>0||this._finalValue){let e=this._unconsumedValues.length>0?this._unconsumedValues.shift():this._finalValue;return e.ok?Promise.resolve(e.value):Promise.reject(e.error)}else{let e=new In;return this._unsatisfiedConsumers.push(e),e.p}}},J1=class t{constructor(e,n){this._onReturn=n,this._producerConsumer=new es,this._iterator={next:()=>this._producerConsumer.consume(),return:()=>(this._onReturn?.(),Promise.resolve({done:!0,value:void 0})),throw:async r=>(this._finishError(r),{done:!0,value:void 0})},queueMicrotask(async()=>{let r=e({emitOne:s=>this._producerConsumer.produce({ok:!0,value:{done:!1,value:s}}),emitMany:s=>{for(let i of s)this._producerConsumer.produce({ok:!0,value:{done:!1,value:i}})},reject:s=>this._finishError(s)});if(!this._producerConsumer.hasFinalValue)try{await r,this._finishOk()}catch(s){this._finishError(s)}})}static fromArray(e){return new t(n=>{n.emitMany(e)})}static fromPromise(e){return new t(async n=>{n.emitMany(await e)})}static fromPromisesResolveOrder(e){return new t(async n=>{await Promise.all(e.map(async r=>n.emitOne(await r)))})}static merge(e){return new t(async n=>{await Promise.all(e.map(async r=>{for await(let s of r)n.emitOne(s)}))})}static{this.EMPTY=t.fromArray([])}static map(e,n){return new t(async r=>{for await(let s of e)r.emitOne(n(s))})}static tee(e){let n,r,s=new In,i=async()=>{if(!(!n||!r))try{for await(let u of e)n.emitOne(u),r.emitOne(u)}catch(u){n.reject(u),r.reject(u)}finally{s.complete()}},a=new t(async u=>(n=u,i(),s.p)),l=new t(async u=>(r=u,i(),s.p));return[a,l]}map(e){return t.map(this,e)}static coalesce(e){return t.filter(e,n=>!!n)}coalesce(){return t.coalesce(this)}static filter(e,n){return new t(async r=>{for await(let s of e)n(s)&&r.emitOne(s)})}filter(e){return t.filter(this,e)}_finishOk(){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!0,value:{done:!0,value:void 0}})}_finishError(e){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!1,error:e})}[Symbol.asyncIterator](){return this._iterator}};var Bn=class{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,n){e=je(e);let r=this.values,s=this.prefixSum,i=n.length;return i===0?!1:(this.values=new Uint32Array(r.length+i),this.values.set(r.subarray(0,e),0),this.values.set(r.subarray(e),e+i),this.values.set(n,e),e-1=0&&this.prefixSum.set(s.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,n){return e=je(e),n=je(n),this.values[e]===n?!1:(this.values[e]=n,e-1=r.length)return!1;let i=r.length-e;return n>=i&&(n=i),n===0?!1:(this.values=new Uint32Array(r.length-n),this.values.set(r.subarray(0,e),0),this.values.set(r.subarray(e+n),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(s.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(e){return e<0?0:(e=je(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let n=this.prefixSumValidIndex[0]+1;n===0&&(this.prefixSum[0]=this.values[0],n++),e>=this.values.length&&(e=this.values.length-1);for(let r=n;r<=e;r++)this.prefixSum[r]=this.prefixSum[r-1]+this.values[r];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalSum();let n=0,r=this.values.length-1,s=0,i=0,a=0;for(;n<=r;)if(s=n+(r-n)/2|0,i=this.prefixSum[s],a=i-this.values[s],e=i)n=s+1;else break;return new ts(s,e-a)}};var ts=class{constructor(e,n){this.index=e,this.remainder=n,this._prefixSumIndexOfResultBrand=void 0,this.index=e,this.remainder=n}};var Vn=class{constructor(e,n,r,s){this._uri=e,this._lines=n,this._eol=r,this._versionId=s,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return this._cachedTextValue===null&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(e){e.eol&&e.eol!==this._eol&&(this._eol=e.eol,this._lineStarts=null);let n=e.changes;for(let r of n)this._acceptDeleteRange(r.range),this._acceptInsertText(new B(r.range.startLineNumber,r.range.startColumn),r.text);this._versionId=e.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){let e=this._eol.length,n=this._lines.length,r=new Uint32Array(n);for(let s=0;se.push(this._models[n])),e}$acceptNewModel(e){this._models[e.url]=new ns(se.parse(e.url),e.lines,e.EOL,e.versionId)}$acceptModelChanged(e,n){if(!this._models[e])return;this._models[e].onEvents(n)}$acceptRemovedModel(e){this._models[e]&&delete this._models[e]}},ns=class extends Vn{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(e){let n=[];for(let r=0;rthis._lines.length)n=this._lines.length,r=this._lines[n-1].length+1,s=!0;else{let i=this._lines[n-1].length+1;r<1?(r=1,s=!0):r>i&&(r=i,s=!0)}return s?{lineNumber:n,column:r}:e}};var Un=class t{constructor(e=null){this._foreignModule=e,this._requestHandlerBrand=void 0,this._workerTextModelSyncServer=new qn}dispose(){}async $ping(){return"pong"}_getModel(e){return this._workerTextModelSyncServer.getModel(e)}getModels(){return this._workerTextModelSyncServer.getModels()}$acceptNewModel(e){this._workerTextModelSyncServer.$acceptNewModel(e)}$acceptModelChanged(e,n){this._workerTextModelSyncServer.$acceptModelChanged(e,n)}$acceptRemovedModel(e){this._workerTextModelSyncServer.$acceptRemovedModel(e)}async $computeUnicodeHighlights(e,n,r){let s=this._getModel(e);return s?yn.computeUnicodeHighlights(s,n,r):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}}async $findSectionHeaders(e,n){let r=this._getModel(e);return r?X1(r,n):[]}async $computeDiff(e,n,r,s){let i=this._getModel(e),a=this._getModel(n);if(!i||!a)return null;let l=await ya(s);return t.computeDiff(i,a,r,l)}static computeDiff(e,n,r,s){let i=e.getLinesContent(),a=n.getLinesContent(),l=s.computeDiff(i,a,r),u=l.changes.length>0?!1:this._modelsAreIdentical(e,n);function c(f){return f.map(h=>[h.original.startLineNumber,h.original.endLineNumberExclusive,h.modified.startLineNumber,h.modified.endLineNumberExclusive,h.innerChanges?.map(m=>[m.originalRange.startLineNumber,m.originalRange.startColumn,m.originalRange.endLineNumber,m.originalRange.endColumn,m.modifiedRange.startLineNumber,m.modifiedRange.startColumn,m.modifiedRange.endLineNumber,m.modifiedRange.endColumn])])}return{identical:u,quitEarly:l.hitTimeout,changes:c(l.changes),moves:l.moves.map(f=>[f.lineRangeMapping.original.startLineNumber,f.lineRangeMapping.original.endLineNumberExclusive,f.lineRangeMapping.modified.startLineNumber,f.lineRangeMapping.modified.endLineNumberExclusive,c(f.changes)])}}static _modelsAreIdentical(e,n){let r=e.getLineCount(),s=n.getLineCount();if(r!==s)return!1;for(let i=1;i<=r;i++){let a=e.getLineContent(i),l=n.getLineContent(i);if(a!==l)return!1}return!0}static{this._diffLimit=1e5}async $computeMoreMinimalEdits(e,n,r){let s=this._getModel(e);if(!s)return n;let i=[],a;n=n.slice(0).sort((u,c)=>{if(u.range&&c.range)return R.compareRangesUsingStarts(u.range,c.range);let f=u.range?0:1,h=c.range?0:1;return f-h});let l=0;for(let u=1;ut._diffLimit){i.push({range:u,text:c});continue}let m=Vs(h,c,r),b=s.offsetAt(R.lift(u).getStartPosition());for(let g of m){let d=s.positionAt(b+g.originalStart),w=s.positionAt(b+g.originalStart+g.originalLength),L={text:c.substr(g.modifiedStart,g.modifiedLength),range:{startLineNumber:d.lineNumber,startColumn:d.column,endLineNumber:w.lineNumber,endColumn:w.column}};s.getValueInRange(L.range)!==L.text&&i.push(L)}}return typeof a=="number"&&i.push({eol:a,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),i}async $computeLinks(e){let n=this._getModel(e);return n?qs(n):null}async $computeDefaultDocumentColors(e){let n=this._getModel(e);return n?j1(n):null}static{this._suggestionsLimit=1e4}async $textualSuggest(e,n,r,s){let i=new rt,a=new RegExp(r,s),l=new Set;e:for(let u of e){let c=this._getModel(u);if(c){for(let f of c.words(a))if(!(f===n||!isNaN(Number(f)))&&(l.add(f),l.size>t._suggestionsLimit))break e}}return{words:Array.from(l),duration:i.elapsed()}}async $computeWordRanges(e,n,r,s){let i=this._getModel(e);if(!i)return Object.create(null);let a=new RegExp(r,s),l=Object.create(null);for(let u=n.startLineNumber;u{let s=Wn.getChannel(r),a={host:new Proxy({},{get(l,u,c){if(u!=="then"){if(typeof u!="string")throw new Error("Not supported");return(...f)=>s.$fhr(u,f)}}}),getMirrorModels:()=>n.requestHandler.getModels()};return e=t(a),new Un(e)});return e}var Y1=!1;function Z1(){return Y1}function La(t){Y1=!0,self.onmessage=e=>{On(n=>t(n,e.data))}}self.onmessage=()=>{Z1()||On(()=>({}))};export{La as initialize}; diff --git a/plugins/diff-explorer/package-lock.json b/plugins/diff-explorer/package-lock.json new file mode 100644 index 0000000..2290606 --- /dev/null +++ b/plugins/diff-explorer/package-lock.json @@ -0,0 +1,727 @@ +{ + "name": "bb-plugin-diff-explorer", + "version": "0.1.2", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "bb-plugin-diff-explorer", + "version": "0.1.2", + "dependencies": { + "zod": "^4.3.6" + }, + "devDependencies": { + "@get-bb/plugin-sdk": "0.5.29", + "@types/node": "^22.0.0", + "@types/react": "^19.0.0", + "esbuild": "^0.28.2", + "monaco-editor": "0.56.0", + "typescript": "^5.7.0" + }, + "engines": { + "bb": ">=0.44", + "bbPluginSdk": ">=0.5.29" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.2.tgz", + "integrity": "sha512-XExcO+dvLKvVtNTibSTBej1NCAbaGhWn9Ww1ZPx80qsahhPFe/8jgWP0IchNe0F3HwkU7n8ejhH8bjonqht8mQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.28.2.tgz", + "integrity": "sha512-kXXoiPVVGQcnIYGOeaovwOURpniDBpSq4A03qkQ+BMQqtGG6HYap3xne9C1O1yo4TR3qxlCX5IqqmX6fFo2Lqg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.28.2.tgz", + "integrity": "sha512-5YfKeeI8qWfBZIX+u2xZC3Zlb3Os/gLS2sbEKM+I4ZOcsWmHS2WLysCcQZDAFRslDUU5Oiq44gf6PYN1vGwG5A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.28.2.tgz", + "integrity": "sha512-O387ite7SzUyCcy3JQX4P4bLtEA7bLLkx+esve5JHnyYfNTxcVpXZo9jhdB0lTKN44gztELTdU7nS8Nr16Fs1Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.28.2.tgz", + "integrity": "sha512-n4KqkOQrraxHJcgjM1RvwbigfQKIKJVpM7xp+KsxiyUSrRdIXnt73VhrPAx0fV44hgfmIVKjxMN9J1t5jySVkw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.28.2.tgz", + "integrity": "sha512-uq6suIWYP37qzGddBKPw5QEQPi6HiLGsO7UmkpfyaYNQ3D+rN6w6WfwH+nuqcGXWvawGwxOEroO4YGnFh95azw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.28.2.tgz", + "integrity": "sha512-n+I0BTSRIoy+d6RPKnEVwql5UwBJolytvY4mAOIEJorKlqgPII8ix6slVVrfZ5Tnj7glIZvloylbB/EJPMWEXw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.28.2.tgz", + "integrity": "sha512-78XJTJkvPs0kz2w61301PJjXl4g7q3JqiYMZ/M/yVI73EHBrCRTgkhu9oqG7vPqq+a/yadEW8aD+agKlk5xrmg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.28.2.tgz", + "integrity": "sha512-XlDnu2q5yoqems+xay6wSAcg9DDD7K9RLKZEBOMZm3ckNpJBvOX20tSfby8KfrrhINDyv9V2YVZKY/SpoGJI8w==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.28.2.tgz", + "integrity": "sha512-pW4AC0P3it8c7do9MVM4p51FzHzdM/TZrerurgRcHJ2WTa1VQ1CIq18xncfpBJw4ojkiZZrKW2yIBWBP92j6Ug==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.28.2.tgz", + "integrity": "sha512-CYbnj78HsIeA+DhgUKgFCfvNsTHFhMMrinUrMZpDXJXKN8T3XViTZ/+wtHeVxEWY8ewSzTFN+nRmSwO2tZaLUQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.28.2.tgz", + "integrity": "sha512-buwkd8nsph4R+ajRvw0qM5Hja/TXQow3ptzWO2EbG/cqcIkHloRrdlBtQlshyYGTNFvfkfJ5tpPLVkY4DtsPfQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.28.2.tgz", + "integrity": "sha512-ZVykbDyk7519VwiNb9Lcj9m8XM6v5V9uKPvrEMkkEedVewf+0itkhahp4HDpgERXhwLRpWFypsGbG/J8s0QjJA==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.28.2.tgz", + "integrity": "sha512-CAXl+Dtd9UUuJd8pKKdwh6MLm3MUMiqMPmhZ3tTSXPqfyQ3vDl6R5hZdZ/kYojK4ofXtdfSv1tFq8XzWx3heNQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.28.2.tgz", + "integrity": "sha512-GeXCej4IQtU1B+QlDV8W/RRvbzI3O/Stss+/bCXv4lZls5WGRtu2a+3JkA3i4qIUlMXpcHebWpF8AkJhATowuA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.28.2.tgz", + "integrity": "sha512-3H1weTYZPxt/WOhByszQZybS9w5lKzUn1FDMsgEChbHWQwHYQQRfBxgCcZvPhjHfKyJjIievvMmEUawJrdY9Dg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.28.2.tgz", + "integrity": "sha512-4xTZr1FUmSoQW4XIWmit3tzQrUTZM+N3P0XV8xROKYF50XfI7xeO90+1bZvNwxIufQ9hDQVRJH5YhgPVF8A/HQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.28.2.tgz", + "integrity": "sha512-sSATRjPeDBg3pdgHoQfoYBob11Kk1FGa9lui5RIHZCoCkJa9QKlvl3/vKz2usCmYYjs7ymJR/2Nnsqe+Hjt5nw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.28.2.tgz", + "integrity": "sha512-lqnzCV+mM0gIADaKihiCg6ifgfU2L3h5E33rNQBN1Y4MaVGnzryzmvvf7UHxprpQdE8hpqLolJ9Rl+SkIRDpyw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.28.2.tgz", + "integrity": "sha512-AL2qJILH7lNjrDmCQDvdxMfAUIv8KMNZOvrwAQ8i8//ntL9FflhOyMJ8OZSMBb8/AWXe3/5v5S20y3zCoZWKoQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.28.2.tgz", + "integrity": "sha512-QtiuPytchRyC4rwUKhexJdQKvDuZ6hWloi3igqPQNUJCS1/v9EiO3UTOXR6A3FoMo4fnAKbWJdqaIwhOzh8qEw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.28.2.tgz", + "integrity": "sha512-WkhYDmpTjLvGlScA1rwjRUmhl4k8oXR3cIbtqWmELgU/dFeHHlEllxDvdWcNJV9rbzCexB5vz8gtNewWLgCT7Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.28.2.tgz", + "integrity": "sha512-GPMSkTOtMnv2U2F8gxe4Io6qmVs+YKyp832Etqqxr0hFngmXQ3rzwytelm3GIn7T4VviRUlf3sOgBOiTdvaf7g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.28.2.tgz", + "integrity": "sha512-PIhhEkE9uPBleRBrQEJpUn7MBnibZzbGzYWPmY3x+YoVg/95zbjB4CxPPOQ8l5tYYM4mMaCthF8/1DIfBQQyWQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.28.2.tgz", + "integrity": "sha512-YmJbfTlvU7Sdn9BB+4PRES4oB6pxgS37MAONj+hBr/cpXS1aBPKXxNnDbu+QCWPj0o9dgyxeq79g6c5P8KeuYA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.28.2.tgz", + "integrity": "sha512-5ebpxr3nWMzrL/rnUI755Jkuee0bHL/Gq0WTF9lvcpv73wAp5eu8MfBUgWK9bhWvZjj7yX8etf/8tI8Ney695g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@get-bb/plugin-sdk": { + "version": "0.5.29", + "resolved": "https://registry.npmjs.org/@get-bb/plugin-sdk/-/plugin-sdk-0.5.29.tgz", + "integrity": "sha512-eRIUeZUu3Q4gESo10ajF58yd32+6QdKRGJMPz2/WjxK7DAGNfY5kO2ZAKP+pWS7Bo1l92GrlcO29C15CCvg1aA==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.6", + "zod": "^4.3.6" + }, + "peerDependencies": { + "@testing-library/react": "^16.3.2", + "@types/better-sqlite3": "^7.6.12", + "@types/react": "^19.0.0", + "better-sqlite3": ">=12", + "cron-parser": "^5.5.0", + "hono": "^4.11.9", + "react": "^19.0.0", + "react-dom": "^19.0.0" + }, + "peerDependenciesMeta": { + "@testing-library/react": { + "optional": true + }, + "@types/better-sqlite3": { + "optional": true + }, + "@types/react": { + "optional": true + }, + "better-sqlite3": { + "optional": true + }, + "cron-parser": { + "optional": true + }, + "hono": { + "optional": true + }, + "react": { + "optional": true + }, + "react-dom": { + "optional": true + } + } + }, + "node_modules/@types/node": { + "version": "22.20.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.20.5.tgz", + "integrity": "sha512-U2+DNr+wSjpsTS/wZGYHq7GcwfuSmKiKvoPvK22zwTlRhU91yOniN4qRR5KhIjvif7ysw/dz/hKmfDH0Ris4aA==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.21.0" + } + }, + "node_modules/@types/react": { + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/@types/react/-/react-19.3.0.tgz", + "integrity": "sha512-N0rFCuH9YoxG9/m61l9MfpJKfmLOVU0em7ipIz6TRgSSkvReLB9vL85GB+yr8Bs5leqpvg96JSwF4ZS1s4viQg==", + "dev": true, + "license": "MIT", + "dependencies": { + "csstype": "^3.2.2" + } + }, + "node_modules/@types/trusted-types": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz", + "integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==", + "dev": true, + "license": "MIT", + "optional": true + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/csstype": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", + "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/dompurify": { + "version": "3.4.8", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.4.8.tgz", + "integrity": "sha512-yb1cEmaOum7wFvOCSQxyfgVlv5D47Rc30iZWoMpbDIWTnJ6grDDQyu2KFJzB2k7u0pMuJcQ1zphH//fFnw2tjQ==", + "dev": true, + "license": "(MPL-2.0 OR Apache-2.0)", + "optionalDependencies": { + "@types/trusted-types": "^2.0.7" + } + }, + "node_modules/esbuild": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.2.tgz", + "integrity": "sha512-HKVLS8dvII+xoKW9kmqxbRKrnWEXfJJr/FZhhJmiqIB0e053QNYFqOBouTMO/k5sID4MvCiUCvv8b9M4h32wIA==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.28.2", + "@esbuild/android-arm": "0.28.2", + "@esbuild/android-arm64": "0.28.2", + "@esbuild/android-x64": "0.28.2", + "@esbuild/darwin-arm64": "0.28.2", + "@esbuild/darwin-x64": "0.28.2", + "@esbuild/freebsd-arm64": "0.28.2", + "@esbuild/freebsd-x64": "0.28.2", + "@esbuild/linux-arm": "0.28.2", + "@esbuild/linux-arm64": "0.28.2", + "@esbuild/linux-ia32": "0.28.2", + "@esbuild/linux-loong64": "0.28.2", + "@esbuild/linux-mips64el": "0.28.2", + "@esbuild/linux-ppc64": "0.28.2", + "@esbuild/linux-riscv64": "0.28.2", + "@esbuild/linux-s390x": "0.28.2", + "@esbuild/linux-x64": "0.28.2", + "@esbuild/netbsd-arm64": "0.28.2", + "@esbuild/netbsd-x64": "0.28.2", + "@esbuild/openbsd-arm64": "0.28.2", + "@esbuild/openbsd-x64": "0.28.2", + "@esbuild/openharmony-arm64": "0.28.2", + "@esbuild/sunos-x64": "0.28.2", + "@esbuild/win32-arm64": "0.28.2", + "@esbuild/win32-ia32": "0.28.2", + "@esbuild/win32-x64": "0.28.2" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/marked": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/marked/-/marked-14.0.0.tgz", + "integrity": "sha512-uIj4+faQ+MgHgwUW1l2PsPglZLOLOT1uErt06dAPtx2kjteLAkbsd/0FiYg/MGS+i7ZKLb7w2WClxHkzOOuryQ==", + "dev": true, + "license": "MIT", + "bin": { + "marked": "bin/marked.js" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/monaco-editor": { + "version": "0.56.0", + "resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.56.0.tgz", + "integrity": "sha512-sXboRm3BeBeLm938eaiyLMe0OxzfXIlZvbv4ir/jVgQy1zDhWjgmny0WoN45fuDKhCCQsYMbBJrv/A6jd8aCUg==", + "dev": true, + "license": "MIT", + "dependencies": { + "dompurify": "3.4.8", + "marked": "14.0.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/typescript": { + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/undici-types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/zod": { + "version": "4.6.5", + "resolved": "https://registry.npmjs.org/zod/-/zod-4.6.5.tgz", + "integrity": "sha512-v5l/aFXZQeai4awLbOpSoHecE9UiMrnfx75tEXLjNonXVARxQ5mOeipTjROUchszUNCqnE+hqAMujRsRHsut2Q==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } + } + } +} diff --git a/plugins/diff-explorer/package.json b/plugins/diff-explorer/package.json new file mode 100644 index 0000000..3668466 --- /dev/null +++ b/plugins/diff-explorer/package.json @@ -0,0 +1,36 @@ +{ + "name": "bb-plugin-diff-explorer", + "version": "0.1.2", + "type": "module", + "private": true, + "license": "MIT", + "engines": { + "bb": ">=0.44", + "bbPluginSdk": ">=0.5.29" + }, + "bb": { + "name": "Diff Explorer", + "description": "Scrollable diff of every changed file, with go to definition.", + "branding": { + "icon": "FileDiff" + }, + "server": "./server.ts", + "app": "./app.tsx", + "host": "./host.ts", + "skills": [] + }, + "dependencies": { + "zod": "^4.3.6" + }, + "devDependencies": { + "@get-bb/plugin-sdk": "0.5.29", + "@types/node": "^22.0.0", + "@types/react": "^19.0.0", + "esbuild": "^0.28.2", + "monaco-editor": "0.56.0", + "typescript": "^5.7.0" + }, + "scripts": { + "build:monaco": "scripts/build-monaco.sh" + } +} diff --git a/plugins/diff-explorer/screenshots/diff.png b/plugins/diff-explorer/screenshots/diff.png new file mode 100644 index 0000000..12a0493 Binary files /dev/null and b/plugins/diff-explorer/screenshots/diff.png differ diff --git a/plugins/diff-explorer/screenshots/go-to-definition.png b/plugins/diff-explorer/screenshots/go-to-definition.png new file mode 100644 index 0000000..9538dc7 Binary files /dev/null and b/plugins/diff-explorer/screenshots/go-to-definition.png differ diff --git a/plugins/diff-explorer/scripts/build-monaco.sh b/plugins/diff-explorer/scripts/build-monaco.sh new file mode 100755 index 0000000..ba62b2a --- /dev/null +++ b/plugins/diff-explorer/scripts/build-monaco.sh @@ -0,0 +1,15 @@ +#!/bin/sh +# Monaco with the editor, diff editor, and syntax highlighting only. The language +# servers in host.ts replace Monaco's built-in TS/CSS/HTML/JSON workers. +set -eu +cd "$(dirname "$0")/.." +src="$PWD/node_modules/monaco-editor/esm/vs/editor" +entry="$PWD/node_modules/.monaco-entry.js" +grep -v -E 'languages/features/|__src_languages_features|monaco-lsp-client|index as lsp' "$src/editor.main.js" | + sed -e "s#'\./#'$src/#" -e "s#'\.\./#'$src/../#" >"$entry" +echo "export * as monaco from '$src/editor.api.js';" >>"$entry" +echo "export { createMultiDiffEditor } from '$PWD/scripts/multi-diff.js';" >>"$entry" +rm -rf monaco +npx esbuild "$entry" --bundle --format=esm --minify --loader:.ttf=file --outfile=monaco/editor.js --log-level=warning +npx esbuild "$src/editor.worker.js" --bundle --format=esm --minify --outfile=monaco/editor.worker.js --log-level=warning +cp node_modules/monaco-editor/LICENSE node_modules/monaco-editor/ThirdPartyNotices.txt monaco/ diff --git a/plugins/diff-explorer/scripts/multi-diff.js b/plugins/diff-explorer/scripts/multi-diff.js new file mode 100644 index 0000000..e81d51f --- /dev/null +++ b/plugins/diff-explorer/scripts/multi-diff.js @@ -0,0 +1,122 @@ +// VS Code's multi-diff editor (the Git: View Changes view): a virtualized list +// that reuses a small pool of diff editors. Monaco ships the widget but not its +// view models, so DocumentItem and EditorViewModel recreate them from VS Code's +// multiDiffEditorViewModel.ts. +import { StandaloneServices } from "../node_modules/monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js"; +import { IStandaloneThemeService } from "../node_modules/monaco-editor/esm/vs/editor/standalone/common/standaloneTheme.js"; +import { IInstantiationService } from "../node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"; +import { MultiDiffEditorWidgetImpl } from "../node_modules/monaco-editor/esm/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidgetImpl.js"; +import { DiffEditorViewModel } from "../node_modules/monaco-editor/esm/vs/editor/browser/widget/diffEditor/diffEditorViewModel.js"; +import { DiffEditorOptions } from "../node_modules/monaco-editor/esm/vs/editor/browser/widget/diffEditor/diffEditorOptions.js"; +import { RefCounted } from "../node_modules/monaco-editor/esm/vs/editor/browser/widget/diffEditor/utils.js"; +import { observableValue } from "../node_modules/monaco-editor/esm/vs/base/common/observableInternal/observables/observableValue.js"; +import { constObservable } from "../node_modules/monaco-editor/esm/vs/base/common/observableInternal/observables/constObservable.js"; +import { derived } from "../node_modules/monaco-editor/esm/vs/base/common/observableInternal/observables/derived.js"; + +class DocumentItem { + constructor(documentDiffItem, editorViewModel, instantiationService) { + this.documentDiffItem = documentDiffItem; + this.collapsed = observableValue(this, false); + this.lastTemplateData = observableValue(this, { contentHeight: documentDiffItem.estimatedHeight, selections: undefined }); + this.isActive = derived(this, (reader) => editorViewModel.activeDiffItem.read(reader) === this); + this._isFocusedSource = observableValue(this, constObservable(false)); + this.isFocused = derived(this, (reader) => this._isFocusedSource.read(reader).read(reader)); + this.isAlive = constObservable(true); + const options = instantiationService.createInstance(DiffEditorOptions, documentDiffItem.options); + this.diffEditorViewModelRef = RefCounted.create( + instantiationService.createInstance( + DiffEditorViewModel, + { original: documentDiffItem.original, modified: documentDiffItem.modified }, + options, + ), + ); + } + get originalUri() { + return this.documentDiffItem.original?.uri; + } + get modifiedUri() { + return this.documentDiffItem.modified?.uri; + } + setIsFocused(source, tx) { + this._isFocusedSource.set(source, tx); + } + getKey() { + return JSON.stringify([this.originalUri?.toString(), this.modifiedUri?.toString()]); + } + dispose() { + this.diffEditorViewModelRef.dispose(); + } +} + +class EditorViewModel { + constructor(documents, instantiationService) { + this.instantiationService = instantiationService; + this.activeDiffItem = observableValue(this, undefined); + this.activeDiffItem.setCache = (value, tx) => this.activeDiffItem.set(value, tx); + this.items = observableValue(this, []); + this.setDocuments(documents); + this.isLoading = constObservable(false); + this.contextKeys = undefined; + } + // Keeps the item, and so its editor and scroll place, of every document whose models are unchanged. + setDocuments(documents) { + const previous = this.items.get(); + const next = documents.map( + (d) => + previous.find((item) => item.documentDiffItem.modified === d.modified) ?? + new DocumentItem(d, this, this.instantiationService), + ); + this.items.set(next, undefined); + // Pre-set so the widget does not focus and scroll to the first change on load. + if (!next.includes(this.activeDiffItem.get())) this.activeDiffItem.set(next[0], undefined); + for (const item of previous) if (!next.includes(item)) item.dispose(); + } + dispose() { + for (const item of this.items.get()) item.dispose(); + } +} + +/** + * documents: { original: ITextModel, modified: ITextModel, label: string, options: IDiffEditorOptions, estimatedHeight: number }[] + */ +export function createMultiDiffEditor(element, documents) { + const instantiationService = StandaloneServices.get(IInstantiationService); + // monaco.editor.create does this; without it the theme stylesheet (token and diff colors) is never injected. + const theme = StandaloneServices.get(IStandaloneThemeService).registerEditorContainer(element); + const viewModel = new EditorViewModel(documents, instantiationService); + let labels = new Map(documents.map((d) => [d.modified.uri.toString(), d.label])); + const dimension = observableValue("dimension", undefined); + const viewModelSource = observableValue("viewModel", undefined); + const widget = instantiationService.createInstance( + MultiDiffEditorWidgetImpl, + element, + dimension, + viewModelSource, + { + headerClickToCollapse: true, + createResourceLabel: (el) => ({ + setUri(uri, options) { + el.textContent = uri === undefined ? "" : (labels.get(uri.toString()) ?? uri.path); + el.style.textDecoration = options?.strikethrough ? "line-through" : ""; + }, + dispose() {}, + }), + }, + ); + const resize = new ResizeObserver(() => dimension.set({ width: element.clientWidth, height: element.clientHeight }, undefined)); + resize.observe(element); + // Like VS Code: create the widget empty, then attach the view model. + viewModelSource.set(viewModel, undefined); + return { + update(documents) { + labels = new Map(documents.map((d) => [d.modified.uri.toString(), d.label])); + viewModel.setDocuments(documents); + }, + dispose() { + resize.disconnect(); + widget.dispose(); + theme.dispose(); + viewModel.dispose(); + }, + }; +} diff --git a/plugins/diff-explorer/server.ts b/plugins/diff-explorer/server.ts new file mode 100644 index 0000000..e8ce997 --- /dev/null +++ b/plugins/diff-explorer/server.ts @@ -0,0 +1,100 @@ +import path from "node:path"; +import { fileURLToPath } from "node:url"; +import type { BbPluginApi } from "@get-bb/plugin-sdk"; +import { hostContract, hostSignals, rpcContract, type DiffFile } from "./contract"; + +// Path installs run server.ts from the plugin root; git and npm installs run the bundled dist/server.js. +const HERE = path.dirname(fileURLToPath(import.meta.url)); +const MONACO_DIR = path.join(path.basename(HERE) === "dist" ? path.dirname(HERE) : HERE, "monaco"); + +export default async function plugin(bb: BbPluginApi) { + const host = bb.hosts.experimental_client({ contract: hostContract, experimental_signals: hostSignals }); + host.experimental_onSignal("changed", ({ payload }) => bb.realtime.publish("changed", payload)); + + async function environment(environmentId: string) { + const env = await bb.sdk.environments.get({ environmentId }); + if (!env.path) throw new Error("This environment has no workspace path"); + if (!env.hostId) throw new Error("This environment has no host"); + return { root: env.path, hostId: env.hostId }; + } + + let preview: { baseUrl: string; expiresAtMs: number } | null = null; + + bb.rpc.register(rpcContract, { + async assets() { + if (preview === null || preview.expiresAtMs - Date.now() < 5 * 60_000) { + preview = await bb.sdk.files.createPreview({ rootPath: MONACO_DIR, ttlMs: 60 * 60_000 }); + } + return { baseUrl: preview.baseUrl }; + }, + + async load({ threadId, target }) { + const thread = await bb.sdk.threads.get({ threadId }); + if (!thread.environmentId) throw new Error("This thread has no environment"); + const environmentId = thread.environmentId; + const env = await bb.sdk.environments.get({ environmentId }); + if (!env.path) throw new Error("This environment has no workspace path"); + if (!env.hostId) throw new Error("This environment has no host"); + const root = env.path; + const baseBranch = env.mergeBaseBranch ?? env.baseBranch ?? env.defaultBranch; + if (baseBranch === null) throw new Error("This environment has no base branch"); + // "all" = everything since the merge base with the base branch, committed or not. + const diff = await bb.sdk.environments.diffFiles( + target === "uncommitted" + ? { environmentId, target: "uncommitted" } + : { environmentId, target: "all", mergeBaseBranch: baseBranch }, + ); + if (diff.outcome !== "available") { + throw new Error(diff.outcome === "unavailable" ? diff.failure.message : diff.message); + } + const { mergeBaseRef } = diff; + const query = target === "uncommitted" ? ({ target } as const) : mergeBaseRef === null ? null : ({ target, mergeBaseRef } as const); + if (query === null) throw new Error(`No merge base with ${baseBranch}`); + const side = async (filePath: string, which: "old" | "new") => { + const result = await bb.sdk.environments.diffFile({ environmentId, ...query, path: filePath, side: which }); + if (result.contentEncoding !== "utf8") throw new Error(`${filePath} is not text`); + return result.content; + }; + const textual = diff.files.filter((f) => !f.binary && f.loadMode !== "too_large"); + // ponytail: loads every file up front; lazy-load per file if big diffs get slow + const entries: DiffFile[] = await Promise.all( + textual.map(async (f) => ({ + path: f.path, + changeKind: f.changeKind, + additions: f.additions, + deletions: f.deletions, + oldText: f.changeKind === "added" || f.origin === "untracked" ? "" : await side(f.previousPath ?? f.path, "old"), + newText: f.changeKind === "deleted" ? "" : await side(f.path, "new"), + })), + ); + // "all" can list one path twice: deleted in a commit, then re-added uncommitted. Show it as one modification. + const byPath = new Map(); + for (const f of entries) { + const prev = byPath.get(f.path); + byPath.set( + f.path, + prev === undefined + ? f + : { ...f, changeKind: "modified", additions: prev.additions + f.additions, deletions: prev.deletions + f.deletions, oldText: prev.oldText || f.oldText, newText: f.newText || prev.newText }, + ); + } + const files = [...byPath.values()]; + host.call("watch", { root }, { hostId: env.hostId }).catch((error) => bb.log.warn(`File watch failed: ${error}`)); + host + .call("warm", { root, paths: files.filter((f) => f.newText !== "").map((f) => path.join(root, f.path)) }, { hostId: env.hostId }) + .catch((error) => bb.log.warn(`Language server warm-up failed: ${error}`)); + const skipped = diff.files.filter((f) => f.binary || f.loadMode === "too_large").map((f) => f.path); + return { environmentId, root, baseBranch, files, skipped }; + }, + + async definition({ environmentId, ...position }) { + const { root, hostId } = await environment(environmentId); + return host.call("definition", { root, ...position }, { hostId }); + }, + + async read({ environmentId, path: filePath }) { + const { hostId } = await environment(environmentId); + return host.call("read", { path: filePath }, { hostId }); + }, + }); +} diff --git a/plugins/diff-explorer/tsconfig.json b/plugins/diff-explorer/tsconfig.json new file mode 100644 index 0000000..f176ad3 --- /dev/null +++ b/plugins/diff-explorer/tsconfig.json @@ -0,0 +1,14 @@ +{ + "compilerOptions": { + "strict": true, + "target": "ES2022", + "module": "ESNext", + "moduleResolution": "bundler", + "jsx": "react-jsx", + "lib": ["ES2023", "DOM"], + "types": ["node"], + "noEmit": true, + "skipLibCheck": true + }, + "include": ["server.ts", "host.ts", "contract.ts", "app.tsx"] +}