@surething/cockpit 1.0.175
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next-prod/BUILD_ID +1 -0
- package/.next-prod/app-path-routes-manifest.json +99 -0
- package/.next-prod/build-manifest.json +20 -0
- package/.next-prod/diagnostics/build-diagnostics.json +6 -0
- package/.next-prod/diagnostics/framework.json +1 -0
- package/.next-prod/export-marker.json +6 -0
- package/.next-prod/images-manifest.json +67 -0
- package/.next-prod/next-minimal-server.js.nft.json +1 -0
- package/.next-prod/next-server.js.nft.json +1 -0
- package/.next-prod/package.json +1 -0
- package/.next-prod/prerender-manifest.json +119 -0
- package/.next-prod/react-loadable-manifest.json +4241 -0
- package/.next-prod/required-server-files.js +326 -0
- package/.next-prod/required-server-files.json +326 -0
- package/.next-prod/routes-manifest.json +641 -0
- package/.next-prod/server/app/_global-error/page.js +3 -0
- package/.next-prod/server/app/_global-error/page.js.nft.json +1 -0
- package/.next-prod/server/app/_global-error/page_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/_global-error.html +2 -0
- package/.next-prod/server/app/_global-error.meta +16 -0
- package/.next-prod/server/app/_global-error.rsc +12 -0
- package/.next-prod/server/app/_global-error.segments/_full.segment.rsc +12 -0
- package/.next-prod/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +5 -0
- package/.next-prod/server/app/_global-error.segments/_global-error.segment.rsc +4 -0
- package/.next-prod/server/app/_global-error.segments/_head.segment.rsc +5 -0
- package/.next-prod/server/app/_global-error.segments/_index.segment.rsc +4 -0
- package/.next-prod/server/app/_global-error.segments/_tree.segment.rsc +1 -0
- package/.next-prod/server/app/_not-found/page.js +2 -0
- package/.next-prod/server/app/_not-found/page.js.nft.json +1 -0
- package/.next-prod/server/app/_not-found/page_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/_not-found.html +18 -0
- package/.next-prod/server/app/_not-found.meta +16 -0
- package/.next-prod/server/app/_not-found.rsc +18 -0
- package/.next-prod/server/app/_not-found.segments/_full.segment.rsc +18 -0
- package/.next-prod/server/app/_not-found.segments/_head.segment.rsc +6 -0
- package/.next-prod/server/app/_not-found.segments/_index.segment.rsc +6 -0
- package/.next-prod/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +5 -0
- package/.next-prod/server/app/_not-found.segments/_not-found.segment.rsc +4 -0
- package/.next-prod/server/app/_not-found.segments/_tree.segment.rsc +5 -0
- package/.next-prod/server/app/api/bash/route.js +1 -0
- package/.next-prod/server/app/api/bash/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/bash/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/chat/route.js +5 -0
- package/.next-prod/server/app/api/chat/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/chat/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/claude-stats/route.js +1 -0
- package/.next-prod/server/app/api/claude-stats/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/claude-stats/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/commands/route.js +1 -0
- package/.next-prod/server/app/api/commands/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/commands/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/comments/route.js +1 -0
- package/.next-prod/server/app/api/comments/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/comments/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/db/columns/route.js +15 -0
- package/.next-prod/server/app/api/db/columns/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/db/columns/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/db/connect/route.js +1 -0
- package/.next-prod/server/app/api/db/connect/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/db/connect/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/db/disconnect/route.js +1 -0
- package/.next-prod/server/app/api/db/disconnect/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/db/disconnect/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/db/export/route.js +1 -0
- package/.next-prod/server/app/api/db/export/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/db/export/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/db/query/route.js +1 -0
- package/.next-prod/server/app/api/db/query/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/db/query/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/db/schemas/route.js +8 -0
- package/.next-prod/server/app/api/db/schemas/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/db/schemas/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/extension/version/route.js +1 -0
- package/.next-prod/server/app/api/extension/version/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/extension/version/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/file/route.js +1 -0
- package/.next-prod/server/app/api/file/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/file/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/files/blame/route.js +1 -0
- package/.next-prod/server/app/api/files/blame/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/files/blame/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/files/clipboard/route.js +1 -0
- package/.next-prod/server/app/api/files/clipboard/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/files/clipboard/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/files/copy/route.js +1 -0
- package/.next-prod/server/app/api/files/copy/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/files/copy/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/files/delete/route.js +1 -0
- package/.next-prod/server/app/api/files/delete/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/files/delete/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/files/expanded/route.js +1 -0
- package/.next-prod/server/app/api/files/expanded/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/files/expanded/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/files/index/route.js +1 -0
- package/.next-prod/server/app/api/files/index/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/files/index/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/files/init/route.js +1 -0
- package/.next-prod/server/app/api/files/init/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/files/init/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/files/paste/route.js +1 -0
- package/.next-prod/server/app/api/files/paste/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/files/paste/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/files/read/route.js +1 -0
- package/.next-prod/server/app/api/files/read/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/files/read/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/files/readdir/route.js +1 -0
- package/.next-prod/server/app/api/files/readdir/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/files/readdir/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/files/recent/route.js +1 -0
- package/.next-prod/server/app/api/files/recent/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/files/recent/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/files/save/route.js +1 -0
- package/.next-prod/server/app/api/files/save/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/files/save/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/files/search/route.js +1 -0
- package/.next-prod/server/app/api/files/search/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/files/search/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/git/branch-diff/route.js +1 -0
- package/.next-prod/server/app/api/git/branch-diff/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/git/branch-diff/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/git/branches/route.js +1 -0
- package/.next-prod/server/app/api/git/branches/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/git/branches/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/git/commit-diff/route.js +1 -0
- package/.next-prod/server/app/api/git/commit-diff/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/git/commit-diff/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/git/commits/route.js +1 -0
- package/.next-prod/server/app/api/git/commits/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/git/commits/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/git/diff/route.js +1 -0
- package/.next-prod/server/app/api/git/diff/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/git/diff/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/git/discard/route.js +1 -0
- package/.next-prod/server/app/api/git/discard/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/git/discard/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/git/stage/route.js +1 -0
- package/.next-prod/server/app/api/git/stage/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/git/stage/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/git/status/route.js +1 -0
- package/.next-prod/server/app/api/git/status/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/git/status/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/git/unstage/route.js +1 -0
- package/.next-prod/server/app/api/git/unstage/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/git/unstage/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/git/worktree/route.js +1 -0
- package/.next-prod/server/app/api/git/worktree/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/git/worktree/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/global-state/route.js +1 -0
- package/.next-prod/server/app/api/global-state/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/global-state/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/jupyter/load/route.js +1 -0
- package/.next-prod/server/app/api/jupyter/load/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/jupyter/load/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/jupyter/save/route.js +1 -0
- package/.next-prod/server/app/api/jupyter/save/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/jupyter/save/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/jupyter/shutdown/route.js +1 -0
- package/.next-prod/server/app/api/jupyter/shutdown/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/jupyter/shutdown/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/lsp/definition/route.js +1 -0
- package/.next-prod/server/app/api/lsp/definition/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/lsp/definition/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/lsp/hover/route.js +1 -0
- package/.next-prod/server/app/api/lsp/hover/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/lsp/hover/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/lsp/references/route.js +1 -0
- package/.next-prod/server/app/api/lsp/references/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/lsp/references/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/lsp/status/route.js +1 -0
- package/.next-prod/server/app/api/lsp/status/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/lsp/status/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/lsp/warmup/route.js +1 -0
- package/.next-prod/server/app/api/lsp/warmup/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/lsp/warmup/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/mysql/columns/route.js +9 -0
- package/.next-prod/server/app/api/mysql/columns/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/mysql/columns/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/mysql/connect/route.js +1 -0
- package/.next-prod/server/app/api/mysql/connect/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/mysql/connect/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/mysql/disconnect/route.js +1 -0
- package/.next-prod/server/app/api/mysql/disconnect/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/mysql/disconnect/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/mysql/export/route.js +1 -0
- package/.next-prod/server/app/api/mysql/export/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/mysql/export/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/mysql/query/route.js +1 -0
- package/.next-prod/server/app/api/mysql/query/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/mysql/query/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/mysql/schemas/route.js +6 -0
- package/.next-prod/server/app/api/mysql/schemas/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/mysql/schemas/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/note/route.js +1 -0
- package/.next-prod/server/app/api/note/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/note/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/open-cursor/route.js +1 -0
- package/.next-prod/server/app/api/open-cursor/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/open-cursor/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/open-vscode/route.js +1 -0
- package/.next-prod/server/app/api/open-vscode/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/open-vscode/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/pick-folder/route.js +1 -0
- package/.next-prod/server/app/api/pick-folder/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/pick-folder/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/pinned-sessions/route.js +1 -0
- package/.next-prod/server/app/api/pinned-sessions/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/pinned-sessions/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/project-settings/route.js +1 -0
- package/.next-prod/server/app/api/project-settings/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/project-settings/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/project-state/route.js +1 -0
- package/.next-prod/server/app/api/project-state/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/project-state/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/projects/route.js +1 -0
- package/.next-prod/server/app/api/projects/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/projects/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/redis/command/route.js +1 -0
- package/.next-prod/server/app/api/redis/command/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/redis/command/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/redis/connect/route.js +1 -0
- package/.next-prod/server/app/api/redis/connect/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/redis/connect/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/redis/delete/route.js +1 -0
- package/.next-prod/server/app/api/redis/delete/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/redis/delete/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/redis/disconnect/route.js +1 -0
- package/.next-prod/server/app/api/redis/disconnect/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/redis/disconnect/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/redis/get/route.js +1 -0
- package/.next-prod/server/app/api/redis/get/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/redis/get/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/redis/keys/route.js +1 -0
- package/.next-prod/server/app/api/redis/keys/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/redis/keys/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/redis/set/route.js +1 -0
- package/.next-prod/server/app/api/redis/set/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/redis/set/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/review/[id]/comments/route.js +1 -0
- package/.next-prod/server/app/api/review/[id]/comments/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/review/[id]/comments/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/review/[id]/replies/route.js +1 -0
- package/.next-prod/server/app/api/review/[id]/replies/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/review/[id]/replies/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/review/[id]/route.js +1 -0
- package/.next-prod/server/app/api/review/[id]/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/review/[id]/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/review/identify/route.js +1 -0
- package/.next-prod/server/app/api/review/identify/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/review/identify/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/review/order/route.js +1 -0
- package/.next-prod/server/app/api/review/order/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/review/order/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/review/route.js +1 -0
- package/.next-prod/server/app/api/review/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/review/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/review/share-info/route.js +1 -0
- package/.next-prod/server/app/api/review/share-info/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/review/share-info/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/review/users/route.js +1 -0
- package/.next-prod/server/app/api/review/users/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/review/users/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/scheduled-tasks/route.js +1 -0
- package/.next-prod/server/app/api/scheduled-tasks/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/scheduled-tasks/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/services/config/route.js +1 -0
- package/.next-prod/server/app/api/services/config/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/services/config/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/services/scripts/route.js +1 -0
- package/.next-prod/server/app/api/services/scripts/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/services/scripts/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/session/[sessionId]/fork/route.js +1 -0
- package/.next-prod/server/app/api/session/[sessionId]/fork/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/session/[sessionId]/fork/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/session/[sessionId]/history/route.js +1 -0
- package/.next-prod/server/app/api/session/[sessionId]/history/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/session/[sessionId]/history/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/session-by-path/route.js +1 -0
- package/.next-prod/server/app/api/session-by-path/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/session-by-path/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/sessions/projects/[encodedPath]/route.js +1 -0
- package/.next-prod/server/app/api/sessions/projects/[encodedPath]/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/sessions/projects/[encodedPath]/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/sessions/projects/route.js +1 -0
- package/.next-prod/server/app/api/sessions/projects/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/sessions/projects/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/sessions/route.js +1 -0
- package/.next-prod/server/app/api/sessions/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/sessions/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/settings/route.js +1 -0
- package/.next-prod/server/app/api/settings/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/settings/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/terminal/aliases/route.js +1 -0
- package/.next-prod/server/app/api/terminal/aliases/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/terminal/aliases/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/terminal/autocomplete/route.js +1 -0
- package/.next-prod/server/app/api/terminal/autocomplete/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/terminal/autocomplete/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/terminal/bubble-order/route.js +1 -0
- package/.next-prod/server/app/api/terminal/bubble-order/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/terminal/bubble-order/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/terminal/env/route.js +1 -0
- package/.next-prod/server/app/api/terminal/env/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/terminal/env/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/terminal/history/route.js +1 -0
- package/.next-prod/server/app/api/terminal/history/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/terminal/history/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/version/route.js +1 -0
- package/.next-prod/server/app/api/version/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/version/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/favicon.ico/route.js +1 -0
- package/.next-prod/server/app/favicon.ico/route.js.nft.json +1 -0
- package/.next-prod/server/app/favicon.ico.body +0 -0
- package/.next-prod/server/app/favicon.ico.meta +1 -0
- package/.next-prod/server/app/manifest.webmanifest/route.js +16 -0
- package/.next-prod/server/app/manifest.webmanifest/route.js.nft.json +1 -0
- package/.next-prod/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/manifest.webmanifest.body +1 -0
- package/.next-prod/server/app/manifest.webmanifest.meta +1 -0
- package/.next-prod/server/app/page.js +97 -0
- package/.next-prod/server/app/page.js.nft.json +1 -0
- package/.next-prod/server/app/page_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/project/page.js +29 -0
- package/.next-prod/server/app/project/page.js.nft.json +1 -0
- package/.next-prod/server/app/project/page_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/review/[id]/page.js +2 -0
- package/.next-prod/server/app/review/[id]/page.js.nft.json +1 -0
- package/.next-prod/server/app/review/[id]/page_client-reference-manifest.js +1 -0
- package/.next-prod/server/app-paths-manifest.json +99 -0
- package/.next-prod/server/chunks/1639.js +1 -0
- package/.next-prod/server/chunks/1667.js +1 -0
- package/.next-prod/server/chunks/1813.js +1 -0
- package/.next-prod/server/chunks/1912.js +1 -0
- package/.next-prod/server/chunks/2325.js +82 -0
- package/.next-prod/server/chunks/2376.js +36 -0
- package/.next-prod/server/chunks/2816.js +1 -0
- package/.next-prod/server/chunks/2840.js +62 -0
- package/.next-prod/server/chunks/3434.js +1 -0
- package/.next-prod/server/chunks/3441.js +24 -0
- package/.next-prod/server/chunks/3503.js +29 -0
- package/.next-prod/server/chunks/3863.js +1 -0
- package/.next-prod/server/chunks/3932.js +56 -0
- package/.next-prod/server/chunks/4042.js +1 -0
- package/.next-prod/server/chunks/4073.js +1 -0
- package/.next-prod/server/chunks/4097.js +136 -0
- package/.next-prod/server/chunks/4098.js +1 -0
- package/.next-prod/server/chunks/4268.js +4 -0
- package/.next-prod/server/chunks/4272.js +5 -0
- package/.next-prod/server/chunks/4309.js +141 -0
- package/.next-prod/server/chunks/4345.js +1 -0
- package/.next-prod/server/chunks/4367.js +1 -0
- package/.next-prod/server/chunks/4388.js +24 -0
- package/.next-prod/server/chunks/4442.js +1 -0
- package/.next-prod/server/chunks/4490.js +26 -0
- package/.next-prod/server/chunks/4741.js +22 -0
- package/.next-prod/server/chunks/4793.js +1 -0
- package/.next-prod/server/chunks/5152.js +1 -0
- package/.next-prod/server/chunks/5460.js +201 -0
- package/.next-prod/server/chunks/5481.js +1 -0
- package/.next-prod/server/chunks/5536.js +148 -0
- package/.next-prod/server/chunks/5733.js +5 -0
- package/.next-prod/server/chunks/582.js +1 -0
- package/.next-prod/server/chunks/5958.js +1 -0
- package/.next-prod/server/chunks/6062.js +1 -0
- package/.next-prod/server/chunks/6117.js +13 -0
- package/.next-prod/server/chunks/6142.js +287 -0
- package/.next-prod/server/chunks/6346.js +1 -0
- package/.next-prod/server/chunks/6443.js +1 -0
- package/.next-prod/server/chunks/6804.js +43 -0
- package/.next-prod/server/chunks/7265.js +93 -0
- package/.next-prod/server/chunks/7284.js +1 -0
- package/.next-prod/server/chunks/7307.js +1 -0
- package/.next-prod/server/chunks/7483.js +1 -0
- package/.next-prod/server/chunks/7484.js +64 -0
- package/.next-prod/server/chunks/7514.js +31 -0
- package/.next-prod/server/chunks/7800.js +166 -0
- package/.next-prod/server/chunks/8068.js +63 -0
- package/.next-prod/server/chunks/8351.js +23 -0
- package/.next-prod/server/chunks/8491.js +5 -0
- package/.next-prod/server/chunks/8585.js +198 -0
- package/.next-prod/server/chunks/887.js +215 -0
- package/.next-prod/server/chunks/911.js +1 -0
- package/.next-prod/server/chunks/9116.js +65 -0
- package/.next-prod/server/chunks/925.js +68 -0
- package/.next-prod/server/chunks/9298.js +139 -0
- package/.next-prod/server/chunks/9401.js +1 -0
- package/.next-prod/server/chunks/9408.js +1 -0
- package/.next-prod/server/functions-config-manifest.json +24 -0
- package/.next-prod/server/interception-route-rewrite-manifest.js +1 -0
- package/.next-prod/server/middleware-build-manifest.js +1 -0
- package/.next-prod/server/middleware-manifest.json +6 -0
- package/.next-prod/server/middleware-react-loadable-manifest.js +1 -0
- package/.next-prod/server/next-font-manifest.js +1 -0
- package/.next-prod/server/next-font-manifest.json +1 -0
- package/.next-prod/server/pages/404.html +18 -0
- package/.next-prod/server/pages/500.html +2 -0
- package/.next-prod/server/pages-manifest.json +4 -0
- package/.next-prod/server/server-reference-manifest.js +1 -0
- package/.next-prod/server/server-reference-manifest.json +1 -0
- package/.next-prod/server/webpack-runtime.js +1 -0
- package/.next-prod/static/DV3WCL3Yj_UIBxTQ3r93N/_buildManifest.js +1 -0
- package/.next-prod/static/DV3WCL3Yj_UIBxTQ3r93N/_ssgManifest.js +1 -0
- package/.next-prod/static/chunks/10.6cf001c181ce1098.js +1 -0
- package/.next-prod/static/chunks/1078.02294b2934d5bf21.js +1 -0
- package/.next-prod/static/chunks/1142.17e45d200709420d.js +1 -0
- package/.next-prod/static/chunks/1161.06b33878b495da50.js +1 -0
- package/.next-prod/static/chunks/1184.e80a999422621ed9.js +1 -0
- package/.next-prod/static/chunks/1188.1d4ce94ddc297119.js +1 -0
- package/.next-prod/static/chunks/1198.2a5c215f01a8b74d.js +1 -0
- package/.next-prod/static/chunks/1215.88ed89521e915107.js +1 -0
- package/.next-prod/static/chunks/1219.e27b0bd10b029e40.js +1 -0
- package/.next-prod/static/chunks/123.d6fe9c2353baf42b.js +1 -0
- package/.next-prod/static/chunks/1247.64e212daa5bb3925.js +1 -0
- package/.next-prod/static/chunks/1248.36af3903f037c1f5.js +1 -0
- package/.next-prod/static/chunks/1274.ce6906b1fe2e04b8.js +1 -0
- package/.next-prod/static/chunks/1280.1651bb5167170457.js +1 -0
- package/.next-prod/static/chunks/1310.c38c5fbf05820fcd.js +166 -0
- package/.next-prod/static/chunks/1335.716cc5924662708e.js +1 -0
- package/.next-prod/static/chunks/1365.d7391145ca7f8791.js +1 -0
- package/.next-prod/static/chunks/1379.03e1e0f31bdaa2cc.js +1 -0
- package/.next-prod/static/chunks/1409.9f81cd6d2cab4b67.js +1 -0
- package/.next-prod/static/chunks/1413.117c5958c59cc695.js +1 -0
- package/.next-prod/static/chunks/142.e09e154342f02da4.js +4 -0
- package/.next-prod/static/chunks/1453.3c24c777a3deca2d.js +1 -0
- package/.next-prod/static/chunks/1456.a1f849b334fff0da.js +1 -0
- package/.next-prod/static/chunks/1501.549af2c91a889a08.js +1 -0
- package/.next-prod/static/chunks/1534.918a25b2e3daab22.js +1 -0
- package/.next-prod/static/chunks/1556.96abc9ff91b0c383.js +1 -0
- package/.next-prod/static/chunks/1583.03a06dbdde85ac56.js +1 -0
- package/.next-prod/static/chunks/1590.05549e036336164c.js +65 -0
- package/.next-prod/static/chunks/1593-7902218f5b10761f.js +1 -0
- package/.next-prod/static/chunks/1595.ee61519fde230f60.js +1 -0
- package/.next-prod/static/chunks/1656.a9efc78185a5a85f.js +1 -0
- package/.next-prod/static/chunks/1664.6d5b5e3112b66906.js +1 -0
- package/.next-prod/static/chunks/1898.e07b2b1c5e789b06.js +1 -0
- package/.next-prod/static/chunks/1932.b0aea9b52cabe5e8.js +1 -0
- package/.next-prod/static/chunks/194.dace825a3ddbbbff.js +1 -0
- package/.next-prod/static/chunks/1948.bf7e0d9ede202530.js +29 -0
- package/.next-prod/static/chunks/1977.a06c8e8d2198f765.js +1 -0
- package/.next-prod/static/chunks/1987.226da043eabc8911.js +5 -0
- package/.next-prod/static/chunks/1991.d869abe5092c9011.js +1 -0
- package/.next-prod/static/chunks/1cd6e1d3.8121a74b2042bff3.js +1 -0
- package/.next-prod/static/chunks/2013.598558c40e51e107.js +1 -0
- package/.next-prod/static/chunks/2020.46a0112747939389.js +1 -0
- package/.next-prod/static/chunks/2031.3877441c49bff5cd.js +1 -0
- package/.next-prod/static/chunks/2041.00f4fa0ab26c6ba5.js +1 -0
- package/.next-prod/static/chunks/2062.4a0ab3400fea0e34.js +1 -0
- package/.next-prod/static/chunks/2072-37a80cb92f1ee2d4.js +4 -0
- package/.next-prod/static/chunks/2107.c627112b02b9e1c8.js +1 -0
- package/.next-prod/static/chunks/2130.441ae0f68863efeb.js +1 -0
- package/.next-prod/static/chunks/214.f6bba63dfa159e01.js +1 -0
- package/.next-prod/static/chunks/2160.e38d781fd5c4cde0.js +1 -0
- package/.next-prod/static/chunks/2179.1bf5fe315e6e132c.js +1 -0
- package/.next-prod/static/chunks/2215.9d2d6fbe90ffcc80.js +1 -0
- package/.next-prod/static/chunks/2235.b4453110c06e2b09.js +1 -0
- package/.next-prod/static/chunks/2349.ca15d465c4260b4b.js +1 -0
- package/.next-prod/static/chunks/2374.7560cc5c4b8ed6b0.js +1 -0
- package/.next-prod/static/chunks/2403.3dda71b6482dce3b.js +1 -0
- package/.next-prod/static/chunks/2485.3188870375e9fbee.js +1 -0
- package/.next-prod/static/chunks/2489.fcc70bd67329a70e.js +1 -0
- package/.next-prod/static/chunks/2501.4e65b56602faa956.js +1 -0
- package/.next-prod/static/chunks/2503.bb9d3528c3c7ccae.js +1 -0
- package/.next-prod/static/chunks/252.a9e22657cbf67b42.js +1 -0
- package/.next-prod/static/chunks/254.8b4308512ac955b5.js +24 -0
- package/.next-prod/static/chunks/2614.8349e4b407470a30.js +1 -0
- package/.next-prod/static/chunks/2710.fe0656d4ebae4d30.js +1 -0
- package/.next-prod/static/chunks/2728.5fed9ac13dfcd1d1.js +1 -0
- package/.next-prod/static/chunks/2729.826909b4d5229ba6.js +68 -0
- package/.next-prod/static/chunks/2735.5a3e65a580bd5af9.js +1 -0
- package/.next-prod/static/chunks/2747.1d85d388314f2904.js +1 -0
- package/.next-prod/static/chunks/2765.2c6d9772af50feed.js +1 -0
- package/.next-prod/static/chunks/2783.e8bbf2c794ef9750.js +1 -0
- package/.next-prod/static/chunks/2812.dcd8179a6b1d76c9.js +1 -0
- package/.next-prod/static/chunks/2821.fa74c6e87f6e759a.js +1 -0
- package/.next-prod/static/chunks/2839.a832cb0d77a9d298.js +1 -0
- package/.next-prod/static/chunks/2895.0339e755e79ee794.js +1 -0
- package/.next-prod/static/chunks/2921.26016c4c7eb031e8.js +1 -0
- package/.next-prod/static/chunks/2954.7d8daeae6410d4a4.js +1 -0
- package/.next-prod/static/chunks/2964.1a0e15f7327680a2.js +1 -0
- package/.next-prod/static/chunks/2ff9d716.93c18c265de76cfb.js +136 -0
- package/.next-prod/static/chunks/305-fced91c3443b6178.js +1 -0
- package/.next-prod/static/chunks/3072.b6da96c10080c967.js +1 -0
- package/.next-prod/static/chunks/3074.911584369786c26c.js +1 -0
- package/.next-prod/static/chunks/3077.bf82c0c332cc9fec.js +1 -0
- package/.next-prod/static/chunks/3082.159e4ab8f0572597.js +1 -0
- package/.next-prod/static/chunks/3095.8cd478c42cee505a.js +1 -0
- package/.next-prod/static/chunks/3111.1cf85db2faeb20cc.js +1 -0
- package/.next-prod/static/chunks/3126.c89ab7ce8e10978e.js +1 -0
- package/.next-prod/static/chunks/3175.538ce7aec634bddb.js +1 -0
- package/.next-prod/static/chunks/3186.3665756f8aae3eb7.js +1 -0
- package/.next-prod/static/chunks/3194.5a331fb5e3dc34e9.js +1 -0
- package/.next-prod/static/chunks/3229.5e91f7d0b135266b.js +1 -0
- package/.next-prod/static/chunks/327.8ecab0b86d52b597.js +1 -0
- package/.next-prod/static/chunks/3274.858f7f9216c8b074.js +1 -0
- package/.next-prod/static/chunks/3286.196c508356bb0b66.js +1 -0
- package/.next-prod/static/chunks/3288.f210cd6796271d4f.js +1 -0
- package/.next-prod/static/chunks/3290.b5ba2646ad49c9fd.js +1 -0
- package/.next-prod/static/chunks/3304.16305e84f4ff6598.js +1 -0
- package/.next-prod/static/chunks/3313.471138e5504646a9.js +1 -0
- package/.next-prod/static/chunks/3324.85e21e3313d0901c.js +1 -0
- package/.next-prod/static/chunks/3392.460f5a753531f501.js +1 -0
- package/.next-prod/static/chunks/34.ce581867cf95e24b.js +1 -0
- package/.next-prod/static/chunks/3419.78b520dab7e2f96d.js +1 -0
- package/.next-prod/static/chunks/3437.0ad1ecc8c5b8a679.js +1 -0
- package/.next-prod/static/chunks/3476.246c30b47bded3b7.js +1 -0
- package/.next-prod/static/chunks/3483.fc2a0b1185dbaa5d.js +1 -0
- package/.next-prod/static/chunks/3492.ca55498822ad7796.js +1 -0
- package/.next-prod/static/chunks/3530-6d8abfd0e950d439.js +14 -0
- package/.next-prod/static/chunks/36.b4a553bf2106f6d3.js +1 -0
- package/.next-prod/static/chunks/3613.9a37e282a0b018d7.js +1 -0
- package/.next-prod/static/chunks/3682.d8c0079db560c625.js +1 -0
- package/.next-prod/static/chunks/3695-f14fb3e48483755c.js +18 -0
- package/.next-prod/static/chunks/376.9e742ff6919b2b54.js +1 -0
- package/.next-prod/static/chunks/3782.8de9ba0149339c0c.js +1 -0
- package/.next-prod/static/chunks/3787.78ebe68a043f50ce.js +1 -0
- package/.next-prod/static/chunks/3794-337d1ca25ad99a89.js +2 -0
- package/.next-prod/static/chunks/3860.be5b243bf7d6618c.js +1 -0
- package/.next-prod/static/chunks/3873.72a9a21509f713f7.js +1 -0
- package/.next-prod/static/chunks/392.3cad93691f1b7360.js +1 -0
- package/.next-prod/static/chunks/3942.00e2e29e2d62b039.js +1 -0
- package/.next-prod/static/chunks/3979.cea8623f6e9f83ea.js +1 -0
- package/.next-prod/static/chunks/400.59979e0d3ae126e4.js +1 -0
- package/.next-prod/static/chunks/4053.90d71fcbe4ffd852.js +1 -0
- package/.next-prod/static/chunks/4080.08a21dae9e93c547.js +1 -0
- package/.next-prod/static/chunks/4163.c6ebefdd9aa5c358.js +1 -0
- package/.next-prod/static/chunks/4174.9e84de8f8816fe01.js +1 -0
- package/.next-prod/static/chunks/4223.c10556cd92fc8018.js +1 -0
- package/.next-prod/static/chunks/4240-38a224bd376cc8a0.js +1 -0
- package/.next-prod/static/chunks/4242.3a66c58375424a5b.js +1 -0
- package/.next-prod/static/chunks/425.9a3434a28926566a.js +1 -0
- package/.next-prod/static/chunks/4275.8f2e531757c2a813.js +1 -0
- package/.next-prod/static/chunks/4295.6c0f4838b0c9c69d.js +1 -0
- package/.next-prod/static/chunks/4309.a887a10e84c44f9e.js +1 -0
- package/.next-prod/static/chunks/4350.b9d80827e8eee01a.js +1 -0
- package/.next-prod/static/chunks/4357.05060a5a3fea9ff1.js +1 -0
- package/.next-prod/static/chunks/4358.f15dd467571f7594.js +1 -0
- package/.next-prod/static/chunks/4367.2610339aa03a9fb3.js +1 -0
- package/.next-prod/static/chunks/4370.ac13b62c811f7ede.js +1 -0
- package/.next-prod/static/chunks/4402d2ac.d0d1b1777a45e0b2.js +1 -0
- package/.next-prod/static/chunks/4474.053807fa34066566.js +1 -0
- package/.next-prod/static/chunks/4539.559c223da16b0282.js +1 -0
- package/.next-prod/static/chunks/4540.03df20c499bca840.js +1 -0
- package/.next-prod/static/chunks/4553.a16dba8d6d03226c.js +1 -0
- package/.next-prod/static/chunks/4567.d405b50b917bd2c2.js +1 -0
- package/.next-prod/static/chunks/4583.2a5df6eb3a6ea30b.js +1 -0
- package/.next-prod/static/chunks/4593.676ac488744e1af5.js +1 -0
- package/.next-prod/static/chunks/4608.1ff246d6b4c771f8.js +1 -0
- package/.next-prod/static/chunks/4634.0332a56fdb8e26c0.js +1 -0
- package/.next-prod/static/chunks/4650.61aec912b756287b.js +1 -0
- package/.next-prod/static/chunks/4659.b8e05ba7cbf46556.js +1 -0
- package/.next-prod/static/chunks/4678.867dfae26694be02.js +1 -0
- package/.next-prod/static/chunks/4699.8603b2742a761084.js +1 -0
- package/.next-prod/static/chunks/4823.907850963b2bcb70.js +1 -0
- package/.next-prod/static/chunks/4829.402ec60139d36417.js +1 -0
- package/.next-prod/static/chunks/4892.1674cc00200143ba.js +1 -0
- package/.next-prod/static/chunks/4900.b723a916eafdf743.js +1 -0
- package/.next-prod/static/chunks/4903.004f583a12223dac.js +1 -0
- package/.next-prod/static/chunks/4963.0f6678151a159143.js +1 -0
- package/.next-prod/static/chunks/4969.1cb10af9489ea295.js +1 -0
- package/.next-prod/static/chunks/4976.8870319ffbd1c31f.js +1 -0
- package/.next-prod/static/chunks/4bd1b696-e5d7c65570c947b7.js +1 -0
- package/.next-prod/static/chunks/4ca0cff5.07efe2bc8f09d72e.js +1 -0
- package/.next-prod/static/chunks/5005.cf839e066f3d3efe.js +1 -0
- package/.next-prod/static/chunks/5019.2906d96e77b98f68.js +198 -0
- package/.next-prod/static/chunks/5025.b597364f0cf8b85a.js +1 -0
- package/.next-prod/static/chunks/5061.025d30c3123eeaf6.js +1 -0
- package/.next-prod/static/chunks/5136.ac897c2a56ee392f.js +1 -0
- package/.next-prod/static/chunks/5139.83dc2c84aeea716b.js +63 -0
- package/.next-prod/static/chunks/5183.2e5c895a2be76262.js +1 -0
- package/.next-prod/static/chunks/5199.5faac6a2cc104a4c.js +36 -0
- package/.next-prod/static/chunks/5269.25d99df0164521ad.js +23 -0
- package/.next-prod/static/chunks/5318.d48b9096df0171df.js +1 -0
- package/.next-prod/static/chunks/5320.191be461ff110fb3.js +1 -0
- package/.next-prod/static/chunks/5325.aad15a16a5d57787.js +1 -0
- package/.next-prod/static/chunks/5331.4d5d42e5253dbee2.js +1 -0
- package/.next-prod/static/chunks/5338.76f7773c317f3142.js +1 -0
- package/.next-prod/static/chunks/5347.3192e0021174aaa8.js +1 -0
- package/.next-prod/static/chunks/5364.2e5ba480c24d7854.js +148 -0
- package/.next-prod/static/chunks/5375.ebc026e6140b52f1.js +1 -0
- package/.next-prod/static/chunks/5394.9d260f733e336357.js +287 -0
- package/.next-prod/static/chunks/53c1bd3f.2911e2bac119d910.js +1 -0
- package/.next-prod/static/chunks/541.cfa15b606745131a.js +1 -0
- package/.next-prod/static/chunks/5424.4d62f7ee887cd8b9.js +1 -0
- package/.next-prod/static/chunks/5482.0907421e6bf5eeec.js +1 -0
- package/.next-prod/static/chunks/5491.5cc285c4b84dac30.js +1 -0
- package/.next-prod/static/chunks/5493-9f80ad2c7c9cf840.js +1 -0
- package/.next-prod/static/chunks/5498.fa0a196807d6cd2f.js +1 -0
- package/.next-prod/static/chunks/54a60aa6-f60235f3d6b54466.js +79 -0
- package/.next-prod/static/chunks/5518.6c3dc9afe81a566b.js +1 -0
- package/.next-prod/static/chunks/5520.eab85d7487e77510.js +1 -0
- package/.next-prod/static/chunks/5553.75df19e3cc1246d6.js +1 -0
- package/.next-prod/static/chunks/5575.3d90c643343a1329.js +1 -0
- package/.next-prod/static/chunks/5645.9002948124d25d41.js +1 -0
- package/.next-prod/static/chunks/5670.2a1b27a6fdb7aa6b.js +1 -0
- package/.next-prod/static/chunks/5690.d30877807cf5c7eb.js +1 -0
- package/.next-prod/static/chunks/570e4624.a82467c542429379.js +1 -0
- package/.next-prod/static/chunks/5712.574fca2d5f06483a.js +1 -0
- package/.next-prod/static/chunks/5728.8ef773d61765855e.js +1 -0
- package/.next-prod/static/chunks/5750.aa57d25b74640d23.js +1 -0
- package/.next-prod/static/chunks/5755.00015c284ed6fb39.js +1 -0
- package/.next-prod/static/chunks/5788.e5d5040b65e5edf3.js +1 -0
- package/.next-prod/static/chunks/579.33fc87fb95163c6a.js +1 -0
- package/.next-prod/static/chunks/583.5061a2f9e7b7e97d.js +1 -0
- package/.next-prod/static/chunks/5920.9db223329ee9e11a.js +1 -0
- package/.next-prod/static/chunks/5922.0d75c174139a59a4.js +1 -0
- package/.next-prod/static/chunks/5937.0827b5b3eb831ff0.js +1 -0
- package/.next-prod/static/chunks/5968.63d5869783fad06f.js +1 -0
- package/.next-prod/static/chunks/5997.226c07d9e6c496e0.js +1 -0
- package/.next-prod/static/chunks/6026.4027a04696ef04db.js +1 -0
- package/.next-prod/static/chunks/6046.00d36aea7fd5b147.js +1 -0
- package/.next-prod/static/chunks/6089.2dd351186ec85cc3.js +1 -0
- package/.next-prod/static/chunks/6099.43e6595fcf24fc33.js +1 -0
- package/.next-prod/static/chunks/6110.5ce3f75fced27aaf.js +1 -0
- package/.next-prod/static/chunks/6144.f967a8228bcdf663.js +1 -0
- package/.next-prod/static/chunks/6155.e6cf0ef7c818caa9.js +1 -0
- package/.next-prod/static/chunks/6166.ecd82a9dcb484b97.js +1 -0
- package/.next-prod/static/chunks/624.2dd909fbfce98c5e.js +1 -0
- package/.next-prod/static/chunks/6290.e14cf4fc52dd4539.js +1 -0
- package/.next-prod/static/chunks/6293.5914fa73a9f7e777.js +1 -0
- package/.next-prod/static/chunks/6311.5b9c1f74df9a8f67.js +1 -0
- package/.next-prod/static/chunks/6331.758f2f66b92cada9.js +1 -0
- package/.next-prod/static/chunks/6339.bc9301cc22898be0.js +1 -0
- package/.next-prod/static/chunks/6360.ff0a9063773daeeb.js +1 -0
- package/.next-prod/static/chunks/6383.ca3e074feb80c69c.js +1 -0
- package/.next-prod/static/chunks/640.5bf1e25d0bddf875.js +1 -0
- package/.next-prod/static/chunks/6402.a0070d7688ed986b.js +1 -0
- package/.next-prod/static/chunks/6412.089ee787a294d10b.js +1 -0
- package/.next-prod/static/chunks/6455.12b78a2660d609eb.js +1 -0
- package/.next-prod/static/chunks/6460.8ce93fe47320f6c5.js +1 -0
- package/.next-prod/static/chunks/6563.5d618b608750f4dc.js +1 -0
- package/.next-prod/static/chunks/6572.ca2463823b9b01a0.js +1 -0
- package/.next-prod/static/chunks/6580.75d53830b434451f.js +1 -0
- package/.next-prod/static/chunks/6588.0fbca957af7d9e6a.js +1 -0
- package/.next-prod/static/chunks/6647.584c5d5cd8dfdb5a.js +1 -0
- package/.next-prod/static/chunks/6686.796c782c33ab8ca9.js +1 -0
- package/.next-prod/static/chunks/6701.bff0efb979f71a17.js +1 -0
- package/.next-prod/static/chunks/6704.f280f0ad0f5d8644.js +1 -0
- package/.next-prod/static/chunks/6729.0f91dcaaaffa2ed4.js +1 -0
- package/.next-prod/static/chunks/6741.06fdaf122961074e.js +1 -0
- package/.next-prod/static/chunks/6846.91283f709c40802c.js +1 -0
- package/.next-prod/static/chunks/6859.bacad166ee995fe0.js +1 -0
- package/.next-prod/static/chunks/6871.38519003bd87ac1c.js +62 -0
- package/.next-prod/static/chunks/6887.6c81234d73740fb9.js +1 -0
- package/.next-prod/static/chunks/6927.aa3914b5fb0d14d4.js +1 -0
- package/.next-prod/static/chunks/6931.3c90e9fe0f7f1e66.js +1 -0
- package/.next-prod/static/chunks/6938.0ccf683bd8aa8410.js +1 -0
- package/.next-prod/static/chunks/6948.2719ed8731963209.js +1 -0
- package/.next-prod/static/chunks/6959.5a803faf27f88e9f.js +1 -0
- package/.next-prod/static/chunks/6962.3bbd080592d4efa0.js +64 -0
- package/.next-prod/static/chunks/698.e0dda03fd303b96b.js +1 -0
- package/.next-prod/static/chunks/700.65a02f6a597083dc.js +9 -0
- package/.next-prod/static/chunks/7021.b71240b1d5f6fbe4.js +1 -0
- package/.next-prod/static/chunks/7040.b8e05ba7cbf46556.js +1 -0
- package/.next-prod/static/chunks/7041.174bf29bd837f06d.js +1 -0
- package/.next-prod/static/chunks/7082.fc816f91214026d7.js +1 -0
- package/.next-prod/static/chunks/7084.921c9737b83f55eb.js +1 -0
- package/.next-prod/static/chunks/7085.b16e7c0e24741232.js +215 -0
- package/.next-prod/static/chunks/70e0d97a-6903b8594c742784.js +1 -0
- package/.next-prod/static/chunks/7113.86e40b60c804b8c5.js +1 -0
- package/.next-prod/static/chunks/7130.8d24694735826c22.js +1 -0
- package/.next-prod/static/chunks/7142.dbd2cf8141eece5e.js +1 -0
- package/.next-prod/static/chunks/7152.c7b7f1f5e9622f21.js +1 -0
- package/.next-prod/static/chunks/7182.b747e3ef1524157a.js +1 -0
- package/.next-prod/static/chunks/7227.a6b2f01487bb3d9d.js +1 -0
- package/.next-prod/static/chunks/7258.6cbe24c3bcb63d1d.js +1 -0
- package/.next-prod/static/chunks/7425.8b47c8e398a12dd8.js +1 -0
- package/.next-prod/static/chunks/7443.124211e5abc05d3f.js +93 -0
- package/.next-prod/static/chunks/7455.71d54397710b923c.js +1 -0
- package/.next-prod/static/chunks/7465.867e8ff655666413.js +1 -0
- package/.next-prod/static/chunks/7479.433d3878625aba75.js +24 -0
- package/.next-prod/static/chunks/7524.9528295a19a5837a.js +1 -0
- package/.next-prod/static/chunks/7525.f433aaf1fe40c90a.js +1 -0
- package/.next-prod/static/chunks/7547.54b68d37b50c2f21.js +43 -0
- package/.next-prod/static/chunks/7557.bdc743175125b3d8.js +1 -0
- package/.next-prod/static/chunks/7610.b1439345dbcf285d.js +1 -0
- package/.next-prod/static/chunks/7625.ab66bd50d2fb61a4.js +1 -0
- package/.next-prod/static/chunks/7635.166d83de1d29e758.js +1 -0
- package/.next-prod/static/chunks/7636.bf91320a9ff695af.js +1 -0
- package/.next-prod/static/chunks/7650.18f74243e9325242.js +1 -0
- package/.next-prod/static/chunks/7785.1402a4110c300764.js +1 -0
- package/.next-prod/static/chunks/7799.f90cda9aba4e0e77.js +1 -0
- package/.next-prod/static/chunks/7819.3c56f48c0dc5ad5d.js +1 -0
- package/.next-prod/static/chunks/7844.2bb29faa262f313e.js +1 -0
- package/.next-prod/static/chunks/7846.c9705c044ab8f87a.js +1 -0
- package/.next-prod/static/chunks/7874.8db6929b94cdf697.js +1 -0
- package/.next-prod/static/chunks/7884.79af1a2f4511cea5.js +1 -0
- package/.next-prod/static/chunks/7889.af3e581842f34c28.js +1 -0
- package/.next-prod/static/chunks/7921.c361f794cc208e06.js +1 -0
- package/.next-prod/static/chunks/794.06b1ae4fc9cc10a9.js +1 -0
- package/.next-prod/static/chunks/7977.80e4daa080a79c39.js +1 -0
- package/.next-prod/static/chunks/799ebd4e.ccb85c56e9216a38.js +1 -0
- package/.next-prod/static/chunks/7d29de82.30ff86a90cbfd921.js +1 -0
- package/.next-prod/static/chunks/8113.907baefc7227cfb8.js +1 -0
- package/.next-prod/static/chunks/8132.74491162f08af899.js +1 -0
- package/.next-prod/static/chunks/816.ccc7dc455fcaf7c0.js +1 -0
- package/.next-prod/static/chunks/8192.5918d83ac6a0e2dc.js +1 -0
- package/.next-prod/static/chunks/8243.aa3ccfb41335eb1f.js +1 -0
- package/.next-prod/static/chunks/8257.dd8f651f1a43fee2.js +1 -0
- package/.next-prod/static/chunks/8288.8ff86c6a3bee6b7c.js +1 -0
- package/.next-prod/static/chunks/830.e49b226c07876df4.js +1 -0
- package/.next-prod/static/chunks/8317.9c6f22e0c8cd07a8.js +141 -0
- package/.next-prod/static/chunks/8318.a70d7a81445f8cf9.js +1 -0
- package/.next-prod/static/chunks/840.a9c535f8868cc4bd.js +1 -0
- package/.next-prod/static/chunks/8406.955ccfbb4b70b8c3.js +1 -0
- package/.next-prod/static/chunks/8430.b1f802dcffa41626.js +1 -0
- package/.next-prod/static/chunks/8432.bd66ac287c569996.js +1 -0
- package/.next-prod/static/chunks/8457.b61d96d8d30215fc.js +1 -0
- package/.next-prod/static/chunks/8496.046efd6301dd804f.js +1 -0
- package/.next-prod/static/chunks/8545.be0c9eea6aae5971.js +1 -0
- package/.next-prod/static/chunks/8555.ab3ee6358f1d64da.js +1 -0
- package/.next-prod/static/chunks/862.7cd3197e1ba5fd00.js +1 -0
- package/.next-prod/static/chunks/8656.2ceb4e5ff5df2fca.js +1 -0
- package/.next-prod/static/chunks/8670.90ede75068758e82.js +1 -0
- package/.next-prod/static/chunks/8704.a1003918da6654da.js +1 -0
- package/.next-prod/static/chunks/8773.614f1f4f0f845c5e.js +1 -0
- package/.next-prod/static/chunks/8776.6fb12270eca03fd3.js +149 -0
- package/.next-prod/static/chunks/8848.b0a10ee0b0a2b91b.js +1 -0
- package/.next-prod/static/chunks/8863.4a09596cf95e996a.js +82 -0
- package/.next-prod/static/chunks/893.c469257bbbbca4f5.js +1 -0
- package/.next-prod/static/chunks/8947.31d3d834d8281fd9.js +1 -0
- package/.next-prod/static/chunks/9005.473ce947d16e7f65.js +1 -0
- package/.next-prod/static/chunks/9006.11537833945ec4b8.js +1 -0
- package/.next-prod/static/chunks/9015.c4e40321a6503a1b.js +1 -0
- package/.next-prod/static/chunks/90542734.58d84d15ab7a8c98.js +1 -0
- package/.next-prod/static/chunks/9114-abef8471519b7dee.js +1 -0
- package/.next-prod/static/chunks/9136.191be42a2fee842c.js +1 -0
- package/.next-prod/static/chunks/9178.48a90097ee3f0b0c.js +1 -0
- package/.next-prod/static/chunks/9186.3af6fcd13ab752fa.js +1 -0
- package/.next-prod/static/chunks/9189.3e9d29bf275ec462.js +1 -0
- package/.next-prod/static/chunks/9220.0206dd0432eca784.js +1 -0
- package/.next-prod/static/chunks/9224.401f9320ee58570b.js +1 -0
- package/.next-prod/static/chunks/9233.124321d2f404e01c.js +1 -0
- package/.next-prod/static/chunks/9240.d38ddbe94e0bf128.js +1 -0
- package/.next-prod/static/chunks/9261.303cbbe69262a995.js +1 -0
- package/.next-prod/static/chunks/9267.fbfd65ea31e7448c.js +1 -0
- package/.next-prod/static/chunks/9294.a20485f3282321b3.js +1 -0
- package/.next-prod/static/chunks/92e53eb0.097194be4a0e7d55.js +1 -0
- package/.next-prod/static/chunks/9302.726b065f2df0323a.js +1 -0
- package/.next-prod/static/chunks/9318.ba24787a52cefe4c.js +56 -0
- package/.next-prod/static/chunks/9373.6206c440af44002a.js +1 -0
- package/.next-prod/static/chunks/9377.f9db706e76f04afe.js +1 -0
- package/.next-prod/static/chunks/9382.bc0e11ecc88dd62c.js +1 -0
- package/.next-prod/static/chunks/9421.a5c1dbcfbfdd8f52.js +1 -0
- package/.next-prod/static/chunks/9448.2668b3cd408e86de.js +1 -0
- package/.next-prod/static/chunks/9466.3dacf5969d47ba2c.js +1 -0
- package/.next-prod/static/chunks/9521.e1240eb862eb32dc.js +1 -0
- package/.next-prod/static/chunks/9547.7729788fff21926f.js +1 -0
- package/.next-prod/static/chunks/9565.8de0671f99d12abe.js +1 -0
- package/.next-prod/static/chunks/9569.2f36b2b1c2f838d7.js +1 -0
- package/.next-prod/static/chunks/9615.3b62c13af671f714.js +1 -0
- package/.next-prod/static/chunks/9648.8235b6fea7087b3a.js +1 -0
- package/.next-prod/static/chunks/966.57e4cd93c2368d34.js +1 -0
- package/.next-prod/static/chunks/9666.a515fa6d89a71f1c.js +1 -0
- package/.next-prod/static/chunks/968.29d4ba7ee8bd5ccb.js +1 -0
- package/.next-prod/static/chunks/9680.d5ceac8967e0b6a8.js +1 -0
- package/.next-prod/static/chunks/9690.7773c72f0eff6dec.js +1 -0
- package/.next-prod/static/chunks/9841.422321143547591a.js +1 -0
- package/.next-prod/static/chunks/9842.3b71b65b30d8ef2a.js +1 -0
- package/.next-prod/static/chunks/9996.18b7bca2f0ab222e.js +1 -0
- package/.next-prod/static/chunks/aaea2bcf-6b3391c26b869501.js +1 -0
- package/.next-prod/static/chunks/af7f6608.85a7e1eb0d4130b0.js +53 -0
- package/.next-prod/static/chunks/app/_global-error/page-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/_not-found/page-511b5b7e4ffc7ac9.js +1 -0
- package/.next-prod/static/chunks/app/api/bash/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/chat/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/claude-stats/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/commands/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/comments/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/db/columns/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/db/connect/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/db/disconnect/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/db/export/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/db/query/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/db/schemas/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/extension/version/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/file/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/files/blame/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/files/clipboard/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/files/copy/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/files/delete/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/files/expanded/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/files/index/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/files/init/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/files/paste/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/files/read/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/files/readdir/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/files/recent/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/files/save/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/files/search/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/git/branch-diff/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/git/branches/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/git/commit-diff/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/git/commits/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/git/diff/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/git/discard/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/git/stage/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/git/status/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/git/unstage/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/git/worktree/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/global-state/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/jupyter/load/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/jupyter/save/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/jupyter/shutdown/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/lsp/definition/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/lsp/hover/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/lsp/references/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/lsp/status/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/lsp/warmup/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/mysql/columns/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/mysql/connect/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/mysql/disconnect/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/mysql/export/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/mysql/query/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/mysql/schemas/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/note/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/open-cursor/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/open-vscode/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/pick-folder/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/pinned-sessions/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/project-settings/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/project-state/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/projects/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/command/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/connect/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/delete/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/disconnect/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/get/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/keys/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/set/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/review/[id]/comments/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/review/[id]/replies/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/review/[id]/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/review/identify/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/review/order/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/review/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/review/share-info/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/review/users/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/scheduled-tasks/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/services/config/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/services/scripts/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/session/[sessionId]/fork/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/session/[sessionId]/history/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/session-by-path/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/sessions/projects/[encodedPath]/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/sessions/projects/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/sessions/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/settings/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/terminal/aliases/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/terminal/autocomplete/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/terminal/bubble-order/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/terminal/env/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/terminal/history/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/api/version/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/global-error-3c48d7d42c672863.js +1 -0
- package/.next-prod/static/chunks/app/layout-44210aade5d56585.js +1 -0
- package/.next-prod/static/chunks/app/manifest.webmanifest/route-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/app/page-cc2bf3ca4c337090.js +1 -0
- package/.next-prod/static/chunks/app/project/page-fb1ff1d5d382977d.js +25 -0
- package/.next-prod/static/chunks/app/review/[id]/page-64f18d8d2476753c.js +1 -0
- package/.next-prod/static/chunks/ce16f5a9.5c7821b201f35593.js +1 -0
- package/.next-prod/static/chunks/cee15710.869cef5f741d40c2.js +1 -0
- package/.next-prod/static/chunks/cfdf2ac7.4506d3f72b310564.js +1 -0
- package/.next-prod/static/chunks/d1c28714.f52cffdd449a2d14.js +1 -0
- package/.next-prod/static/chunks/d3ac728e-d1ae8819b8f0be6a.js +1 -0
- package/.next-prod/static/chunks/e868780c.a081703edc1bc551.js +18 -0
- package/.next-prod/static/chunks/framework-81b2e59ffe13bb24.js +1 -0
- package/.next-prod/static/chunks/main-ac50dc1e450895a2.js +5 -0
- package/.next-prod/static/chunks/main-app-b76c0df33a946918.js +1 -0
- package/.next-prod/static/chunks/next/dist/client/components/builtin/app-error-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/next/dist/client/components/builtin/forbidden-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/next/dist/client/components/builtin/not-found-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/next/dist/client/components/builtin/unauthorized-f2ae9d2d29d5fe08.js +1 -0
- package/.next-prod/static/chunks/polyfills-42372ed130431b0a.js +1 -0
- package/.next-prod/static/chunks/webpack-67d02a2a41508d41.js +1 -0
- package/.next-prod/static/css/2163ab5e45fedc6a.css +1 -0
- package/.next-prod/static/css/dd86f60184ab34a9.css +3 -0
- package/.next-prod/static/media/0086f8992871c45b-s.woff2 +0 -0
- package/.next-prod/static/media/03b436aa846269de-s.woff2 +0 -0
- package/.next-prod/static/media/08aedeceaf1dcd57-s.woff2 +0 -0
- package/.next-prod/static/media/0aa834ed78bf6d07-s.woff2 +0 -0
- package/.next-prod/static/media/19cfc7226ec3afaa-s.woff2 +0 -0
- package/.next-prod/static/media/21350d82a1f187e9-s.woff2 +0 -0
- package/.next-prod/static/media/36008747766f78c6-s.woff2 +0 -0
- package/.next-prod/static/media/5c0c2bcbaa4149ca-s.p.woff2 +0 -0
- package/.next-prod/static/media/67957d42bae0796d-s.woff2 +0 -0
- package/.next-prod/static/media/6d38f9d4e0f4772b-s.woff2 +0 -0
- package/.next-prod/static/media/886030b0b59bc5a7-s.woff2 +0 -0
- package/.next-prod/static/media/8e9860b6e62d6359-s.woff2 +0 -0
- package/.next-prod/static/media/939c4f875ee75fbb-s.woff2 +0 -0
- package/.next-prod/static/media/KaTeX_AMS-Regular.1608a09b.woff +0 -0
- package/.next-prod/static/media/KaTeX_AMS-Regular.4aafdb68.ttf +0 -0
- package/.next-prod/static/media/KaTeX_AMS-Regular.a79f1c31.woff2 +0 -0
- package/.next-prod/static/media/KaTeX_Caligraphic-Bold.b6770918.woff +0 -0
- package/.next-prod/static/media/KaTeX_Caligraphic-Bold.cce5b8ec.ttf +0 -0
- package/.next-prod/static/media/KaTeX_Caligraphic-Bold.ec17d132.woff2 +0 -0
- package/.next-prod/static/media/KaTeX_Caligraphic-Regular.07ef19e7.ttf +0 -0
- package/.next-prod/static/media/KaTeX_Caligraphic-Regular.55fac258.woff2 +0 -0
- package/.next-prod/static/media/KaTeX_Caligraphic-Regular.dad44a7f.woff +0 -0
- package/.next-prod/static/media/KaTeX_Fraktur-Bold.9f256b85.woff +0 -0
- package/.next-prod/static/media/KaTeX_Fraktur-Bold.b18f59e1.ttf +0 -0
- package/.next-prod/static/media/KaTeX_Fraktur-Bold.d42a5579.woff2 +0 -0
- package/.next-prod/static/media/KaTeX_Fraktur-Regular.7c187121.woff +0 -0
- package/.next-prod/static/media/KaTeX_Fraktur-Regular.d3c882a6.woff2 +0 -0
- package/.next-prod/static/media/KaTeX_Fraktur-Regular.ed38e79f.ttf +0 -0
- package/.next-prod/static/media/KaTeX_Main-Bold.b74a1a8b.ttf +0 -0
- package/.next-prod/static/media/KaTeX_Main-Bold.c3fb5ac2.woff2 +0 -0
- package/.next-prod/static/media/KaTeX_Main-Bold.d181c465.woff +0 -0
- package/.next-prod/static/media/KaTeX_Main-BoldItalic.6f2bb1df.woff2 +0 -0
- package/.next-prod/static/media/KaTeX_Main-BoldItalic.70d8b0a5.ttf +0 -0
- package/.next-prod/static/media/KaTeX_Main-BoldItalic.e3f82f9d.woff +0 -0
- package/.next-prod/static/media/KaTeX_Main-Italic.47373d1e.ttf +0 -0
- package/.next-prod/static/media/KaTeX_Main-Italic.8916142b.woff2 +0 -0
- package/.next-prod/static/media/KaTeX_Main-Italic.9024d815.woff +0 -0
- package/.next-prod/static/media/KaTeX_Main-Regular.0462f03b.woff2 +0 -0
- package/.next-prod/static/media/KaTeX_Main-Regular.7f51fe03.woff +0 -0
- package/.next-prod/static/media/KaTeX_Main-Regular.b7f8fe9b.ttf +0 -0
- package/.next-prod/static/media/KaTeX_Math-BoldItalic.572d331f.woff2 +0 -0
- package/.next-prod/static/media/KaTeX_Math-BoldItalic.a879cf83.ttf +0 -0
- package/.next-prod/static/media/KaTeX_Math-BoldItalic.f1035d8d.woff +0 -0
- package/.next-prod/static/media/KaTeX_Math-Italic.5295ba48.woff +0 -0
- package/.next-prod/static/media/KaTeX_Math-Italic.939bc644.ttf +0 -0
- package/.next-prod/static/media/KaTeX_Math-Italic.f28c23ac.woff2 +0 -0
- package/.next-prod/static/media/KaTeX_SansSerif-Bold.8c5b5494.woff2 +0 -0
- package/.next-prod/static/media/KaTeX_SansSerif-Bold.94e1e8dc.ttf +0 -0
- package/.next-prod/static/media/KaTeX_SansSerif-Bold.bf59d231.woff +0 -0
- package/.next-prod/static/media/KaTeX_SansSerif-Italic.3b1e59b3.woff2 +0 -0
- package/.next-prod/static/media/KaTeX_SansSerif-Italic.7c9bc82b.woff +0 -0
- package/.next-prod/static/media/KaTeX_SansSerif-Italic.b4c20c84.ttf +0 -0
- package/.next-prod/static/media/KaTeX_SansSerif-Regular.74048478.woff +0 -0
- package/.next-prod/static/media/KaTeX_SansSerif-Regular.ba21ed5f.woff2 +0 -0
- package/.next-prod/static/media/KaTeX_SansSerif-Regular.d4d7ba48.ttf +0 -0
- package/.next-prod/static/media/KaTeX_Script-Regular.03e9641d.woff2 +0 -0
- package/.next-prod/static/media/KaTeX_Script-Regular.07505710.woff +0 -0
- package/.next-prod/static/media/KaTeX_Script-Regular.fe9cbbe1.ttf +0 -0
- package/.next-prod/static/media/KaTeX_Size1-Regular.e1e279cb.woff +0 -0
- package/.next-prod/static/media/KaTeX_Size1-Regular.eae34984.woff2 +0 -0
- package/.next-prod/static/media/KaTeX_Size1-Regular.fabc004a.ttf +0 -0
- package/.next-prod/static/media/KaTeX_Size2-Regular.57727022.woff +0 -0
- package/.next-prod/static/media/KaTeX_Size2-Regular.5916a24f.woff2 +0 -0
- package/.next-prod/static/media/KaTeX_Size2-Regular.d6b476ec.ttf +0 -0
- package/.next-prod/static/media/KaTeX_Size3-Regular.9acaf01c.woff +0 -0
- package/.next-prod/static/media/KaTeX_Size3-Regular.a144ef58.ttf +0 -0
- package/.next-prod/static/media/KaTeX_Size3-Regular.b4230e7e.woff2 +0 -0
- package/.next-prod/static/media/KaTeX_Size4-Regular.10d95fd3.woff2 +0 -0
- package/.next-prod/static/media/KaTeX_Size4-Regular.7a996c9d.woff +0 -0
- package/.next-prod/static/media/KaTeX_Size4-Regular.fbccdabe.ttf +0 -0
- package/.next-prod/static/media/KaTeX_Typewriter-Regular.6258592b.woff +0 -0
- package/.next-prod/static/media/KaTeX_Typewriter-Regular.a8709e36.woff2 +0 -0
- package/.next-prod/static/media/KaTeX_Typewriter-Regular.d97aaf4a.ttf +0 -0
- package/.next-prod/static/media/ab00a911ac2adf48-s.woff2 +0 -0
- package/.next-prod/static/media/ba9851c3c22cd980-s.woff2 +0 -0
- package/.next-prod/static/media/bb3ef058b751a6ad-s.p.woff2 +0 -0
- package/.next-prod/static/media/c5fe6dc8356a8c31-s.woff2 +0 -0
- package/.next-prod/static/media/df0a9ae256c0569c-s.woff2 +0 -0
- package/.next-prod/static/media/e4af272ccee01ff0-s.p.woff2 +0 -0
- package/.next-prod/static/media/f911b923c6adde36-s.woff2 +0 -0
- package/.next-prod/trace +12 -0
- package/.next-prod/trace-build +1 -0
- package/.next-prod/types/app/api/bash/route.ts +350 -0
- package/.next-prod/types/app/api/chat/route.ts +350 -0
- package/.next-prod/types/app/api/claude-stats/route.ts +350 -0
- package/.next-prod/types/app/api/commands/route.ts +350 -0
- package/.next-prod/types/app/api/comments/route.ts +350 -0
- package/.next-prod/types/app/api/db/columns/route.ts +350 -0
- package/.next-prod/types/app/api/db/connect/route.ts +350 -0
- package/.next-prod/types/app/api/db/disconnect/route.ts +350 -0
- package/.next-prod/types/app/api/db/export/route.ts +350 -0
- package/.next-prod/types/app/api/db/query/route.ts +350 -0
- package/.next-prod/types/app/api/db/schemas/route.ts +350 -0
- package/.next-prod/types/app/api/extension/version/route.ts +350 -0
- package/.next-prod/types/app/api/file/route.ts +350 -0
- package/.next-prod/types/app/api/files/blame/route.ts +350 -0
- package/.next-prod/types/app/api/files/clipboard/route.ts +350 -0
- package/.next-prod/types/app/api/files/copy/route.ts +350 -0
- package/.next-prod/types/app/api/files/delete/route.ts +350 -0
- package/.next-prod/types/app/api/files/expanded/route.ts +350 -0
- package/.next-prod/types/app/api/files/index/route.ts +350 -0
- package/.next-prod/types/app/api/files/init/route.ts +350 -0
- package/.next-prod/types/app/api/files/paste/route.ts +350 -0
- package/.next-prod/types/app/api/files/read/route.ts +350 -0
- package/.next-prod/types/app/api/files/readdir/route.ts +350 -0
- package/.next-prod/types/app/api/files/recent/route.ts +350 -0
- package/.next-prod/types/app/api/files/save/route.ts +350 -0
- package/.next-prod/types/app/api/files/search/route.ts +350 -0
- package/.next-prod/types/app/api/git/branch-diff/route.ts +350 -0
- package/.next-prod/types/app/api/git/branches/route.ts +350 -0
- package/.next-prod/types/app/api/git/commit-diff/route.ts +350 -0
- package/.next-prod/types/app/api/git/commits/route.ts +350 -0
- package/.next-prod/types/app/api/git/diff/route.ts +350 -0
- package/.next-prod/types/app/api/git/discard/route.ts +350 -0
- package/.next-prod/types/app/api/git/stage/route.ts +350 -0
- package/.next-prod/types/app/api/git/status/route.ts +350 -0
- package/.next-prod/types/app/api/git/unstage/route.ts +350 -0
- package/.next-prod/types/app/api/git/worktree/route.ts +350 -0
- package/.next-prod/types/app/api/global-state/route.ts +350 -0
- package/.next-prod/types/app/api/jupyter/load/route.ts +350 -0
- package/.next-prod/types/app/api/jupyter/save/route.ts +350 -0
- package/.next-prod/types/app/api/jupyter/shutdown/route.ts +350 -0
- package/.next-prod/types/app/api/lsp/definition/route.ts +350 -0
- package/.next-prod/types/app/api/lsp/hover/route.ts +350 -0
- package/.next-prod/types/app/api/lsp/references/route.ts +350 -0
- package/.next-prod/types/app/api/lsp/status/route.ts +350 -0
- package/.next-prod/types/app/api/lsp/warmup/route.ts +350 -0
- package/.next-prod/types/app/api/mysql/columns/route.ts +350 -0
- package/.next-prod/types/app/api/mysql/connect/route.ts +350 -0
- package/.next-prod/types/app/api/mysql/disconnect/route.ts +350 -0
- package/.next-prod/types/app/api/mysql/export/route.ts +350 -0
- package/.next-prod/types/app/api/mysql/query/route.ts +350 -0
- package/.next-prod/types/app/api/mysql/schemas/route.ts +350 -0
- package/.next-prod/types/app/api/note/route.ts +350 -0
- package/.next-prod/types/app/api/open-cursor/route.ts +350 -0
- package/.next-prod/types/app/api/open-vscode/route.ts +350 -0
- package/.next-prod/types/app/api/pick-folder/route.ts +350 -0
- package/.next-prod/types/app/api/pinned-sessions/route.ts +350 -0
- package/.next-prod/types/app/api/project-settings/route.ts +350 -0
- package/.next-prod/types/app/api/project-state/route.ts +350 -0
- package/.next-prod/types/app/api/projects/route.ts +350 -0
- package/.next-prod/types/app/api/redis/command/route.ts +350 -0
- package/.next-prod/types/app/api/redis/connect/route.ts +350 -0
- package/.next-prod/types/app/api/redis/delete/route.ts +350 -0
- package/.next-prod/types/app/api/redis/disconnect/route.ts +350 -0
- package/.next-prod/types/app/api/redis/get/route.ts +350 -0
- package/.next-prod/types/app/api/redis/keys/route.ts +350 -0
- package/.next-prod/types/app/api/redis/set/route.ts +350 -0
- package/.next-prod/types/app/api/review/[id]/comments/route.ts +350 -0
- package/.next-prod/types/app/api/review/[id]/replies/route.ts +350 -0
- package/.next-prod/types/app/api/review/[id]/route.ts +350 -0
- package/.next-prod/types/app/api/review/identify/route.ts +350 -0
- package/.next-prod/types/app/api/review/order/route.ts +350 -0
- package/.next-prod/types/app/api/review/route.ts +350 -0
- package/.next-prod/types/app/api/review/share-info/route.ts +350 -0
- package/.next-prod/types/app/api/review/users/route.ts +350 -0
- package/.next-prod/types/app/api/scheduled-tasks/route.ts +350 -0
- package/.next-prod/types/app/api/services/config/route.ts +350 -0
- package/.next-prod/types/app/api/services/scripts/route.ts +350 -0
- package/.next-prod/types/app/api/session/[sessionId]/fork/route.ts +350 -0
- package/.next-prod/types/app/api/session/[sessionId]/history/route.ts +350 -0
- package/.next-prod/types/app/api/session-by-path/route.ts +350 -0
- package/.next-prod/types/app/api/sessions/projects/[encodedPath]/route.ts +350 -0
- package/.next-prod/types/app/api/sessions/projects/route.ts +350 -0
- package/.next-prod/types/app/api/sessions/route.ts +350 -0
- package/.next-prod/types/app/api/settings/route.ts +350 -0
- package/.next-prod/types/app/api/terminal/aliases/route.ts +350 -0
- package/.next-prod/types/app/api/terminal/autocomplete/route.ts +350 -0
- package/.next-prod/types/app/api/terminal/bubble-order/route.ts +350 -0
- package/.next-prod/types/app/api/terminal/env/route.ts +350 -0
- package/.next-prod/types/app/api/terminal/history/route.ts +350 -0
- package/.next-prod/types/app/api/version/route.ts +350 -0
- package/.next-prod/types/app/page.ts +86 -0
- package/.next-prod/types/app/project/page.ts +86 -0
- package/.next-prod/types/app/review/[id]/page.ts +86 -0
- package/.next-prod/types/package.json +1 -0
- package/.next-prod/types/routes.d.ts +164 -0
- package/.next-prod/types/validator.ts +898 -0
- package/LICENSE +21 -0
- package/README.md +94 -0
- package/README.zh.md +100 -0
- package/bin/cock-browser.mjs +435 -0
- package/bin/cock-dev.mjs +6 -0
- package/bin/cock-terminal.mjs +215 -0
- package/bin/cock.mjs +99 -0
- package/bin/postinstall.mjs +29 -0
- package/chrome-extension/automation.js +684 -0
- package/chrome-extension/background.js +364 -0
- package/chrome-extension/content.js +224 -0
- package/chrome-extension/disguise.js +14 -0
- package/chrome-extension/icons/icon128.png +0 -0
- package/chrome-extension/icons/icon16.png +0 -0
- package/chrome-extension/icons/icon48.png +0 -0
- package/chrome-extension/manifest.json +42 -0
- package/chrome-extension/network-capture.js +197 -0
- package/chrome-extension/rules.json +56 -0
- package/dist/JupyterKernelManager-475VNVA5.mjs +248 -0
- package/dist/chunk-OER3N6H7.mjs +250 -0
- package/dist/scheduledTasks.mjs +418 -0
- package/dist/wsServer.mjs +1441 -0
- package/next.config.ts +18 -0
- package/package.json +122 -0
- package/public/favicon.ico +0 -0
- package/public/icons/dev/icon-128x128.png +0 -0
- package/public/icons/dev/icon-144x144.png +0 -0
- package/public/icons/dev/icon-152x152.png +0 -0
- package/public/icons/dev/icon-192x192.png +0 -0
- package/public/icons/dev/icon-384x384.png +0 -0
- package/public/icons/dev/icon-512x512.png +0 -0
- package/public/icons/dev/icon-72x72.png +0 -0
- package/public/icons/dev/icon-96x96.png +0 -0
- package/public/icons/icon-128x128.png +0 -0
- package/public/icons/icon-144x144.png +0 -0
- package/public/icons/icon-152x152.png +0 -0
- package/public/icons/icon-192x192.png +0 -0
- package/public/icons/icon-384x384.png +0 -0
- package/public/icons/icon-512x512.png +0 -0
- package/public/icons/icon-72x72.png +0 -0
- package/public/icons/icon-96x96.png +0 -0
- package/server.mjs +135 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";exports.id=4490,exports.ids=[4490],exports.modules={54490:(a,b,c)=>{let d,e,f,g,h,i,j,k,l,m,n,o;c.r(b),c.d(b,{XtermRenderer:()=>f1});var p,q,r,s=c(48249),u=c(67484),v=Object.defineProperty,w=Object.getOwnPropertyDescriptor,x=(a,b,c,d)=>{for(var e,f=d>1?void 0:d?w(b,c):b,g=a.length-1;g>=0;g--)(e=a[g])&&(f=(d?e(b,c,f):e(f))||f);return d&&f&&v(b,c,f),f},y=(a,b)=>(c,d)=>b(c,d,a),z="Terminal input",A="Too much output to announce, navigate to rows manually to read";function B(a,b,c,d){var e;e=a=a.replace(/\r?\n/g,"\r"),a=c.decPrivateModes.bracketedPasteMode&&!0!==d.rawOptions.ignoreBracketedPasteMode?"\x1b[200~"+e+"\x1b[201~":e,c.triggerDataEvent(a,!0),b.value=""}function C(a,b,c){let d=c.getBoundingClientRect(),e=a.clientX-d.left-10,f=a.clientY-d.top-10;b.style.width="20px",b.style.height="20px",b.style.left=`${e}px`,b.style.top=`${f}px`,b.style.zIndex="1000",b.focus()}function D(a,b,c,d,e){C(a,b,c),e&&d.rightClickSelect(a),b.value=d.selectionText,b.select()}function E(a){return a>65535?String.fromCharCode(((a-=65536)>>10)+55296)+String.fromCharCode(a%1024+56320):String.fromCharCode(a)}function F(a,b=0,c=a.length){let d="";for(let e=b;e<c;++e){let b=a[e];b>65535?(b-=65536,d+=String.fromCharCode((b>>10)+55296)+String.fromCharCode(b%1024+56320)):d+=String.fromCharCode(b)}return d}var G=class{constructor(){this._interim=0}clear(){this._interim=0}decode(a,b){let c=a.length;if(!c)return 0;let d=0,e=0;if(this._interim){let c=a.charCodeAt(e++);56320<=c&&c<=57343?b[d++]=(this._interim-55296)*1024+c-56320+65536:(b[d++]=this._interim,b[d++]=c),this._interim=0}for(let f=e;f<c;++f){let e=a.charCodeAt(f);if(55296<=e&&e<=56319){if(++f>=c)return this._interim=e,d;let g=a.charCodeAt(f);56320<=g&&g<=57343?b[d++]=(e-55296)*1024+g-56320+65536:(b[d++]=e,b[d++]=g);continue}65279!==e&&(b[d++]=e)}return d}},H=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(a,b){let c=a.length;if(!c)return 0;let d=0,e,f,g,h,i=0,j=0;if(this.interim[0]){let e=!1,f=this.interim[0];f&=(224&f)==192?31:(240&f)==224?15:7;let g=0,h;for(;(h=63&this.interim[++g])&&g<4;)f<<=6,f|=h;let i=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,k=i-g;for(;j<k;){if(j>=c)return 0;if((192&(h=a[j++]))!=128){j--,e=!0;break}this.interim[g++]=h,f<<=6,f|=63&h}e||(2===i?f<128?j--:b[d++]=f:3===i?f<2048||f>=55296&&f<=57343||65279===f||(b[d++]=f):f<65536||f>1114111||(b[d++]=f)),this.interim.fill(0)}let k=c-4,l=j;for(;l<c;){for(;l<k&&!(128&(e=a[l]))&&!(128&(f=a[l+1]))&&!(128&(g=a[l+2]))&&!(128&(h=a[l+3]));)b[d++]=e,b[d++]=f,b[d++]=g,b[d++]=h,l+=4;if((e=a[l++])<128)b[d++]=e;else if((224&e)==192){if(l>=c)return this.interim[0]=e,d;if((192&(f=a[l++]))!=128||(i=(31&e)<<6|63&f)<128){l--;continue}b[d++]=i}else if((240&e)==224){if(l>=c)return this.interim[0]=e,d;if((192&(f=a[l++]))!=128){l--;continue}if(l>=c)return this.interim[0]=e,this.interim[1]=f,d;if((192&(g=a[l++]))!=128){l--;continue}if((i=(15&e)<<12|(63&f)<<6|63&g)<2048||i>=55296&&i<=57343||65279===i)continue;b[d++]=i}else if((248&e)==240){if(l>=c)return this.interim[0]=e,d;if((192&(f=a[l++]))!=128){l--;continue}if(l>=c)return this.interim[0]=e,this.interim[1]=f,d;if((192&(g=a[l++]))!=128){l--;continue}if(l>=c)return this.interim[0]=e,this.interim[1]=f,this.interim[2]=g,d;if((192&(h=a[l++]))!=128){l--;continue}if((i=(7&e)<<18|(63&f)<<12|(63&g)<<6|63&h)<65536||i>1114111)continue;b[d++]=i}}return d}},I=class a{constructor(){this.fg=0,this.bg=0,this.extended=new J}static toColorRGB(a){return[a>>>16&255,a>>>8&255,255&a]}static fromColorRGB(a){return(255&a[0])<<16|(255&a[1])<<8|255&a[2]}clone(){let b=new a;return b.fg=this.fg,b.bg=this.bg,b.extended=this.extended.clone(),b}isInverse(){return 0x4000000&this.fg}isBold(){return 0x8000000&this.fg}isUnderline(){return this.hasExtendedAttrs()&&0!==this.extended.underlineStyle?1:0x10000000&this.fg}isBlink(){return 0x20000000&this.fg}isInvisible(){return 0x40000000&this.fg}isItalic(){return 0x4000000&this.bg}isDim(){return 0x8000000&this.bg}isStrikethrough(){return 0x80000000&this.fg}isProtected(){return 0x20000000&this.bg}isOverline(){return 0x40000000&this.bg}getFgColorMode(){return 0x3000000&this.fg}getBgColorMode(){return 0x3000000&this.bg}isFgRGB(){return(0x3000000&this.fg)==0x3000000}isBgRGB(){return(0x3000000&this.bg)==0x3000000}isFgPalette(){return(0x3000000&this.fg)==0x1000000||(0x3000000&this.fg)==0x2000000}isBgPalette(){return(0x3000000&this.bg)==0x1000000||(0x3000000&this.bg)==0x2000000}isFgDefault(){return(0x3000000&this.fg)==0}isBgDefault(){return(0x3000000&this.bg)==0}isAttributeDefault(){return 0===this.fg&&0===this.bg}getFgColor(){switch(0x3000000&this.fg){case 0x1000000:case 0x2000000:return 255&this.fg;case 0x3000000:return 0xffffff&this.fg;default:return -1}}getBgColor(){switch(0x3000000&this.bg){case 0x1000000:case 0x2000000:return 255&this.bg;case 0x3000000:return 0xffffff&this.bg;default:return -1}}hasExtendedAttrs(){return 0x10000000&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-0x10000001:this.bg|=0x10000000}getUnderlineColor(){if(0x10000000&this.bg&&~this.extended.underlineColor)switch(0x3000000&this.extended.underlineColor){case 0x1000000:case 0x2000000:return 255&this.extended.underlineColor;case 0x3000000:return 0xffffff&this.extended.underlineColor}return this.getFgColor()}getUnderlineColorMode(){return 0x10000000&this.bg&&~this.extended.underlineColor?0x3000000&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 0x10000000&this.bg&&~this.extended.underlineColor?(0x3000000&this.extended.underlineColor)==0x3000000:this.isFgRGB()}isUnderlineColorPalette(){return 0x10000000&this.bg&&~this.extended.underlineColor?(0x3000000&this.extended.underlineColor)==0x1000000||(0x3000000&this.extended.underlineColor)==0x2000000:this.isFgPalette()}isUnderlineColorDefault(){return 0x10000000&this.bg&&~this.extended.underlineColor?(0x3000000&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 0x10000000&this.fg?0x10000000&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}},J=class a{constructor(a=0,b=0){this._ext=0,this._urlId=0,this._ext=a,this._urlId=b}get ext(){return this._urlId?-0x1c000001&this._ext|this.underlineStyle<<26:this._ext}set ext(a){this._ext=a}get underlineStyle(){return this._urlId?5:(0x1c000000&this._ext)>>26}set underlineStyle(a){this._ext&=-0x1c000001,this._ext|=a<<26&0x1c000000}get underlineColor(){return 0x3ffffff&this._ext}set underlineColor(a){this._ext&=-0x4000000,this._ext|=0x3ffffff&a}get urlId(){return this._urlId}set urlId(a){this._urlId=a}get underlineVariantOffset(){let a=(0xe0000000&this._ext)>>29;return a<0?0xfffffff8^a:a}set underlineVariantOffset(a){this._ext&=0x1fffffff,this._ext|=a<<29&0xe0000000}clone(){return new a(this._ext,this._urlId)}isEmpty(){return 0===this.underlineStyle&&0===this._urlId}},K=class a extends I{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new J,this.combinedData=""}static fromCharData(b){let c=new a;return c.setFromCharData(b),c}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?E(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(a){this.fg=a[0],this.bg=0;let b=!1;if(a[1].length>2)b=!0;else if(2===a[1].length){let c=a[1].charCodeAt(0);if(55296<=c&&c<=56319){let d=a[1].charCodeAt(1);56320<=d&&d<=57343?this.content=(c-55296)*1024+d-56320+65536|a[2]<<22:b=!0}else b=!0}else this.content=a[1].charCodeAt(0)|a[2]<<22;b&&(this.combinedData=a[1],this.content=2097152|a[2]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},L="di$target",M="di$dependencies",N=new Map;function O(a){if(N.has(a))return N.get(a);let b=function(a,c,d){var e,f,g;if(3!=arguments.length)throw Error("@IServiceName-decorator can only be used to decorate a parameter");e=b,f=a,g=d,f[L]===f?f[M].push({id:e,index:g}):(f[M]=[{id:e,index:g}],f[L]=f)};return b._id=a,N.set(a,b),b}var P=O("BufferService"),Q=O("CoreMouseService"),R=O("CoreService"),S=O("CharsetService"),T=O("InstantiationService"),U=O("LogService"),V=O("OptionsService"),W=O("OscLinkService"),X=O("UnicodeService"),Y=O("DecorationService"),Z=class{constructor(a,b,c){this._bufferService=a,this._optionsService=b,this._oscLinkService=c}provideLinks(a,b){let c=this._bufferService.buffer.lines.get(a-1);if(!c)return void b(void 0);let d=[],e=this._optionsService.rawOptions.linkHandler,f=new K,g=c.getTrimmedLength(),h=-1,i=-1,j=!1;for(let b=0;b<g;b++)if(!(-1===i&&!c.hasContent(b))){if(c.loadCell(b,f),f.hasExtendedAttrs()&&f.extended.urlId)if(-1===i){i=b,h=f.extended.urlId;continue}else j=f.extended.urlId!==h;else -1!==i&&(j=!0);if(j||-1!==i&&b===g-1){let c=this._oscLinkService.getLinkData(h)?.uri;if(c){let f={start:{x:i+1,y:a},end:{x:b+ +(!j&&b===g-1),y:a}},h=!1;if(!e?.allowNonHttpProtocols)try{let a=new URL(c);["http:","https:"].includes(a.protocol)||(h=!0)}catch{h=!0}h||d.push({text:c,range:f,activate:(a,b)=>e?e.activate(a,b,f):function(a,b){if(confirm(`Do you want to navigate to ${b}?
|
|
2
|
+
|
|
3
|
+
WARNING: This link could potentially be dangerous`)){let a=window.open();if(a){try{a.opener=null}catch{}a.location.href=b}else console.warn("Opening link blocked as opener could not be cleared")}}(0,b),hover:(a,b)=>e?.hover?.(a,b,f),leave:(a,b)=>e?.leave?.(a,b,f)})}j=!1,f.hasExtendedAttrs()&&f.extended.urlId?(i=b,h=f.extended.urlId):(i=-1,h=-1)}}b(d)}};Z=x([y(0,P),y(1,V),y(2,W)],Z);var $=O("CharSizeService"),_=O("CoreBrowserService"),aa=O("MouseService"),ab=O("RenderService"),ac=O("SelectionService"),ad=O("CharacterJoinerService"),ae=O("ThemeService"),af=O("LinkProviderService"),ag=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(a){setTimeout(()=>{throw a.stack?ak.isErrorNoTelemetry(a)?new ak(a.message+`
|
|
4
|
+
|
|
5
|
+
`+a.stack):Error(a.message+`
|
|
6
|
+
|
|
7
|
+
`+a.stack):a},0)}}addListener(a){return this.listeners.push(a),()=>{this._removeListener(a)}}emit(a){this.listeners.forEach(b=>{b(a)})}_removeListener(a){this.listeners.splice(this.listeners.indexOf(a),1)}setUnexpectedErrorHandler(a){this.unexpectedErrorHandler=a}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(a){this.unexpectedErrorHandler(a),this.emit(a)}onUnexpectedExternalError(a){this.unexpectedErrorHandler(a)}};function ah(a){var b;(b=a)instanceof aj||b instanceof Error&&b.name===ai&&b.message===ai||ag.onUnexpectedError(a)}var ai="Canceled",aj=class extends Error{constructor(){super(ai),this.name=this.message}},ak=class a extends Error{constructor(a){super(a),this.name="CodeExpectedError"}static fromError(b){if(b instanceof a)return b;let c=new a;return c.message=b.message,c.stack=b.stack,c}static isErrorNoTelemetry(a){return"CodeExpectedError"===a.name}},al=class a extends Error{constructor(b){super(b||"An unexpected bug occurred."),Object.setPrototypeOf(this,a.prototype)}};function am(a,b=0){return a[a.length-(1+b)]}(aF=aG||={}).isLessThan=function(a){return a<0},aF.isLessThanOrEqual=function(a){return a<=0},aF.isGreaterThan=function(a){return a>0},aF.isNeitherLessOrGreaterThan=function(a){return 0===a},aF.greaterThan=1,aF.lessThan=-1,aF.neitherLessOrGreaterThan=0;var an=class a{constructor(a){this.iterate=a}forEach(a){this.iterate(b=>(a(b),!0))}toArray(){let a=[];return this.iterate(b=>(a.push(b),!0)),a}filter(b){return new a(a=>this.iterate(c=>!b(c)||a(c)))}map(b){return new a(a=>this.iterate(c=>a(b(c))))}some(a){let b=!1;return this.iterate(c=>!(b=a(c))),b}findFirst(a){let b;return this.iterate(c=>!a(c)||(b=c,!1)),b}findLast(a){let b;return this.iterate(c=>(a(c)&&(b=c),!0)),b}findLastMaxBy(a){let b,c=!0;return this.iterate(d=>((c||aG.isGreaterThan(a(d,b)))&&(c=!1,b=d),!0)),b}};an.empty=new an(a=>{});(a=>{function b(a){return a&&"object"==typeof a&&"function"==typeof a[Symbol.iterator]}a.is=b;let c=Object.freeze([]);function*d(a){yield a}a.empty=function(){return c},a.single=d,a.wrap=function(a){return b(a)?a:d(a)},a.from=function(a){return a||c},a.reverse=function*(a){for(let b=a.length-1;b>=0;b--)yield a[b]},a.isEmpty=function(a){return!a||!0===a[Symbol.iterator]().next().done},a.first=function(a){return a[Symbol.iterator]().next().value},a.some=function(a,b){let c=0;for(let d of a)if(b(d,c++))return!0;return!1},a.find=function(a,b){for(let c of a)if(b(c))return c},a.filter=function*(a,b){for(let c of a)b(c)&&(yield c)},a.map=function*(a,b){let c=0;for(let d of a)yield b(d,c++)},a.flatMap=function*(a,b){let c=0;for(let d of a)yield*b(d,c++)},a.concat=function*(...a){for(let b of a)yield*b},a.reduce=function(a,b,c){let d=c;for(let c of a)d=b(d,c);return d},a.slice=function*(a,b,c=a.length){for(b<0&&(b+=a.length),c<0?c+=a.length:c>a.length&&(c=a.length);b<c;b++)yield a[b]},a.consume=function(b,c=1/0){let d=[];if(0===c)return[d,b];let e=b[Symbol.iterator]();for(let b=0;b<c;b++){let b=e.next();if(b.done)return[d,a.empty()];d.push(b.value)}return[d,{[Symbol.iterator]:()=>e}]},a.asyncToArray=async function(a){let b=[];for await(let c of a)b.push(c);return Promise.resolve(b)}})(aH||={});function ao(a){return a}function ap(a){}function aq(a,b){}function ar(a){return a}function as(a){if(aH.is(a)){let b=[];for(let c of a)if(c)try{c.dispose()}catch(a){b.push(a)}if(1===b.length)throw b[0];if(b.length>1)throw AggregateError(b,"Encountered errors while disposing of store");return Array.isArray(a)?[]:a}if(a)return a.dispose(),a}function at(a){let b=ao({dispose:function(a,b){let c=this,d=!1,e;return function(){if(d)return e;if(d=!0,b)try{e=a.apply(c,arguments)}finally{b()}else e=a.apply(c,arguments);return e}}(()=>{ap(b),a()})});return b}var au=class a{constructor(){this._toDispose=new Set,this._isDisposed=!1,ao(this)}dispose(){this._isDisposed||(ap(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(0!==this._toDispose.size)try{as(this._toDispose)}finally{this._toDispose.clear()}}add(b){if(!b)return b;if(b===this)throw Error("Cannot register a disposable on itself!");return aq(b,this),this._isDisposed?a.DISABLE_DISPOSED_WARNING||console.warn(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(b),b}delete(a){if(a){if(a===this)throw Error("Cannot dispose a disposable on itself!");this._toDispose.delete(a),a.dispose()}}deleteAndLeak(a){a&&this._toDispose.has(a)&&(this._toDispose.delete(a),aq(a,null))}};au.DISABLE_DISPOSED_WARNING=!1;var av=au,aw=class{constructor(){this._store=new av,ao(this),aq(this._store,this)}dispose(){ap(this),this._store.dispose()}_register(a){if(a===this)throw Error("Cannot register a disposable on itself!");return this._store.add(a)}};aw.None=Object.freeze({dispose(){}});var ax=class{constructor(){this._isDisposed=!1,ao(this)}get value(){return this._isDisposed?void 0:this._value}set value(a){this._isDisposed||a===this._value||(this._value?.dispose(),a&&aq(a,this),this._value=a)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,ap(this),this._value?.dispose(),this._value=void 0}clearAndLeak(){let a=this._value;return this._value=void 0,a&&aq(a,null),a}},ay="object"==typeof window?window:globalThis,az=class a{constructor(b){this.element=b,this.next=a.Undefined,this.prev=a.Undefined}};az.Undefined=new az(void 0);var aA=class{constructor(){this._first=az.Undefined,this._last=az.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===az.Undefined}clear(){let a=this._first;for(;a!==az.Undefined;){let b=a.next;a.prev=az.Undefined,a.next=az.Undefined,a=b}this._first=az.Undefined,this._last=az.Undefined,this._size=0}unshift(a){return this._insert(a,!1)}push(a){return this._insert(a,!0)}_insert(a,b){let c=new az(a);if(this._first===az.Undefined)this._first=c,this._last=c;else if(b){let a=this._last;this._last=c,c.prev=a,a.next=c}else{let a=this._first;this._first=c,c.next=a,a.prev=c}this._size+=1;let d=!1;return()=>{d||(d=!0,this._remove(c))}}shift(){if(this._first!==az.Undefined){let a=this._first.element;return this._remove(this._first),a}}pop(){if(this._last!==az.Undefined){let a=this._last.element;return this._remove(this._last),a}}_remove(a){if(a.prev!==az.Undefined&&a.next!==az.Undefined){let b=a.prev;b.next=a.next,a.next.prev=b}else a.prev===az.Undefined&&a.next===az.Undefined?(this._first=az.Undefined,this._last=az.Undefined):a.next===az.Undefined?(this._last=this._last.prev,this._last.next=az.Undefined):a.prev===az.Undefined&&(this._first=this._first.next,this._first.prev=az.Undefined);this._size-=1}*[Symbol.iterator](){let a=this._first;for(;a!==az.Undefined;)yield a.element,a=a.next}},aB=globalThis.performance&&"function"==typeof globalThis.performance.now,aC=class a{static create(b){return new a(b)}constructor(a){this._now=aB&&!1===a?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return -1!==this._stopTime?this._stopTime-this._startTime:this._now()-this._startTime}};(a=>{function b(a){}function c(a){return(b,c=null,d)=>{let e=!1,f;return f=a(a=>{if(!e)return f?f.dispose():e=!0,b.call(c,a)},null,d),e&&f.dispose(),f}}function d(a,b,c){return f((c,d=null,e)=>a(a=>c.call(d,b(a)),null,e),c)}function e(a,b,c){return f((c,d=null,e)=>a(a=>b(a)&&c.call(d,a),null,e),c)}function f(a,c){let d,e={onWillAddFirstListener(){d=a(f.fire,f)},onDidRemoveLastListener(){d?.dispose()}};c||b(e);let f=new aP(e);return c?.add(f),f.event}function g(a,c,d=100,e=!1,f=!1,h,i){let j,k,l,m=0,n,o={leakWarningThreshold:h,onWillAddFirstListener(){j=a(a=>{m++,k=c(k,a),e&&!l&&(p.fire(k),k=void 0),n=()=>{let a=k;k=void 0,l=void 0,(!e||m>1)&&p.fire(a),m=0},"number"==typeof d?(clearTimeout(l),l=setTimeout(n,d)):void 0===l&&(l=0,queueMicrotask(n))})},onWillRemoveListener(){f&&m>0&&n?.()},onDidRemoveLastListener(){n=void 0,j.dispose()}};i||b(o);let p=new aP(o);return i?.add(p),p.event}a.None=()=>aw.None,a.defer=function(a,b){return g(a,()=>{},0,void 0,!0,void 0,b)},a.once=c,a.map=d,a.forEach=function(a,b,c){return f((c,d=null,e)=>a(a=>{b(a),c.call(d,a)},null,e),c)},a.filter=e,a.signal=function(a){return a},a.any=function(...a){return(b,c=null,d)=>{var e,f;return e=function(...a){let b=at(()=>as(a));return function(a,b){!1}(a,b),b}(...a.map(a=>a(a=>b.call(c,a)))),(f=d)instanceof Array?f.push(e):f&&f.add(e),e}},a.reduce=function(a,b,c,e){let f=c;return d(a,a=>f=b(f,a),e)},a.debounce=g,a.accumulate=function(b,c=0,d){return a.debounce(b,(a,b)=>a?(a.push(b),a):[b],c,void 0,!0,void 0,d)},a.latch=function(a,b=(a,b)=>a===b,c){let d=!0,f;return e(a,a=>{let c=d||!b(a,f);return d=!1,f=a,c},c)},a.split=function(b,c,d){return[a.filter(b,c,d),a.filter(b,a=>!c(a),d)]},a.buffer=function(a,b=!1,c=[],d){let e=c.slice(),f=a(a=>{e?e.push(a):h.fire(a)});d&&d.add(f);let g=()=>{e?.forEach(a=>h.fire(a)),e=null},h=new aP({onWillAddFirstListener(){f||(f=a(a=>h.fire(a)),d&&d.add(f))},onDidAddFirstListener(){e&&(b?setTimeout(g):g())},onDidRemoveLastListener(){f&&f.dispose(),f=null}});return d&&d.add(h),h.event},a.chain=function(a,b){return(c,d,e)=>{let f=b(new i);return a(function(a){let b=f.evaluate(a);b!==h&&c.call(d,b)},void 0,e)}};let h=Symbol("HaltChainable");class i{constructor(){this.steps=[]}map(a){return this.steps.push(a),this}forEach(a){return this.steps.push(b=>(a(b),b)),this}filter(a){return this.steps.push(b=>a(b)?b:h),this}reduce(a,b){let c=b;return this.steps.push(b=>c=a(c,b)),this}latch(a=(a,b)=>a===b){let b=!0,c;return this.steps.push(d=>{let e=b||!a(d,c);return b=!1,c=d,e?d:h}),this}evaluate(a){for(let b of this.steps)if((a=b(a))===h)break;return a}}a.fromNodeEventEmitter=function(a,b,c=a=>a){let d=(...a)=>e.fire(c(...a)),e=new aP({onWillAddFirstListener:()=>a.on(b,d),onDidRemoveLastListener:()=>a.removeListener(b,d)});return e.event},a.fromDOMEventEmitter=function(a,b,c=a=>a){let d=(...a)=>e.fire(c(...a)),e=new aP({onWillAddFirstListener:()=>a.addEventListener(b,d),onDidRemoveLastListener:()=>a.removeEventListener(b,d)});return e.event},a.toPromise=function(a){return new Promise(b=>c(a)(b))},a.fromPromise=function(a){let b=new aP;return a.then(a=>{b.fire(a)},()=>{b.fire(void 0)}).finally(()=>{b.dispose()}),b.event},a.forward=function(a,b){return a(a=>b.fire(a))},a.runAndSubscribe=function(a,b,c){return b(c),a(a=>b(a))};class j{constructor(a,c){this._observable=a,this._counter=0,this._hasChanged=!1;let d={onWillAddFirstListener:()=>{a.addObserver(this)},onDidRemoveLastListener:()=>{a.removeObserver(this)}};c||b(d),this.emitter=new aP(d),c&&c.add(this.emitter)}beginUpdate(a){this._counter++}handlePossibleChange(a){}handleChange(a,b){this._hasChanged=!0}endUpdate(a){this._counter--,0===this._counter&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}a.fromObservable=function(a,b){return new j(a,b).emitter.event},a.fromObservableLight=function(a){return(b,c,d)=>{let e=0,f=!1,g={beginUpdate(){e++},endUpdate(){0==--e&&(a.reportChanges(),f&&(f=!1,b.call(c)))},handlePossibleChange(){},handleChange(){f=!0}};a.addObserver(g),a.reportChanges();let h={dispose(){a.removeObserver(g)}};return d instanceof av?d.add(h):Array.isArray(d)&&d.push(h),h}}})(aI||={});var aD=class a{constructor(b){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${b}_${a._idPool++}`,a.all.add(this)}start(a){this._stopWatch=new aC,this.listenerCount=a}stop(){if(this._stopWatch){let a=this._stopWatch.elapsed();this.durations.push(a),this.elapsedOverall+=a,this.invocationCount+=1,this._stopWatch=void 0}}};aD.all=new Set,aD._idPool=0;var aE=class a{constructor(b,c,d=(a._idPool++).toString(16).padStart(3,"0")){this._errorHandler=b,this.threshold=c,this.name=d,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(a,b){let c=this.threshold;if(c<=0||b<c)return;this._stacks||(this._stacks=new Map);let d=this._stacks.get(a.value)||0;if(this._stacks.set(a.value,d+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=.5*c;let[a,d]=this.getMostFrequentStack(),e=`[${this.name}] potential listener LEAK detected, having ${b} listeners already. MOST frequent listener (${d}):`;console.warn(e),console.warn(a);let f=new aL(e,a);this._errorHandler(f)}return()=>{let b=this._stacks.get(a.value)||0;this._stacks.set(a.value,b-1)}}getMostFrequentStack(){if(!this._stacks)return;let a,b=0;for(let[c,d]of this._stacks)(!a||b<d)&&(a=[c,d],b=d);return a}};aE._idPool=1;var aF,aG,aH,aI,aJ,aK=class a{constructor(a){this.value=a}static create(){return new a(Error().stack??"")}print(){console.warn(this.value.split(`
|
|
8
|
+
`).slice(2).join(`
|
|
9
|
+
`))}},aL=class extends Error{constructor(a,b){super(a),this.name="ListenerLeakError",this.stack=b}},aM=class extends Error{constructor(a,b){super(a),this.name="ListenerRefusalError",this.stack=b}},aN=0,aO=class{constructor(a){this.value=a,this.id=aN++}},aP=class{constructor(a){this._size=0,this._options=a,this._leakageMon=this._options?.leakWarningThreshold?new aE(a?.onListenerError??ah,this._options?.leakWarningThreshold??-1):void 0,this._perfMon=this._options?._profName?new aD(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){this._disposed||(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose())}get event(){return this._event??=(a,b,c)=>{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 b=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],c=new aM(`${a}. HINT: Stack shows most frequent listener (${b[1]}-times)`,b[0]);return(this._options?.onListenerError||ah)(c),aw.None}if(this._disposed)return aw.None;b&&(a=a.bind(b));let d=new aO(a),e;this._leakageMon&&this._size>=Math.ceil(.2*this._leakageMon.threshold)&&(d.stack=aK.create(),e=this._leakageMon.check(d.stack,this._size+1)),this._listeners?this._listeners instanceof aO?(this._deliveryQueue??=new aQ,this._listeners=[this._listeners,d]):this._listeners.push(d):(this._options?.onWillAddFirstListener?.(this),this._listeners=d,this._options?.onDidAddFirstListener?.(this)),this._size++;let f=at(()=>{aJ?.unregister(f),e?.(),this._removeListener(d)});if(c instanceof av?c.add(f):Array.isArray(c)&&c.push(f),aJ){let a=Error().stack.split(`
|
|
10
|
+
`).slice(2,3).join(`
|
|
11
|
+
`).trim(),b=/(file:|vscode-file:\/\/vscode-app)?(\/[^:]*:\d+:\d+)/.exec(a);aJ.register(f,b?.[2]??a,f)}return f},this._event}_removeListener(a){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(1===this._size){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let b=this._listeners,c=b.indexOf(a);if(-1===c)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),Error("Attempted to dispose unknown listener");this._size--,b[c]=void 0;let d=this._deliveryQueue.current===this;if(2*this._size<=b.length){let a=0;for(let c=0;c<b.length;c++)b[c]?b[a++]=b[c]:d&&(this._deliveryQueue.end--,a<this._deliveryQueue.i&&this._deliveryQueue.i--);b.length=a}}_deliver(a,b){if(!a)return;let c=this._options?.onListenerError||ah;if(!c)return void a.value(b);try{a.value(b)}catch(a){c(a)}}_deliverQueue(a){let b=a.current._listeners;for(;a.i<a.end;)this._deliver(b[a.i++],a.value);a.reset()}fire(a){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners)if(this._listeners instanceof aO)this._deliver(this._listeners,a);else{let b=this._deliveryQueue;b.enqueue(this,a,this._listeners.length),this._deliverQueue(b)}this._perfMon?.stop()}hasListeners(){return this._size>0}},aQ=class{constructor(){this.i=-1,this.end=0}enqueue(a,b,c){this.i=0,this.end=c,this.current=a,this.value=b}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},aR=class{constructor(){this.mapWindowIdToZoomLevel=new Map,this._onDidChangeZoomLevel=new aP,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this.mapWindowIdToZoomFactor=new Map,this._onDidChangeFullscreen=new aP,this.onDidChangeFullscreen=this._onDidChangeFullscreen.event,this.mapWindowIdToFullScreen=new Map}getZoomLevel(a){return this.mapWindowIdToZoomLevel.get(this.getWindowId(a))??0}setZoomLevel(a,b){if(this.getZoomLevel(b)===a)return;let c=this.getWindowId(b);this.mapWindowIdToZoomLevel.set(c,a),this._onDidChangeZoomLevel.fire(c)}getZoomFactor(a){return this.mapWindowIdToZoomFactor.get(this.getWindowId(a))??1}setZoomFactor(a,b){this.mapWindowIdToZoomFactor.set(this.getWindowId(b),a)}setFullscreen(a,b){if(this.isFullscreen(b)===a)return;let c=this.getWindowId(b);this.mapWindowIdToFullScreen.set(c,a),this._onDidChangeFullscreen.fire(c)}isFullscreen(a){return!!this.mapWindowIdToFullScreen.get(this.getWindowId(a))}getWindowId(a){return a.vscodeWindowId}};aR.INSTANCE=new aR,aR.INSTANCE.onDidChangeZoomLevel,aR.INSTANCE.onDidChangeFullscreen;var aS="object"==typeof navigator?navigator.userAgent:"",aT=aS.indexOf("Firefox")>=0,aU=aS.indexOf("AppleWebKit")>=0,aV=aS.indexOf("Chrome")>=0,aW=!aV&&aS.indexOf("Safari")>=0;aS.indexOf("Electron/"),aS.indexOf("Android");var aX=!1;if("function"==typeof ay.matchMedia){let a=ay.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),b=ay.matchMedia("(display-mode: fullscreen)");aX=a.matches,aY=a,"string"==typeof aY&&(aY=ay.matchMedia(aY)),aY.addEventListener("change",({matches:a})=>{aX&&b.matches||(aX=a)})}var aY,aZ,a$,a_=!1,a0=!1,a1=!1,a2=!1,a3=!1,a4="en",a5=globalThis;"u">typeof a5.vscode&&"u">typeof a5.vscode.process?a$=a5.vscode.process:"u">typeof process&&"string"==typeof process?.versions?.node&&(a$=process);var a6="string"==typeof a$?.versions?.electron&&a$?.type==="renderer";if("object"==typeof a$){a_="win32"===a$.platform,a0="darwin"===a$.platform,(a1="linux"===a$.platform)&&a$.env.SNAP&&a$.env.SNAP_REVISION,a$.env.CI||a$.env.BUILD_ARTIFACTSTAGINGDIRECTORY,a4="en";let a=a$.env.VSCODE_NLS_CONFIG;if(a)try{let b=JSON.parse(a);b.userLocale,b.osLocale,a4=b.resolvedLanguage||"en",b.languagePack?.translationsConfigFile}catch{}a2=!0}else"object"!=typeof navigator||a6?console.error("Unable to resolve platform."):(a_=(aZ=navigator.userAgent).indexOf("Windows")>=0,a0=aZ.indexOf("Macintosh")>=0,(aZ.indexOf("Macintosh")>=0||aZ.indexOf("iPad")>=0||aZ.indexOf("iPhone")>=0)&&navigator.maxTouchPoints&&navigator.maxTouchPoints,a1=aZ.indexOf("Linux")>=0,aZ?.indexOf("Mobi"),a3=!0,a4=globalThis._VSCODE_NLS_LANGUAGE||"en",navigator.language.toLowerCase());var a7=a_,a8=a0,a9=a1,ba=a2;a3&&"function"==typeof a5.importScripts&&a5.origin;var bb,bc=aZ,bd=a4;(bn=bb||={}).value=function(){return bd},bn.isDefaultVariant=function(){return 2===bd.length?"en"===bd:bd.length>=3&&"e"===bd[0]&&"n"===bd[1]&&"-"===bd[2]},bn.isDefault=function(){return"en"===bd};var be="function"==typeof a5.postMessage&&!a5.importScripts,bf=(()=>{if(be){let a=[];a5.addEventListener("message",b=>{if(b.data&&b.data.vscodeScheduleAsyncWork)for(let c=0,d=a.length;c<d;c++){let d=a[c];if(d.id===b.data.vscodeScheduleAsyncWork){a.splice(c,1),d.callback();return}}});let b=0;return c=>{let d=++b;a.push({id:d,callback:c}),a5.postMessage({vscodeScheduleAsyncWork:d},"*")}}return a=>setTimeout(a)})(),bg=!!(bc&&bc.indexOf("Chrome")>=0);bc&&bc.indexOf("Firefox"),!bg&&bc&&bc.indexOf("Safari"),bc&&bc.indexOf("Edg/"),bc&&bc.indexOf("Android");var bh="object"==typeof navigator?navigator:{};ba||document.queryCommandSupported&&document.queryCommandSupported("copy")||bh&&bh.clipboard&&bh.clipboard.writeText,ba||bh&&bh.clipboard&&bh.clipboard.readText,ba||aX||bh.keyboard,"ontouchstart"in ay||bh.maxTouchPoints,ay.PointerEvent&&("ontouchstart"in ay||navigator.maxTouchPoints);var bi=class{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(a,b){this._keyCodeToStr[a]=b,this._strToKeyCode[b.toLowerCase()]=a}keyCodeToStr(a){return this._keyCodeToStr[a]}strToKeyCode(a){return this._strToKeyCode[a.toLowerCase()]||0}},bj=new bi,bk=new bi,bl=new bi,bm=Array(230);(bo=bp||={}).toString=function(a){return bj.keyCodeToStr(a)},bo.fromString=function(a){return bj.strToKeyCode(a)},bo.toUserSettingsUS=function(a){return bk.keyCodeToStr(a)},bo.toUserSettingsGeneral=function(a){return bl.keyCodeToStr(a)},bo.fromUserSettings=function(a){return bk.strToKeyCode(a)||bl.strToKeyCode(a)},bo.toElectronAccelerator=function(a){if(a>=98&&a<=113)return null;switch(a){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return bj.keyCodeToStr(a)};var bn,bo,bp,bq,br=class a{constructor(a,b,c,d,e){this.ctrlKey=a,this.shiftKey=b,this.altKey=c,this.metaKey=d,this.keyCode=e}equals(b){return b instanceof a&&this.ctrlKey===b.ctrlKey&&this.shiftKey===b.shiftKey&&this.altKey===b.altKey&&this.metaKey===b.metaKey&&this.keyCode===b.keyCode}getHashCode(){let a=this.ctrlKey?"1":"0",b=this.shiftKey?"1":"0",c=this.altKey?"1":"0",d=this.metaKey?"1":"0";return`K${a}${b}${c}${d}${this.keyCode}`}isModifierKey(){return 0===this.keyCode||5===this.keyCode||57===this.keyCode||6===this.keyCode||4===this.keyCode}toKeybinding(){return new bs([this])}isDuplicateModifierCase(){return this.ctrlKey&&5===this.keyCode||this.shiftKey&&4===this.keyCode||this.altKey&&6===this.keyCode||this.metaKey&&57===this.keyCode}},bs=class{constructor(a){if(0===a.length)throw function(a){return a?Error(`Illegal argument: ${a}`):Error("Illegal argument")}("chords");this.chords=a}getHashCode(){let a="";for(let b=0,c=this.chords.length;b<c;b++)0!==b&&(a+=";"),a+=this.chords[b].getHashCode();return a}equals(a){if(null===a||this.chords.length!==a.chords.length)return!1;for(let b=0;b<this.chords.length;b++)if(!this.chords[b].equals(a.chords[b]))return!1;return!0}},bt=a8?256:2048,bu=a8?2048:256,bv=class{constructor(a){this._standardKeyboardEventBrand=!0,this.browserEvent=a,this.target=a.target,this.ctrlKey=a.ctrlKey,this.shiftKey=a.shiftKey,this.altKey=a.altKey,this.metaKey=a.metaKey,this.altGraphKey=a.getModifierState?.("AltGraph"),this.keyCode=function(a){if(a.charCode){let b=String.fromCharCode(a.charCode).toUpperCase();return bp.fromString(b)}let b=a.keyCode;if(3===b)return 7;if(aT)switch(b){case 59:return 85;case 60:if(a9)return 97;break;case 61:return 86;case 107:return 109;case 109:return 111;case 173:return 88;case 224:if(a8)return 57}else if(aU&&(a8&&93===b||!a8&&92===b))return 57;return bm[b]||0}(a),this.code=a.code,this.ctrlKey=this.ctrlKey||5===this.keyCode,this.altKey=this.altKey||6===this.keyCode,this.shiftKey=this.shiftKey||4===this.keyCode,this.metaKey=this.metaKey||57===this.keyCode,this._asKeybinding=this._computeKeybinding(),this._asKeyCodeChord=this._computeKeyCodeChord()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeyCodeChord(){return this._asKeyCodeChord}equals(a){return this._asKeybinding===a}_computeKeybinding(){let a=0;5!==this.keyCode&&4!==this.keyCode&&6!==this.keyCode&&57!==this.keyCode&&(a=this.keyCode);let b=0;return this.ctrlKey&&(b|=bt),this.altKey&&(b|=512),this.shiftKey&&(b|=1024),this.metaKey&&(b|=bu),b|=a}_computeKeyCodeChord(){let a=0;return 5!==this.keyCode&&4!==this.keyCode&&6!==this.keyCode&&57!==this.keyCode&&(a=this.keyCode),new br(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,a)}},bw=new WeakMap,bx=class{static getSameOriginWindowChain(a){let b=bw.get(a);if(!b){b=[],bw.set(a,b);let c=a,d;do(d=function(a){if(!a.parent||a.parent===a)return null;try{let b=a.location,c=a.parent.location;if("null"!==b.origin&&"null"!==c.origin&&b.origin!==c.origin)return null}catch{return null}return a.parent}(c))?b.push({window:new WeakRef(c),iframeElement:c.frameElement||null}):b.push({window:new WeakRef(c),iframeElement:null}),c=d;while(c)}return b.slice(0)}static getPositionOfChildWindowRelativeToAncestorWindow(a,b){if(!b||a===b)return{top:0,left:0};let c=0,d=0;for(let e of this.getSameOriginWindowChain(a)){let a=e.window.deref();if(c+=a?.scrollY??0,d+=a?.scrollX??0,a===b||!e.iframeElement)break;let f=e.iframeElement.getBoundingClientRect();c+=f.top,d+=f.left}return{top:c,left:d}}},by=class{constructor(a,b){this.timestamp=Date.now(),this.browserEvent=b,this.leftButton=0===b.button,this.middleButton=1===b.button,this.rightButton=2===b.button,this.buttons=b.buttons,this.target=b.target,this.detail=b.detail||1,"dblclick"===b.type&&(this.detail=2),this.ctrlKey=b.ctrlKey,this.shiftKey=b.shiftKey,this.altKey=b.altKey,this.metaKey=b.metaKey,"number"==typeof b.pageX?(this.posx=b.pageX,this.posy=b.pageY):(this.posx=b.clientX+this.target.ownerDocument.body.scrollLeft+this.target.ownerDocument.documentElement.scrollLeft,this.posy=b.clientY+this.target.ownerDocument.body.scrollTop+this.target.ownerDocument.documentElement.scrollTop);let c=bx.getPositionOfChildWindowRelativeToAncestorWindow(a,b.view);this.posx-=c.left,this.posy-=c.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}},bz=class{constructor(a,b=0,c=0){this.browserEvent=a||null,this.target=a?a.target||a.targetNode||a.srcElement:null,this.deltaY=c,this.deltaX=b;let d=!1;if(aV){let a=navigator.userAgent.match(/Chrome\/(\d+)/);d=(a?parseInt(a[1]):123)<=122}if(a){let b=a.view?.devicePixelRatio||1;"u">typeof a.wheelDeltaY?d?this.deltaY=a.wheelDeltaY/(120*b):this.deltaY=a.wheelDeltaY/120:"u">typeof a.VERTICAL_AXIS&&a.axis===a.VERTICAL_AXIS?this.deltaY=-a.detail/3:"wheel"===a.type&&(a.deltaMode===a.DOM_DELTA_LINE?aT&&!a8?this.deltaY=-a.deltaY/3:this.deltaY=-a.deltaY:this.deltaY=-a.deltaY/40),"u">typeof a.wheelDeltaX?aW&&a7?this.deltaX=-(a.wheelDeltaX/120):d?this.deltaX=a.wheelDeltaX/(120*b):this.deltaX=a.wheelDeltaX/120:"u">typeof a.HORIZONTAL_AXIS&&a.axis===a.HORIZONTAL_AXIS?this.deltaX=-a.detail/3:"wheel"===a.type&&(a.deltaMode===a.DOM_DELTA_LINE?aT&&!a8?this.deltaX=-a.deltaX/3:this.deltaX=-a.deltaX:this.deltaX=-a.deltaX/40),0===this.deltaY&&0===this.deltaX&&a.wheelDelta&&(d?this.deltaY=a.wheelDelta/(120*b):this.deltaY=a.wheelDelta/120)}}preventDefault(){this.browserEvent?.preventDefault()}stopPropagation(){this.browserEvent?.stopPropagation()}},bA=Object.freeze(function(a,b){let c=setTimeout(a.bind(b),0);return{dispose(){clearTimeout(c)}}});(cq=bq||={}).isCancellationToken=function(a){return a===cq.None||a===cq.Cancelled||a instanceof bB||!!a&&"object"==typeof a&&"boolean"==typeof a.isCancellationRequested&&"function"==typeof a.onCancellationRequested},cq.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:aI.None}),cq.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:bA});var bB=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?bA:(this._emitter||(this._emitter=new aP),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}};Symbol("MicrotaskDelay");var bC=class{constructor(a,b){this._isDisposed=!1,this._token=-1,"function"==typeof a&&"number"==typeof b&&this.setIfNotSet(a,b)}dispose(){this.cancel(),this._isDisposed=!0}cancel(){-1!==this._token&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(a,b){if(this._isDisposed)throw new al("Calling 'cancelAndSet' on a disposed TimeoutTimer");this.cancel(),this._token=setTimeout(()=>{this._token=-1,a()},b)}setIfNotSet(a,b){if(this._isDisposed)throw new al("Calling 'setIfNotSet' on a disposed TimeoutTimer");-1===this._token&&(this._token=setTimeout(()=>{this._token=-1,a()},b))}},bD=class{constructor(){this.disposable=void 0,this.isDisposed=!1}cancel(){this.disposable?.dispose(),this.disposable=void 0}cancelAndSet(a,b,c=globalThis){if(this.isDisposed)throw new al("Calling 'cancelAndSet' on a disposed IntervalTimer");this.cancel();let d=c.setInterval(()=>{a()},b);this.disposable=at(()=>{c.clearInterval(d),this.disposable=void 0})}dispose(){this.cancel(),this.isDisposed=!0}};(cr=cs||={}).settled=async function(a){let b,c=await Promise.all(a.map(a=>a.then(a=>a,a=>{b||(b=a)})));if("u">typeof b)throw b;return c},cr.withAsyncBody=function(a){return new Promise(async(b,c)=>{try{await a(b,c)}catch(a){c(a)}})};var bE=class a{static fromArray(b){return new a(a=>{a.emitMany(b)})}static fromPromise(b){return new a(async a=>{a.emitMany(await b)})}static fromPromises(b){return new a(async a=>{await Promise.all(b.map(async b=>a.emitOne(await b)))})}static merge(b){return new a(async a=>{await Promise.all(b.map(async b=>{for await(let c of b)a.emitOne(c)}))})}constructor(a,b){this._state=0,this._results=[],this._error=null,this._onReturn=b,this._onStateChanged=new aP,queueMicrotask(async()=>{let b={emitOne:a=>this.emitOne(a),emitMany:a=>this.emitMany(a),reject:a=>this.reject(a)};try{await Promise.resolve(a(b)),this.resolve()}catch(a){this.reject(a)}finally{b.emitOne=void 0,b.emitMany=void 0,b.reject=void 0}})}[Symbol.asyncIterator](){let a=0;return{next:async()=>{for(;;){if(2===this._state)throw this._error;if(a<this._results.length)return{done:!1,value:this._results[a++]};if(1===this._state)return{done:!0,value:void 0};await aI.toPromise(this._onStateChanged.event)}},return:async()=>(this._onReturn?.(),{done:!0,value:void 0})}}static map(b,c){return new a(async a=>{for await(let d of b)a.emitOne(c(d))})}map(b){return a.map(this,b)}static filter(b,c){return new a(async a=>{for await(let d of b)c(d)&&a.emitOne(d)})}filter(b){return a.filter(this,b)}static coalesce(b){return a.filter(b,a=>!!a)}coalesce(){return a.coalesce(this)}static async toPromise(a){let b=[];for await(let c of a)b.push(c);return b}toPromise(){return a.toPromise(this)}emitOne(a){0===this._state&&(this._results.push(a),this._onStateChanged.fire())}emitMany(a){0===this._state&&(this._results=this._results.concat(a),this._onStateChanged.fire())}resolve(){0===this._state&&(this._state=1,this._onStateChanged.fire())}reject(a){0===this._state&&(this._state=2,this._error=a,this._onStateChanged.fire())}};bE.EMPTY=bE.fromArray([]);function bF(a,b){return(b<<5)-b+a|0}function bG(a,b){b=bF(149417,b);for(let c=0,d=a.length;c<d;c++)b=bF(a.charCodeAt(c),b);return b}new DataView(new ArrayBuffer(320));var{registerWindow:bH,getWindow:bI,getDocument:bJ,getWindows:bK,getWindowsCount:bL,getWindowId:bM,getWindowById:bN,hasWindow:bO,onDidRegisterWindow:bP,onWillUnregisterWindow:bQ,onDidUnregisterWindow:bR}=(d=new Map,e={window:ay,disposables:new av},d.set(ay.vscodeWindowId,e),f=new aP,g=new aP,h=new aP,{onDidRegisterWindow:f.event,onWillUnregisterWindow:h.event,onDidUnregisterWindow:g.event,registerWindow(a){if(d.has(a.vscodeWindowId))return aw.None;let b=new av,c={window:a,disposables:b.add(new av)};return d.set(a.vscodeWindowId,c),b.add(at(()=>{d.delete(a.vscodeWindowId),g.fire(a)})),b.add(bT(a,bY.BEFORE_UNLOAD,()=>{h.fire(a)})),f.fire(c),b},getWindows:()=>d.values(),getWindowsCount:()=>d.size,getWindowId:a=>a.vscodeWindowId,hasWindow:a=>d.has(a),getWindowById:function(a,b){return("number"==typeof a?d.get(a):void 0)??(b?e:void 0)},getWindow:a=>a?.ownerDocument?.defaultView?a.ownerDocument.defaultView.window:a?.view?a.view.window:ay,getDocument:a=>bI(a).document}),bS=class{constructor(a,b,c,d){this._node=a,this._type=b,this._handler=c,this._options=d||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}};function bT(a,b,c,d){return new bS(a,b,c,d)}var bU=function(a,b,c,d){var e;let f=c;return"click"===b||"mousedown"===b||"contextmenu"===b?(e=bI(a),f=function(a){return c(new by(e,a))}):("keydown"===b||"keypress"===b||"keyup"===b)&&(f=function(a){return c(new bv(a))}),bT(a,b,f,d)},bV=class extends bD{constructor(a){super(),this.defaultTarget=a&&bI(a)}cancelAndSet(a,b,c){return super.cancelAndSet(a,b,c??this.defaultTarget)}},bW=class{constructor(a,b=0){this._runner=a,this.priority=b,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(a){ah(a)}}static sort(a,b){return b.priority-a.priority}};i=new Map,j=new Map,k=new Map,l=new Map,ct=(a,b,c=0)=>{let d=bM(a),e=new bW(b,c),f=i.get(d);return f||(f=[],i.set(d,f)),f.push(e),k.get(d)||(k.set(d,!0),a.requestAnimationFrame(()=>(a=>{k.set(a,!1);let b=i.get(a)??[];for(j.set(a,b),i.set(a,[]),l.set(a,!0);b.length>0;)b.sort(bW.sort),b.shift().execute();l.set(a,!1)})(d))),e};var bX=class a{constructor(a,b){this.width=a,this.height=b}with(b=this.width,c=this.height){return b!==this.width||c!==this.height?new a(b,c):this}static is(a){return"object"==typeof a&&"number"==typeof a.height&&"number"==typeof a.width}static lift(b){return b instanceof a?b:new a(b.width,b.height)}static equals(a,b){return a===b||!!a&&!!b&&a.width===b.width&&a.height===b.height}};bX.None=new bX(0,0),new class{constructor(){this.mutationObservers=new Map}observe(a,b,c){let d=this.mutationObservers.get(a);d||(d=new Map,this.mutationObservers.set(a,d));let e=function a(b,c){switch(typeof b){case"object":var d,e,f,g;return null===b?bF(349,c):Array.isArray(b)?(d=b,e=bF(104579,e=c),d.reduce((b,c)=>a(c,b),e)):(f=b,g=bF(181387,g=c),Object.keys(f).sort().reduce((b,c)=>(b=bG(c,b),a(f[c],b)),g));case"string":return bG(b,c);case"boolean":return bF(b?433:863,c);case"number":return bF(b,c);case"undefined":return bF(937,c);default:return bF(617,c)}}(c,0),f=d.get(e);if(f)f.users+=1;else{let g=new aP,h=new MutationObserver(a=>g.fire(a));h.observe(a,c);let i=f={users:1,observer:h,onDidMutate:g.event};b.add(at(()=>{i.users-=1,0===i.users&&(g.dispose(),h.disconnect(),d?.delete(e),d?.size===0&&this.mutationObservers.delete(a))})),d.set(e,f)}return f.onDidMutate}};var bY={CLICK:"click",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_LEAVE:"mouseleave",MOUSE_WHEEL:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",KEY_DOWN:"keydown",KEY_UP:"keyup",BEFORE_UNLOAD:"beforeunload",CHANGE:"change",FOCUS:"focus",BLUR:"blur",INPUT:"input"},bZ=class{constructor(a){this.domNode=a,this._maxWidth="",this._width="",this._height="",this._top="",this._left="",this._bottom="",this._right="",this._paddingTop="",this._paddingLeft="",this._paddingBottom="",this._paddingRight="",this._fontFamily="",this._fontWeight="",this._fontSize="",this._fontStyle="",this._fontFeatureSettings="",this._fontVariationSettings="",this._textDecoration="",this._lineHeight="",this._letterSpacing="",this._className="",this._display="",this._position="",this._visibility="",this._color="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(a){let b=b$(a);this._maxWidth!==b&&(this._maxWidth=b,this.domNode.style.maxWidth=this._maxWidth)}setWidth(a){let b=b$(a);this._width!==b&&(this._width=b,this.domNode.style.width=this._width)}setHeight(a){let b=b$(a);this._height!==b&&(this._height=b,this.domNode.style.height=this._height)}setTop(a){let b=b$(a);this._top!==b&&(this._top=b,this.domNode.style.top=this._top)}setLeft(a){let b=b$(a);this._left!==b&&(this._left=b,this.domNode.style.left=this._left)}setBottom(a){let b=b$(a);this._bottom!==b&&(this._bottom=b,this.domNode.style.bottom=this._bottom)}setRight(a){let b=b$(a);this._right!==b&&(this._right=b,this.domNode.style.right=this._right)}setPaddingTop(a){let b=b$(a);this._paddingTop!==b&&(this._paddingTop=b,this.domNode.style.paddingTop=this._paddingTop)}setPaddingLeft(a){let b=b$(a);this._paddingLeft!==b&&(this._paddingLeft=b,this.domNode.style.paddingLeft=this._paddingLeft)}setPaddingBottom(a){let b=b$(a);this._paddingBottom!==b&&(this._paddingBottom=b,this.domNode.style.paddingBottom=this._paddingBottom)}setPaddingRight(a){let b=b$(a);this._paddingRight!==b&&(this._paddingRight=b,this.domNode.style.paddingRight=this._paddingRight)}setFontFamily(a){this._fontFamily!==a&&(this._fontFamily=a,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(a){this._fontWeight!==a&&(this._fontWeight=a,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(a){let b=b$(a);this._fontSize!==b&&(this._fontSize=b,this.domNode.style.fontSize=this._fontSize)}setFontStyle(a){this._fontStyle!==a&&(this._fontStyle=a,this.domNode.style.fontStyle=this._fontStyle)}setFontFeatureSettings(a){this._fontFeatureSettings!==a&&(this._fontFeatureSettings=a,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setFontVariationSettings(a){this._fontVariationSettings!==a&&(this._fontVariationSettings=a,this.domNode.style.fontVariationSettings=this._fontVariationSettings)}setTextDecoration(a){this._textDecoration!==a&&(this._textDecoration=a,this.domNode.style.textDecoration=this._textDecoration)}setLineHeight(a){let b=b$(a);this._lineHeight!==b&&(this._lineHeight=b,this.domNode.style.lineHeight=this._lineHeight)}setLetterSpacing(a){let b=b$(a);this._letterSpacing!==b&&(this._letterSpacing=b,this.domNode.style.letterSpacing=this._letterSpacing)}setClassName(a){this._className!==a&&(this._className=a,this.domNode.className=this._className)}toggleClassName(a,b){this.domNode.classList.toggle(a,b),this._className=this.domNode.className}setDisplay(a){this._display!==a&&(this._display=a,this.domNode.style.display=this._display)}setPosition(a){this._position!==a&&(this._position=a,this.domNode.style.position=this._position)}setVisibility(a){this._visibility!==a&&(this._visibility=a,this.domNode.style.visibility=this._visibility)}setColor(a){this._color!==a&&(this._color=a,this.domNode.style.color=this._color)}setBackgroundColor(a){this._backgroundColor!==a&&(this._backgroundColor=a,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(a){this._layerHint!==a&&(this._layerHint=a,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}setBoxShadow(a){this._boxShadow!==a&&(this._boxShadow=a,this.domNode.style.boxShadow=a)}setContain(a){this._contain!==a&&(this._contain=a,this.domNode.style.contain=this._contain)}setAttribute(a,b){this.domNode.setAttribute(a,b)}removeAttribute(a){this.domNode.removeAttribute(a)}appendChild(a){this.domNode.appendChild(a.domNode)}removeChild(a){this.domNode.removeChild(a.domNode)}};function b$(a){return"number"==typeof a?`${a}px`:a}function b_(a){return new bZ(a)}var b0=class{constructor(){this._hooks=new av,this._pointerMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(a,b){if(!this.isMonitoring())return;this._hooks.clear(),this._pointerMoveCallback=null;let c=this._onStopCallback;this._onStopCallback=null,a&&c&&c(b)}isMonitoring(){return!!this._pointerMoveCallback}startMonitoring(a,b,c,d,e){this.isMonitoring()&&this.stopMonitoring(!1),this._pointerMoveCallback=d,this._onStopCallback=e;let f=a;try{a.setPointerCapture(b),this._hooks.add(at(()=>{try{a.releasePointerCapture(b)}catch{}}))}catch{f=bI(a)}this._hooks.add(bT(f,bY.POINTER_MOVE,a=>{a.buttons!==c?this.stopMonitoring(!0):(a.preventDefault(),this._pointerMoveCallback(a))})),this._hooks.add(bT(f,bY.POINTER_UP,a=>this.stopMonitoring(!0)))}};(m=cu||={}).Tap="-xterm-gesturetap",m.Change="-xterm-gesturechange",m.Start="-xterm-gesturestart",m.End="-xterm-gesturesend",m.Contextmenu="-xterm-gesturecontextmenu";var b1=class a extends aw{constructor(){super(),this.dispatched=!1,this.targets=new aA,this.ignoreTargets=new aA,this.activeTouches={},this.handle=null,this._lastSetTapCountTime=0,this._register(aI.runAndSubscribe(bP,({window:a,disposables:b})=>{b.add(bT(a.document,"touchstart",a=>this.onTouchStart(a),{passive:!1})),b.add(bT(a.document,"touchend",b=>this.onTouchEnd(a,b))),b.add(bT(a.document,"touchmove",a=>this.onTouchMove(a),{passive:!1}))},{window:ay,disposables:this._store}))}static addTarget(b){return a.isTouchDevice()?(a.INSTANCE||(a.INSTANCE=ar(new a)),at(a.INSTANCE.targets.push(b))):aw.None}static ignoreTarget(b){return a.isTouchDevice()?(a.INSTANCE||(a.INSTANCE=ar(new a)),at(a.INSTANCE.ignoreTargets.push(b))):aw.None}static isTouchDevice(){return"ontouchstart"in ay||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(a){let b=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let c=0,d=a.targetTouches.length;c<d;c++){let d=a.targetTouches.item(c);this.activeTouches[d.identifier]={id:d.identifier,initialTarget:d.target,initialTimeStamp:b,initialPageX:d.pageX,initialPageY:d.pageY,rollingTimestamps:[b],rollingPageX:[d.pageX],rollingPageY:[d.pageY]};let e=this.newGestureEvent(cu.Start,d.target);e.pageX=d.pageX,e.pageY=d.pageY,this.dispatchEvent(e)}this.dispatched&&(a.preventDefault(),a.stopPropagation(),this.dispatched=!1)}onTouchEnd(b,c){let d=Date.now(),e=Object.keys(this.activeTouches).length;for(let f=0,g=c.changedTouches.length;f<g;f++){let g=c.changedTouches.item(f);if(!this.activeTouches.hasOwnProperty(String(g.identifier))){console.warn("move of an UNKNOWN touch",g);continue}let h=this.activeTouches[g.identifier],i=Date.now()-h.initialTimeStamp;if(i<a.HOLD_DELAY&&30>Math.abs(h.initialPageX-am(h.rollingPageX))&&30>Math.abs(h.initialPageY-am(h.rollingPageY))){let a=this.newGestureEvent(cu.Tap,h.initialTarget);a.pageX=am(h.rollingPageX),a.pageY=am(h.rollingPageY),this.dispatchEvent(a)}else if(i>=a.HOLD_DELAY&&30>Math.abs(h.initialPageX-am(h.rollingPageX))&&30>Math.abs(h.initialPageY-am(h.rollingPageY))){let a=this.newGestureEvent(cu.Contextmenu,h.initialTarget);a.pageX=am(h.rollingPageX),a.pageY=am(h.rollingPageY),this.dispatchEvent(a)}else if(1===e){let a=am(h.rollingPageX),c=am(h.rollingPageY),e=am(h.rollingTimestamps)-h.rollingTimestamps[0],f=a-h.rollingPageX[0],g=c-h.rollingPageY[0],i=[...this.targets].filter(a=>h.initialTarget instanceof Node&&a.contains(h.initialTarget));this.inertia(b,i,d,Math.abs(f)/e,f>0?1:-1,a,Math.abs(g)/e,g>0?1:-1,c)}this.dispatchEvent(this.newGestureEvent(cu.End,h.initialTarget)),delete this.activeTouches[g.identifier]}this.dispatched&&(c.preventDefault(),c.stopPropagation(),this.dispatched=!1)}newGestureEvent(a,b){let c=document.createEvent("CustomEvent");return c.initEvent(a,!1,!0),c.initialTarget=b,c.tapCount=0,c}dispatchEvent(b){if(b.type===cu.Tap){let c=new Date().getTime(),d=0;d=c-this._lastSetTapCountTime>a.CLEAR_TAP_COUNT_TIME?1:2,this._lastSetTapCountTime=c,b.tapCount=d}else(b.type===cu.Change||b.type===cu.Contextmenu)&&(this._lastSetTapCountTime=0);if(b.initialTarget instanceof Node){for(let a of this.ignoreTargets)if(a.contains(b.initialTarget))return;let a=[];for(let c of this.targets)if(c.contains(b.initialTarget)){let d=0,e=b.initialTarget;for(;e&&e!==c;)d++,e=e.parentElement;a.push([d,c])}for(let[c,d]of(a.sort((a,b)=>a[0]-b[0]),a))d.dispatchEvent(b),this.dispatched=!0}}inertia(b,c,d,e,f,g,h,i,j){this.handle=ct(b,()=>{let k=Date.now(),l=k-d,m=0,n=0,o=!0;e+=a.SCROLL_FRICTION*l,h+=a.SCROLL_FRICTION*l,e>0&&(o=!1,m=f*e*l),h>0&&(o=!1,n=i*h*l);let p=this.newGestureEvent(cu.Change);p.translationX=m,p.translationY=n,c.forEach(a=>a.dispatchEvent(p)),o||this.inertia(b,c,k,e,f,g+m,h,i,j+n)})}onTouchMove(a){let b=Date.now();for(let c=0,d=a.changedTouches.length;c<d;c++){let d=a.changedTouches.item(c);if(!this.activeTouches.hasOwnProperty(String(d.identifier))){console.warn("end of an UNKNOWN touch",d);continue}let e=this.activeTouches[d.identifier],f=this.newGestureEvent(cu.Change,e.initialTarget);f.translationX=d.pageX-am(e.rollingPageX),f.translationY=d.pageY-am(e.rollingPageY),f.pageX=d.pageX,f.pageY=d.pageY,this.dispatchEvent(f),e.rollingPageX.length>3&&(e.rollingPageX.shift(),e.rollingPageY.shift(),e.rollingTimestamps.shift()),e.rollingPageX.push(d.pageX),e.rollingPageY.push(d.pageY),e.rollingTimestamps.push(b)}this.dispatched&&(a.preventDefault(),a.stopPropagation(),this.dispatched=!1)}};b1.SCROLL_FRICTION=-.005,b1.HOLD_DELAY=700,b1.CLEAR_TAP_COUNT_TIME=400,x([function(a,b,c){let d=null,e=null;if("function"==typeof c.value?(d="value",0!==(e=c.value).length&&console.warn("Memoize should only be used in functions with zero parameters")):"function"==typeof c.get&&(d="get",e=c.get),!e)throw Error("not supported");let f=`$memoize$${b}`;c[d]=function(...a){return this.hasOwnProperty(f)||Object.defineProperty(this,f,{configurable:!1,enumerable:!1,writable:!1,value:e.apply(this,a)}),this[f]}}],b1,"isTouchDevice",1);var b2=class extends aw{onclick(a,b){this._register(bT(a,bY.CLICK,c=>b(new by(bI(a),c))))}onmousedown(a,b){this._register(bT(a,bY.MOUSE_DOWN,c=>b(new by(bI(a),c))))}onmouseover(a,b){this._register(bT(a,bY.MOUSE_OVER,c=>b(new by(bI(a),c))))}onmouseleave(a,b){this._register(bT(a,bY.MOUSE_LEAVE,c=>b(new by(bI(a),c))))}onkeydown(a,b){this._register(bT(a,bY.KEY_DOWN,a=>b(new bv(a))))}onkeyup(a,b){this._register(bT(a,bY.KEY_UP,a=>b(new bv(a))))}oninput(a,b){this._register(bT(a,bY.INPUT,b))}onblur(a,b){this._register(bT(a,bY.BLUR,b))}onfocus(a,b){this._register(bT(a,bY.FOCUS,b))}onchange(a,b){this._register(bT(a,bY.CHANGE,b))}ignoreGesture(a){return b1.ignoreTarget(a)}},b3=class extends b2{constructor(a){super(),this._onActivate=a.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=a.bgWidth+"px",this.bgDomNode.style.height=a.bgHeight+"px","u">typeof a.top&&(this.bgDomNode.style.top="0px"),"u">typeof a.left&&(this.bgDomNode.style.left="0px"),"u">typeof a.bottom&&(this.bgDomNode.style.bottom="0px"),"u">typeof a.right&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=a.className,this.domNode.style.position="absolute",this.domNode.style.width="11px",this.domNode.style.height="11px","u">typeof a.top&&(this.domNode.style.top=a.top+"px"),"u">typeof a.left&&(this.domNode.style.left=a.left+"px"),"u">typeof a.bottom&&(this.domNode.style.bottom=a.bottom+"px"),"u">typeof a.right&&(this.domNode.style.right=a.right+"px"),this._pointerMoveMonitor=this._register(new b0),this._register(bU(this.bgDomNode,bY.POINTER_DOWN,a=>this._arrowPointerDown(a))),this._register(bU(this.domNode,bY.POINTER_DOWN,a=>this._arrowPointerDown(a))),this._pointerdownRepeatTimer=this._register(new bV),this._pointerdownScheduleRepeatTimer=this._register(new bC)}_arrowPointerDown(a){if(!a.target||!(a.target instanceof Element))return;let b=()=>{this._pointerdownRepeatTimer.cancelAndSet(()=>this._onActivate(),1e3/24,bI(a))};this._onActivate(),this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancelAndSet(b,200),this._pointerMoveMonitor.startMonitoring(a.target,a.pointerId,a.buttons,a=>{},()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()}),a.preventDefault()}},b4=class a{constructor(a,b,c,d,e,f,g){this._forceIntegerValues=a,this._scrollStateBrand=void 0,this._forceIntegerValues&&(b|=0,c|=0,d|=0,e|=0,f|=0,g|=0),this.rawScrollLeft=d,this.rawScrollTop=g,b<0&&(b=0),d+b>c&&(d=c-b),d<0&&(d=0),e<0&&(e=0),g+e>f&&(g=f-e),g<0&&(g=0),this.width=b,this.scrollWidth=c,this.scrollLeft=d,this.height=e,this.scrollHeight=f,this.scrollTop=g}equals(a){return this.rawScrollLeft===a.rawScrollLeft&&this.rawScrollTop===a.rawScrollTop&&this.width===a.width&&this.scrollWidth===a.scrollWidth&&this.scrollLeft===a.scrollLeft&&this.height===a.height&&this.scrollHeight===a.scrollHeight&&this.scrollTop===a.scrollTop}withScrollDimensions(b,c){return new a(this._forceIntegerValues,"u">typeof b.width?b.width:this.width,"u">typeof b.scrollWidth?b.scrollWidth:this.scrollWidth,c?this.rawScrollLeft:this.scrollLeft,"u">typeof b.height?b.height:this.height,"u">typeof b.scrollHeight?b.scrollHeight:this.scrollHeight,c?this.rawScrollTop:this.scrollTop)}withScrollPosition(b){return new a(this._forceIntegerValues,this.width,this.scrollWidth,"u">typeof b.scrollLeft?b.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,"u">typeof b.scrollTop?b.scrollTop:this.rawScrollTop)}createScrollEvent(a,b){let c=this.width!==a.width,d=this.scrollWidth!==a.scrollWidth,e=this.scrollLeft!==a.scrollLeft,f=this.height!==a.height,g=this.scrollHeight!==a.scrollHeight,h=this.scrollTop!==a.scrollTop;return{inSmoothScrolling:b,oldWidth:a.width,oldScrollWidth:a.scrollWidth,oldScrollLeft:a.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:a.height,oldScrollHeight:a.scrollHeight,oldScrollTop:a.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:c,scrollWidthChanged:d,scrollLeftChanged:e,heightChanged:f,scrollHeightChanged:g,scrollTopChanged:h}}},b5=class extends aw{constructor(a){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new aP),this.onScroll=this._onScroll.event,this._smoothScrollDuration=a.smoothScrollDuration,this._scheduleAtNextAnimationFrame=a.scheduleAtNextAnimationFrame,this._state=new b4(a.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(a){this._smoothScrollDuration=a}validateScrollPosition(a){return this._state.withScrollPosition(a)}getScrollDimensions(){return this._state}setScrollDimensions(a,b){let c=this._state.withScrollDimensions(a,b);this._setState(c,!!this._smoothScrolling),this._smoothScrolling?.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(a){let b=this._state.withScrollPosition(a);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(b,!1)}setScrollPositionSmooth(a,b){if(0===this._smoothScrollDuration)return this.setScrollPositionNow(a);if(this._smoothScrolling){let c;a={scrollLeft:typeof a.scrollLeft>"u"?this._smoothScrolling.to.scrollLeft:a.scrollLeft,scrollTop:typeof a.scrollTop>"u"?this._smoothScrolling.to.scrollTop:a.scrollTop};let d=this._state.withScrollPosition(a);if(this._smoothScrolling.to.scrollLeft===d.scrollLeft&&this._smoothScrolling.to.scrollTop===d.scrollTop)return;c=b?new b8(this._smoothScrolling.from,d,this._smoothScrolling.startTime,this._smoothScrolling.duration):this._smoothScrolling.combine(this._state,d,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=c}else{let b=this._state.withScrollPosition(a);this._smoothScrolling=b8.start(this._state,b,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 a=this._smoothScrolling.tick(),b=this._state.withScrollPosition(a);if(this._setState(b,!0),this._smoothScrolling){if(a.isDone){this._smoothScrolling.dispose(),this._smoothScrolling=null;return}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}}_setState(a,b){let c=this._state;c.equals(a)||(this._state=a,this._onScroll.fire(this._state.createScrollEvent(c,b)))}},b6=class{constructor(a,b,c){this.scrollLeft=a,this.scrollTop=b,this.isDone=c}};function b7(a,b){let c=b-a;return function(b){return a+c*(1-Math.pow(1-b,3))}}var b8=class a{constructor(a,b,c,d){this.from=a,this.to=b,this.duration=d,this.startTime=c,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(a,b,c){if(Math.abs(a-b)>2.5*c){var d,e;let f,g;return a<b?(f=a+.75*c,g=b-.75*c):(f=a-.75*c,g=b+.75*c),d=b7(a,f),e=b7(g,b),function(a){return a<.33?d(a/.33):e((a-.33)/(1-.33))}}return b7(a,b)}dispose(){null!==this.animationFrameDisposable&&(this.animationFrameDisposable.dispose(),this.animationFrameDisposable=null)}acceptScrollDimensions(a){this.to=a.withScrollPosition(this.to),this._initAnimations()}tick(){return this._tick(Date.now())}_tick(a){let b=(a-this.startTime)/this.duration;return b<1?new b6(this.scrollLeft(b),this.scrollTop(b),!1):new b6(this.to.scrollLeft,this.to.scrollTop,!0)}combine(b,c,d){return a.start(b,c,d)}static start(b,c,d){return d+=10,new a(b,c,Date.now()-10,d)}},b9=class extends aw{constructor(a,b,c){super(),this._visibility=a,this._visibleClassName=b,this._invisibleClassName=c,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new bC)}setVisibility(a){this._visibility!==a&&(this._visibility=a,this._updateShouldBeVisible())}setShouldBeVisible(a){this._rawShouldBeVisible=a,this._updateShouldBeVisible()}_applyVisibilitySetting(){return 2!==this._visibility&&(3===this._visibility||this._rawShouldBeVisible)}_updateShouldBeVisible(){let a=this._applyVisibilitySetting();this._shouldBeVisible!==a&&(this._shouldBeVisible=a,this.ensureVisibility())}setIsNeeded(a){this._isNeeded!==a&&(this._isNeeded=a,this.ensureVisibility())}setDomNode(a){this._domNode=a,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){this._isNeeded?this._shouldBeVisible?this._reveal():this._hide(!0):this._hide(!1)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet(()=>{this._domNode?.setClassName(this._visibleClassName)},0))}_hide(a){this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,this._domNode?.setClassName(this._invisibleClassName+(a?" fade":"")))}},ca=class extends b2{constructor(a){super(),this._lazyRender=a.lazyRender,this._host=a.host,this._scrollable=a.scrollable,this._scrollByPage=a.scrollByPage,this._scrollbarState=a.scrollbarState,this._visibilityController=this._register(new b9(a.visibility,"visible scrollbar "+a.extraScrollbarClassName,"invisible scrollbar "+a.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._pointerMoveMonitor=this._register(new b0),this._shouldRender=!0,this.domNode=b_(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(bT(this.domNode.domNode,bY.POINTER_DOWN,a=>this._domNodePointerDown(a)))}_createArrow(a){let b=this._register(new b3(a));this.domNode.domNode.appendChild(b.bgDomNode),this.domNode.domNode.appendChild(b.domNode)}_createSlider(a,b,c,d){this.slider=b_(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(a),this.slider.setLeft(b),"number"==typeof c&&this.slider.setWidth(c),"number"==typeof d&&this.slider.setHeight(d),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this._register(bT(this.slider.domNode,bY.POINTER_DOWN,a=>{0===a.button&&(a.preventDefault(),this._sliderPointerDown(a))})),this.onclick(this.slider.domNode,a=>{a.leftButton&&a.stopPropagation()})}_onElementSize(a){return this._scrollbarState.setVisibleSize(a)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(a){return this._scrollbarState.setScrollSize(a)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(a){return this._scrollbarState.setScrollPosition(a)&&(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(a){a.target===this.domNode.domNode&&this._onPointerDown(a)}delegatePointerDown(a){let b=this.domNode.domNode.getClientRects()[0].top,c=b+this._scrollbarState.getSliderPosition(),d=b+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),e=this._sliderPointerPosition(a);c<=e&&e<=d?0===a.button&&(a.preventDefault(),this._sliderPointerDown(a)):this._onPointerDown(a)}_onPointerDown(a){let b,c;if(a.target===this.domNode.domNode&&"number"==typeof a.offsetX&&"number"==typeof a.offsetY)b=a.offsetX,c=a.offsetY;else{var d;let e,f,g=(e=(d=this.domNode.domNode).getBoundingClientRect(),f=bI(d),{left:e.left+f.scrollX,top:e.top+f.scrollY,width:e.width,height:e.height});b=a.pageX-g.left,c=a.pageY-g.top}let e=this._pointerDownRelativePosition(b,c);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(e):this._scrollbarState.getDesiredScrollPositionFromOffset(e)),0===a.button&&(a.preventDefault(),this._sliderPointerDown(a))}_sliderPointerDown(a){if(!a.target||!(a.target instanceof Element))return;let b=this._sliderPointerPosition(a),c=this._sliderOrthogonalPointerPosition(a),d=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._pointerMoveMonitor.startMonitoring(a.target,a.pointerId,a.buttons,a=>{let e=Math.abs(this._sliderOrthogonalPointerPosition(a)-c);if(a7&&e>140)return void this._setDesiredScrollPositionNow(d.getScrollPosition());let f=this._sliderPointerPosition(a)-b;this._setDesiredScrollPositionNow(d.getDesiredScrollPositionFromDelta(f))},()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd()}),this._host.onDragStart()}_setDesiredScrollPositionNow(a){let b={};this.writeScrollPosition(b,a),this._scrollable.setScrollPositionNow(b)}updateScrollbarSize(a){this._updateScrollbarSize(a),this._scrollbarState.setScrollbarSize(a),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}},cb=class a{constructor(a,b,c,d,e,f){this._scrollbarSize=Math.round(b),this._oppositeScrollbarSize=Math.round(c),this._arrowSize=Math.round(a),this._visibleSize=d,this._scrollSize=e,this._scrollPosition=f,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new a(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(a){let b=Math.round(a);return this._visibleSize!==b&&(this._visibleSize=b,this._refreshComputedValues(),!0)}setScrollSize(a){let b=Math.round(a);return this._scrollSize!==b&&(this._scrollSize=b,this._refreshComputedValues(),!0)}setScrollPosition(a){let b=Math.round(a);return this._scrollPosition!==b&&(this._scrollPosition=b,this._refreshComputedValues(),!0)}setScrollbarSize(a){this._scrollbarSize=Math.round(a)}setOppositeScrollbarSize(a){this._oppositeScrollbarSize=Math.round(a)}static _computeValues(a,b,c,d,e){let f=Math.max(0,c-a),g=Math.max(0,f-2*b),h=d>0&&d>c;if(!h)return{computedAvailableSize:Math.round(f),computedIsNeeded:h,computedSliderSize:Math.round(g),computedSliderRatio:0,computedSliderPosition:0};let i=Math.round(Math.max(20,Math.floor(c*g/d))),j=(g-i)/(d-c);return{computedAvailableSize:Math.round(f),computedIsNeeded:h,computedSliderSize:Math.round(i),computedSliderRatio:j,computedSliderPosition:Math.round(e*j)}}_refreshComputedValues(){let b=a._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=b.computedAvailableSize,this._computedIsNeeded=b.computedIsNeeded,this._computedSliderSize=b.computedSliderSize,this._computedSliderRatio=b.computedSliderRatio,this._computedSliderPosition=b.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(a){return this._computedIsNeeded?Math.round((a-this._arrowSize-this._computedSliderSize/2)/this._computedSliderRatio):0}getDesiredScrollPositionFromOffsetPaged(a){if(!this._computedIsNeeded)return 0;let b=a-this._arrowSize,c=this._scrollPosition;return b<this._computedSliderPosition?c-=this._visibleSize:c+=this._visibleSize,c}getDesiredScrollPositionFromDelta(a){return this._computedIsNeeded?Math.round((this._computedSliderPosition+a)/this._computedSliderRatio):0}},cc=class extends ca{constructor(a,b,c){let d=a.getScrollDimensions(),e=a.getCurrentScrollPosition();if(super({lazyRender:b.lazyRender,host:c,scrollbarState:new cb(b.horizontalHasArrows?b.arrowSize:0,2===b.horizontal?0:b.horizontalScrollbarSize,2===b.vertical?0:b.verticalScrollbarSize,d.width,d.scrollWidth,e.scrollLeft),visibility:b.horizontal,extraScrollbarClassName:"horizontal",scrollable:a,scrollByPage:b.scrollByPage}),b.horizontalHasArrows)throw Error("horizontalHasArrows is not supported in xterm.js");this._createSlider(Math.floor((b.horizontalScrollbarSize-b.horizontalSliderSize)/2),0,void 0,b.horizontalSliderSize)}_updateSlider(a,b){this.slider.setWidth(a),this.slider.setLeft(b)}_renderDomNode(a,b){this.domNode.setWidth(a),this.domNode.setHeight(b),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(a){return this._shouldRender=this._onElementScrollSize(a.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(a.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(a.width)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(a,b){return a}_sliderPointerPosition(a){return a.pageX}_sliderOrthogonalPointerPosition(a){return a.pageY}_updateScrollbarSize(a){this.slider.setHeight(a)}writeScrollPosition(a,b){a.scrollLeft=b}updateOptions(a){this.updateScrollbarSize(2===a.horizontal?0:a.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(2===a.vertical?0:a.verticalScrollbarSize),this._visibilityController.setVisibility(a.horizontal),this._scrollByPage=a.scrollByPage}},cd=class extends ca{constructor(a,b,c){let d=a.getScrollDimensions(),e=a.getCurrentScrollPosition();if(super({lazyRender:b.lazyRender,host:c,scrollbarState:new cb(b.verticalHasArrows?b.arrowSize:0,2===b.vertical?0:b.verticalScrollbarSize,0,d.height,d.scrollHeight,e.scrollTop),visibility:b.vertical,extraScrollbarClassName:"vertical",scrollable:a,scrollByPage:b.scrollByPage}),b.verticalHasArrows)throw Error("horizontalHasArrows is not supported in xterm.js");this._createSlider(0,Math.floor((b.verticalScrollbarSize-b.verticalSliderSize)/2),b.verticalSliderSize,void 0)}_updateSlider(a,b){this.slider.setHeight(a),this.slider.setTop(b)}_renderDomNode(a,b){this.domNode.setWidth(b),this.domNode.setHeight(a),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(a){return this._shouldRender=this._onElementScrollSize(a.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(a.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(a.height)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(a,b){return b}_sliderPointerPosition(a){return a.pageY}_sliderOrthogonalPointerPosition(a){return a.pageX}_updateScrollbarSize(a){this.slider.setWidth(a)}writeScrollPosition(a,b){a.scrollTop=b}updateOptions(a){this.updateScrollbarSize(2===a.vertical?0:a.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(a.vertical),this._scrollByPage=a.scrollByPage}},ce=class{constructor(a,b,c){this.timestamp=a,this.deltaX=b,this.deltaY=c,this.score=0}},cf=class{constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(-1===this._front&&-1===this._rear)return!1;let a=1,b=0,c=1,d=this._rear;for(;;){let e=d===this._front?a:Math.pow(2,-c);if(a-=e,b+=this._memory[d].score*e,d===this._front)break;d=(this._capacity+d-1)%this._capacity,c++}return b<=.5}acceptStandardWheelEvent(a){if(aV){var b;let c=(b=bI(a.browserEvent),aR.INSTANCE.getZoomFactor(b));this.accept(Date.now(),a.deltaX*c,a.deltaY*c)}else this.accept(Date.now(),a.deltaX,a.deltaY)}accept(a,b,c){let d=null,e=new ce(a,b,c);-1===this._front&&-1===this._rear?(this._memory[0]=e,this._front=0,this._rear=0):(d=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]=e),e.score=this._computeScore(e,d)}_computeScore(a,b){if(Math.abs(a.deltaX)>0&&Math.abs(a.deltaY)>0)return 1;let c=.5;if(this._isAlmostInt(a.deltaX)&&this._isAlmostInt(a.deltaY)||(c+=.25),b){let d=Math.abs(a.deltaX),e=Math.abs(a.deltaY),f=Math.abs(b.deltaX),g=Math.abs(b.deltaY),h=Math.max(Math.min(d,f),1),i=Math.max(Math.min(e,g),1),j=Math.max(e,g);Math.max(d,f)%h==0&&j%i==0&&(c-=.5)}return Math.min(Math.max(c,0),1)}_isAlmostInt(a){return .01>Math.abs(Math.round(a)-a)}};cf.INSTANCE=new cf;var cg=class extends b2{constructor(a,b,c){super(),this._onScroll=this._register(new aP),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new aP),this.onWillScroll=this._onWillScroll.event,this._options=function(a){let b={lazyRender:"u">typeof a.lazyRender&&a.lazyRender,className:"u">typeof a.className?a.className:"",useShadows:!("u">typeof a.useShadows)||a.useShadows,handleMouseWheel:!("u">typeof a.handleMouseWheel)||a.handleMouseWheel,flipAxes:"u">typeof a.flipAxes&&a.flipAxes,consumeMouseWheelIfScrollbarIsNeeded:"u">typeof a.consumeMouseWheelIfScrollbarIsNeeded&&a.consumeMouseWheelIfScrollbarIsNeeded,alwaysConsumeMouseWheel:"u">typeof a.alwaysConsumeMouseWheel&&a.alwaysConsumeMouseWheel,scrollYToX:"u">typeof a.scrollYToX&&a.scrollYToX,mouseWheelScrollSensitivity:"u">typeof a.mouseWheelScrollSensitivity?a.mouseWheelScrollSensitivity:1,fastScrollSensitivity:"u">typeof a.fastScrollSensitivity?a.fastScrollSensitivity:5,scrollPredominantAxis:!("u">typeof a.scrollPredominantAxis)||a.scrollPredominantAxis,mouseWheelSmoothScroll:!("u">typeof a.mouseWheelSmoothScroll)||a.mouseWheelSmoothScroll,arrowSize:"u">typeof a.arrowSize?a.arrowSize:11,listenOnDomNode:"u">typeof a.listenOnDomNode?a.listenOnDomNode:null,horizontal:"u">typeof a.horizontal?a.horizontal:1,horizontalScrollbarSize:"u">typeof a.horizontalScrollbarSize?a.horizontalScrollbarSize:10,horizontalSliderSize:"u">typeof a.horizontalSliderSize?a.horizontalSliderSize:0,horizontalHasArrows:"u">typeof a.horizontalHasArrows&&a.horizontalHasArrows,vertical:"u">typeof a.vertical?a.vertical:1,verticalScrollbarSize:"u">typeof a.verticalScrollbarSize?a.verticalScrollbarSize:10,verticalHasArrows:"u">typeof a.verticalHasArrows&&a.verticalHasArrows,verticalSliderSize:"u">typeof a.verticalSliderSize?a.verticalSliderSize:0,scrollByPage:"u">typeof a.scrollByPage&&a.scrollByPage};return b.horizontalSliderSize="u">typeof a.horizontalSliderSize?a.horizontalSliderSize:b.horizontalScrollbarSize,b.verticalSliderSize="u">typeof a.verticalSliderSize?a.verticalSliderSize:b.verticalScrollbarSize,a8&&(b.className+=" mac"),b}(b),this._scrollable=c,this._register(this._scrollable.onScroll(a=>{this._onWillScroll.fire(a),this._onDidScroll(a),this._onScroll.fire(a)}));let d={onMouseWheel:a=>this._onMouseWheel(a),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new cd(this._scrollable,this._options,d)),this._horizontalScrollbar=this._register(new cc(this._scrollable,this._options,d)),this._domNode=document.createElement("div"),this._domNode.className="xterm-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.appendChild(a),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=b_(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=b_(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=b_(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,a=>this._onMouseOver(a)),this.onmouseleave(this._listenOnDomNode,a=>this._onMouseLeave(a)),this._hideTimeout=this._register(new bC),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}get options(){return this._options}dispose(){this._mouseWheelToDispose=as(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarPointerDown(a){this._verticalScrollbar.delegatePointerDown(a)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(a){this._scrollable.setScrollDimensions(a,!1)}updateClassName(a){this._options.className=a,a8&&(this._options.className+=" mac"),this._domNode.className="xterm-scrollable-element "+this._options.className}updateOptions(a){"u">typeof a.handleMouseWheel&&(this._options.handleMouseWheel=a.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),"u">typeof a.mouseWheelScrollSensitivity&&(this._options.mouseWheelScrollSensitivity=a.mouseWheelScrollSensitivity),"u">typeof a.fastScrollSensitivity&&(this._options.fastScrollSensitivity=a.fastScrollSensitivity),"u">typeof a.scrollPredominantAxis&&(this._options.scrollPredominantAxis=a.scrollPredominantAxis),"u">typeof a.horizontal&&(this._options.horizontal=a.horizontal),"u">typeof a.vertical&&(this._options.vertical=a.vertical),"u">typeof a.horizontalScrollbarSize&&(this._options.horizontalScrollbarSize=a.horizontalScrollbarSize),"u">typeof a.verticalScrollbarSize&&(this._options.verticalScrollbarSize=a.verticalScrollbarSize),"u">typeof a.scrollByPage&&(this._options.scrollByPage=a.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}setRevealOnScroll(a){this._revealOnScroll=a}delegateScrollFromMouseWheelEvent(a){this._onMouseWheel(new bz(a))}_setListeningToMouseWheel(a){if(this._mouseWheelToDispose.length>0!==a&&(this._mouseWheelToDispose=as(this._mouseWheelToDispose),a)){let a=a=>{this._onMouseWheel(new bz(a))};this._mouseWheelToDispose.push(bT(this._listenOnDomNode,bY.MOUSE_WHEEL,a,{passive:!1}))}}_onMouseWheel(a){if(a.browserEvent?.defaultPrevented)return;let b=cf.INSTANCE;b.acceptStandardWheelEvent(a);let c=!1;if(a.deltaY||a.deltaX){let d=a.deltaY*this._options.mouseWheelScrollSensitivity,e=a.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(this._options.scrollYToX&&e+d===0?e=d=0:Math.abs(d)>=Math.abs(e)?e=0:d=0),this._options.flipAxes&&([d,e]=[e,d]);let f=!a8&&a.browserEvent&&a.browserEvent.shiftKey;(this._options.scrollYToX||f)&&!e&&(e=d,d=0),a.browserEvent&&a.browserEvent.altKey&&(e*=this._options.fastScrollSensitivity,d*=this._options.fastScrollSensitivity);let g=this._scrollable.getFutureScrollPosition(),h={};if(d){let a=50*d,b=g.scrollTop-(a<0?Math.floor(a):Math.ceil(a));this._verticalScrollbar.writeScrollPosition(h,b)}if(e){let a=50*e,b=g.scrollLeft-(a<0?Math.floor(a):Math.ceil(a));this._horizontalScrollbar.writeScrollPosition(h,b)}h=this._scrollable.validateScrollPosition(h),(g.scrollLeft!==h.scrollLeft||g.scrollTop!==h.scrollTop)&&(this._options.mouseWheelSmoothScroll&&b.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(h):this._scrollable.setScrollPositionNow(h),c=!0)}let d=c;!d&&this._options.alwaysConsumeMouseWheel&&(d=!0),!d&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(d=!0),d&&(a.preventDefault(),a.stopPropagation())}_onDidScroll(a){this._shouldRender=this._horizontalScrollbar.onDidScroll(a)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(a)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw 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 a=this._scrollable.getCurrentScrollPosition(),b=a.scrollTop>0,c=a.scrollLeft>0,d=c?" left":"",e=b?" top":"";this._leftShadowDomNode.setClassName(`shadow${d}`),this._topShadowDomNode.setClassName(`shadow${e}`),this._topLeftShadowDomNode.setClassName(`shadow${c||b?" top-left-corner":""}${e}${d}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseLeave(a){this._mouseIsOver=!1,this._hide()}_onMouseOver(a){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(),500)}},ch=class extends cg{constructor(a,b,c){super(a,b,c)}setScrollPosition(a){a.reuseAnimation?this._scrollable.setScrollPositionSmooth(a,a.reuseAnimation):this._scrollable.setScrollPositionNow(a)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}},ci=class extends aw{constructor(a,b,c,d,e,f,g,h){super(),this._bufferService=c,this._optionsService=g,this._renderService=h,this._onRequestScrollLines=this._register(new aP),this.onRequestScrollLines=this._onRequestScrollLines.event,this._isSyncing=!1,this._isHandlingScroll=!1,this._suppressOnScrollHandler=!1;let i=this._register(new b5({forceIntegerValues:!1,smoothScrollDuration:this._optionsService.rawOptions.smoothScrollDuration,scheduleAtNextAnimationFrame:a=>ct(d.window,a)}));this._register(this._optionsService.onSpecificOptionChange("smoothScrollDuration",()=>{i.setSmoothScrollDuration(this._optionsService.rawOptions.smoothScrollDuration)})),this._scrollableElement=this._register(new ch(b,{vertical:1,horizontal:2,useShadows:!1,mouseWheelSmoothScroll:!0,...this._getChangeOptions()},i)),this._register(this._optionsService.onMultipleOptionChange(["scrollSensitivity","fastScrollSensitivity","overviewRuler"],()=>this._scrollableElement.updateOptions(this._getChangeOptions()))),this._register(e.onProtocolChange(a=>{this._scrollableElement.updateOptions({handleMouseWheel:!(16&a)})})),this._scrollableElement.setScrollDimensions({height:0,scrollHeight:0}),this._register(aI.runAndSubscribe(f.onChangeColors,()=>{this._scrollableElement.getDomNode().style.backgroundColor=f.colors.background.css})),a.appendChild(this._scrollableElement.getDomNode()),this._register(at(()=>this._scrollableElement.getDomNode().remove())),this._styleElement=d.mainDocument.createElement("style"),b.appendChild(this._styleElement),this._register(at(()=>this._styleElement.remove())),this._register(aI.runAndSubscribe(f.onChangeColors,()=>{this._styleElement.textContent=[".xterm .xterm-scrollable-element > .scrollbar > .slider {",` background: ${f.colors.scrollbarSliderBackground.css};`,"}",".xterm .xterm-scrollable-element > .scrollbar > .slider:hover {",` background: ${f.colors.scrollbarSliderHoverBackground.css};`,"}",".xterm .xterm-scrollable-element > .scrollbar > .slider.active {",` background: ${f.colors.scrollbarSliderActiveBackground.css};`,"}"].join(`
|
|
12
|
+
`)})),this._register(this._bufferService.onResize(()=>this.queueSync())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._latestYDisp=void 0,this.queueSync()})),this._register(this._bufferService.onScroll(()=>this._sync())),this._register(this._scrollableElement.onScroll(a=>this._handleScroll(a)))}scrollLines(a){let b=this._scrollableElement.getScrollPosition();this._scrollableElement.setScrollPosition({reuseAnimation:!0,scrollTop:b.scrollTop+a*this._renderService.dimensions.css.cell.height})}scrollToLine(a,b){b&&(this._latestYDisp=a),this._scrollableElement.setScrollPosition({reuseAnimation:!b,scrollTop:a*this._renderService.dimensions.css.cell.height})}_getChangeOptions(){return{mouseWheelScrollSensitivity:this._optionsService.rawOptions.scrollSensitivity,fastScrollSensitivity:this._optionsService.rawOptions.fastScrollSensitivity,verticalScrollbarSize:this._optionsService.rawOptions.overviewRuler?.width||14}}queueSync(a){void 0!==a&&(this._latestYDisp=a),void 0===this._queuedAnimationFrame&&(this._queuedAnimationFrame=this._renderService.addRefreshCallback(()=>{this._queuedAnimationFrame=void 0,this._sync(this._latestYDisp)}))}_sync(a=this._bufferService.buffer.ydisp){!this._renderService||this._isSyncing||(this._isSyncing=!0,this._suppressOnScrollHandler=!0,this._scrollableElement.setScrollDimensions({height:this._renderService.dimensions.css.canvas.height,scrollHeight:this._renderService.dimensions.css.cell.height*this._bufferService.buffer.lines.length}),this._suppressOnScrollHandler=!1,a!==this._latestYDisp&&this._scrollableElement.setScrollPosition({scrollTop:a*this._renderService.dimensions.css.cell.height}),this._isSyncing=!1)}_handleScroll(a){if(!this._renderService||this._isHandlingScroll||this._suppressOnScrollHandler)return;this._isHandlingScroll=!0;let b=Math.round(a.scrollTop/this._renderService.dimensions.css.cell.height),c=b-this._bufferService.buffer.ydisp;0!==c&&(this._latestYDisp=b,this._onRequestScrollLines.fire(c)),this._isHandlingScroll=!1}};ci=x([y(2,P),y(3,_),y(4,Q),y(5,ae),y(6,V),y(7,ab)],ci);var cj=class extends aw{constructor(a,b,c,d,e){super(),this._screenElement=a,this._bufferService=b,this._coreBrowserService=c,this._decorationService=d,this._renderService=e,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this._register(this._renderService.onRenderedViewportChange(()=>this._doRefreshDecorations())),this._register(this._renderService.onDimensionsChange(()=>{this._dimensionsChanged=!0,this._queueRefresh()})),this._register(this._coreBrowserService.onDprChange(()=>this._queueRefresh())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt})),this._register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh())),this._register(this._decorationService.onDecorationRemoved(a=>this._removeDecoration(a))),this._register(at(()=>{this._container.remove(),this._decorationElements.clear()}))}_queueRefresh(){void 0===this._animationFrame&&(this._animationFrame=this._renderService.addRefreshCallback(()=>{this._doRefreshDecorations(),this._animationFrame=void 0}))}_doRefreshDecorations(){for(let a of this._decorationService.decorations)this._renderDecoration(a);this._dimensionsChanged=!1}_renderDecoration(a){this._refreshStyle(a),this._dimensionsChanged&&this._refreshXPosition(a)}_createElement(a){let b=this._coreBrowserService.mainDocument.createElement("div");b.classList.add("xterm-decoration"),b.classList.toggle("xterm-decoration-top-layer",a?.options?.layer==="top"),b.style.width=`${Math.round((a.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,b.style.height=`${(a.options.height||1)*this._renderService.dimensions.css.cell.height}px`,b.style.top=`${(a.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height}px`,b.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;let c=a.options.x??0;return c&&c>this._bufferService.cols&&(b.style.display="none"),this._refreshXPosition(a,b),b}_refreshStyle(a){let b=a.marker.line-this._bufferService.buffers.active.ydisp;if(b<0||b>=this._bufferService.rows)a.element&&(a.element.style.display="none",a.onRenderEmitter.fire(a.element));else{let c=this._decorationElements.get(a);c||(c=this._createElement(a),a.element=c,this._decorationElements.set(a,c),this._container.appendChild(c),a.onDispose(()=>{this._decorationElements.delete(a),c.remove()})),c.style.display=this._altBufferIsActive?"none":"block",this._altBufferIsActive||(c.style.width=`${Math.round((a.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,c.style.height=`${(a.options.height||1)*this._renderService.dimensions.css.cell.height}px`,c.style.top=`${b*this._renderService.dimensions.css.cell.height}px`,c.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`),a.onRenderEmitter.fire(c)}}_refreshXPosition(a,b=a.element){if(!b)return;let c=a.options.x??0;"right"===(a.options.anchor||"left")?b.style.right=c?`${c*this._renderService.dimensions.css.cell.width}px`:"":b.style.left=c?`${c*this._renderService.dimensions.css.cell.width}px`:""}_removeDecoration(a){this._decorationElements.get(a)?.remove(),this._decorationElements.delete(a),a.dispose()}};cj=x([y(1,P),y(2,_),y(3,Y),y(4,ab)],cj);var ck=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(a){if(a.options.overviewRulerOptions){for(let b of this._zones)if(b.color===a.options.overviewRulerOptions.color&&b.position===a.options.overviewRulerOptions.position){if(this._lineIntersectsZone(b,a.marker.line))return;if(this._lineAdjacentToZone(b,a.marker.line,a.options.overviewRulerOptions.position))return void this._addLineToZone(b,a.marker.line)}if(this._zonePoolIndex<this._zonePool.length){this._zonePool[this._zonePoolIndex].color=a.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=a.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=a.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=a.marker.line,this._zones.push(this._zonePool[this._zonePoolIndex++]);return}this._zones.push({color:a.options.overviewRulerOptions.color,position:a.options.overviewRulerOptions.position,startBufferLine:a.marker.line,endBufferLine:a.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(a){this._linePadding=a}_lineIntersectsZone(a,b){return b>=a.startBufferLine&&b<=a.endBufferLine}_lineAdjacentToZone(a,b,c){return b>=a.startBufferLine-this._linePadding[c||"full"]&&b<=a.endBufferLine+this._linePadding[c||"full"]}_addLineToZone(a,b){a.startBufferLine=Math.min(a.startBufferLine,b),a.endBufferLine=Math.max(a.endBufferLine,b)}},cl={full:0,left:0,center:0,right:0},cm={full:0,left:0,center:0,right:0},cn={full:0,left:0,center:0,right:0},co=class extends aw{constructor(a,b,c,d,e,f,g,h){super(),this._viewportElement=a,this._screenElement=b,this._bufferService=c,this._decorationService=d,this._renderService=e,this._optionsService=f,this._themeService=g,this._coreBrowserService=h,this._colorZoneStore=new ck,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),this._viewportElement.parentElement?.insertBefore(this._canvas,this._viewportElement),this._register(at(()=>this._canvas?.remove()));let i=this._canvas.getContext("2d");if(i)this._ctx=i;else throw Error("Ctx cannot be null");this._register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh(void 0,!0))),this._register(this._decorationService.onDecorationRemoved(()=>this._queueRefresh(void 0,!0))),this._register(this._renderService.onRenderedViewportChange(()=>this._queueRefresh())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"})),this._register(this._bufferService.onScroll(()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())})),this._register(this._renderService.onRender(()=>{this._containerHeight&&this._containerHeight===this._screenElement.clientHeight||(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)})),this._register(this._coreBrowserService.onDprChange(()=>this._queueRefresh(!0))),this._register(this._optionsService.onSpecificOptionChange("overviewRuler",()=>this._queueRefresh(!0))),this._register(this._themeService.onChangeColors(()=>this._queueRefresh())),this._queueRefresh(!0)}get _width(){return this._optionsService.options.overviewRuler?.width||0}_refreshDrawConstants(){let a=Math.floor((this._canvas.width-1)/3),b=Math.ceil((this._canvas.width-1)/3);cm.full=this._canvas.width,cm.left=a,cm.center=b,cm.right=a,this._refreshDrawHeightConstants(),cn.full=1,cn.left=1,cn.center=1+cm.left,cn.right=1+cm.left+cm.center}_refreshDrawHeightConstants(){cl.full=Math.round(2*this._coreBrowserService.dpr);let a=Math.round(Math.max(Math.min(this._canvas.height/this._bufferService.buffer.lines.length,12),6)*this._coreBrowserService.dpr);cl.left=a,cl.center=a,cl.right=a}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*cl.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*cl.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*cl.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*cl.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){for(let a of(this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear(),this._decorationService.decorations))this._colorZoneStore.addDecoration(a);this._ctx.lineWidth=1,this._renderRulerOutline();let a=this._colorZoneStore.zones;for(let b of a)"full"!==b.position&&this._renderColorZone(b);for(let b of a)"full"===b.position&&this._renderColorZone(b);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderRulerOutline(){this._ctx.fillStyle=this._themeService.colors.overviewRulerBorder.css,this._ctx.fillRect(0,0,1,this._canvas.height),this._optionsService.rawOptions.overviewRuler.showTopBorder&&this._ctx.fillRect(1,0,this._canvas.width-1,1),this._optionsService.rawOptions.overviewRuler.showBottomBorder&&this._ctx.fillRect(1,this._canvas.height-1,this._canvas.width-1,this._canvas.height)}_renderColorZone(a){this._ctx.fillStyle=a.color,this._ctx.fillRect(cn[a.position||"full"],Math.round((this._canvas.height-1)*(a.startBufferLine/this._bufferService.buffers.active.lines.length)-cl[a.position||"full"]/2),cm[a.position||"full"],Math.round((this._canvas.height-1)*((a.endBufferLine-a.startBufferLine)/this._bufferService.buffers.active.lines.length)+cl[a.position||"full"]))}_queueRefresh(a,b){this._shouldUpdateDimensions=a||this._shouldUpdateDimensions,this._shouldUpdateAnchor=b||this._shouldUpdateAnchor,void 0===this._animationFrame&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._refreshDecorations(),this._animationFrame=void 0}))}};co=x([y(2,P),y(3,Y),y(4,ab),y(5,V),y(6,ae),y(7,_)],co),(n=cv||={}).NUL="\0",n.SOH="\x01",n.STX="\x02",n.ETX="\x03",n.EOT="\x04",n.ENQ="\x05",n.ACK="\x06",n.BEL="\x07",n.BS="\b",n.HT=" ",n.LF=`
|
|
13
|
+
`,n.VT="\v",n.FF="\f",n.CR="\r",n.SO="\x0e",n.SI="\x0f",n.DLE="\x10",n.DC1="\x11",n.DC2="\x12",n.DC3="\x13",n.DC4="\x14",n.NAK="\x15",n.SYN="\x16",n.ETB="\x17",n.CAN="\x18",n.EM="\x19",n.SUB="\x1a",n.ESC="\x1b",n.FS="\x1c",n.GS="\x1d",n.RS="\x1e",n.US="\x1f",n.SP=" ",n.DEL="",(o=cw||={}).PAD="\x80",o.HOP="\x81",o.BPH="\x82",o.NBH="\x83",o.IND="\x84",o.NEL="\x85",o.SSA="\x86",o.ESA="\x87",o.HTS="\x88",o.HTJ="\x89",o.VTS="\x8a",o.PLD="\x8b",o.PLU="\x8c",o.RI="\x8d",o.SS2="\x8e",o.SS3="\x8f",o.DCS="\x90",o.PU1="\x91",o.PU2="\x92",o.STS="\x93",o.CCH="\x94",o.MW="\x95",o.SPA="\x96",o.EPA="\x97",o.SOS="\x98",o.SGCI="\x99",o.SCI="\x9a",o.CSI="\x9b",o.ST="\x9c",o.OSC="\x9d",o.PM="\x9e",o.APC="\x9f",(cx||={}).ST=`${cv.ESC}\\`;var cp=class{constructor(a,b,c,d,e,f){this._textarea=a,this._compositionView=b,this._bufferService=c,this._optionsService=d,this._coreService=e,this._renderService=f,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}get isComposing(){return this._isComposing}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(a){this._compositionView.textContent=a.data,this.updateCompositionElements(),setTimeout(()=>{this._compositionPosition.end=this._textarea.value.length},0)}compositionend(){this._finalizeComposition(!0)}keydown(a){if(this._isComposing||this._isSendingComposition){if(20===a.keyCode||229===a.keyCode||16===a.keyCode||17===a.keyCode||18===a.keyCode)return!1;this._finalizeComposition(!1)}return 229!==a.keyCode||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(a){if(this._compositionView.classList.remove("active"),this._isComposing=!1,a){let a={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(()=>{if(this._isSendingComposition){let b;this._isSendingComposition=!1,a.start+=this._dataAlreadySent.length,(b=this._isComposing?this._textarea.value.substring(a.start,this._compositionPosition.start):this._textarea.value.substring(a.start)).length>0&&this._coreService.triggerDataEvent(b,!0)}},0)}else{this._isSendingComposition=!1;let a=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(a,!0)}}_handleAnyTextareaChanges(){let a=this._textarea.value;setTimeout(()=>{if(!this._isComposing){let b=this._textarea.value,c=b.replace(a,"");this._dataAlreadySent=c,b.length>a.length?this._coreService.triggerDataEvent(c,!0):b.length<a.length?this._coreService.triggerDataEvent(`${cv.DEL}`,!0):b.length===a.length&&b!==a&&this._coreService.triggerDataEvent(b,!0)}},0)}updateCompositionElements(a){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){let a=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),b=this._renderService.dimensions.css.cell.height,c=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,d=a*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=d+"px",this._compositionView.style.top=c+"px",this._compositionView.style.height=b+"px",this._compositionView.style.lineHeight=b+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";let e=this._compositionView.getBoundingClientRect();this._textarea.style.left=d+"px",this._textarea.style.top=c+"px",this._textarea.style.width=Math.max(e.width,1)+"px",this._textarea.style.height=Math.max(e.height,1)+"px",this._textarea.style.lineHeight=e.height+"px"}a||setTimeout(()=>this.updateCompositionElements(!0),0)}}};cp=x([y(2,P),y(3,V),y(4,R),y(5,ab)],cp);var cq,cr,cs,ct,cu,cv,cw,cx,cy,cz=0,cA=0,cB=0,cC=0,cD={css:"#00000000",rgba:0};(ef=cy||={}).toCss=function(a,b,c,d){return void 0!==d?`#${cL(a)}${cL(b)}${cL(c)}${cL(d)}`:`#${cL(a)}${cL(b)}${cL(c)}`},ef.toRgba=function(a,b,c,d=255){return(a<<24|b<<16|c<<8|d)>>>0},ef.toColor=function(a,b,c,d){return{css:ef.toCss(a,b,c,d),rgba:ef.toRgba(a,b,c,d)}};var cE=eg||={};function cF(a,b){return cC=Math.round(255*b),[cz,cA,cB]=ej.toChannels(a.rgba),{css:cy.toCss(cz,cA,cB,cC),rgba:cy.toRgba(cz,cA,cB,cC)}}cE.blend=function(a,b){if(1==(cC=(255&b.rgba)/255))return{css:b.css,rgba:b.rgba};let c=b.rgba>>24&255,d=b.rgba>>16&255,e=b.rgba>>8&255,f=a.rgba>>24&255,g=a.rgba>>16&255,h=a.rgba>>8&255;return cz=f+Math.round((c-f)*cC),cA=g+Math.round((d-g)*cC),cB=h+Math.round((e-h)*cC),{css:cy.toCss(cz,cA,cB),rgba:cy.toRgba(cz,cA,cB)}},cE.isOpaque=function(a){return(255&a.rgba)==255},cE.ensureContrastRatio=function(a,b,c){let d=ej.ensureContrastRatio(a.rgba,b.rgba,c);if(d)return cy.toColor(d>>24&255,d>>16&255,d>>8&255)},cE.opaque=function(a){let b=(255|a.rgba)>>>0;return[cz,cA,cB]=ej.toChannels(b),{css:cy.toCss(cz,cA,cB),rgba:b}},cE.opacity=cF,cE.multiplyOpacity=function(a,b){return cC=255&a.rgba,cF(a,cC*b/255)},cE.toColorRGB=function(a){return[a.rgba>>24&255,a.rgba>>16&255,a.rgba>>8&255]},(a=>{let b,c;try{let a=document.createElement("canvas");a.width=1,a.height=1;let d=a.getContext("2d",{willReadFrequently:!0});d&&((b=d).globalCompositeOperation="copy",c=b.createLinearGradient(0,0,1,1))}catch{}a.toColor=function(a){if(a.match(/#[\da-f]{3,8}/i))switch(a.length){case 4:return cz=parseInt(a.slice(1,2).repeat(2),16),cA=parseInt(a.slice(2,3).repeat(2),16),cB=parseInt(a.slice(3,4).repeat(2),16),cy.toColor(cz,cA,cB);case 5:return cz=parseInt(a.slice(1,2).repeat(2),16),cA=parseInt(a.slice(2,3).repeat(2),16),cB=parseInt(a.slice(3,4).repeat(2),16),cC=parseInt(a.slice(4,5).repeat(2),16),cy.toColor(cz,cA,cB,cC);case 7:return{css:a,rgba:(parseInt(a.slice(1),16)<<8|255)>>>0};case 9:return{css:a,rgba:parseInt(a.slice(1),16)>>>0}}let d=a.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(d)return cz=parseInt(d[1]),cA=parseInt(d[2]),cB=parseInt(d[3]),cC=Math.round((void 0===d[5]?1:parseFloat(d[5]))*255),cy.toColor(cz,cA,cB,cC);if(!b||!c||(b.fillStyle=c,b.fillStyle=a,"string"!=typeof b.fillStyle)||(b.fillRect(0,0,1,1),[cz,cA,cB,cC]=b.getImageData(0,0,1,1).data,255!==cC))throw Error("css.toColor: Unsupported css format");return{rgba:cy.toRgba(cz,cA,cB,cC),css:a}}})(eh||={});var cG=ei||={};function cH(a,b,c){let d=a/255,e=b/255,f=c/255;return .2126*(d<=.03928?d/12.92:Math.pow((d+.055)/1.055,2.4))+.7152*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.0722*(f<=.03928?f/12.92:Math.pow((f+.055)/1.055,2.4))}cG.relativeLuminance=function(a){return cH(a>>16&255,a>>8&255,255&a)},cG.relativeLuminance2=cH;var cI=ej||={};function cJ(a,b,c){let d=a>>24&255,e=a>>16&255,f=a>>8&255,g=b>>24&255,h=b>>16&255,i=b>>8&255,j=cM(ei.relativeLuminance2(g,h,i),ei.relativeLuminance2(d,e,f));for(;j<c&&(g>0||h>0||i>0);)g-=Math.max(0,Math.ceil(.1*g)),h-=Math.max(0,Math.ceil(.1*h)),i-=Math.max(0,Math.ceil(.1*i)),j=cM(ei.relativeLuminance2(g,h,i),ei.relativeLuminance2(d,e,f));return(g<<24|h<<16|i<<8|255)>>>0}function cK(a,b,c){let d=a>>24&255,e=a>>16&255,f=a>>8&255,g=b>>24&255,h=b>>16&255,i=b>>8&255,j=cM(ei.relativeLuminance2(g,h,i),ei.relativeLuminance2(d,e,f));for(;j<c&&(g<255||h<255||i<255);)g=Math.min(255,g+Math.ceil((255-g)*.1)),h=Math.min(255,h+Math.ceil((255-h)*.1)),i=Math.min(255,i+Math.ceil((255-i)*.1)),j=cM(ei.relativeLuminance2(g,h,i),ei.relativeLuminance2(d,e,f));return(g<<24|h<<16|i<<8|255)>>>0}function cL(a){let b=a.toString(16);return b.length<2?"0"+b:b}function cM(a,b){return a<b?(b+.05)/(a+.05):(a+.05)/(b+.05)}cI.blend=function(a,b){if(1==(cC=(255&b)/255))return b;let c=a>>24&255,d=a>>16&255,e=a>>8&255;return cz=c+Math.round(((b>>24&255)-c)*cC),cA=d+Math.round(((b>>16&255)-d)*cC),cB=e+Math.round(((b>>8&255)-e)*cC),cy.toRgba(cz,cA,cB)},cI.ensureContrastRatio=function(a,b,c){let d=ei.relativeLuminance(a>>8),e=ei.relativeLuminance(b>>8);if(cM(d,e)<c){if(e<d){let e=cJ(a,b,c),f=cM(d,ei.relativeLuminance(e>>8));if(f<c){let g=cK(a,b,c);return f>cM(d,ei.relativeLuminance(g>>8))?e:g}return e}let f=cK(a,b,c),g=cM(d,ei.relativeLuminance(f>>8));if(g<c){let e=cJ(a,b,c);return g>cM(d,ei.relativeLuminance(e>>8))?f:e}return f}},cI.reduceLuminance=cJ,cI.increaseLuminance=cK,cI.toChannels=function(a){return[a>>24&255,a>>16&255,a>>8&255,255&a]};var cN=class extends I{constructor(a,b,c){super(),this.content=0,this.combinedData="",this.fg=a.fg,this.bg=a.bg,this.combinedData=b,this._width=c}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(a){throw Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},cO=class{constructor(a){this._bufferService=a,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new K}register(a){let b={id:this._nextCharacterJoinerId++,handler:a};return this._characterJoiners.push(b),b.id}deregister(a){for(let b=0;b<this._characterJoiners.length;b++)if(this._characterJoiners[b].id===a)return this._characterJoiners.splice(b,1),!0;return!1}getJoinedCharacters(a){if(0===this._characterJoiners.length)return[];let b=this._bufferService.buffer.lines.get(a);if(!b||0===b.length)return[];let c=[],d=b.translateToString(!0),e=0,f=0,g=0,h=b.getFg(0),i=b.getBg(0);for(let a=0;a<b.getTrimmedLength();a++)if(b.loadCell(a,this._workCell),0!==this._workCell.getWidth()){if(this._workCell.fg!==h||this._workCell.bg!==i){if(a-e>1){let a=this._getJoinedRanges(d,g,f,b,e);for(let b=0;b<a.length;b++)c.push(a[b])}e=a,g=f,h=this._workCell.fg,i=this._workCell.bg}f+=this._workCell.getChars().length||1}if(this._bufferService.cols-e>1){let a=this._getJoinedRanges(d,g,f,b,e);for(let b=0;b<a.length;b++)c.push(a[b])}return c}_getJoinedRanges(a,b,c,d,e){let f=a.substring(b,c),g=[];try{g=this._characterJoiners[0].handler(f)}catch(a){console.error(a)}for(let a=1;a<this._characterJoiners.length;a++)try{let b=this._characterJoiners[a].handler(f);for(let a=0;a<b.length;a++)cO._mergeRanges(g,b[a])}catch(a){console.error(a)}return this._stringRangesToCellRanges(g,d,e),g}_stringRangesToCellRanges(a,b,c){let d=0,e=!1,f=0,g=a[0];if(g){for(let h=c;h<this._bufferService.cols;h++){let c=b.getWidth(h),i=b.getString(h).length||1;if(0!==c){if(!e&&g[0]<=f&&(g[0]=h,e=!0),g[1]<=f){if(g[1]=h,!(g=a[++d]))break;g[0]<=f?(g[0]=h,e=!0):e=!1}f+=i}}g&&(g[1]=this._bufferService.cols)}}static _mergeRanges(a,b){let c=!1;for(let d=0;d<a.length;d++){let e=a[d];if(c){if(b[1]<=e[0])return a[d-1][1]=b[1],a;if(b[1]<=e[1])return a[d-1][1]=Math.max(b[1],e[1]),a.splice(d,1),a;a.splice(d,1),d--}else{if(b[1]<=e[0])return a.splice(d,0,b),a;if(b[1]<=e[1])return e[0]=Math.min(b[0],e[0]),a;b[0]<e[1]&&(e[0]=Math.min(b[0],e[0]),c=!0);continue}}return c?a[a.length-1][1]=b[1]:a.push(b),a}};function cP(){return{width:0,height:0}}cO=x([y(0,P)],cO);var cQ=class{constructor(a,b,c,d,e,f,g){this._document=a,this._characterJoinerService=b,this._optionsService=c,this._coreBrowserService=d,this._coreService=e,this._decorationService=f,this._themeService=g,this._workCell=new K,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(a,b,c){this._selectionStart=a,this._selectionEnd=b,this._columnSelectMode=c}createRow(a,b,c,d,e,f,g,h,i,j,k){let l=[],m=this._characterJoinerService.getJoinedCharacters(b),n=this._themeService.colors,o=a.getNoBgTrimmedLength();c&&o<f+1&&(o=f+1);let p,q=0,r="",s=0,u=0,v=0,w=0,x=!1,y=0,z=!1,A=0,B=0,C=[],D=-1!==j&&-1!==k;for(let E=0;E<o;E++){let o;a.loadCell(E,this._workCell);let F=this._workCell.getWidth();if(0===F)continue;let G=!1,H=E>=B,J=E,K=this._workCell;if(m.length>0&&E===m[0][0]&&H){let d=m.shift(),e=this._isCellInSelection(d[0],b);for(s=d[0]+1;s<d[1];s++)H&&=e===this._isCellInSelection(s,b);(H&&=!c||f<d[0]||f>=d[1])?(G=!0,K=new cN(this._workCell,a.translateToString(!0,d[0],d[1]),d[1]-d[0]),J=d[1]-1,F=K.getWidth()):B=d[1]}let L=this._isCellInSelection(E,b),M=c&&E===f,N=D&&E>=j&&E<=k,O=!1;this._decorationService.forEachDecorationAtCell(E,b,void 0,a=>{O=!0});let P=K.getChars()||" ";if(" "===P&&(K.isUnderline()||K.isOverline())&&(P="\xa0"),A=F*h-i.get(P,K.isBold(),K.isItalic()),p)if(q&&(L&&z||!L&&!z&&K.bg===u)&&(L&&z&&n.selectionForeground||K.fg===v)&&K.extended.ext===w&&N===x&&A===y&&!M&&!G&&!O&&H){K.isInvisible()?r+=" ":r+=P,q++;continue}else q&&(p.textContent=r),p=this._document.createElement("span"),q=0,r="";else p=this._document.createElement("span");if(u=K.bg,v=K.fg,w=K.extended.ext,x=N,y=A,z=L,G&&f>=E&&f<=J&&(f=E),!this._coreService.isCursorHidden&&M&&this._coreService.isCursorInitialized){if(C.push("xterm-cursor"),this._coreBrowserService.isFocused)g&&C.push("xterm-cursor-blink"),C.push("bar"===d?"xterm-cursor-bar":"underline"===d?"xterm-cursor-underline":"xterm-cursor-block");else if(e)switch(e){case"outline":C.push("xterm-cursor-outline");break;case"block":C.push("xterm-cursor-block");break;case"bar":C.push("xterm-cursor-bar");break;case"underline":C.push("xterm-cursor-underline")}}if(K.isBold()&&C.push("xterm-bold"),K.isItalic()&&C.push("xterm-italic"),K.isDim()&&C.push("xterm-dim"),r=K.isInvisible()?" ":K.getChars()||" ",K.isUnderline()&&(C.push(`xterm-underline-${K.extended.underlineStyle}`)," "===r&&(r="\xa0"),!K.isUnderlineColorDefault()))if(K.isUnderlineColorRGB())p.style.textDecorationColor=`rgb(${I.toColorRGB(K.getUnderlineColor()).join(",")})`;else{let a=K.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&K.isBold()&&a<8&&(a+=8),p.style.textDecorationColor=n.ansi[a].css}K.isOverline()&&(C.push("xterm-overline")," "===r&&(r="\xa0")),K.isStrikethrough()&&C.push("xterm-strikethrough"),N&&(p.style.textDecoration="underline");let Q=K.getFgColor(),R=K.getFgColorMode(),S=K.getBgColor(),T=K.getBgColorMode(),U=!!K.isInverse();if(U){let a=Q;Q=S,S=a;let b=R;R=T,T=b}let V,W,X=!1;switch(this._decorationService.forEachDecorationAtCell(E,b,void 0,a=>{"top"!==a.options.layer&&X||(a.backgroundColorRGB&&(T=0x3000000,S=a.backgroundColorRGB.rgba>>8&0xffffff,V=a.backgroundColorRGB),a.foregroundColorRGB&&(R=0x3000000,Q=a.foregroundColorRGB.rgba>>8&0xffffff,W=a.foregroundColorRGB),X="top"===a.options.layer)}),!X&&L&&(S=(V=this._coreBrowserService.isFocused?n.selectionBackgroundOpaque:n.selectionInactiveBackgroundOpaque).rgba>>8&0xffffff,T=0x3000000,X=!0,n.selectionForeground&&(R=0x3000000,Q=n.selectionForeground.rgba>>8&0xffffff,W=n.selectionForeground)),X&&C.push("xterm-decoration-top"),T){case 0x1000000:case 0x2000000:o=n.ansi[S],C.push(`xterm-bg-${S}`);break;case 0x3000000:o=cy.toColor(S>>16,S>>8&255,255&S),this._addStyle(p,`background-color:#${cR((S>>>0).toString(16),"0",6)}`);break;default:U?(o=n.foreground,C.push("xterm-bg-257")):o=n.background}switch(V||K.isDim()&&(V=eg.multiplyOpacity(o,.5)),R){case 0x1000000:case 0x2000000:K.isBold()&&Q<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(Q+=8),this._applyMinimumContrast(p,o,n.ansi[Q],K,V,void 0)||C.push(`xterm-fg-${Q}`);break;case 0x3000000:let Y=cy.toColor(Q>>16&255,Q>>8&255,255&Q);this._applyMinimumContrast(p,o,Y,K,V,W)||this._addStyle(p,`color:#${cR(Q.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(p,o,n.foreground,K,V,W)||U&&C.push("xterm-fg-257")}C.length&&(p.className=C.join(" "),C.length=0),M||G||O||!H?p.textContent=r:q++,A!==this.defaultSpacing&&(p.style.letterSpacing=`${A}px`),l.push(p),E=J}return p&&q&&(p.textContent=r),l}_applyMinimumContrast(a,b,c,d,e,f){var g,h,i;if(1===this._optionsService.rawOptions.minimumContrastRatio||57508<=(h=g=d.getCode())&&h<=57558||9472<=(i=g)&&i<=9631)return!1;let j=this._getContrastCache(d),k;if(e||f||(k=j.getColor(b.rgba,c.rgba)),void 0===k){let a=this._optionsService.rawOptions.minimumContrastRatio/(d.isDim()?2:1);k=eg.ensureContrastRatio(e||b,f||c,a),j.setColor((e||b).rgba,(f||c).rgba,k??null)}return!!k&&(this._addStyle(a,`color:${k.css}`),!0)}_getContrastCache(a){return a.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(a,b){a.setAttribute("style",`${a.getAttribute("style")||""}${b};`)}_isCellInSelection(a,b){let c=this._selectionStart,d=this._selectionEnd;return!!c&&!!d&&(this._columnSelectMode?c[0]<=d[0]?a>=c[0]&&b>=c[1]&&a<d[0]&&b<=d[1]:a<c[0]&&b>=c[1]&&a>=d[0]&&b<=d[1]:b>c[1]&&b<d[1]||c[1]===d[1]&&b===c[1]&&a>=c[0]&&a<d[0]||c[1]<d[1]&&b===d[1]&&a<d[0]||c[1]<d[1]&&b===c[1]&&a>=c[0])}};function cR(a,b,c){for(;a.length<c;)a=b+a;return a}cQ=x([y(1,ad),y(2,V),y(3,_),y(4,R),y(5,Y),y(6,ae)],cQ);var cS=class{constructor(a,b){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=a.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";let c=a.createElement("span");c.classList.add("xterm-char-measure-element");let d=a.createElement("span");d.classList.add("xterm-char-measure-element"),d.style.fontWeight="bold";let e=a.createElement("span");e.classList.add("xterm-char-measure-element"),e.style.fontStyle="italic";let f=a.createElement("span");f.classList.add("xterm-char-measure-element"),f.style.fontWeight="bold",f.style.fontStyle="italic",this._measureElements=[c,d,e,f],this._container.appendChild(c),this._container.appendChild(d),this._container.appendChild(e),this._container.appendChild(f),b.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(a,b,c,d){a===this._font&&b===this._fontSize&&c===this._weight&&d===this._weightBold||(this._font=a,this._fontSize=b,this._weight=c,this._weightBold=d,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${c}`,this._measureElements[1].style.fontWeight=`${d}`,this._measureElements[2].style.fontWeight=`${c}`,this._measureElements[3].style.fontWeight=`${d}`,this.clear())}get(a,b,c){let d=0;if(!b&&!c&&1===a.length&&(d=a.charCodeAt(0))<256){if(-9999!==this._flat[d])return this._flat[d];let b=this._measure(a,0);return b>0&&(this._flat[d]=b),b}let e=a;b&&(e+="B"),c&&(e+="I");let f=this._holey.get(e);if(void 0===f){let d=0;b&&(d|=1),c&&(d|=2),(f=this._measure(a,d))>0&&this._holey.set(e,f)}return f}_measure(a,b){let c=this._measureElements[b];return c.textContent=a.repeat(32),c.offsetWidth/32}},cT=class{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(a,b,c,d=!1){if(this.selectionStart=b,this.selectionEnd=c,!b||!c||b[0]===c[0]&&b[1]===c[1])return void this.clear();let e=a.buffers.active.ydisp,f=b[1]-e,g=c[1]-e,h=Math.max(f,0),i=Math.min(g,a.rows-1);h>=a.rows||i<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=d,this.viewportStartRow=f,this.viewportEndRow=g,this.viewportCappedStartRow=h,this.viewportCappedEndRow=i,this.startCol=b[0],this.endCol=c[0])}isCellSelected(a,b,c){return!!this.hasSelection&&(c-=a.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?b>=this.startCol&&c>=this.viewportCappedStartRow&&b<this.endCol&&c<=this.viewportCappedEndRow:b<this.startCol&&c>=this.viewportCappedStartRow&&b>=this.endCol&&c<=this.viewportCappedEndRow:c>this.viewportStartRow&&c<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&c===this.viewportStartRow&&b>=this.startCol&&b<this.endCol||this.viewportStartRow<this.viewportEndRow&&c===this.viewportEndRow&&b<this.endCol||this.viewportStartRow<this.viewportEndRow&&c===this.viewportStartRow&&b>=this.startCol)}},cU="xterm-dom-renderer-owner-",cV="xterm-rows",cW="xterm-fg-",cX="xterm-bg-",cY="xterm-focus",cZ="xterm-selection",c$=1,c_=class extends aw{constructor(a,b,c,d,e,f,g,h,i,j,k,l,m,n){super(),this._terminal=a,this._document=b,this._element=c,this._screenElement=d,this._viewportElement=e,this._helperContainer=f,this._linkifier2=g,this._charSizeService=i,this._optionsService=j,this._bufferService=k,this._coreService=l,this._coreBrowserService=m,this._themeService=n,this._terminalClass=c$++,this._rowElements=[],this._selectionRenderModel=new cT,this.onRequestRedraw=this._register(new aP).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(cV),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add(cZ),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions={css:{canvas:cP(),cell:cP()},device:{canvas:cP(),cell:cP(),char:{width:0,height:0,left:0,top:0}}},this._updateDimensions(),this._register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this._register(this._themeService.onChangeColors(a=>this._injectCss(a))),this._injectCss(this._themeService.colors),this._rowFactory=h.createInstance(cQ,document),this._element.classList.add(cU+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this._register(this._linkifier2.onShowLinkUnderline(a=>this._handleLinkHover(a))),this._register(this._linkifier2.onHideLinkUnderline(a=>this._handleLinkLeave(a))),this._register(at(()=>{this._element.classList.remove(cU+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()})),this._widthCache=new cS(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){let a=this._coreBrowserService.dpr;for(let b of(this.dimensions.device.char.width=this._charSizeService.width*a,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*a),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/a),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/a),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows,this._rowElements))b.style.width=`${this.dimensions.css.canvas.width}px`,b.style.height=`${this.dimensions.css.cell.height}px`,b.style.lineHeight=`${this.dimensions.css.cell.height}px`,b.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));let b=`${this._terminalSelector} .${cV} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=b,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(a){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let b=`${this._terminalSelector} .${cV} { pointer-events: none; color: ${a.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;b+=`${this._terminalSelector} .${cV} .xterm-dim { color: ${eg.multiplyOpacity(a.foreground,.5).css};}${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;let c=`blink_underline_${this._terminalClass}`,d=`blink_bar_${this._terminalClass}`,e=`blink_block_${this._terminalClass}`;for(let[f,g]of(b+=`@keyframes ${c} { 50% { border-bottom-style: hidden; }}@keyframes ${d} { 50% { box-shadow: none; }}@keyframes ${e} { 0% { background-color: ${a.cursor.css}; color: ${a.cursorAccent.css}; } 50% { background-color: inherit; color: ${a.cursor.css}; }}${this._terminalSelector} .${cV}.${cY} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${c} 1s step-end infinite;}${this._terminalSelector} .${cV}.${cY} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${d} 1s step-end infinite;}${this._terminalSelector} .${cV}.${cY} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${e} 1s step-end infinite;}${this._terminalSelector} .${cV} .xterm-cursor.xterm-cursor-block { background-color: ${a.cursor.css}; color: ${a.cursorAccent.css};}${this._terminalSelector} .${cV} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${a.cursor.css} !important; color: ${a.cursorAccent.css} !important;}${this._terminalSelector} .${cV} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${a.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${cV} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${a.cursor.css} inset;}${this._terminalSelector} .${cV} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${a.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}${this._terminalSelector} .${cZ} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${cZ} div { position: absolute; background-color: ${a.selectionBackgroundOpaque.css};}${this._terminalSelector} .${cZ} div { position: absolute; background-color: ${a.selectionInactiveBackgroundOpaque.css};}`,a.ansi.entries()))b+=`${this._terminalSelector} .${cW}${f} { color: ${g.css}; }${this._terminalSelector} .${cW}${f}.xterm-dim { color: ${eg.multiplyOpacity(g,.5).css}; }${this._terminalSelector} .${cX}${f} { background-color: ${g.css}; }`;b+=`${this._terminalSelector} .${cW}257 { color: ${eg.opaque(a.background).css}; }${this._terminalSelector} .${cW}257.xterm-dim { color: ${eg.multiplyOpacity(eg.opaque(a.background),.5).css}; }${this._terminalSelector} .${cX}257 { background-color: ${a.foreground.css}; }`,this._themeStyleElement.textContent=b}_setDefaultSpacing(){let a=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${a}px`,this._rowFactory.defaultSpacing=a}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(a,b){for(let a=this._rowElements.length;a<=b;a++){let a=this._document.createElement("div");this._rowContainer.appendChild(a),this._rowElements.push(a)}for(;this._rowElements.length>b;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(a,b){this._refreshRowElements(a,b),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(cY),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(cY),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(a,b,c){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(a,b,c),this.renderRows(0,this._bufferService.rows-1),!a||!b||(this._selectionRenderModel.update(this._terminal,a,b,c),!this._selectionRenderModel.hasSelection))return;let d=this._selectionRenderModel.viewportStartRow,e=this._selectionRenderModel.viewportEndRow,f=this._selectionRenderModel.viewportCappedStartRow,g=this._selectionRenderModel.viewportCappedEndRow,h=this._document.createDocumentFragment();if(c){let c=a[0]>b[0];h.appendChild(this._createSelectionElement(f,c?b[0]:a[0],c?a[0]:b[0],g-f+1))}else{let c=d===f?a[0]:0,i=f===e?b[0]:this._bufferService.cols;if(h.appendChild(this._createSelectionElement(f,c,i)),h.appendChild(this._createSelectionElement(f+1,0,this._bufferService.cols,g-f-1)),f!==g){let a=e===g?b[0]:this._bufferService.cols;h.appendChild(this._createSelectionElement(g,0,a))}}this._selectionContainer.appendChild(h)}_createSelectionElement(a,b,c,d=1){let e=this._document.createElement("div"),f=b*this.dimensions.css.cell.width,g=this.dimensions.css.cell.width*(c-b);return f+g>this.dimensions.css.canvas.width&&(g=this.dimensions.css.canvas.width-f),e.style.height=`${d*this.dimensions.css.cell.height}px`,e.style.top=`${a*this.dimensions.css.cell.height}px`,e.style.left=`${f}px`,e.style.width=`${g}px`,e}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(let a of this._rowElements)a.replaceChildren()}renderRows(a,b){let c=this._bufferService.buffer,d=c.ybase+c.y,e=Math.min(c.x,this._bufferService.cols-1),f=this._coreService.decPrivateModes.cursorBlink??this._optionsService.rawOptions.cursorBlink,g=this._coreService.decPrivateModes.cursorStyle??this._optionsService.rawOptions.cursorStyle,h=this._optionsService.rawOptions.cursorInactiveStyle;for(let i=a;i<=b;i++){let a=i+c.ydisp,b=this._rowElements[i],j=c.lines.get(a);if(!b||!j)break;b.replaceChildren(...this._rowFactory.createRow(j,a,a===d,g,h,e,f,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${cU}${this._terminalClass}`}_handleLinkHover(a){this._setCellUnderline(a.x1,a.x2,a.y1,a.y2,a.cols,!0)}_handleLinkLeave(a){this._setCellUnderline(a.x1,a.x2,a.y1,a.y2,a.cols,!1)}_setCellUnderline(a,b,c,d,e,f){c<0&&(a=0),d<0&&(b=0);let g=this._bufferService.rows-1;c=Math.max(Math.min(c,g),0),d=Math.max(Math.min(d,g),0),e=Math.min(e,this._bufferService.cols);let h=this._bufferService.buffer,i=h.ybase+h.y,j=Math.min(h.x,e-1),k=this._optionsService.rawOptions.cursorBlink,l=this._optionsService.rawOptions.cursorStyle,m=this._optionsService.rawOptions.cursorInactiveStyle;for(let g=c;g<=d;++g){let n=g+h.ydisp,o=this._rowElements[g],p=h.lines.get(n);if(!o||!p)break;o.replaceChildren(...this._rowFactory.createRow(p,n,n===i,l,m,j,k,this.dimensions.css.cell.width,this._widthCache,f?g===c?a:0:-1,f?(g===d?b:e)-1:-1))}}};c_=x([y(7,T),y(8,$),y(9,V),y(10,P),y(11,R),y(12,_),y(13,ae)],c_);var c0=class extends aw{constructor(a,b,c){super(),this._optionsService=c,this.width=0,this.height=0,this._onCharSizeChange=this._register(new aP),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this._register(new c3(this._optionsService))}catch{this._measureStrategy=this._register(new c2(a,b,this._optionsService))}this._register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],()=>this.measure()))}get hasValidSize(){return this.width>0&&this.height>0}measure(){let a=this._measureStrategy.measure();(a.width!==this.width||a.height!==this.height)&&(this.width=a.width,this.height=a.height,this._onCharSizeChange.fire())}};c0=x([y(2,V)],c0);var c1=class extends aw{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(a,b){void 0!==a&&a>0&&void 0!==b&&b>0&&(this._result.width=a,this._result.height=b)}},c2=class extends c1{constructor(a,b,c){super(),this._document=a,this._parentElement=b,this._optionsService=c,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}},c3=class extends c1{constructor(a){super(),this._optionsService=a,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");let b=this._ctx.measureText("W");if(!("width"in b&&"fontBoundingBoxAscent"in b&&"fontBoundingBoxDescent"in b))throw Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;let a=this._ctx.measureText("W");return this._validateAndSet(a.width,a.fontBoundingBoxAscent+a.fontBoundingBoxDescent),this._result}},c4=class extends aw{constructor(a,b,c){super(),this._textarea=a,this._window=b,this.mainDocument=c,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=this._register(new c5(this._window)),this._onDprChange=this._register(new aP),this.onDprChange=this._onDprChange.event,this._onWindowChange=this._register(new aP),this.onWindowChange=this._onWindowChange.event,this._register(this.onWindowChange(a=>this._screenDprMonitor.setWindow(a))),this._register(aI.forward(this._screenDprMonitor.onDprChange,this._onDprChange)),this._register(bT(this._textarea,"focus",()=>this._isFocused=!0)),this._register(bT(this._textarea,"blur",()=>this._isFocused=!1))}get window(){return this._window}set window(a){this._window!==a&&(this._window=a,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return void 0===this._cachedIsFocused&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask(()=>this._cachedIsFocused=void 0)),this._cachedIsFocused}},c5=class extends aw{constructor(a){super(),this._parentWindow=a,this._windowResizeListener=this._register(new ax),this._onDprChange=this._register(new aP),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this._register(at(()=>this.clearListener()))}setWindow(a){this._parentWindow=a,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=bT(this._parentWindow,"resize",()=>this._setDprAndFireIfDiffers())}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){this._outerListener&&(this._resolutionMediaMatchList?.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){this._resolutionMediaMatchList&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}},c6=class extends aw{constructor(){super(),this.linkProviders=[],this._register(at(()=>this.linkProviders.length=0))}registerLinkProvider(a){return this.linkProviders.push(a),{dispose:()=>{let b=this.linkProviders.indexOf(a);-1!==b&&this.linkProviders.splice(b,1)}}}};function c7(a,b,c){let d=c.getBoundingClientRect(),e=a.getComputedStyle(c),f=parseInt(e.getPropertyValue("padding-left")),g=parseInt(e.getPropertyValue("padding-top"));return[b.clientX-d.left-f,b.clientY-d.top-g]}var c8=class{constructor(a,b){this._renderService=a,this._charSizeService=b}getCoords(a,b,c,d,e){return function(a,b,c,d,e,f,g,h,i){if(!f)return;let j=c7(a,b,c);if(j)return j[0]=Math.ceil((j[0]+(i?g/2:0))/g),j[1]=Math.ceil(j[1]/h),j[0]=Math.min(Math.max(j[0],1),d+ +!!i),j[1]=Math.min(Math.max(j[1],1),e),j}(window,a,b,c,d,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,e)}getMouseReportCoords(a,b){let c=c7(window,a,b);if(this._charSizeService.hasValidSize)return c[0]=Math.min(Math.max(c[0],0),this._renderService.dimensions.css.canvas.width-1),c[1]=Math.min(Math.max(c[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(c[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(c[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(c[0]),y:Math.floor(c[1])}}};c8=x([y(0,ab),y(1,$)],c8);var c9=class{constructor(a,b){this._renderCallback=a,this._coreBrowserService=b,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(a){return this._refreshCallbacks.push(a),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh())),this._animationFrame}refresh(a,b,c){this._rowCount=c,a=void 0!==a?a:0,b=void 0!==b?b:this._rowCount-1,this._rowStart=void 0!==this._rowStart?Math.min(this._rowStart,a):a,this._rowEnd=void 0!==this._rowEnd?Math.max(this._rowEnd,b):b,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh()))}_innerRefresh(){if(this._animationFrame=void 0,void 0===this._rowStart||void 0===this._rowEnd||void 0===this._rowCount)return void this._runRefreshCallbacks();let a=Math.max(this._rowStart,0),b=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(a,b),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(let a of this._refreshCallbacks)a(0);this._refreshCallbacks=[]}},da={},db={getSafariVersion:()=>dj,isChromeOS:()=>dq,isFirefox:()=>dg,isIpad:()=>dl,isIphone:()=>dm,isLegacyEdge:()=>dh,isLinux:()=>dp,isMac:()=>dk,isNode:()=>dd,isSafari:()=>di,isWindows:()=>dn};for(var dc in db)v(da,dc,{get:db[dc],enumerable:!0});var dd="u">typeof process&&"title"in process,de=dd?"node":navigator.userAgent,df=dd?"node":navigator.platform,dg=de.includes("Firefox"),dh=de.includes("Edge"),di=/^((?!chrome|android).)*safari/i.test(de);function dj(){if(!di)return 0;let a=de.match(/Version\/(\d+)/);return null===a||a.length<2?0:parseInt(a[1])}var dk=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(df),dl="iPad"===df,dm="iPhone"===df,dn=["Windows","Win16","Win32","WinCE"].includes(df),dp=df.indexOf("Linux")>=0,dq=/\bCrOS\b/.test(de),dr=class{constructor(){this._tasks=[],this._i=0}enqueue(a){this._tasks.push(a),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}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(a){this._idleCallback=void 0;let b=0,c=0,d=a.timeRemaining(),e=0;for(;this._i<this._tasks.length;){if(b=performance.now(),this._tasks[this._i]()||this._i++,1.5*(c=Math.max(b=Math.max(1,performance.now()-b),c))>(e=a.timeRemaining())){d-b<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(d-b))}ms`),this._start();return}d=e}this.clear()}},ds=class extends dr{_requestCallback(a){return setTimeout(()=>a(this._createDeadline(16)))}_cancelCallback(a){clearTimeout(a)}_createDeadline(a){let b=performance.now()+a;return{timeRemaining:()=>Math.max(0,b-performance.now())}}},dt=class extends dr{_requestCallback(a){return requestIdleCallback(a)}_cancelCallback(a){cancelIdleCallback(a)}},du=!dd&&"requestIdleCallback"in window?dt:ds,dv=class{constructor(){this._queue=new du}set(a){this._queue.clear(),this._queue.enqueue(a)}flush(){this._queue.flush()}},dw=class extends aw{constructor(a,b,c,d,e,f,g,h,i){super(),this._rowCount=a,this._optionsService=c,this._charSizeService=d,this._coreService=e,this._coreBrowserService=h,this._renderer=this._register(new ax),this._pausedResizeTask=new dv,this._observerDisposable=this._register(new ax),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this._register(new aP),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this._register(new aP),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this._register(new aP),this.onRender=this._onRender.event,this._onRefreshRequest=this._register(new aP),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new c9((a,b)=>this._renderRows(a,b),this._coreBrowserService),this._register(this._renderDebouncer),this._syncOutputHandler=new dx(this._coreBrowserService,this._coreService,()=>this._fullRefresh()),this._register(at(()=>this._syncOutputHandler.dispose())),this._register(this._coreBrowserService.onDprChange(()=>this.handleDevicePixelRatioChange())),this._register(g.onResize(()=>this._fullRefresh())),this._register(g.buffers.onBufferActivate(()=>this._renderer.value?.clear())),this._register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this._register(this._charSizeService.onCharSizeChange(()=>this.handleCharSizeChanged())),this._register(f.onDecorationRegistered(()=>this._fullRefresh())),this._register(f.onDecorationRemoved(()=>this._fullRefresh())),this._register(this._optionsService.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],()=>{this.clear(),this.handleResize(g.cols,g.rows),this._fullRefresh()})),this._register(this._optionsService.onMultipleOptionChange(["cursorBlink","cursorStyle"],()=>this.refreshRows(g.buffer.y,g.buffer.y,!0))),this._register(i.onChangeColors(()=>this._fullRefresh())),this._registerIntersectionObserver(this._coreBrowserService.window,b),this._register(this._coreBrowserService.onWindowChange(a=>this._registerIntersectionObserver(a,b)))}get dimensions(){return this._renderer.value.dimensions}_registerIntersectionObserver(a,b){if("IntersectionObserver"in a){let c=new a.IntersectionObserver(a=>this._handleIntersectionChange(a[a.length-1]),{threshold:0});c.observe(b),this._observerDisposable.value=at(()=>c.disconnect())}}_handleIntersectionChange(a){this._isPaused=void 0===a.isIntersecting?0===a.intersectionRatio:!a.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(a,b,c=!1){if(this._isPaused){this._needsFullRefresh=!0;return}if(this._coreService.decPrivateModes.synchronizedOutput)return void this._syncOutputHandler.bufferRows(a,b);let d=this._syncOutputHandler.flush();d&&(a=Math.min(a,d.start),b=Math.max(b,d.end)),c||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(a,b,this._rowCount)}_renderRows(a,b){if(this._renderer.value){if(this._coreService.decPrivateModes.synchronizedOutput)return void this._syncOutputHandler.bufferRows(a,b);a=Math.min(a,this._rowCount-1),b=Math.min(b,this._rowCount-1),this._renderer.value.renderRows(a,b),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:a,end:b}),this._onRender.fire({start:a,end:b}),this._isNextRenderRedrawOnly=!0}}resize(a,b){this._rowCount=b,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(a){this._renderer.value=a,this._renderer.value&&(this._renderer.value.onRequestRedraw(a=>this.refreshRows(a.start,a.end,!0)),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(a){return this._renderDebouncer.addRefreshCallback(a)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){this._renderer.value&&(this._renderer.value.clearTextureAtlas?.(),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(a,b){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set(()=>this._renderer.value?.handleResize(a,b)):this._renderer.value.handleResize(a,b),this._fullRefresh())}handleCharSizeChanged(){this._renderer.value?.handleCharSizeChanged()}handleBlur(){this._renderer.value?.handleBlur()}handleFocus(){this._renderer.value?.handleFocus()}handleSelectionChanged(a,b,c){this._selectionState.start=a,this._selectionState.end=b,this._selectionState.columnSelectMode=c,this._renderer.value?.handleSelectionChanged(a,b,c)}handleCursorMove(){this._renderer.value?.handleCursorMove()}clear(){this._renderer.value?.clear()}};dw=x([y(2,V),y(3,$),y(4,R),y(5,Y),y(6,P),y(7,_),y(8,ae)],dw);var dx=class{constructor(a,b,c){this._coreBrowserService=a,this._coreService=b,this._onTimeout=c,this._start=0,this._end=0,this._isBuffering=!1}bufferRows(a,b){this._isBuffering?(this._start=Math.min(this._start,a),this._end=Math.max(this._end,b)):(this._start=a,this._end=b,this._isBuffering=!0),void 0===this._timeout&&(this._timeout=this._coreBrowserService.window.setTimeout(()=>{this._timeout=void 0,this._coreService.decPrivateModes.synchronizedOutput=!1,this._onTimeout()},1e3))}flush(){if(void 0!==this._timeout&&(this._coreBrowserService.window.clearTimeout(this._timeout),this._timeout=void 0),!this._isBuffering)return;let a={start:this._start,end:this._end};return this._isBuffering=!1,a}dispose(){void 0!==this._timeout&&(this._coreBrowserService.window.clearTimeout(this._timeout),this._timeout=void 0)}};function dy(a,b,c,d){return dC(Math.abs(a-dz(a,c)-(b-dz(b,c)))-function(a,b,c){let d=0,e=a-dz(a,c),f=b-dz(b,c);for(let g=0;g<Math.abs(e-f);g++){let f="A"===function(a,b){return a>b?"A":"B"}(a,b)?-1:1;c.buffer.lines.get(e+f*g)?.isWrapped&&d++}return d}(a,b,c),dB(a>b?"A":"B",d))}function dz(a,b){let c=0,d=b.buffer.lines.get(a),e=d?.isWrapped;for(;e&&a>=0&&a<b.rows;)c++,d=b.buffer.lines.get(--a),e=d?.isWrapped;return c}function dA(a,b,c,d,e,f){let g=a,h=b,i="";for(;(g!==c||h!==d)&&h>=0&&h<f.buffer.lines.length;)g+=e?1:-1,e&&g>f.cols-1?(i+=f.buffer.translateBufferLineToString(h,!1,a,g),g=0,a=0,h++):!e&&g<0&&(i+=f.buffer.translateBufferLineToString(h,!1,0,a+1),a=g=f.cols-1,h--);return i+f.buffer.translateBufferLineToString(h,!1,a,g)}function dB(a,b){return cv.ESC+(b?"O":"[")+a}function dC(a,b){a=Math.floor(a);let c="";for(let d=0;d<a;d++)c+=b;return c}var dD=class{constructor(a){this._bufferService=a,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){let a=this.selectionStart[0]+this.selectionStartLength;return a>this._bufferService.cols?a%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(a/this._bufferService.cols)-1]:[a%this._bufferService.cols,this.selectionStart[1]+Math.floor(a/this._bufferService.cols)]:[a,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){let a=this.selectionStart[0]+this.selectionStartLength;return a>this._bufferService.cols?[a%this._bufferService.cols,this.selectionStart[1]+Math.floor(a/this._bufferService.cols)]:[Math.max(a,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){let a=this.selectionStart,b=this.selectionEnd;return!!a&&!!b&&(a[1]>b[1]||a[1]===b[1]&&a[0]>b[0])}handleTrim(a){return this.selectionStart&&(this.selectionStart[1]-=a),this.selectionEnd&&(this.selectionEnd[1]-=a),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}};function dE(a,b){if(a.start.y>a.end.y)throw Error(`Buffer range end (${a.end.x}, ${a.end.y}) cannot be before start (${a.start.x}, ${a.start.y})`);return b*(a.end.y-a.start.y)+(a.end.x-a.start.x+1)}var dF=RegExp("\xa0","g"),dG=class extends aw{constructor(a,b,c,d,e,f,g,h,i){super(),this._element=a,this._screenElement=b,this._linkifier=c,this._bufferService=d,this._coreService=e,this._mouseService=f,this._optionsService=g,this._renderService=h,this._coreBrowserService=i,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new K,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this._register(new aP),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this._register(new aP),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this._register(new aP),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this._register(new aP),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=a=>this._handleMouseMove(a),this._mouseUpListener=a=>this._handleMouseUp(a),this._coreService.onUserInput(()=>{this.hasSelection&&this.clearSelection()}),this._trimListener=this._bufferService.buffer.lines.onTrim(a=>this._handleTrim(a)),this._register(this._bufferService.buffers.onBufferActivate(a=>this._handleBufferActivate(a))),this.enable(),this._model=new dD(this._bufferService),this._activeSelectionMode=0,this._register(at(()=>{this._removeMouseDownListeners()})),this._register(this._bufferService.onResize(a=>{a.rowsChanged&&this.clearSelection()}))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){let a=this._model.finalSelectionStart,b=this._model.finalSelectionEnd;return!!a&&!!b&&(a[0]!==b[0]||a[1]!==b[1])}get selectionText(){let a=this._model.finalSelectionStart,b=this._model.finalSelectionEnd;if(!a||!b)return"";let c=this._bufferService.buffer,d=[];if(3===this._activeSelectionMode){if(a[0]===b[0])return"";let e=a[0]<b[0]?a[0]:b[0],f=a[0]<b[0]?b[0]:a[0];for(let g=a[1];g<=b[1];g++){let a=c.translateBufferLineToString(g,!0,e,f);d.push(a)}}else{let e=a[1]===b[1]?b[0]:void 0;d.push(c.translateBufferLineToString(a[1],!0,a[0],e));for(let e=a[1]+1;e<=b[1]-1;e++){let a=c.lines.get(e),b=c.translateBufferLineToString(e,!0);a?.isWrapped?d[d.length-1]+=b:d.push(b)}if(a[1]!==b[1]){let a=c.lines.get(b[1]),e=c.translateBufferLineToString(b[1],!0,0,b[0]);a&&a.isWrapped?d[d.length-1]+=e:d.push(e)}}return d.map(a=>a.replace(dF," ")).join(dn?`\r
|
|
14
|
+
`:`
|
|
15
|
+
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(a){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._refresh())),dp&&a&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:3===this._activeSelectionMode})}_isClickInSelection(a){let b=this._getMouseBufferCoords(a),c=this._model.finalSelectionStart,d=this._model.finalSelectionEnd;return!!c&&!!d&&!!b&&this._areCoordsInSelection(b,c,d)}isCellInSelection(a,b){let c=this._model.finalSelectionStart,d=this._model.finalSelectionEnd;return!!c&&!!d&&this._areCoordsInSelection([a,b],c,d)}_areCoordsInSelection(a,b,c){return a[1]>b[1]&&a[1]<c[1]||b[1]===c[1]&&a[1]===b[1]&&a[0]>=b[0]&&a[0]<c[0]||b[1]<c[1]&&a[1]===c[1]&&a[0]<c[0]||b[1]<c[1]&&a[1]===b[1]&&a[0]>=b[0]}_selectWordAtCursor(a,b){let c=this._linkifier.currentLink?.link?.range;if(c)return this._model.selectionStart=[c.start.x-1,c.start.y-1],this._model.selectionStartLength=dE(c,this._bufferService.cols),this._model.selectionEnd=void 0,!0;let d=this._getMouseBufferCoords(a);return!!d&&(this._selectWordAt(d,b),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(a,b){this._model.clearSelection(),a=Math.max(a,0),b=Math.min(b,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,a],this._model.selectionEnd=[this._bufferService.cols,b],this.refresh(),this._onSelectionChange.fire()}_handleTrim(a){this._model.handleTrim(a)&&this.refresh()}_getMouseBufferCoords(a){let b=this._mouseService.getCoords(a,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(b)return b[0]--,b[1]--,b[1]+=this._bufferService.buffer.ydisp,b}_getMouseEventScrollAmount(a){let b=c7(this._coreBrowserService.window,a,this._screenElement)[1],c=this._renderService.dimensions.css.canvas.height;return b>=0&&b<=c?0:(b>c&&(b-=c),(b=Math.min(Math.max(b,-50),50)/50)/Math.abs(b)+Math.round(14*b))}shouldForceSelection(a){return dk?a.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:a.shiftKey}handleMouseDown(a){if(this._mouseDownTimeStamp=a.timeStamp,!(2===a.button&&this.hasSelection)&&0===a.button){if(!this._enabled){if(!this.shouldForceSelection(a))return;a.stopPropagation()}a.preventDefault(),this._dragScrollAmount=0,this._enabled&&a.shiftKey?this._handleIncrementalClick(a):1===a.detail?this._handleSingleClick(a):2===a.detail?this._handleDoubleClick(a):3===a.detail&&this._handleTripleClick(a),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval(()=>this._dragScroll(),50)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(a){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(a))}_handleSingleClick(a){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=3*!!this.shouldColumnSelect(a),this._model.selectionStart=this._getMouseBufferCoords(a),!this._model.selectionStart)return;this._model.selectionEnd=void 0;let b=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);b&&b.length!==this._model.selectionStart[0]&&0===b.hasWidth(this._model.selectionStart[0])&&this._model.selectionStart[0]++}_handleDoubleClick(a){this._selectWordAtCursor(a,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(a){let b=this._getMouseBufferCoords(a);b&&(this._activeSelectionMode=2,this._selectLineAt(b[1]))}shouldColumnSelect(a){return a.altKey&&!(dk&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(a){if(a.stopImmediatePropagation(),!this._model.selectionStart)return;let b=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(a),!this._model.selectionEnd)return void this.refresh(!0);2===this._activeSelectionMode?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:1===this._activeSelectionMode&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(a),3!==this._activeSelectionMode&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));let c=this._bufferService.buffer;if(this._model.selectionEnd[1]<c.lines.length){let a=c.lines.get(this._model.selectionEnd[1]);a&&0===a.hasWidth(this._model.selectionEnd[0])&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}b&&b[0]===this._model.selectionEnd[0]&&b[1]===this._model.selectionEnd[1]||this.refresh(!0)}_dragScroll(){if(!(!this._model.selectionEnd||!this._model.selectionStart)&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});let a=this._bufferService.buffer;this._dragScrollAmount>0?(3!==this._activeSelectionMode&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(a.ydisp+this._bufferService.rows,a.lines.length-1)):(3!==this._activeSelectionMode&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=a.ydisp),this.refresh()}}_handleMouseUp(a){let b=a.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&b<500&&a.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){let b=this._mouseService.getCoords(a,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(b&&void 0!==b[0]&&void 0!==b[1]){let a=function(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,u,v,w;let x,y=c.buffer.x,z=c.buffer.y;if(!c.buffer.hasScrollback){let v,w,x;return e=y,g=0,(0===dy(f=z,b,h=c,i=d).length?"":dC(dA(e,f,e,f-dz(f,h),!1,h).length,dB("D",i)))+dy(z,b,c,d)+(j=y,k=z,l=a,v=dy(k,m=b,n=c,o=d).length>0?m-dz(m,n):k,x=(p=j,q=k,w=dy(r=l,s=m,u=n,o).length>0?s-dz(s,u):q,p<r&&w<=s||p>=r&&w<s?"C":"D"),dC(dA(j,v,l,m,"C"===x,n).length,dB(x,o)))}if(z===b)return x=y>a?"D":"C",dC(Math.abs(y-a),dB(x,d));x=z>b?"D":"C";let A=Math.abs(z-b);return dC((v=z>b?a:y,c.cols-v+(A-1)*c.cols+1+(w=0,(z>b?y:a)-1)),dB(x,d))}(b[0]-1,b[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(a,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){let a=this._model.finalSelectionStart,b=this._model.finalSelectionEnd,c=!!a&&!!b&&(a[0]!==b[0]||a[1]!==b[1]);if(!c){this._oldHasSelection&&this._fireOnSelectionChange(a,b,c);return}!a||!b||this._oldSelectionStart&&this._oldSelectionEnd&&a[0]===this._oldSelectionStart[0]&&a[1]===this._oldSelectionStart[1]&&b[0]===this._oldSelectionEnd[0]&&b[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(a,b,c)}_fireOnSelectionChange(a,b,c){this._oldSelectionStart=a,this._oldSelectionEnd=b,this._oldHasSelection=c,this._onSelectionChange.fire()}_handleBufferActivate(a){this.clearSelection(),this._trimListener.dispose(),this._trimListener=a.activeBuffer.lines.onTrim(a=>this._handleTrim(a))}_convertViewportColToCharacterIndex(a,b){let c=b;for(let d=0;b>=d;d++){let e=a.loadCell(d,this._workCell).getChars().length;0===this._workCell.getWidth()?c--:e>1&&b!==d&&(c+=e-1)}return c}setSelection(a,b,c){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[a,b],this._model.selectionStartLength=c,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(a){this._isClickInSelection(a)||(this._selectWordAtCursor(a,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(a,b,c=!0,d=!0){if(a[0]>=this._bufferService.cols)return;let e=this._bufferService.buffer,f=e.lines.get(a[1]);if(!f)return;let g=e.translateBufferLineToString(a[1],!1),h=this._convertViewportColToCharacterIndex(f,a[0]),i=h,j=a[0]-h,k=0,l=0,m=0,n=0;if(" "===g.charAt(h)){for(;h>0&&" "===g.charAt(h-1);)h--;for(;i<g.length&&" "===g.charAt(i+1);)i++}else{let b=a[0],c=a[0];0===f.getWidth(b)&&(k++,b--),2===f.getWidth(c)&&(l++,c++);let d=f.getString(c).length;for(d>1&&(n+=d-1,i+=d-1);b>0&&h>0&&!this._isCharWordSeparator(f.loadCell(b-1,this._workCell));){f.loadCell(b-1,this._workCell);let a=this._workCell.getChars().length;0===this._workCell.getWidth()?(k++,b--):a>1&&(m+=a-1,h-=a-1),h--,b--}for(;c<f.length&&i+1<g.length&&!this._isCharWordSeparator(f.loadCell(c+1,this._workCell));){f.loadCell(c+1,this._workCell);let a=this._workCell.getChars().length;2===this._workCell.getWidth()?(l++,c++):a>1&&(n+=a-1,i+=a-1),i++,c++}}i++;let o=h+j-k+m,p=Math.min(this._bufferService.cols,i-h+k+l-m-n);if(!(!b&&""===g.slice(h,i).trim())){if(c&&0===o&&32!==f.getCodePoint(0)){let b=e.lines.get(a[1]-1);if(b&&f.isWrapped&&32!==b.getCodePoint(this._bufferService.cols-1)){let b=this._getWordAt([this._bufferService.cols-1,a[1]-1],!1,!0,!1);if(b){let a=this._bufferService.cols-b.start;o-=a,p+=a}}}if(d&&o+p===this._bufferService.cols&&32!==f.getCodePoint(this._bufferService.cols-1)){let b=e.lines.get(a[1]+1);if(b?.isWrapped&&32!==b.getCodePoint(0)){let b=this._getWordAt([0,a[1]+1],!1,!1,!0);b&&(p+=b.length)}}return{start:o,length:p}}}_selectWordAt(a,b){let c=this._getWordAt(a,b);if(c){for(;c.start<0;)c.start+=this._bufferService.cols,a[1]--;this._model.selectionStart=[c.start,a[1]],this._model.selectionStartLength=c.length}}_selectToWordAt(a){let b=this._getWordAt(a,!0);if(b){let c=a[1];for(;b.start<0;)b.start+=this._bufferService.cols,c--;if(!this._model.areSelectionValuesReversed())for(;b.start+b.length>this._bufferService.cols;)b.length-=this._bufferService.cols,c++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?b.start:b.start+b.length,c]}}_isCharWordSeparator(a){return 0!==a.getWidth()&&this._optionsService.rawOptions.wordSeparator.indexOf(a.getChars())>=0}_selectLineAt(a){let b=this._bufferService.buffer.getWrappedRangeForLine(a),c={start:{x:0,y:b.first},end:{x:this._bufferService.cols-1,y:b.last}};this._model.selectionStart=[0,b.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=dE(c,this._bufferService.cols)}};dG=x([y(3,P),y(4,R),y(5,aa),y(6,V),y(7,ab),y(8,_)],dG);var dH=class{constructor(){this._data={}}set(a,b,c){this._data[a]||(this._data[a]={}),this._data[a][b]=c}get(a,b){return this._data[a]?this._data[a][b]:void 0}clear(){this._data={}}},dI=class{constructor(){this._color=new dH,this._css=new dH}setCss(a,b,c){this._css.set(a,b,c)}getCss(a,b){return this._css.get(a,b)}setColor(a,b,c){this._color.set(a,b,c)}getColor(a,b){return this._color.get(a,b)}clear(){this._color.clear(),this._css.clear()}},dJ=Object.freeze((()=>{let a=[eh.toColor("#2e3436"),eh.toColor("#cc0000"),eh.toColor("#4e9a06"),eh.toColor("#c4a000"),eh.toColor("#3465a4"),eh.toColor("#75507b"),eh.toColor("#06989a"),eh.toColor("#d3d7cf"),eh.toColor("#555753"),eh.toColor("#ef2929"),eh.toColor("#8ae234"),eh.toColor("#fce94f"),eh.toColor("#729fcf"),eh.toColor("#ad7fa8"),eh.toColor("#34e2e2"),eh.toColor("#eeeeec")],b=[0,95,135,175,215,255];for(let c=0;c<216;c++){let d=b[c/36%6|0],e=b[c/6%6|0],f=b[c%6];a.push({css:cy.toCss(d,e,f),rgba:cy.toRgba(d,e,f)})}for(let b=0;b<24;b++){let c=8+10*b;a.push({css:cy.toCss(c,c,c),rgba:cy.toRgba(c,c,c)})}return a})()),dK=eh.toColor("#ffffff"),dL=eh.toColor("#000000"),dM=eh.toColor("#ffffff"),dN={css:"rgba(255, 255, 255, 0.3)",rgba:0xffffff4d},dO=class extends aw{constructor(a){super(),this._optionsService=a,this._contrastCache=new dI,this._halfContrastCache=new dI,this._onChangeColors=this._register(new aP),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:dK,background:dL,cursor:dM,cursorAccent:dL,selectionForeground:void 0,selectionBackgroundTransparent:dN,selectionBackgroundOpaque:eg.blend(dL,dN),selectionInactiveBackgroundTransparent:dN,selectionInactiveBackgroundOpaque:eg.blend(dL,dN),scrollbarSliderBackground:eg.opacity(dK,.2),scrollbarSliderHoverBackground:eg.opacity(dK,.4),scrollbarSliderActiveBackground:eg.opacity(dK,.5),overviewRulerBorder:dK,ansi:dJ.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this._register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",()=>this._contrastCache.clear())),this._register(this._optionsService.onSpecificOptionChange("theme",()=>this._setTheme(this._optionsService.rawOptions.theme)))}get colors(){return this._colors}_setTheme(a={}){let b=this._colors;if(b.foreground=dP(a.foreground,dK),b.background=dP(a.background,dL),b.cursor=eg.blend(b.background,dP(a.cursor,dM)),b.cursorAccent=eg.blend(b.background,dP(a.cursorAccent,dL)),b.selectionBackgroundTransparent=dP(a.selectionBackground,dN),b.selectionBackgroundOpaque=eg.blend(b.background,b.selectionBackgroundTransparent),b.selectionInactiveBackgroundTransparent=dP(a.selectionInactiveBackground,b.selectionBackgroundTransparent),b.selectionInactiveBackgroundOpaque=eg.blend(b.background,b.selectionInactiveBackgroundTransparent),b.selectionForeground=a.selectionForeground?dP(a.selectionForeground,cD):void 0,b.selectionForeground===cD&&(b.selectionForeground=void 0),eg.isOpaque(b.selectionBackgroundTransparent)&&(b.selectionBackgroundTransparent=eg.opacity(b.selectionBackgroundTransparent,.3)),eg.isOpaque(b.selectionInactiveBackgroundTransparent)&&(b.selectionInactiveBackgroundTransparent=eg.opacity(b.selectionInactiveBackgroundTransparent,.3)),b.scrollbarSliderBackground=dP(a.scrollbarSliderBackground,eg.opacity(b.foreground,.2)),b.scrollbarSliderHoverBackground=dP(a.scrollbarSliderHoverBackground,eg.opacity(b.foreground,.4)),b.scrollbarSliderActiveBackground=dP(a.scrollbarSliderActiveBackground,eg.opacity(b.foreground,.5)),b.overviewRulerBorder=dP(a.overviewRulerBorder,dK),b.ansi=dJ.slice(),b.ansi[0]=dP(a.black,dJ[0]),b.ansi[1]=dP(a.red,dJ[1]),b.ansi[2]=dP(a.green,dJ[2]),b.ansi[3]=dP(a.yellow,dJ[3]),b.ansi[4]=dP(a.blue,dJ[4]),b.ansi[5]=dP(a.magenta,dJ[5]),b.ansi[6]=dP(a.cyan,dJ[6]),b.ansi[7]=dP(a.white,dJ[7]),b.ansi[8]=dP(a.brightBlack,dJ[8]),b.ansi[9]=dP(a.brightRed,dJ[9]),b.ansi[10]=dP(a.brightGreen,dJ[10]),b.ansi[11]=dP(a.brightYellow,dJ[11]),b.ansi[12]=dP(a.brightBlue,dJ[12]),b.ansi[13]=dP(a.brightMagenta,dJ[13]),b.ansi[14]=dP(a.brightCyan,dJ[14]),b.ansi[15]=dP(a.brightWhite,dJ[15]),a.extendedAnsi){let c=Math.min(b.ansi.length-16,a.extendedAnsi.length);for(let d=0;d<c;d++)b.ansi[d+16]=dP(a.extendedAnsi[d],dJ[d+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(a){this._restoreColor(a),this._onChangeColors.fire(this.colors)}_restoreColor(a){if(void 0===a){for(let a=0;a<this._restoreColors.ansi.length;++a)this._colors.ansi[a]=this._restoreColors.ansi[a];return}switch(a){case 256:this._colors.foreground=this._restoreColors.foreground;break;case 257:this._colors.background=this._restoreColors.background;break;case 258:this._colors.cursor=this._restoreColors.cursor;break;default:this._colors.ansi[a]=this._restoreColors.ansi[a]}}modifyColors(a){a(this._colors),this._onChangeColors.fire(this.colors)}_updateRestoreColors(){this._restoreColors={foreground:this._colors.foreground,background:this._colors.background,cursor:this._colors.cursor,ansi:this._colors.ansi.slice()}}};function dP(a,b){if(void 0!==a)try{return eh.toColor(a)}catch{}return b}dO=x([y(0,V)],dO);var dQ=class{constructor(...a){for(let[b,c]of(this._entries=new Map,a))this.set(b,c)}set(a,b){let c=this._entries.get(a);return this._entries.set(a,b),c}forEach(a){for(let[b,c]of this._entries.entries())a(b,c)}has(a){return this._entries.has(a)}get(a){return this._entries.get(a)}},dR=class{constructor(){this._services=new dQ,this._services.set(T,this)}setService(a,b){this._services.set(a,b)}getService(a){return this._services.get(a)}createInstance(a,...b){let c=(a[M]||[]).sort((a,b)=>a.index-b.index),d=[];for(let b of c){let c=this._services.get(b.id);if(!c)throw Error(`[createInstance] ${a.name} depends on UNKNOWN service ${b.id._id}.`);d.push(c)}let e=c.length>0?c[0].index:b.length;if(b.length!==e)throw Error(`[createInstance] First service dependency of ${a.name} at position ${e+1} conflicts with ${b.length} static arguments`);return new a(...b,...d)}},dS={trace:0,debug:1,info:2,warn:3,error:4,off:5},dT=class extends aw{constructor(a){super(),this._optionsService=a,this._logLevel=5,this._updateLogLevel(),this._register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel()))}get logLevel(){return this._logLevel}_updateLogLevel(){this._logLevel=dS[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(a){for(let b=0;b<a.length;b++)"function"==typeof a[b]&&(a[b]=a[b]())}_log(a,b,c){this._evalLazyOptionalParams(c),a.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+b,...c)}trace(a,...b){this._logLevel<=0&&this._log(this._optionsService.options.logger?.trace.bind(this._optionsService.options.logger)??console.log,a,b)}debug(a,...b){this._logLevel<=1&&this._log(this._optionsService.options.logger?.debug.bind(this._optionsService.options.logger)??console.log,a,b)}info(a,...b){this._logLevel<=2&&this._log(this._optionsService.options.logger?.info.bind(this._optionsService.options.logger)??console.info,a,b)}warn(a,...b){this._logLevel<=3&&this._log(this._optionsService.options.logger?.warn.bind(this._optionsService.options.logger)??console.warn,a,b)}error(a,...b){this._logLevel<=4&&this._log(this._optionsService.options.logger?.error.bind(this._optionsService.options.logger)??console.error,a,b)}};dT=x([y(0,V)],dT);var dU=class extends aw{constructor(a){super(),this._maxLength=a,this.onDeleteEmitter=this._register(new aP),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this._register(new aP),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this._register(new aP),this.onTrim=this.onTrimEmitter.event,this._array=Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(a){if(this._maxLength===a)return;let b=Array(a);for(let c=0;c<Math.min(a,this.length);c++)b[c]=this._array[this._getCyclicIndex(c)];this._array=b,this._maxLength=a,this._startIndex=0}get length(){return this._length}set length(a){if(a>this._length)for(let b=this._length;b<a;b++)this._array[b]=void 0;this._length=a}get(a){return this._array[this._getCyclicIndex(a)]}set(a,b){this._array[this._getCyclicIndex(a)]=b}push(a){this._array[this._getCyclicIndex(this._length)]=a,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){if(this._length!==this._maxLength)throw Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(a,b,...c){if(b){for(let c=a;c<this._length-b;c++)this._array[this._getCyclicIndex(c)]=this._array[this._getCyclicIndex(c+b)];this._length-=b,this.onDeleteEmitter.fire({index:a,amount:b})}for(let b=this._length-1;b>=a;b--)this._array[this._getCyclicIndex(b+c.length)]=this._array[this._getCyclicIndex(b)];for(let b=0;b<c.length;b++)this._array[this._getCyclicIndex(a+b)]=c[b];if(c.length&&this.onInsertEmitter.fire({index:a,amount:c.length}),this._length+c.length>this._maxLength){let a=this._length+c.length-this._maxLength;this._startIndex+=a,this._length=this._maxLength,this.onTrimEmitter.fire(a)}else this._length+=c.length}trimStart(a){a>this._length&&(a=this._length),this._startIndex+=a,this._length-=a,this.onTrimEmitter.fire(a)}shiftElements(a,b,c){if(!(b<=0)){if(a<0||a>=this._length)throw Error("start argument out of range");if(a+c<0)throw Error("Cannot shift elements in list beyond index 0");if(c>0){for(let d=b-1;d>=0;d--)this.set(a+d+c,this.get(a+d));let d=a+b+c-this._length;if(d>0)for(this._length+=d;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let d=0;d<b;d++)this.set(a+d+c,this.get(a+d))}}_getCyclicIndex(a){return(this._startIndex+a)%this._maxLength}},dV=Object.freeze(new I),dW=0,dX=class a{constructor(a,b,c=!1){this.isWrapped=c,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*a);let d=b||K.fromCharData([0,"",1,0]);for(let b=0;b<a;++b)this.setCell(b,d);this.length=a}get(a){let b=this._data[3*a+0],c=2097151&b;return[this._data[3*a+1],2097152&b?this._combined[a]:c?E(c):"",b>>22,2097152&b?this._combined[a].charCodeAt(this._combined[a].length-1):c]}set(a,b){this._data[3*a+1]=b[0],b[1].length>1?(this._combined[a]=b[1],this._data[3*a+0]=2097152|a|b[2]<<22):this._data[3*a+0]=b[1].charCodeAt(0)|b[2]<<22}getWidth(a){return this._data[3*a+0]>>22}hasWidth(a){return 0xc00000&this._data[3*a+0]}getFg(a){return this._data[3*a+1]}getBg(a){return this._data[3*a+2]}hasContent(a){return 4194303&this._data[3*a+0]}getCodePoint(a){let b=this._data[3*a+0];return 2097152&b?this._combined[a].charCodeAt(this._combined[a].length-1):2097151&b}isCombined(a){return 2097152&this._data[3*a+0]}getString(a){let b=this._data[3*a+0];return 2097152&b?this._combined[a]:2097151&b?E(2097151&b):""}isProtected(a){return 0x20000000&this._data[3*a+2]}loadCell(a,b){return dW=3*a,b.content=this._data[dW+0],b.fg=this._data[dW+1],b.bg=this._data[dW+2],2097152&b.content&&(b.combinedData=this._combined[a]),0x10000000&b.bg&&(b.extended=this._extendedAttrs[a]),b}setCell(a,b){2097152&b.content&&(this._combined[a]=b.combinedData),0x10000000&b.bg&&(this._extendedAttrs[a]=b.extended),this._data[3*a+0]=b.content,this._data[3*a+1]=b.fg,this._data[3*a+2]=b.bg}setCellFromCodepoint(a,b,c,d){0x10000000&d.bg&&(this._extendedAttrs[a]=d.extended),this._data[3*a+0]=b|c<<22,this._data[3*a+1]=d.fg,this._data[3*a+2]=d.bg}addCodepointToCell(a,b,c){let d=this._data[3*a+0];2097152&d?this._combined[a]+=E(b):2097151&d?(this._combined[a]=E(2097151&d)+E(b),d&=-2097152,d|=2097152):d=4194304|b,c&&(d&=-0xc00001,d|=c<<22),this._data[3*a+0]=d}insertCells(a,b,c){if((a%=this.length)&&2===this.getWidth(a-1)&&this.setCellFromCodepoint(a-1,0,1,c),b<this.length-a){let d=new K;for(let c=this.length-a-b-1;c>=0;--c)this.setCell(a+b+c,this.loadCell(a+c,d));for(let d=0;d<b;++d)this.setCell(a+d,c)}else for(let b=a;b<this.length;++b)this.setCell(b,c);2===this.getWidth(this.length-1)&&this.setCellFromCodepoint(this.length-1,0,1,c)}deleteCells(a,b,c){if(a%=this.length,b<this.length-a){let d=new K;for(let c=0;c<this.length-a-b;++c)this.setCell(a+c,this.loadCell(a+b+c,d));for(let a=this.length-b;a<this.length;++a)this.setCell(a,c)}else for(let b=a;b<this.length;++b)this.setCell(b,c);a&&2===this.getWidth(a-1)&&this.setCellFromCodepoint(a-1,0,1,c),0!==this.getWidth(a)||this.hasContent(a)||this.setCellFromCodepoint(a,0,1,c)}replaceCells(a,b,c,d=!1){if(d){for(a&&2===this.getWidth(a-1)&&!this.isProtected(a-1)&&this.setCellFromCodepoint(a-1,0,1,c),b<this.length&&2===this.getWidth(b-1)&&!this.isProtected(b)&&this.setCellFromCodepoint(b,0,1,c);a<b&&a<this.length;)this.isProtected(a)||this.setCell(a,c),a++;return}for(a&&2===this.getWidth(a-1)&&this.setCellFromCodepoint(a-1,0,1,c),b<this.length&&2===this.getWidth(b-1)&&this.setCellFromCodepoint(b,0,1,c);a<b&&a<this.length;)this.setCell(a++,c)}resize(a,b){if(a===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;let c=3*a;if(a>this.length){if(this._data.buffer.byteLength>=4*c)this._data=new Uint32Array(this._data.buffer,0,c);else{let a=new Uint32Array(c);a.set(this._data),this._data=a}for(let c=this.length;c<a;++c)this.setCell(c,b)}else{this._data=this._data.subarray(0,c);let b=Object.keys(this._combined);for(let c=0;c<b.length;c++){let d=parseInt(b[c],10);d>=a&&delete this._combined[d]}let d=Object.keys(this._extendedAttrs);for(let b=0;b<d.length;b++){let c=parseInt(d[b],10);c>=a&&delete this._extendedAttrs[c]}}return this.length=a,4*c*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){let a=new Uint32Array(this._data.length);return a.set(this._data),this._data=a,1}return 0}fill(a,b=!1){if(b){for(let b=0;b<this.length;++b)this.isProtected(b)||this.setCell(b,a);return}this._combined={},this._extendedAttrs={};for(let b=0;b<this.length;++b)this.setCell(b,a)}copyFrom(a){for(let b in this.length!==a.length?this._data=new Uint32Array(a._data):this._data.set(a._data),this.length=a.length,this._combined={},a._combined)this._combined[b]=a._combined[b];for(let b in this._extendedAttrs={},a._extendedAttrs)this._extendedAttrs[b]=a._extendedAttrs[b];this.isWrapped=a.isWrapped}clone(){let b=new a(0);for(let a in b._data=new Uint32Array(this._data),b.length=this.length,this._combined)b._combined[a]=this._combined[a];for(let a in this._extendedAttrs)b._extendedAttrs[a]=this._extendedAttrs[a];return b.isWrapped=this.isWrapped,b}getTrimmedLength(){for(let a=this.length-1;a>=0;--a)if(4194303&this._data[3*a+0])return a+(this._data[3*a+0]>>22);return 0}getNoBgTrimmedLength(){for(let a=this.length-1;a>=0;--a)if(4194303&this._data[3*a+0]||0x3000000&this._data[3*a+2])return a+(this._data[3*a+0]>>22);return 0}copyCellsFrom(a,b,c,d,e){let f=a._data;if(e)for(let e=d-1;e>=0;e--){for(let a=0;a<3;a++)this._data[(c+e)*3+a]=f[(b+e)*3+a];0x10000000&f[(b+e)*3+2]&&(this._extendedAttrs[c+e]=a._extendedAttrs[b+e])}else for(let e=0;e<d;e++){for(let a=0;a<3;a++)this._data[(c+e)*3+a]=f[(b+e)*3+a];0x10000000&f[(b+e)*3+2]&&(this._extendedAttrs[c+e]=a._extendedAttrs[b+e])}let g=Object.keys(a._combined);for(let d=0;d<g.length;d++){let e=parseInt(g[d],10);e>=b&&(this._combined[e-b+c]=a._combined[e])}}translateToString(a,b,c,d){b=b??0,c=c??this.length,a&&(c=Math.min(c,this.getTrimmedLength())),d&&(d.length=0);let e="";for(;b<c;){let a=this._data[3*b+0],c=2097151&a,f=2097152&a?this._combined[b]:c?E(c):" ";if(e+=f,d)for(let a=0;a<f.length;++a)d.push(b);b+=a>>22||1}return d&&d.push(b),e}};function dY(a,b,c){if(b===a.length-1)return a[b].getTrimmedLength();let d=!a[b].hasContent(c-1)&&1===a[b].getWidth(c-1),e=2===a[b+1].getWidth(0);return d&&e?c-1:c}var dZ=class a{constructor(b){this.line=b,this.isDisposed=!1,this._disposables=[],this._id=a._nextId++,this._onDispose=this.register(new aP),this.onDispose=this._onDispose.event}get id(){return this._id}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),as(this._disposables),this._disposables.length=0)}register(a){return this._disposables.push(a),a}};dZ._nextId=1;var d$={},d_=d$.B;d$[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"\xb0",g:"\xb1",h:"",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"\xa3","~":"\xb7"},d$.A={"#":"\xa3"},d$.B=void 0,d$[4]={"#":"\xa3","@":"\xbe","[":"ij","\\":"\xbd","]":"|","{":"\xa8","|":"f","}":"\xbc","~":"\xb4"},d$.C=d$[5]={"[":"\xc4","\\":"\xd6","]":"\xc5","^":"\xdc","`":"\xe9","{":"\xe4","|":"\xf6","}":"\xe5","~":"\xfc"},d$.R={"#":"\xa3","@":"\xe0","[":"\xb0","\\":"\xe7","]":"\xa7","{":"\xe9","|":"\xf9","}":"\xe8","~":"\xa8"},d$.Q={"@":"\xe0","[":"\xe2","\\":"\xe7","]":"\xea","^":"\xee","`":"\xf4","{":"\xe9","|":"\xf9","}":"\xe8","~":"\xfb"},d$.K={"@":"\xa7","[":"\xc4","\\":"\xd6","]":"\xdc","{":"\xe4","|":"\xf6","}":"\xfc","~":"\xdf"},d$.Y={"#":"\xa3","@":"\xa7","[":"\xb0","\\":"\xe7","]":"\xe9","`":"\xf9","{":"\xe0","|":"\xf2","}":"\xe8","~":"\xec"},d$.E=d$[6]={"@":"\xc4","[":"\xc6","\\":"\xd8","]":"\xc5","^":"\xdc","`":"\xe4","{":"\xe6","|":"\xf8","}":"\xe5","~":"\xfc"},d$.Z={"#":"\xa3","@":"\xa7","[":"\xa1","\\":"\xd1","]":"\xbf","{":"\xb0","|":"\xf1","}":"\xe7"},d$.H=d$[7]={"@":"\xc9","[":"\xc4","\\":"\xd6","]":"\xc5","^":"\xdc","`":"\xe9","{":"\xe4","|":"\xf6","}":"\xe5","~":"\xfc"},d$["="]={"#":"\xf9","@":"\xe0","[":"\xe9","\\":"\xe7","]":"\xea","^":"\xee",_:"\xe8","`":"\xf4","{":"\xe4","|":"\xf6","}":"\xfc","~":"\xfb"};var d0=class{constructor(a,b,c){this._hasScrollback=a,this._optionsService=b,this._bufferService=c,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=dV.clone(),this.savedCharset=d_,this.markers=[],this._nullCell=K.fromCharData([0,"",1,0]),this._whitespaceCell=K.fromCharData([0," ",1,32]),this._isClearing=!1,this._memoryCleanupQueue=new du,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new dU(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(a){return a?(this._nullCell.fg=a.fg,this._nullCell.bg=a.bg,this._nullCell.extended=a.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new J),this._nullCell}getWhitespaceCell(a){return a?(this._whitespaceCell.fg=a.fg,this._whitespaceCell.bg=a.bg,this._whitespaceCell.extended=a.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new J),this._whitespaceCell}getBlankLine(a,b){return new dX(this._bufferService.cols,this.getNullCell(a),b)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){let a=this.ybase+this.y-this.ydisp;return a>=0&&a<this._rows}_getCorrectBufferLength(a){if(!this._hasScrollback)return a;let b=a+this._optionsService.rawOptions.scrollback;return b>0xffffffff?0xffffffff:b}fillViewportRows(a){if(0===this.lines.length){void 0===a&&(a=dV);let b=this._rows;for(;b--;)this.lines.push(this.getBlankLine(a))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new dU(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(a,b){let c=this.getNullCell(dV),d=0,e=this._getCorrectBufferLength(b);if(e>this.lines.maxLength&&(this.lines.maxLength=e),this.lines.length>0){if(this._cols<a)for(let b=0;b<this.lines.length;b++)d+=+this.lines.get(b).resize(a,c);let f=0;if(this._rows<b)for(let d=this._rows;d<b;d++)this.lines.length<b+this.ybase&&(this._optionsService.rawOptions.windowsMode||void 0!==this._optionsService.rawOptions.windowsPty.backend||void 0!==this._optionsService.rawOptions.windowsPty.buildNumber?this.lines.push(new dX(a,c)):this.ybase>0&&this.lines.length<=this.ybase+this.y+f+1?(this.ybase--,f++,this.ydisp>0&&this.ydisp--):this.lines.push(new dX(a,c)));else for(let a=this._rows;a>b;a--)this.lines.length>b+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(e<this.lines.maxLength){let a=this.lines.length-e;a>0&&(this.lines.trimStart(a),this.ybase=Math.max(this.ybase-a,0),this.ydisp=Math.max(this.ydisp-a,0),this.savedY=Math.max(this.savedY-a,0)),this.lines.maxLength=e}this.x=Math.min(this.x,a-1),this.y=Math.min(this.y,b-1),f&&(this.y+=f),this.savedX=Math.min(this.savedX,a-1),this.scrollTop=0}if(this.scrollBottom=b-1,this._isReflowEnabled&&(this._reflow(a,b),this._cols>a))for(let b=0;b<this.lines.length;b++)d+=+this.lines.get(b).resize(a,c);this._cols=a,this._rows=b,this._memoryCleanupQueue.clear(),d>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue(()=>this._batchedMemoryCleanup()))}_batchedMemoryCleanup(){let a=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,a=!1);let b=0;for(;this._memoryCleanupPosition<this.lines.length;)if((b+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory())>100)return!0;return a}get _isReflowEnabled(){let a=this._optionsService.rawOptions.windowsPty;return a&&a.buildNumber?this._hasScrollback&&"conpty"===a.backend&&a.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(a,b){this._cols!==a&&(a>this._cols?this._reflowLarger(a,b):this._reflowSmaller(a,b))}_reflowLarger(a,b){let c=this._optionsService.rawOptions.reflowCursorLine,d=function(a,b,c,d,e,f){let g=[];for(let h=0;h<a.length-1;h++){let i=h,j=a.get(++i);if(!j.isWrapped)continue;let k=[a.get(h)];for(;i<a.length&&j.isWrapped;)k.push(j),j=a.get(++i);if(!f&&d>=h&&d<i){h+=k.length-1;continue}let l=0,m=dY(k,0,b),n=1,o=0;for(;n<k.length;){let a=dY(k,n,b),d=Math.min(a-o,c-m);k[l].copyCellsFrom(k[n],o,m,d,!1),(m+=d)===c&&(l++,m=0),(o+=d)===a&&(n++,o=0),0===m&&0!==l&&2===k[l-1].getWidth(c-1)&&(k[l].copyCellsFrom(k[l-1],c-1,m++,1,!1),k[l-1].setCell(c-1,e))}k[l].replaceCells(m,c,e);let p=0;for(let a=k.length-1;a>0&&(a>l||0===k[a].getTrimmedLength());a--)p++;p>0&&(g.push(h+k.length-p),g.push(p)),h+=k.length-1}return g}(this.lines,this._cols,a,this.ybase+this.y,this.getNullCell(dV),c);if(d.length>0){let c=function(a,b){let c=[],d=0,e=b[0],f=0;for(let g=0;g<a.length;g++)if(e===g){let c=b[++d];a.onDeleteEmitter.fire({index:g-f,amount:c}),g+=c-1,f+=c,e=b[++d]}else c.push(g);return{layout:c,countRemoved:f}}(this.lines,d);(function(a,b){let c=[];for(let d=0;d<b.length;d++)c.push(a.get(b[d]));for(let b=0;b<c.length;b++)a.set(b,c[b]);a.length=b.length})(this.lines,c.layout),this._reflowLargerAdjustViewport(a,b,c.countRemoved)}}_reflowLargerAdjustViewport(a,b,c){let d=this.getNullCell(dV),e=c;for(;e-- >0;)0===this.ybase?(this.y>0&&this.y--,this.lines.length<b&&this.lines.push(new dX(a,d))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-c,0)}_reflowSmaller(a,b){let c=this._optionsService.rawOptions.reflowCursorLine,d=this.getNullCell(dV),e=[],f=0;for(let g=this.lines.length-1;g>=0;g--){let h=this.lines.get(g);if(!h||!h.isWrapped&&h.getTrimmedLength()<=a)continue;let i=[h];for(;h.isWrapped&&g>0;)h=this.lines.get(--g),i.unshift(h);if(!c){let a=this.ybase+this.y;if(a>=g&&a<g+i.length)continue}let j=i[i.length-1].getTrimmedLength(),k=function(a,b,c){let d=[],e=a.map((c,d)=>dY(a,d,b)).reduce((a,b)=>a+b),f=0,g=0,h=0;for(;h<e;){if(e-h<c){d.push(e-h);break}f+=c;let i=dY(a,g,b);f>i&&(f-=i,g++);let j=2===a[g].getWidth(f-1);j&&f--;let k=j?c-1:c;d.push(k),h+=k}return d}(i,this._cols,a),l=k.length-i.length,m;m=0===this.ybase&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+l):Math.max(0,this.lines.length-this.lines.maxLength+l);let n=[];for(let a=0;a<l;a++){let a=this.getBlankLine(dV,!0);n.push(a)}n.length>0&&(e.push({start:g+i.length+f,newLines:n}),f+=n.length),i.push(...n);let o=k.length-1,p=k[o];0===p&&(p=k[--o]);let q=i.length-l-1,r=j;for(;q>=0;){let a=Math.min(r,p);if(void 0===i[o])break;i[o].copyCellsFrom(i[q],r-a,p-a,a,!0),0==(p-=a)&&(p=k[--o]),0==(r-=a)&&(r=dY(i,Math.max(--q,0),this._cols))}for(let b=0;b<i.length;b++)k[b]<a&&i[b].setCell(k[b],d);let s=l-m;for(;s-- >0;)0===this.ybase?this.y<b-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+f)-b&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+l,this.ybase+b-1)}if(e.length>0){let a=[],b=[];for(let a=0;a<this.lines.length;a++)b.push(this.lines.get(a));let c=this.lines.length,d=c-1,g=0,h=e[0];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+f);let i=0;for(let j=Math.min(this.lines.maxLength-1,c+f-1);j>=0;j--)if(h&&h.start>d+i){for(let a=h.newLines.length-1;a>=0;a--)this.lines.set(j--,h.newLines[a]);j++,a.push({index:d+1,amount:h.newLines.length}),i+=h.newLines.length,h=e[++g]}else this.lines.set(j,b[d--]);let j=0;for(let b=a.length-1;b>=0;b--)a[b].index+=j,this.lines.onInsertEmitter.fire(a[b]),j+=a[b].amount;let k=Math.max(0,c+f-this.lines.maxLength);k>0&&this.lines.onTrimEmitter.fire(k)}}translateBufferLineToString(a,b,c=0,d){let e=this.lines.get(a);return e?e.translateToString(b,c,d):""}getWrappedRangeForLine(a){let b=a,c=a;for(;b>0&&this.lines.get(b).isWrapped;)b--;for(;c+1<this.lines.length&&this.lines.get(c+1).isWrapped;)c++;return{first:b,last:c}}setupTabStops(a){for(null!=a?this.tabs[a]||(a=this.prevStop(a)):(this.tabs={},a=0);a<this._cols;a+=this._optionsService.rawOptions.tabStopWidth)this.tabs[a]=!0}prevStop(a){for(null==a&&(a=this.x);!this.tabs[--a]&&a>0;);return a>=this._cols?this._cols-1:a<0?0:a}nextStop(a){for(null==a&&(a=this.x);!this.tabs[++a]&&a<this._cols;);return a>=this._cols?this._cols-1:a<0?0:a}clearMarkers(a){this._isClearing=!0;for(let b=0;b<this.markers.length;b++)this.markers[b].line===a&&(this.markers[b].dispose(),this.markers.splice(b--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let a=0;a<this.markers.length;a++)this.markers[a].dispose();this.markers.length=0,this._isClearing=!1}addMarker(a){let b=new dZ(a);return this.markers.push(b),b.register(this.lines.onTrim(a=>{b.line-=a,b.line<0&&b.dispose()})),b.register(this.lines.onInsert(a=>{b.line>=a.index&&(b.line+=a.amount)})),b.register(this.lines.onDelete(a=>{b.line>=a.index&&b.line<a.index+a.amount&&b.dispose(),b.line>a.index&&(b.line-=a.amount)})),b.register(b.onDispose(()=>this._removeMarker(b))),b}_removeMarker(a){this._isClearing||this.markers.splice(this.markers.indexOf(a),1)}},d1=class extends aw{constructor(a,b){super(),this._optionsService=a,this._bufferService=b,this._onBufferActivate=this._register(new aP),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this._register(this._optionsService.onSpecificOptionChange("scrollback",()=>this.resize(this._bufferService.cols,this._bufferService.rows))),this._register(this._optionsService.onSpecificOptionChange("tabStopWidth",()=>this.setupTabStops()))}reset(){this._normal=new d0(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new d0(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(a){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(a),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(a,b){this._normal.resize(a,b),this._alt.resize(a,b),this.setupTabStops(a)}setupTabStops(a){this._normal.setupTabStops(a),this._alt.setupTabStops(a)}},d2=class extends aw{constructor(a){super(),this.isUserScrolling=!1,this._onResize=this._register(new aP),this.onResize=this._onResize.event,this._onScroll=this._register(new aP),this.onScroll=this._onScroll.event,this.cols=Math.max(a.rawOptions.cols||0,2),this.rows=Math.max(a.rawOptions.rows||0,1),this.buffers=this._register(new d1(a,this)),this._register(this.buffers.onBufferActivate(a=>{this._onScroll.fire(a.activeBuffer.ydisp)}))}get buffer(){return this.buffers.active}resize(a,b){let c=this.cols!==a,d=this.rows!==b;this.cols=a,this.rows=b,this.buffers.resize(a,b),this._onResize.fire({cols:a,rows:b,colsChanged:c,rowsChanged:d})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(a,b=!1){let c=this.buffer,d;(d=this._cachedBlankLine)&&d.length===this.cols&&d.getFg(0)===a.fg&&d.getBg(0)===a.bg||(d=c.getBlankLine(a,b),this._cachedBlankLine=d),d.isWrapped=b;let e=c.ybase+c.scrollTop,f=c.ybase+c.scrollBottom;if(0===c.scrollTop){let a=c.lines.isFull;f===c.lines.length-1?a?c.lines.recycle().copyFrom(d):c.lines.push(d.clone()):c.lines.splice(f+1,0,d.clone()),a?this.isUserScrolling&&(c.ydisp=Math.max(c.ydisp-1,0)):(c.ybase++,this.isUserScrolling||c.ydisp++)}else{let a=f-e+1;c.lines.shiftElements(e+1,a-1,-1),c.lines.set(f,d.clone())}this.isUserScrolling||(c.ydisp=c.ybase),this._onScroll.fire(c.ydisp)}scrollLines(a,b){let c=this.buffer;if(a<0){if(0===c.ydisp)return;this.isUserScrolling=!0}else a+c.ydisp>=c.ybase&&(this.isUserScrolling=!1);let d=c.ydisp;c.ydisp=Math.max(Math.min(c.ydisp+a,c.ybase),0),d!==c.ydisp&&(b||this._onScroll.fire(c.ydisp))}};d2=x([y(0,V)],d2);var d3={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnEraseInDisplay:!1,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},reflowCursorLine:!1,rescaleOverlappingGlyphs:!1,rightClickSelectsWord:dk,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRuler:{}},d4=["normal","bold","100","200","300","400","500","600","700","800","900"],d5=class extends aw{constructor(a){super(),this._onOptionChange=this._register(new aP),this.onOptionChange=this._onOptionChange.event;let b={...d3};for(let c in a)if(c in b)try{let d=a[c];b[c]=this._sanitizeAndValidateOption(c,d)}catch(a){console.error(a)}this.rawOptions=b,this.options={...b},this._setupOptions(),this._register(at(()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null}))}onSpecificOptionChange(a,b){return this.onOptionChange(c=>{c===a&&b(this.rawOptions[a])})}onMultipleOptionChange(a,b){return this.onOptionChange(c=>{-1!==a.indexOf(c)&&b()})}_setupOptions(){let a=a=>{if(!(a in d3))throw Error(`No option with key "${a}"`);return this.rawOptions[a]},b=(a,b)=>{if(!(a in d3))throw Error(`No option with key "${a}"`);b=this._sanitizeAndValidateOption(a,b),this.rawOptions[a]!==b&&(this.rawOptions[a]=b,this._onOptionChange.fire(a))};for(let c in this.rawOptions){let d={get:a.bind(this,c),set:b.bind(this,c)};Object.defineProperty(this.options,c,d)}}_sanitizeAndValidateOption(a,b){switch(a){case"cursorStyle":var c;if(b||(b=d3[a]),"block"!==(c=b)&&"underline"!==c&&"bar"!==c)throw Error(`"${b}" is not a valid value for ${a}`);break;case"wordSeparator":b||(b=d3[a]);break;case"fontWeight":case"fontWeightBold":if("number"==typeof b&&1<=b&&b<=1e3)break;b=d4.includes(b)?b:d3[a];break;case"cursorWidth":b=Math.floor(b);case"lineHeight":case"tabStopWidth":if(b<1)throw Error(`${a} cannot be less than 1, value: ${b}`);break;case"minimumContrastRatio":b=Math.max(1,Math.min(21,Math.round(10*b)/10));break;case"scrollback":if((b=Math.min(b,0xffffffff))<0)throw Error(`${a} cannot be less than 0, value: ${b}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(b<=0)throw Error(`${a} cannot be less than or equal to 0, value: ${b}`);break;case"rows":case"cols":if(!b&&0!==b)throw Error(`${a} must be numeric, value: ${b}`);break;case"windowsPty":b=b??{}}return b}};function d6(a,b=5){if("object"!=typeof a)return a;let c=Array.isArray(a)?[]:{};for(let d in a)c[d]=b<=1?a[d]:a[d]&&d6(a[d],b-1);return c}var d7=Object.freeze({insertMode:!1}),d8=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,cursorBlink:void 0,cursorStyle:void 0,origin:!1,reverseWraparound:!1,sendFocus:!1,synchronizedOutput:!1,wraparound:!0}),d9=class extends aw{constructor(a,b,c){super(),this._bufferService=a,this._logService=b,this._optionsService=c,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this._register(new aP),this.onData=this._onData.event,this._onUserInput=this._register(new aP),this.onUserInput=this._onUserInput.event,this._onBinary=this._register(new aP),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this._register(new aP),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=d6(d7),this.decPrivateModes=d6(d8)}reset(){this.modes=d6(d7),this.decPrivateModes=d6(d8)}triggerDataEvent(a,b=!1){if(this._optionsService.rawOptions.disableStdin)return;let c=this._bufferService.buffer;b&&this._optionsService.rawOptions.scrollOnUserInput&&c.ybase!==c.ydisp&&this._onRequestScrollToBottom.fire(),b&&this._onUserInput.fire(),this._logService.debug(`sending data "${a}"`),this._logService.trace("sending data (codes)",()=>a.split("").map(a=>a.charCodeAt(0))),this._onData.fire(a)}triggerBinaryEvent(a){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${a}"`),this._logService.trace("sending binary (codes)",()=>a.split("").map(a=>a.charCodeAt(0))),this._onBinary.fire(a))}};d9=x([y(0,P),y(1,U),y(2,V)],d9);var ea={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:a=>4!==a.button&&1===a.action&&(a.ctrl=!1,a.alt=!1,a.shift=!1,!0)},VT200:{events:19,restrict:a=>32!==a.action},DRAG:{events:23,restrict:a=>32!==a.action||3!==a.button},ANY:{events:31,restrict:a=>!0}};function eb(a,b){let c=16*!!a.ctrl|4*!!a.shift|8*!!a.alt;return 4===a.button?(c|=64,c|=a.action):(c|=3&a.button,4&a.button&&(c|=64),8&a.button&&(c|=128),32===a.action?c|=32:0!==a.action||b||(c|=3)),c}var ec=String.fromCharCode,ed={DEFAULT:a=>{let b=[eb(a,!1)+32,a.col+32,a.row+32];return b[0]>255||b[1]>255||b[2]>255?"":`\x1b[M${ec(b[0])}${ec(b[1])}${ec(b[2])}`},SGR:a=>{let b=0===a.action&&4!==a.button?"m":"M";return`\x1b[<${eb(a,!0)};${a.col};${a.row}${b}`},SGR_PIXELS:a=>{let b=0===a.action&&4!==a.button?"m":"M";return`\x1b[<${eb(a,!0)};${a.x};${a.y}${b}`}},ee=class extends aw{constructor(a,b,c){for(let d of(super(),this._bufferService=a,this._coreService=b,this._optionsService=c,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._wheelPartialScroll=0,this._onProtocolChange=this._register(new aP),this.onProtocolChange=this._onProtocolChange.event,Object.keys(ea)))this.addProtocol(d,ea[d]);for(let a of Object.keys(ed))this.addEncoding(a,ed[a]);this.reset()}addProtocol(a,b){this._protocols[a]=b}addEncoding(a,b){this._encodings[a]=b}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return 0!==this._protocols[this._activeProtocol].events}set activeProtocol(a){if(!this._protocols[a])throw Error(`unknown protocol "${a}"`);this._activeProtocol=a,this._onProtocolChange.fire(this._protocols[a].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(a){if(!this._encodings[a])throw Error(`unknown encoding "${a}"`);this._activeEncoding=a}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null,this._wheelPartialScroll=0}consumeWheelEvent(a,b,c){if(0===a.deltaY||a.shiftKey||void 0===b||void 0===c)return 0;let d=this._applyScrollModifier(a.deltaY,a);return a.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(d/=b/c+0,50>Math.abs(a.deltaY)&&(d*=.3),this._wheelPartialScroll+=d,d=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):a.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(d*=this._bufferService.rows),d}_applyScrollModifier(a,b){return b.altKey||b.ctrlKey||b.shiftKey?a*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:a*this._optionsService.rawOptions.scrollSensitivity}triggerMouseEvent(a){if(a.col<0||a.col>=this._bufferService.cols||a.row<0||a.row>=this._bufferService.rows||4===a.button&&32===a.action||3===a.button&&32!==a.action||4!==a.button&&(2===a.action||3===a.action)||(a.col++,a.row++,32===a.action&&this._lastEvent&&this._equalEvents(this._lastEvent,a,"SGR_PIXELS"===this._activeEncoding))||!this._protocols[this._activeProtocol].restrict(a))return!1;let b=this._encodings[this._activeEncoding](a);return b&&("DEFAULT"===this._activeEncoding?this._coreService.triggerBinaryEvent(b):this._coreService.triggerDataEvent(b,!0)),this._lastEvent=a,!0}explainEvents(a){return{down:!!(1&a),up:!!(2&a),drag:!!(4&a),move:!!(8&a),wheel:!!(16&a)}}_equalEvents(a,b,c){if(c){if(a.x!==b.x||a.y!==b.y)return!1}else if(a.col!==b.col||a.row!==b.row)return!1;return a.button===b.button&&a.action===b.action&&a.ctrl===b.ctrl&&a.alt===b.alt&&a.shift===b.shift}};ee=x([y(0,P),y(1,R),y(2,V)],ee);var ef,eg,eh,ei,ej,ek,el=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],em=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],en=class{constructor(){if(this.version="6",!ek){(ek=new Uint8Array(65536)).fill(1),ek[0]=0,ek.fill(0,1,32),ek.fill(0,127,160),ek.fill(2,4352,4448),ek[9001]=2,ek[9002]=2,ek.fill(2,11904,42192),ek[12351]=1,ek.fill(2,44032,55204),ek.fill(2,63744,64256),ek.fill(2,65040,65050),ek.fill(2,65072,65136),ek.fill(2,65280,65377),ek.fill(2,65504,65511);for(let a=0;a<el.length;++a)ek.fill(0,el[a][0],el[a][1]+1)}}wcwidth(a){return a<32?0:a<127?1:a<65536?ek[a]:!function(a,b){let c=0,d=b.length-1,e;if(a<b[0][0]||a>b[d][1])return!1;for(;d>=c;)if(a>b[e=c+d>>1][1])c=e+1;else{if(!(a<b[e][0]))return!0;d=e-1}return!1}(a,em)?a>=131072&&a<=196605||a>=196608&&a<=262141?2:1:0}charProperties(a,b){let c=this.wcwidth(a),d=0===c&&0!==b;if(d){let a=eo.extractWidth(b);0===a?d=!1:a>c&&(c=a)}return eo.createPropertyValue(0,c,d)}},eo=class a{constructor(){this._providers=Object.create(null),this._active="",this._onChange=new aP,this.onChange=this._onChange.event;let a=new en;this.register(a),this._active=a.version,this._activeProvider=a}static extractShouldJoin(a){return(1&a)!=0}static extractWidth(a){return a>>1&3}static extractCharKind(a){return a>>3}static createPropertyValue(a,b,c=!1){return(0xffffff&a)<<3|(3&b)<<1|!!c}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(a){if(!this._providers[a])throw Error(`unknown Unicode version "${a}"`);this._active=a,this._activeProvider=this._providers[a],this._onChange.fire(a)}register(a){this._providers[a.version]=a}wcwidth(a){return this._activeProvider.wcwidth(a)}getStringCellWidth(b){let c=0,d=0,e=b.length;for(let f=0;f<e;++f){let g=b.charCodeAt(f);if(55296<=g&&g<=56319){if(++f>=e)return c+this.wcwidth(g);let a=b.charCodeAt(f);56320<=a&&a<=57343?g=(g-55296)*1024+a-56320+65536:c+=this.wcwidth(a)}let h=this.charProperties(g,d),i=a.extractWidth(h);a.extractShouldJoin(h)&&(i-=a.extractWidth(d)),c+=i,d=h}return c}charProperties(a,b){return this._activeProvider.charProperties(a,b)}},ep=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(a){this.glevel=a,this.charset=this._charsets[a]}setgCharset(a,b){this._charsets[a]=b,this.glevel===a&&(this.charset=b)}};function eq(a){let b=a.buffer.lines.get(a.buffer.ybase+a.buffer.y-1)?.get(a.cols-1),c=a.buffer.lines.get(a.buffer.ybase+a.buffer.y);c&&b&&(c.isWrapped=0!==b[3]&&32!==b[3])}var er=class a{constructor(a=32,b=32){if(this.maxLength=a,this.maxSubParamsLength=b,b>256)throw Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(a),this.length=0,this._subParams=new Int32Array(b),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(a),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}static fromArray(b){let c=new a;if(!b.length)return c;for(let a=+!!Array.isArray(b[0]);a<b.length;++a){let d=b[a];if(Array.isArray(d))for(let a=0;a<d.length;++a)c.addSubParam(d[a]);else c.addParam(d)}return c}clone(){let b=new a(this.maxLength,this.maxSubParamsLength);return b.params.set(this.params),b.length=this.length,b._subParams.set(this._subParams),b._subParamsLength=this._subParamsLength,b._subParamsIdx.set(this._subParamsIdx),b._rejectDigits=this._rejectDigits,b._rejectSubDigits=this._rejectSubDigits,b._digitIsSub=this._digitIsSub,b}toArray(){let a=[];for(let b=0;b<this.length;++b){a.push(this.params[b]);let c=this._subParamsIdx[b]>>8,d=255&this._subParamsIdx[b];d-c>0&&a.push(Array.prototype.slice.call(this._subParams,c,d))}return a}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(a){if(this._digitIsSub=!1,this.length>=this.maxLength){this._rejectDigits=!0;return}if(a<-1)throw Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=a>0x7fffffff?0x7fffffff:a}addSubParam(a){if(this._digitIsSub=!0,this.length){if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength){this._rejectSubDigits=!0;return}if(a<-1)throw Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=a>0x7fffffff?0x7fffffff:a,this._subParamsIdx[this.length-1]++}}hasSubParams(a){return(255&this._subParamsIdx[a])-(this._subParamsIdx[a]>>8)>0}getSubParams(a){let b=this._subParamsIdx[a]>>8,c=255&this._subParamsIdx[a];return c-b>0?this._subParams.subarray(b,c):null}getSubParamsAll(){let a={};for(let b=0;b<this.length;++b){let c=this._subParamsIdx[b]>>8,d=255&this._subParamsIdx[b];d-c>0&&(a[b]=this._subParams.slice(c,d))}return a}addDigit(a){let b;if(this._rejectDigits||!(b=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;let c=this._digitIsSub?this._subParams:this.params,d=c[b-1];c[b-1]=~d?Math.min(10*d+a,0x7fffffff):a}},es=[],et=class{constructor(){this._state=0,this._active=es,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(a,b){void 0===this._handlers[a]&&(this._handlers[a]=[]);let c=this._handlers[a];return c.push(b),{dispose:()=>{let a=c.indexOf(b);-1!==a&&c.splice(a,1)}}}clearHandler(a){this._handlers[a]&&delete this._handlers[a]}setHandlerFallback(a){this._handlerFb=a}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=es}reset(){if(2===this._state)for(let a=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;a>=0;--a)this._active[a].end(!1);this._stack.paused=!1,this._active=es,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||es,this._active.length)for(let a=this._active.length-1;a>=0;a--)this._active[a].start();else this._handlerFb(this._id,"START")}_put(a,b,c){if(this._active.length)for(let d=this._active.length-1;d>=0;d--)this._active[d].put(a,b,c);else this._handlerFb(this._id,"PUT",F(a,b,c))}start(){this.reset(),this._state=1}put(a,b,c){if(3!==this._state){if(1===this._state)for(;b<c;){let c=a[b++];if(59===c){this._state=2,this._start();break}if(c<48||57<c){this._state=3;return}-1===this._id&&(this._id=0),this._id=10*this._id+c-48}2===this._state&&c-b>0&&this._put(a,b,c)}}end(a,b=!0){if(0!==this._state){if(3!==this._state)if(1===this._state&&this._start(),this._active.length){let c=!1,d=this._active.length-1,e=!1;if(this._stack.paused&&(d=this._stack.loopPosition-1,c=b,e=this._stack.fallThrough,this._stack.paused=!1),!e&&!1===c){for(;d>=0&&!0!==(c=this._active[d].end(a));d--)if(c instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=d,this._stack.fallThrough=!1,c;d--}for(;d>=0;d--)if((c=this._active[d].end(!1))instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=d,this._stack.fallThrough=!0,c}else this._handlerFb(this._id,"END",a);this._active=es,this._id=-1,this._state=0}}},eu=class{constructor(a){this._handler=a,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(a,b,c){this._hitLimit||(this._data+=F(a,b,c),this._data.length>1e7&&(this._data="",this._hitLimit=!0))}end(a){let b=!1;if(this._hitLimit)b=!1;else if(a&&(b=this._handler(this._data))instanceof Promise)return b.then(a=>(this._data="",this._hitLimit=!1,a));return this._data="",this._hitLimit=!1,b}},ev=[],ew=class{constructor(){this._handlers=Object.create(null),this._active=ev,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=ev}registerHandler(a,b){void 0===this._handlers[a]&&(this._handlers[a]=[]);let c=this._handlers[a];return c.push(b),{dispose:()=>{let a=c.indexOf(b);-1!==a&&c.splice(a,1)}}}clearHandler(a){this._handlers[a]&&delete this._handlers[a]}setHandlerFallback(a){this._handlerFb=a}reset(){if(this._active.length)for(let a=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;a>=0;--a)this._active[a].unhook(!1);this._stack.paused=!1,this._active=ev,this._ident=0}hook(a,b){if(this.reset(),this._ident=a,this._active=this._handlers[a]||ev,this._active.length)for(let a=this._active.length-1;a>=0;a--)this._active[a].hook(b);else this._handlerFb(this._ident,"HOOK",b)}put(a,b,c){if(this._active.length)for(let d=this._active.length-1;d>=0;d--)this._active[d].put(a,b,c);else this._handlerFb(this._ident,"PUT",F(a,b,c))}unhook(a,b=!0){if(this._active.length){let c=!1,d=this._active.length-1,e=!1;if(this._stack.paused&&(d=this._stack.loopPosition-1,c=b,e=this._stack.fallThrough,this._stack.paused=!1),!e&&!1===c){for(;d>=0&&!0!==(c=this._active[d].unhook(a));d--)if(c instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=d,this._stack.fallThrough=!1,c;d--}for(;d>=0;d--)if((c=this._active[d].unhook(!1))instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=d,this._stack.fallThrough=!0,c}else this._handlerFb(this._ident,"UNHOOK",a);this._active=ev,this._ident=0}},ex=new er;ex.addParam(0);var ey=class{constructor(a){this._handler=a,this._data="",this._params=ex,this._hitLimit=!1}hook(a){this._params=a.length>1||a.params[0]?a.clone():ex,this._data="",this._hitLimit=!1}put(a,b,c){this._hitLimit||(this._data+=F(a,b,c),this._data.length>1e7&&(this._data="",this._hitLimit=!0))}unhook(a){let b=!1;if(this._hitLimit)b=!1;else if(a&&(b=this._handler(this._data,this._params))instanceof Promise)return b.then(a=>(this._params=ex,this._data="",this._hitLimit=!1,a));return this._params=ex,this._data="",this._hitLimit=!1,b}},ez=class{constructor(a){this.table=new Uint8Array(a)}setDefault(a,b){this.table.fill(a<<4|b)}add(a,b,c,d){this.table[b<<8|a]=c<<4|d}addMany(a,b,c,d){for(let e=0;e<a.length;e++)this.table[b<<8|a[e]]=c<<4|d}},eA=function(){let a=new ez(4095),b=Array.apply(null,Array(256)).map((a,b)=>b),c=(a,c)=>b.slice(a,c),d=c(32,127),e=c(0,24);e.push(25),e.push.apply(e,c(28,32));let f=c(0,14),g;for(g in a.setDefault(1,0),a.addMany(d,0,2,0),f)a.addMany([24,26,153,154],g,3,0),a.addMany(c(128,144),g,3,0),a.addMany(c(144,152),g,3,0),a.add(156,g,0,0),a.add(27,g,11,1),a.add(157,g,4,8),a.addMany([152,158,159],g,0,7),a.add(155,g,11,3),a.add(144,g,11,9);return a.addMany(e,0,3,0),a.addMany(e,1,3,1),a.add(127,1,0,1),a.addMany(e,8,0,8),a.addMany(e,3,3,3),a.add(127,3,0,3),a.addMany(e,4,3,4),a.add(127,4,0,4),a.addMany(e,6,3,6),a.addMany(e,5,3,5),a.add(127,5,0,5),a.addMany(e,2,3,2),a.add(127,2,0,2),a.add(93,1,4,8),a.addMany(d,8,5,8),a.add(127,8,5,8),a.addMany([156,27,24,26,7],8,6,0),a.addMany(c(28,32),8,0,8),a.addMany([88,94,95],1,0,7),a.addMany(d,7,0,7),a.addMany(e,7,0,7),a.add(156,7,0,0),a.add(127,7,0,7),a.add(91,1,11,3),a.addMany(c(64,127),3,7,0),a.addMany(c(48,60),3,8,4),a.addMany([60,61,62,63],3,9,4),a.addMany(c(48,60),4,8,4),a.addMany(c(64,127),4,7,0),a.addMany([60,61,62,63],4,0,6),a.addMany(c(32,64),6,0,6),a.add(127,6,0,6),a.addMany(c(64,127),6,0,0),a.addMany(c(32,48),3,9,5),a.addMany(c(32,48),5,9,5),a.addMany(c(48,64),5,0,6),a.addMany(c(64,127),5,7,0),a.addMany(c(32,48),4,9,5),a.addMany(c(32,48),1,9,2),a.addMany(c(32,48),2,9,2),a.addMany(c(48,127),2,10,0),a.addMany(c(48,80),1,10,0),a.addMany(c(81,88),1,10,0),a.addMany([89,90,92],1,10,0),a.addMany(c(96,127),1,10,0),a.add(80,1,11,9),a.addMany(e,9,0,9),a.add(127,9,0,9),a.addMany(c(28,32),9,0,9),a.addMany(c(32,48),9,9,12),a.addMany(c(48,60),9,8,10),a.addMany([60,61,62,63],9,9,10),a.addMany(e,11,0,11),a.addMany(c(32,128),11,0,11),a.addMany(c(28,32),11,0,11),a.addMany(e,10,0,10),a.add(127,10,0,10),a.addMany(c(28,32),10,0,10),a.addMany(c(48,60),10,8,10),a.addMany([60,61,62,63],10,0,11),a.addMany(c(32,48),10,9,12),a.addMany(e,12,0,12),a.add(127,12,0,12),a.addMany(c(28,32),12,0,12),a.addMany(c(32,48),12,9,12),a.addMany(c(48,64),12,0,11),a.addMany(c(64,127),12,12,13),a.addMany(c(64,127),10,12,13),a.addMany(c(64,127),9,12,13),a.addMany(e,13,13,13),a.addMany(d,13,13,13),a.add(127,13,0,13),a.addMany([27,156,24,26],13,14,0),a.add(160,0,2,0),a.add(160,8,5,8),a.add(160,6,0,6),a.add(160,11,0,11),a.add(160,13,13,13),a}(),eB=class extends aw{constructor(a=eA){super(),this._transitions=a,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new er,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(a,b,c)=>{},this._executeHandlerFb=a=>{},this._csiHandlerFb=(a,b)=>{},this._escHandlerFb=a=>{},this._errorHandlerFb=a=>a,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this._register(at(()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)})),this._oscParser=this._register(new et),this._dcsParser=this._register(new ew),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},()=>!0)}_identifier(a,b=[64,126]){let c=0;if(a.prefix){if(a.prefix.length>1)throw Error("only one byte as prefix supported");if((c=a.prefix.charCodeAt(0))&&60>c||c>63)throw Error("prefix must be in range 0x3c .. 0x3f")}if(a.intermediates){if(a.intermediates.length>2)throw Error("only two bytes as intermediates are supported");for(let b=0;b<a.intermediates.length;++b){let d=a.intermediates.charCodeAt(b);if(32>d||d>47)throw Error("intermediate must be in range 0x20 .. 0x2f");c<<=8,c|=d}}if(1!==a.final.length)throw Error("final must be a single byte");let d=a.final.charCodeAt(0);if(b[0]>d||d>b[1])throw Error(`final must be in range ${b[0]} .. ${b[1]}`);return c<<=8,c|=d}identToString(a){let b=[];for(;a;)b.push(String.fromCharCode(255&a)),a>>=8;return b.reverse().join("")}setPrintHandler(a){this._printHandler=a}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(a,b){let c=this._identifier(a,[48,126]);void 0===this._escHandlers[c]&&(this._escHandlers[c]=[]);let d=this._escHandlers[c];return d.push(b),{dispose:()=>{let a=d.indexOf(b);-1!==a&&d.splice(a,1)}}}clearEscHandler(a){this._escHandlers[this._identifier(a,[48,126])]&&delete this._escHandlers[this._identifier(a,[48,126])]}setEscHandlerFallback(a){this._escHandlerFb=a}setExecuteHandler(a,b){this._executeHandlers[a.charCodeAt(0)]=b}clearExecuteHandler(a){this._executeHandlers[a.charCodeAt(0)]&&delete this._executeHandlers[a.charCodeAt(0)]}setExecuteHandlerFallback(a){this._executeHandlerFb=a}registerCsiHandler(a,b){let c=this._identifier(a);void 0===this._csiHandlers[c]&&(this._csiHandlers[c]=[]);let d=this._csiHandlers[c];return d.push(b),{dispose:()=>{let a=d.indexOf(b);-1!==a&&d.splice(a,1)}}}clearCsiHandler(a){this._csiHandlers[this._identifier(a)]&&delete this._csiHandlers[this._identifier(a)]}setCsiHandlerFallback(a){this._csiHandlerFb=a}registerDcsHandler(a,b){return this._dcsParser.registerHandler(this._identifier(a),b)}clearDcsHandler(a){this._dcsParser.clearHandler(this._identifier(a))}setDcsHandlerFallback(a){this._dcsParser.setHandlerFallback(a)}registerOscHandler(a,b){return this._oscParser.registerHandler(a,b)}clearOscHandler(a){this._oscParser.clearHandler(a)}setOscHandlerFallback(a){this._oscParser.setHandlerFallback(a)}setErrorHandler(a){this._errorHandler=a}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,0!==this._parseStack.state&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(a,b,c,d,e){this._parseStack.state=a,this._parseStack.handlers=b,this._parseStack.handlerPos=c,this._parseStack.transition=d,this._parseStack.chunkPos=e}parse(a,b,c){let d=0,e=0,f=0,g;if(this._parseStack.state)if(2===this._parseStack.state)this._parseStack.state=0,f=this._parseStack.chunkPos+1;else{if(void 0===c||1===this._parseStack.state)throw this._parseStack.state=1,Error("improper continuation due to previous async handler, giving up parsing");let b=this._parseStack.handlers,e=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(!1===c&&e>-1){for(;e>=0&&!0!==(g=b[e](this._params));e--)if(g instanceof Promise)return this._parseStack.handlerPos=e,g}this._parseStack.handlers=[];break;case 4:if(!1===c&&e>-1){for(;e>=0&&!0!==(g=b[e]());e--)if(g instanceof Promise)return this._parseStack.handlerPos=e,g}this._parseStack.handlers=[];break;case 6:if(d=a[this._parseStack.chunkPos],g=this._dcsParser.unhook(24!==d&&26!==d,c))return g;27===d&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(d=a[this._parseStack.chunkPos],g=this._oscParser.end(24!==d&&26!==d,c))return g;27===d&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,f=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let c=f;c<b;++c){switch(d=a[c],(e=this._transitions.table[this.currentState<<8|(d<160?d:160)])>>4){case 2:for(let e=c+1;;++e)if(e>=b||(d=a[e])<32||d>126&&d<160||++e>=b||(d=a[e])<32||d>126&&d<160||++e>=b||(d=a[e])<32||d>126&&d<160||++e>=b||(d=a[e])<32||d>126&&d<160){this._printHandler(a,c,e),c=e-1;break}break;case 3:this._executeHandlers[d]?this._executeHandlers[d]():this._executeHandlerFb(d),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:c,code:d,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:let f=this._csiHandlers[this._collect<<8|d],h=f?f.length-1:-1;for(;h>=0&&!0!==(g=f[h](this._params));h--)if(g instanceof Promise)return this._preserveStack(3,f,h,e,c),g;h<0&&this._csiHandlerFb(this._collect<<8|d,this._params),this.precedingJoinState=0;break;case 8:do switch(d){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(d-48)}while(++c<b&&(d=a[c])>47&&d<60);c--;break;case 9:this._collect<<=8,this._collect|=d;break;case 10:let i=this._escHandlers[this._collect<<8|d],j=i?i.length-1:-1;for(;j>=0&&!0!==(g=i[j]());j--)if(g instanceof Promise)return this._preserveStack(4,i,j,e,c),g;j<0&&this._escHandlerFb(this._collect<<8|d),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|d,this._params);break;case 13:for(let e=c+1;;++e)if(e>=b||24===(d=a[e])||26===d||27===d||d>127&&d<160){this._dcsParser.put(a,c,e),c=e-1;break}break;case 14:if(g=this._dcsParser.unhook(24!==d&&26!==d))return this._preserveStack(6,[],0,e,c),g;27===d&&(e|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break;case 4:this._oscParser.start();break;case 5:for(let e=c+1;;e++)if(e>=b||(d=a[e])<32||d>127&&d<160){this._oscParser.put(a,c,e),c=e-1;break}break;case 6:if(g=this._oscParser.end(24!==d&&26!==d))return this._preserveStack(5,[],0,e,c),g;27===d&&(e|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&e}}},eC=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,eD=/^[\da-f]+$/;function eE(a){if(!a)return;let b=a.toLowerCase();if(0===b.indexOf("rgb:")){b=b.slice(4);let a=eC.exec(b);if(a){let b=a[1]?15:a[4]?255:a[7]?4095:65535;return[Math.round(parseInt(a[1]||a[4]||a[7]||a[10],16)/b*255),Math.round(parseInt(a[2]||a[5]||a[8]||a[11],16)/b*255),Math.round(parseInt(a[3]||a[6]||a[9]||a[12],16)/b*255)]}}else if(0===b.indexOf("#")&&(b=b.slice(1),eD.exec(b)&&[3,6,9,12].includes(b.length))){let a=b.length/3,c=[0,0,0];for(let d=0;d<3;++d){let e=parseInt(b.slice(a*d,a*d+a),16);c[d]=1===a?e<<4:2===a?e:3===a?e>>4:e>>8}return c}}function eF(a,b){let c=a.toString(16),d=c.length<2?"0"+c:c;switch(b){case 4:return c[0];case 8:return d;case 12:return(d+d).slice(0,3);default:return d+d}}var eG={"(":0,")":1,"*":2,"+":3,"-":1,".":2};function eH(a,b){if(a>24)return b.setWinLines||!1;switch(a){case 1:return!!b.restoreWin;case 2:return!!b.minimizeWin;case 3:return!!b.setWinPosition;case 4:return!!b.setWinSizePixels;case 5:return!!b.raiseWin;case 6:return!!b.lowerWin;case 7:return!!b.refreshWin;case 8:return!!b.setWinSizeChars;case 9:return!!b.maximizeWin;case 10:return!!b.fullscreenWin;case 11:return!!b.getWinState;case 13:return!!b.getWinPosition;case 14:return!!b.getWinSizePixels;case 15:return!!b.getScreenSizePixels;case 16:return!!b.getCellSizePixels;case 18:return!!b.getWinSizeChars;case 19:return!!b.getScreenSizeChars;case 20:return!!b.getIconTitle;case 21:return!!b.getWinTitle;case 22:return!!b.pushTitle;case 23:return!!b.popTitle;case 24:return!!b.setWinLines}return!1}var eI=0,eJ=class extends aw{constructor(a,b,c,d,e,f,g,h,i=new eB){for(let j in super(),this._bufferService=a,this._charsetService=b,this._coreService=c,this._logService=d,this._optionsService=e,this._oscLinkService=f,this._coreMouseService=g,this._unicodeService=h,this._parser=i,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new G,this._utf8Decoder=new H,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=dV.clone(),this._eraseAttrDataInternal=dV.clone(),this._onRequestBell=this._register(new aP),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this._register(new aP),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this._register(new aP),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this._register(new aP),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this._register(new aP),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this._register(new aP),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this._register(new aP),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this._register(new aP),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this._register(new aP),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this._register(new aP),this.onLineFeed=this._onLineFeed.event,this._onScroll=this._register(new aP),this.onScroll=this._onScroll.event,this._onTitleChange=this._register(new aP),this.onTitleChange=this._onTitleChange.event,this._onColor=this._register(new aP),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this._register(this._parser),this._dirtyRowTracker=new eK(this._bufferService),this._activeBuffer=this._bufferService.buffer,this._register(this._bufferService.buffers.onBufferActivate(a=>this._activeBuffer=a.activeBuffer)),this._parser.setCsiHandlerFallback((a,b)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(a),params:b.toArray()})}),this._parser.setEscHandlerFallback(a=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(a)})}),this._parser.setExecuteHandlerFallback(a=>{this._logService.debug("Unknown EXECUTE code: ",{code:a})}),this._parser.setOscHandlerFallback((a,b,c)=>{this._logService.debug("Unknown OSC code: ",{identifier:a,action:b,data:c})}),this._parser.setDcsHandlerFallback((a,b,c)=>{"HOOK"===b&&(c=c.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(a),action:b,payload:c})}),this._parser.setPrintHandler((a,b,c)=>this.print(a,b,c)),this._parser.registerCsiHandler({final:"@"},a=>this.insertChars(a)),this._parser.registerCsiHandler({intermediates:" ",final:"@"},a=>this.scrollLeft(a)),this._parser.registerCsiHandler({final:"A"},a=>this.cursorUp(a)),this._parser.registerCsiHandler({intermediates:" ",final:"A"},a=>this.scrollRight(a)),this._parser.registerCsiHandler({final:"B"},a=>this.cursorDown(a)),this._parser.registerCsiHandler({final:"C"},a=>this.cursorForward(a)),this._parser.registerCsiHandler({final:"D"},a=>this.cursorBackward(a)),this._parser.registerCsiHandler({final:"E"},a=>this.cursorNextLine(a)),this._parser.registerCsiHandler({final:"F"},a=>this.cursorPrecedingLine(a)),this._parser.registerCsiHandler({final:"G"},a=>this.cursorCharAbsolute(a)),this._parser.registerCsiHandler({final:"H"},a=>this.cursorPosition(a)),this._parser.registerCsiHandler({final:"I"},a=>this.cursorForwardTab(a)),this._parser.registerCsiHandler({final:"J"},a=>this.eraseInDisplay(a,!1)),this._parser.registerCsiHandler({prefix:"?",final:"J"},a=>this.eraseInDisplay(a,!0)),this._parser.registerCsiHandler({final:"K"},a=>this.eraseInLine(a,!1)),this._parser.registerCsiHandler({prefix:"?",final:"K"},a=>this.eraseInLine(a,!0)),this._parser.registerCsiHandler({final:"L"},a=>this.insertLines(a)),this._parser.registerCsiHandler({final:"M"},a=>this.deleteLines(a)),this._parser.registerCsiHandler({final:"P"},a=>this.deleteChars(a)),this._parser.registerCsiHandler({final:"S"},a=>this.scrollUp(a)),this._parser.registerCsiHandler({final:"T"},a=>this.scrollDown(a)),this._parser.registerCsiHandler({final:"X"},a=>this.eraseChars(a)),this._parser.registerCsiHandler({final:"Z"},a=>this.cursorBackwardTab(a)),this._parser.registerCsiHandler({final:"`"},a=>this.charPosAbsolute(a)),this._parser.registerCsiHandler({final:"a"},a=>this.hPositionRelative(a)),this._parser.registerCsiHandler({final:"b"},a=>this.repeatPrecedingCharacter(a)),this._parser.registerCsiHandler({final:"c"},a=>this.sendDeviceAttributesPrimary(a)),this._parser.registerCsiHandler({prefix:">",final:"c"},a=>this.sendDeviceAttributesSecondary(a)),this._parser.registerCsiHandler({final:"d"},a=>this.linePosAbsolute(a)),this._parser.registerCsiHandler({final:"e"},a=>this.vPositionRelative(a)),this._parser.registerCsiHandler({final:"f"},a=>this.hVPosition(a)),this._parser.registerCsiHandler({final:"g"},a=>this.tabClear(a)),this._parser.registerCsiHandler({final:"h"},a=>this.setMode(a)),this._parser.registerCsiHandler({prefix:"?",final:"h"},a=>this.setModePrivate(a)),this._parser.registerCsiHandler({final:"l"},a=>this.resetMode(a)),this._parser.registerCsiHandler({prefix:"?",final:"l"},a=>this.resetModePrivate(a)),this._parser.registerCsiHandler({final:"m"},a=>this.charAttributes(a)),this._parser.registerCsiHandler({final:"n"},a=>this.deviceStatus(a)),this._parser.registerCsiHandler({prefix:"?",final:"n"},a=>this.deviceStatusPrivate(a)),this._parser.registerCsiHandler({intermediates:"!",final:"p"},a=>this.softReset(a)),this._parser.registerCsiHandler({intermediates:" ",final:"q"},a=>this.setCursorStyle(a)),this._parser.registerCsiHandler({final:"r"},a=>this.setScrollRegion(a)),this._parser.registerCsiHandler({final:"s"},a=>this.saveCursor(a)),this._parser.registerCsiHandler({final:"t"},a=>this.windowOptions(a)),this._parser.registerCsiHandler({final:"u"},a=>this.restoreCursor(a)),this._parser.registerCsiHandler({intermediates:"'",final:"}"},a=>this.insertColumns(a)),this._parser.registerCsiHandler({intermediates:"'",final:"~"},a=>this.deleteColumns(a)),this._parser.registerCsiHandler({intermediates:'"',final:"q"},a=>this.selectProtected(a)),this._parser.registerCsiHandler({intermediates:"$",final:"p"},a=>this.requestMode(a,!0)),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},a=>this.requestMode(a,!1)),this._parser.setExecuteHandler(cv.BEL,()=>this.bell()),this._parser.setExecuteHandler(cv.LF,()=>this.lineFeed()),this._parser.setExecuteHandler(cv.VT,()=>this.lineFeed()),this._parser.setExecuteHandler(cv.FF,()=>this.lineFeed()),this._parser.setExecuteHandler(cv.CR,()=>this.carriageReturn()),this._parser.setExecuteHandler(cv.BS,()=>this.backspace()),this._parser.setExecuteHandler(cv.HT,()=>this.tab()),this._parser.setExecuteHandler(cv.SO,()=>this.shiftOut()),this._parser.setExecuteHandler(cv.SI,()=>this.shiftIn()),this._parser.setExecuteHandler(cw.IND,()=>this.index()),this._parser.setExecuteHandler(cw.NEL,()=>this.nextLine()),this._parser.setExecuteHandler(cw.HTS,()=>this.tabSet()),this._parser.registerOscHandler(0,new eu(a=>(this.setTitle(a),this.setIconName(a),!0))),this._parser.registerOscHandler(1,new eu(a=>this.setIconName(a))),this._parser.registerOscHandler(2,new eu(a=>this.setTitle(a))),this._parser.registerOscHandler(4,new eu(a=>this.setOrReportIndexedColor(a))),this._parser.registerOscHandler(8,new eu(a=>this.setHyperlink(a))),this._parser.registerOscHandler(10,new eu(a=>this.setOrReportFgColor(a))),this._parser.registerOscHandler(11,new eu(a=>this.setOrReportBgColor(a))),this._parser.registerOscHandler(12,new eu(a=>this.setOrReportCursorColor(a))),this._parser.registerOscHandler(104,new eu(a=>this.restoreIndexedColor(a))),this._parser.registerOscHandler(110,new eu(a=>this.restoreFgColor(a))),this._parser.registerOscHandler(111,new eu(a=>this.restoreBgColor(a))),this._parser.registerOscHandler(112,new eu(a=>this.restoreCursorColor(a))),this._parser.registerEscHandler({final:"7"},()=>this.saveCursor()),this._parser.registerEscHandler({final:"8"},()=>this.restoreCursor()),this._parser.registerEscHandler({final:"D"},()=>this.index()),this._parser.registerEscHandler({final:"E"},()=>this.nextLine()),this._parser.registerEscHandler({final:"H"},()=>this.tabSet()),this._parser.registerEscHandler({final:"M"},()=>this.reverseIndex()),this._parser.registerEscHandler({final:"="},()=>this.keypadApplicationMode()),this._parser.registerEscHandler({final:">"},()=>this.keypadNumericMode()),this._parser.registerEscHandler({final:"c"},()=>this.fullReset()),this._parser.registerEscHandler({final:"n"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"o"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"|"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"}"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"~"},()=>this.setgLevel(1)),this._parser.registerEscHandler({intermediates:"%",final:"@"},()=>this.selectDefaultCharset()),this._parser.registerEscHandler({intermediates:"%",final:"G"},()=>this.selectDefaultCharset()),d$)this._parser.registerEscHandler({intermediates:"(",final:j},()=>this.selectCharset("("+j)),this._parser.registerEscHandler({intermediates:")",final:j},()=>this.selectCharset(")"+j)),this._parser.registerEscHandler({intermediates:"*",final:j},()=>this.selectCharset("*"+j)),this._parser.registerEscHandler({intermediates:"+",final:j},()=>this.selectCharset("+"+j)),this._parser.registerEscHandler({intermediates:"-",final:j},()=>this.selectCharset("-"+j)),this._parser.registerEscHandler({intermediates:".",final:j},()=>this.selectCharset("."+j)),this._parser.registerEscHandler({intermediates:"/",final:j},()=>this.selectCharset("/"+j));this._parser.registerEscHandler({intermediates:"#",final:"8"},()=>this.screenAlignmentPattern()),this._parser.setErrorHandler(a=>(this._logService.error("Parsing error: ",a),a)),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new ey((a,b)=>this.requestStatusString(a,b)))}getAttrData(){return this._curAttrData}_preserveStack(a,b,c,d){this._parseStack.paused=!0,this._parseStack.cursorStartX=a,this._parseStack.cursorStartY=b,this._parseStack.decodedLength=c,this._parseStack.position=d}_logSlowResolvingAsync(a){this._logService.logLevel<=3&&Promise.race([a,new Promise((a,b)=>setTimeout(()=>b("#SLOW_TIMEOUT"),5e3))]).catch(a=>{if("#SLOW_TIMEOUT"!==a)throw a;console.warn("async parser handler taking longer than 5000 ms")})}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(a,b){let c,d=this._activeBuffer.x,e=this._activeBuffer.y,f=0,g=this._parseStack.paused;if(g){if(c=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,b))return this._logSlowResolvingAsync(c),c;d=this._parseStack.cursorStartX,e=this._parseStack.cursorStartY,this._parseStack.paused=!1,a.length>131072&&(f=this._parseStack.position+131072)}if(this._logService.logLevel<=1&&this._logService.debug(`parsing data ${"string"==typeof a?` "${a}"`:` "${Array.prototype.map.call(a,a=>String.fromCharCode(a)).join("")}"`}`),0===this._logService.logLevel&&this._logService.trace("parsing data (codes)","string"==typeof a?a.split("").map(a=>a.charCodeAt(0)):a),this._parseBuffer.length<a.length&&this._parseBuffer.length<131072&&(this._parseBuffer=new Uint32Array(Math.min(a.length,131072))),g||this._dirtyRowTracker.clearRange(),a.length>131072)for(let b=f;b<a.length;b+=131072){let f=b+131072<a.length?b+131072:a.length,g="string"==typeof a?this._stringDecoder.decode(a.substring(b,f),this._parseBuffer):this._utf8Decoder.decode(a.subarray(b,f),this._parseBuffer);if(c=this._parser.parse(this._parseBuffer,g))return this._preserveStack(d,e,g,b),this._logSlowResolvingAsync(c),c}else if(!g){let b="string"==typeof a?this._stringDecoder.decode(a,this._parseBuffer):this._utf8Decoder.decode(a,this._parseBuffer);if(c=this._parser.parse(this._parseBuffer,b))return this._preserveStack(d,e,b,0),this._logSlowResolvingAsync(c),c}(this._activeBuffer.x!==d||this._activeBuffer.y!==e)&&this._onCursorMove.fire();let h=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),i=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);i<this._bufferService.rows&&this._onRequestRefreshRows.fire({start:Math.min(i,this._bufferService.rows-1),end:Math.min(h,this._bufferService.rows-1)})}print(a,b,c){let d,e,f=this._charsetService.charset,g=this._optionsService.rawOptions.screenReaderMode,h=this._bufferService.cols,i=this._coreService.decPrivateModes.wraparound,j=this._coreService.modes.insertMode,k=this._curAttrData,l=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&c-b>0&&2===l.getWidth(this._activeBuffer.x-1)&&l.setCellFromCodepoint(this._activeBuffer.x-1,0,1,k);let m=this._parser.precedingJoinState;for(let n=b;n<c;++n){if((d=a[n])<127&&f){let a=f[String.fromCharCode(d)];a&&(d=a.charCodeAt(0))}let b=this._unicodeService.charProperties(d,m);e=eo.extractWidth(b);let c=eo.extractShouldJoin(b),o=c?eo.extractWidth(m):0;if(m=b,g&&this._onA11yChar.fire(E(d)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+e-o>h){if(i){let a=l,b=this._activeBuffer.x-o;for(this._activeBuffer.x=o,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),l=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),o>0&&l instanceof dX&&l.copyCellsFrom(a,b,0,o,!1);b<h;)a.setCellFromCodepoint(b++,0,1,k)}else if(this._activeBuffer.x=h-1,2===e)continue}if(c&&this._activeBuffer.x){let a=l.getWidth(this._activeBuffer.x-1)?1:2;l.addCodepointToCell(this._activeBuffer.x-a,d,e);for(let a=e-o;--a>=0;)l.setCellFromCodepoint(this._activeBuffer.x++,0,0,k);continue}if(j&&(l.insertCells(this._activeBuffer.x,e-o,this._activeBuffer.getNullCell(k)),2===l.getWidth(h-1)&&l.setCellFromCodepoint(h-1,0,1,k)),l.setCellFromCodepoint(this._activeBuffer.x++,d,e,k),e>0)for(;--e;)l.setCellFromCodepoint(this._activeBuffer.x++,0,0,k)}this._parser.precedingJoinState=m,this._activeBuffer.x<h&&c-b>0&&0===l.getWidth(this._activeBuffer.x)&&!l.hasContent(this._activeBuffer.x)&&l.setCellFromCodepoint(this._activeBuffer.x,0,1,k),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(a,b){return"t"!==a.final||a.prefix||a.intermediates?this._parser.registerCsiHandler(a,b):this._parser.registerCsiHandler(a,a=>!eH(a.params[0],this._optionsService.rawOptions.windowOptions)||b(a))}registerDcsHandler(a,b){return this._parser.registerDcsHandler(a,new ey(b))}registerEscHandler(a,b){return this._parser.registerEscHandler(a,b)}registerOscHandler(a,b){return this._parser.registerOscHandler(a,new eu(b))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(0===this._activeBuffer.x&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y)?.isWrapped){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;let a=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);a.hasWidth(this._activeBuffer.x)&&!a.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let a=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-a),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(a=this._bufferService.cols-1){this._activeBuffer.x=Math.min(a,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(a,b){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=a,this._activeBuffer.y=this._activeBuffer.scrollTop+b):(this._activeBuffer.x=a,this._activeBuffer.y=b),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(a,b){this._restrictCursor(),this._setCursor(this._activeBuffer.x+a,this._activeBuffer.y+b)}cursorUp(a){let b=this._activeBuffer.y-this._activeBuffer.scrollTop;return b>=0?this._moveCursor(0,-Math.min(b,a.params[0]||1)):this._moveCursor(0,-(a.params[0]||1)),!0}cursorDown(a){let b=this._activeBuffer.scrollBottom-this._activeBuffer.y;return b>=0?this._moveCursor(0,Math.min(b,a.params[0]||1)):this._moveCursor(0,a.params[0]||1),!0}cursorForward(a){return this._moveCursor(a.params[0]||1,0),!0}cursorBackward(a){return this._moveCursor(-(a.params[0]||1),0),!0}cursorNextLine(a){return this.cursorDown(a),this._activeBuffer.x=0,!0}cursorPrecedingLine(a){return this.cursorUp(a),this._activeBuffer.x=0,!0}cursorCharAbsolute(a){return this._setCursor((a.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(a){return this._setCursor(a.length>=2?(a.params[1]||1)-1:0,(a.params[0]||1)-1),!0}charPosAbsolute(a){return this._setCursor((a.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(a){return this._moveCursor(a.params[0]||1,0),!0}linePosAbsolute(a){return this._setCursor(this._activeBuffer.x,(a.params[0]||1)-1),!0}vPositionRelative(a){return this._moveCursor(0,a.params[0]||1),!0}hVPosition(a){return this.cursorPosition(a),!0}tabClear(a){let b=a.params[0];return 0===b?delete this._activeBuffer.tabs[this._activeBuffer.x]:3===b&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(a){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let b=a.params[0]||1;for(;b--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(a){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let b=a.params[0]||1;for(;b--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(a){let b=a.params[0];return 1===b&&(this._curAttrData.bg|=0x20000000),(2===b||0===b)&&(this._curAttrData.bg&=-0x20000001),!0}_eraseInBufferLine(a,b,c,d=!1,e=!1){let f=this._activeBuffer.lines.get(this._activeBuffer.ybase+a);f.replaceCells(b,c,this._activeBuffer.getNullCell(this._eraseAttrData()),e),d&&(f.isWrapped=!1)}_resetBufferLine(a,b=!1){let c=this._activeBuffer.lines.get(this._activeBuffer.ybase+a);c&&(c.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),b),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+a),c.isWrapped=!1)}eraseInDisplay(a,b=!1){let c;switch(this._restrictCursor(this._bufferService.cols),a.params[0]){case 0:for(c=this._activeBuffer.y,this._dirtyRowTracker.markDirty(c),this._eraseInBufferLine(c++,this._activeBuffer.x,this._bufferService.cols,0===this._activeBuffer.x,b);c<this._bufferService.rows;c++)this._resetBufferLine(c,b);this._dirtyRowTracker.markDirty(c);break;case 1:for(c=this._activeBuffer.y,this._dirtyRowTracker.markDirty(c),this._eraseInBufferLine(c,0,this._activeBuffer.x+1,!0,b),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(c+1).isWrapped=!1);c--;)this._resetBufferLine(c,b);this._dirtyRowTracker.markDirty(0);break;case 2:if(this._optionsService.rawOptions.scrollOnEraseInDisplay){for(c=this._bufferService.rows,this._dirtyRowTracker.markRangeDirty(0,c-1);c--&&!this._activeBuffer.lines.get(this._activeBuffer.ybase+c)?.getTrimmedLength(););for(;c>=0;c--)this._bufferService.scroll(this._eraseAttrData())}else{for(c=this._bufferService.rows,this._dirtyRowTracker.markDirty(c-1);c--;)this._resetBufferLine(c,b);this._dirtyRowTracker.markDirty(0)}break;case 3:let d=this._activeBuffer.lines.length-this._bufferService.rows;d>0&&(this._activeBuffer.lines.trimStart(d),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-d,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-d,0),this._onScroll.fire(0))}return!0}eraseInLine(a,b=!1){switch(this._restrictCursor(this._bufferService.cols),a.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,0===this._activeBuffer.x,b);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,b);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,b)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(a){this._restrictCursor();let b=a.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let c=this._activeBuffer.ybase+this._activeBuffer.y,d=this._bufferService.rows-1-this._activeBuffer.scrollBottom,e=this._bufferService.rows-1+this._activeBuffer.ybase-d+1;for(;b--;)this._activeBuffer.lines.splice(e-1,1),this._activeBuffer.lines.splice(c,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(a){this._restrictCursor();let b=a.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let c=this._activeBuffer.ybase+this._activeBuffer.y,d;for(d=this._bufferService.rows-1-this._activeBuffer.scrollBottom,d=this._bufferService.rows-1+this._activeBuffer.ybase-d;b--;)this._activeBuffer.lines.splice(c,1),this._activeBuffer.lines.splice(d,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(a){this._restrictCursor();let b=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return b&&(b.insertCells(this._activeBuffer.x,a.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(a){this._restrictCursor();let b=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return b&&(b.deleteCells(this._activeBuffer.x,a.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(a){let b=a.params[0]||1;for(;b--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollDown(a){let b=a.params[0]||1;for(;b--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(dV));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(a){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let b=a.params[0]||1;for(let a=this._activeBuffer.scrollTop;a<=this._activeBuffer.scrollBottom;++a){let c=this._activeBuffer.lines.get(this._activeBuffer.ybase+a);c.deleteCells(0,b,this._activeBuffer.getNullCell(this._eraseAttrData())),c.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(a){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let b=a.params[0]||1;for(let a=this._activeBuffer.scrollTop;a<=this._activeBuffer.scrollBottom;++a){let c=this._activeBuffer.lines.get(this._activeBuffer.ybase+a);c.insertCells(0,b,this._activeBuffer.getNullCell(this._eraseAttrData())),c.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(a){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let b=a.params[0]||1;for(let a=this._activeBuffer.scrollTop;a<=this._activeBuffer.scrollBottom;++a){let c=this._activeBuffer.lines.get(this._activeBuffer.ybase+a);c.insertCells(this._activeBuffer.x,b,this._activeBuffer.getNullCell(this._eraseAttrData())),c.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(a){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let b=a.params[0]||1;for(let a=this._activeBuffer.scrollTop;a<=this._activeBuffer.scrollBottom;++a){let c=this._activeBuffer.lines.get(this._activeBuffer.ybase+a);c.deleteCells(this._activeBuffer.x,b,this._activeBuffer.getNullCell(this._eraseAttrData())),c.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(a){this._restrictCursor();let b=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return b&&(b.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(a.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(a){let b=this._parser.precedingJoinState;if(!b)return!0;let c=a.params[0]||1,d=eo.extractWidth(b),e=this._activeBuffer.x-d,f=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(e),g=new Uint32Array(f.length*c),h=0;for(let a=0;a<f.length;){let b=f.codePointAt(a)||0;g[h++]=b,a+=b>65535?2:1}let i=h;for(let a=1;a<c;++a)g.copyWithin(i,0,h),i+=h;return this.print(g,0,i),!0}sendDeviceAttributesPrimary(a){return a.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(cv.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(cv.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(a){return a.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(cv.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(cv.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(a.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(cv.ESC+"[>83;40003;0c")),!0}_is(a){return 0===(this._optionsService.rawOptions.termName+"").indexOf(a)}setMode(a){for(let b=0;b<a.length;b++)switch(a.params[b]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(a){for(let b=0;b<a.length;b++)switch(a.params[b]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,d_),this._charsetService.setgCharset(1,d_),this._charsetService.setgCharset(2,d_),this._charsetService.setgCharset(3,d_);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(void 0),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0;break;case 2026:this._coreService.decPrivateModes.synchronizedOutput=!0}return!0}resetMode(a){for(let b=0;b<a.length;b++)switch(a.params[b]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(a){for(let b=0;b<a.length;b++)switch(a.params[b]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),1049===a.params[b]&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(void 0),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1;break;case 2026:this._coreService.decPrivateModes.synchronizedOutput=!1,this._onRequestRefreshRows.fire(void 0)}return!0}requestMode(a,b){let c,d,e,f;(d=c||={})[d.NOT_RECOGNIZED=0]="NOT_RECOGNIZED",d[d.SET=1]="SET",d[d.RESET=2]="RESET",d[d.PERMANENTLY_SET=3]="PERMANENTLY_SET",d[d.PERMANENTLY_RESET=4]="PERMANENTLY_RESET";let g=this._coreService.decPrivateModes,{activeProtocol:h,activeEncoding:i}=this._coreMouseService,j=this._coreService,{buffers:k,cols:l}=this._bufferService,{active:m,alt:n}=k,o=this._optionsService.rawOptions,p=a=>a?1:2,q=a.params[0];return e=q,f=b?2===q?4:4===q?p(j.modes.insertMode):12===q?3:20===q?p(o.convertEol):0:1===q?p(g.applicationCursorKeys):3===q?o.windowOptions.setWinLines?80===l?2:+(132===l):0:6===q?p(g.origin):7===q?p(g.wraparound):8===q?3:9===q?p("X10"===h):12===q?p(o.cursorBlink):25===q?p(!j.isCursorHidden):45===q?p(g.reverseWraparound):66===q?p(g.applicationKeypad):67===q?4:1e3===q?p("VT200"===h):1002===q?p("DRAG"===h):1003===q?p("ANY"===h):1004===q?p(g.sendFocus):1005===q?4:1006===q?p("SGR"===i):1015===q?4:1016===q?p("SGR_PIXELS"===i):1048===q?1:47===q||1047===q||1049===q?p(m===n):2004===q?p(g.bracketedPasteMode):2026===q?p(g.synchronizedOutput):0,j.triggerDataEvent(`${cv.ESC}[${b?"":"?"}${e};${f}$y`),!0}_updateAttrColor(a,b,c,d,e){return 2===b?(a|=0x3000000,a&=-0x1000000,a|=I.fromColorRGB([c,d,e])):5===b&&(a&=-0x3000100,a|=0x2000000|255&c),a}_extractColor(a,b,c){let d=[0,0,-1,0,0,0],e=0,f=0;do{if(d[f+e]=a.params[b+f],a.hasSubParams(b+f)){let c=a.getSubParams(b+f),g=0;do 5===d[1]&&(e=1),d[f+g+1+e]=c[g];while(++g<c.length&&g+f+1+e<d.length);break}if(5===d[1]&&f+e>=2||2===d[1]&&f+e>=5)break;d[1]&&(e=1)}while(++f+b<a.length&&f+e<d.length);for(let a=2;a<d.length;++a)-1===d[a]&&(d[a]=0);switch(d[0]){case 38:c.fg=this._updateAttrColor(c.fg,d[1],d[3],d[4],d[5]);break;case 48:c.bg=this._updateAttrColor(c.bg,d[1],d[3],d[4],d[5]);break;case 58:c.extended=c.extended.clone(),c.extended.underlineColor=this._updateAttrColor(c.extended.underlineColor,d[1],d[3],d[4],d[5])}return f}_processUnderline(a,b){b.extended=b.extended.clone(),(!~a||a>5)&&(a=1),b.extended.underlineStyle=a,b.fg|=0x10000000,0===a&&(b.fg&=-0x10000001),b.updateExtended()}_processSGR0(a){a.fg=dV.fg,a.bg=dV.bg,a.extended=a.extended.clone(),a.extended.underlineStyle=0,a.extended.underlineColor&=-0x4000000,a.updateExtended()}charAttributes(a){if(1===a.length&&0===a.params[0])return this._processSGR0(this._curAttrData),!0;let b=a.length,c,d=this._curAttrData;for(let e=0;e<b;e++)(c=a.params[e])>=30&&c<=37?(d.fg&=-0x3000100,d.fg|=0x1000000|c-30):c>=40&&c<=47?(d.bg&=-0x3000100,d.bg|=0x1000000|c-40):c>=90&&c<=97?(d.fg&=-0x3000100,d.fg|=0x1000000|c-90|8):c>=100&&c<=107?(d.bg&=-0x3000100,d.bg|=0x1000000|c-100|8):0===c?this._processSGR0(d):1===c?d.fg|=0x8000000:3===c?d.bg|=0x4000000:4===c?(d.fg|=0x10000000,this._processUnderline(a.hasSubParams(e)?a.getSubParams(e)[0]:1,d)):5===c?d.fg|=0x20000000:7===c?d.fg|=0x4000000:8===c?d.fg|=0x40000000:9===c?d.fg|=0x80000000:2===c?d.bg|=0x8000000:21===c?this._processUnderline(2,d):22===c?(d.fg&=-0x8000001,d.bg&=-0x8000001):23===c?d.bg&=-0x4000001:24===c?(d.fg&=-0x10000001,this._processUnderline(0,d)):25===c?d.fg&=-0x20000001:27===c?d.fg&=-0x4000001:28===c?d.fg&=-0x40000001:29===c?d.fg&=0x7fffffff:39===c?(d.fg&=-0x4000000,d.fg|=0xffffff&dV.fg):49===c?(d.bg&=-0x4000000,d.bg|=0xffffff&dV.bg):38===c||48===c||58===c?e+=this._extractColor(a,e,d):53===c?d.bg|=0x40000000:55===c?d.bg&=-0x40000001:59===c?(d.extended=d.extended.clone(),d.extended.underlineColor=-1,d.updateExtended()):100===c?(d.fg&=-0x4000000,d.fg|=0xffffff&dV.fg,d.bg&=-0x4000000,d.bg|=0xffffff&dV.bg):this._logService.debug("Unknown SGR attribute: %d.",c);return!0}deviceStatus(a){switch(a.params[0]){case 5:this._coreService.triggerDataEvent(`${cv.ESC}[0n`);break;case 6:let b=this._activeBuffer.y+1,c=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${cv.ESC}[${b};${c}R`)}return!0}deviceStatusPrivate(a){if(6===a.params[0]){let a=this._activeBuffer.y+1,b=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${cv.ESC}[?${a};${b}R`)}return!0}softReset(a){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=dV.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(a){let b=0===a.length?1:a.params[0];if(0===b)this._coreService.decPrivateModes.cursorStyle=void 0,this._coreService.decPrivateModes.cursorBlink=void 0;else{switch(b){case 1:case 2:this._coreService.decPrivateModes.cursorStyle="block";break;case 3:case 4:this._coreService.decPrivateModes.cursorStyle="underline";break;case 5:case 6:this._coreService.decPrivateModes.cursorStyle="bar"}this._coreService.decPrivateModes.cursorBlink=b%2==1}return!0}setScrollRegion(a){let b=a.params[0]||1,c;return(a.length<2||(c=a.params[1])>this._bufferService.rows||0===c)&&(c=this._bufferService.rows),c>b&&(this._activeBuffer.scrollTop=b-1,this._activeBuffer.scrollBottom=c-1,this._setCursor(0,0)),!0}windowOptions(a){if(!eH(a.params[0],this._optionsService.rawOptions.windowOptions))return!0;let b=a.length>1?a.params[1]:0;switch(a.params[0]){case 14:2!==b&&this._onRequestWindowsOptionsReport.fire(0);break;case 16:this._onRequestWindowsOptionsReport.fire(1);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${cv.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:(0===b||2===b)&&(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),(0===b||1===b)&&(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:(0===b||2===b)&&this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),(0===b||1===b)&&this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(a){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(a){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(a){return this._windowTitle=a,this._onTitleChange.fire(a),!0}setIconName(a){return this._iconName=a,!0}setOrReportIndexedColor(a){let b=[],c=a.split(";");for(;c.length>1;){let a=c.shift(),d=c.shift();if(/^\d+$/.exec(a)){let c=parseInt(a);if(eL(c))if("?"===d)b.push({type:0,index:c});else{let a=eE(d);a&&b.push({type:1,index:c,color:a})}}}return b.length&&this._onColor.fire(b),!0}setHyperlink(a){let b=a.indexOf(";");if(-1===b)return!0;let c=a.slice(0,b).trim(),d=a.slice(b+1);return d?this._createHyperlink(c,d):!c.trim()&&this._finishHyperlink()}_createHyperlink(a,b){this._getCurrentLinkId()&&this._finishHyperlink();let c=a.split(":"),d,e=c.findIndex(a=>a.startsWith("id="));return -1!==e&&(d=c[e].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:d,uri:b}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(a,b){let c=a.split(";");for(let a=0;a<c.length&&!(b>=this._specialColors.length);++a,++b)if("?"===c[a])this._onColor.fire([{type:0,index:this._specialColors[b]}]);else{let d=eE(c[a]);d&&this._onColor.fire([{type:1,index:this._specialColors[b],color:d}])}return!0}setOrReportFgColor(a){return this._setOrReportSpecialColor(a,0)}setOrReportBgColor(a){return this._setOrReportSpecialColor(a,1)}setOrReportCursorColor(a){return this._setOrReportSpecialColor(a,2)}restoreIndexedColor(a){if(!a)return this._onColor.fire([{type:2}]),!0;let b=[],c=a.split(";");for(let a=0;a<c.length;++a)if(/^\d+$/.exec(c[a])){let d=parseInt(c[a]);eL(d)&&b.push({type:2,index:d})}return b.length&&this._onColor.fire(b),!0}restoreFgColor(a){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(a){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(a){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,d_),!0}selectCharset(a){return 2!==a.length?this.selectDefaultCharset():"/"===a[0]||this._charsetService.setgCharset(eG[a[0]],d$[a[1]]||d_),!0}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){let a=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,a,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=dV.clone(),this._eraseAttrDataInternal=dV.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-0x4000000,this._eraseAttrDataInternal.bg|=0x3ffffff&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(a){return this._charsetService.setgLevel(a),!0}screenAlignmentPattern(){let a=new K;a.content=4194373,a.fg=this._curAttrData.fg,a.bg=this._curAttrData.bg,this._setCursor(0,0);for(let b=0;b<this._bufferService.rows;++b){let c=this._activeBuffer.ybase+this._activeBuffer.y+b,d=this._activeBuffer.lines.get(c);d&&(d.fill(a),d.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(a,b){let c=a=>(this._coreService.triggerDataEvent(`${cv.ESC}${a}${cv.ESC}\\`),!0),d=this._bufferService.buffer,e=this._optionsService.rawOptions;return c('"q'===a?`P1$r${+!!this._curAttrData.isProtected()}"q`:'"p'===a?'P1$r61;1"p':"r"===a?`P1$r${d.scrollTop+1};${d.scrollBottom+1}r`:"m"===a?"P1$r0m":" q"===a?`P1$r${({block:2,underline:4,bar:6})[e.cursorStyle]-!!e.cursorBlink} q`:"P0$r")}markRangeDirty(a,b){this._dirtyRowTracker.markRangeDirty(a,b)}},eK=class{constructor(a){this._bufferService=a,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(a){a<this.start?this.start=a:a>this.end&&(this.end=a)}markRangeDirty(a,b){a>b&&(eI=a,a=b,b=eI),a<this.start&&(this.start=a),b>this.end&&(this.end=b)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function eL(a){return 0<=a&&a<256}eK=x([y(0,P)],eK);var eM=class extends aw{constructor(a){super(),this._action=a,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this._register(new aP),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(a,b){let c;if(void 0!==b&&this._syncCalls>b){this._syncCalls=0;return}if(this._pendingData+=a.length,this._writeBuffer.push(a),this._callbacks.push(void 0),this._syncCalls++,!this._isSyncWriting){for(this._isSyncWriting=!0;c=this._writeBuffer.shift();){this._action(c);let a=this._callbacks.shift();a&&a()}this._pendingData=0,this._bufferOffset=0x7fffffff,this._isSyncWriting=!1,this._syncCalls=0}}write(a,b){if(this._pendingData>5e7)throw Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput){this._didUserInput=!1,this._pendingData+=a.length,this._writeBuffer.push(a),this._callbacks.push(b),this._innerWrite();return}setTimeout(()=>this._innerWrite())}this._pendingData+=a.length,this._writeBuffer.push(a),this._callbacks.push(b)}_innerWrite(a=0,b=!0){let c=a||performance.now();for(;this._writeBuffer.length>this._bufferOffset;){let a=this._writeBuffer[this._bufferOffset],d=this._action(a,b);if(d){let a=a=>performance.now()-c>=12?setTimeout(()=>this._innerWrite(0,a)):this._innerWrite(c,a);d.catch(a=>(queueMicrotask(()=>{throw a}),Promise.resolve(!1))).then(a);return}let e=this._callbacks[this._bufferOffset];if(e&&e(),this._bufferOffset++,this._pendingData-=a.length,performance.now()-c>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout(()=>this._innerWrite())):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}},eN=class{constructor(a){this._bufferService=a,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(a){let b=this._bufferService.buffer;if(void 0===a.id){let c=b.addMarker(b.ybase+b.y),d={data:a,id:this._nextId++,lines:[c]};return c.onDispose(()=>this._removeMarkerFromLink(d,c)),this._dataByLinkId.set(d.id,d),d.id}let c=this._getEntryIdKey(a),d=this._entriesWithId.get(c);if(d)return this.addLineToLink(d.id,b.ybase+b.y),d.id;let e=b.addMarker(b.ybase+b.y),f={id:this._nextId++,key:this._getEntryIdKey(a),data:a,lines:[e]};return e.onDispose(()=>this._removeMarkerFromLink(f,e)),this._entriesWithId.set(f.key,f),this._dataByLinkId.set(f.id,f),f.id}addLineToLink(a,b){let c=this._dataByLinkId.get(a);if(c&&c.lines.every(a=>a.line!==b)){let a=this._bufferService.buffer.addMarker(b);c.lines.push(a),a.onDispose(()=>this._removeMarkerFromLink(c,a))}}getLinkData(a){return this._dataByLinkId.get(a)?.data}_getEntryIdKey(a){return`${a.id};;${a.uri}`}_removeMarkerFromLink(a,b){let c=a.lines.indexOf(b);-1!==c&&(a.lines.splice(c,1),0===a.lines.length&&(void 0!==a.data.id&&this._entriesWithId.delete(a.key),this._dataByLinkId.delete(a.id)))}};eN=x([y(0,P)],eN);var eO=!1,eP=class extends aw{constructor(a){super(),this._windowsWrappingHeuristics=this._register(new ax),this._onBinary=this._register(new aP),this.onBinary=this._onBinary.event,this._onData=this._register(new aP),this.onData=this._onData.event,this._onLineFeed=this._register(new aP),this.onLineFeed=this._onLineFeed.event,this._onResize=this._register(new aP),this.onResize=this._onResize.event,this._onWriteParsed=this._register(new aP),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this._register(new aP),this._instantiationService=new dR,this.optionsService=this._register(new d5(a)),this._instantiationService.setService(V,this.optionsService),this._bufferService=this._register(this._instantiationService.createInstance(d2)),this._instantiationService.setService(P,this._bufferService),this._logService=this._register(this._instantiationService.createInstance(dT)),this._instantiationService.setService(U,this._logService),this.coreService=this._register(this._instantiationService.createInstance(d9)),this._instantiationService.setService(R,this.coreService),this.coreMouseService=this._register(this._instantiationService.createInstance(ee)),this._instantiationService.setService(Q,this.coreMouseService),this.unicodeService=this._register(this._instantiationService.createInstance(eo)),this._instantiationService.setService(X,this.unicodeService),this._charsetService=this._instantiationService.createInstance(ep),this._instantiationService.setService(S,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(eN),this._instantiationService.setService(W,this._oscLinkService),this._inputHandler=this._register(new eJ(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this._register(aI.forward(this._inputHandler.onLineFeed,this._onLineFeed)),this._register(this._inputHandler),this._register(aI.forward(this._bufferService.onResize,this._onResize)),this._register(aI.forward(this.coreService.onData,this._onData)),this._register(aI.forward(this.coreService.onBinary,this._onBinary)),this._register(this.coreService.onRequestScrollToBottom(()=>this.scrollToBottom(!0))),this._register(this.coreService.onUserInput(()=>this._writeBuffer.handleUserInput())),this._register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],()=>this._handleWindowsPtyOptionChange())),this._register(this._bufferService.onScroll(()=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)})),this._writeBuffer=this._register(new eM((a,b)=>this._inputHandler.parse(a,b))),this._register(aI.forward(this._writeBuffer.onWriteParsed,this._onWriteParsed))}get onScroll(){return this._onScrollApi||(this._onScrollApi=this._register(new aP),this._onScroll.event(a=>{this._onScrollApi?.fire(a.position)})),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(a){for(let b in a)this.optionsService.options[b]=a[b]}write(a,b){this._writeBuffer.write(a,b)}writeSync(a,b){this._logService.logLevel<=3&&!eO&&(this._logService.warn("writeSync is unreliable and will be removed soon."),eO=!0),this._writeBuffer.writeSync(a,b)}input(a,b=!0){this.coreService.triggerDataEvent(a,b)}resize(a,b){isNaN(a)||isNaN(b)||(a=Math.max(a,2),b=Math.max(b,1),this._bufferService.resize(a,b))}scroll(a,b=!1){this._bufferService.scroll(a,b)}scrollLines(a,b){this._bufferService.scrollLines(a,b)}scrollPages(a){this.scrollLines(a*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(a){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(a){let b=a-this._bufferService.buffer.ydisp;0!==b&&this.scrollLines(b)}registerEscHandler(a,b){return this._inputHandler.registerEscHandler(a,b)}registerDcsHandler(a,b){return this._inputHandler.registerDcsHandler(a,b)}registerCsiHandler(a,b){return this._inputHandler.registerCsiHandler(a,b)}registerOscHandler(a,b){return this._inputHandler.registerOscHandler(a,b)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let a=!1,b=this.optionsService.rawOptions.windowsPty;b&&void 0!==b.buildNumber&&void 0!==b.buildNumber?a="conpty"===b.backend&&b.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(a=!0),a?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){let a=[];a.push(this.onLineFeed(eq.bind(null,this._bufferService))),a.push(this.registerCsiHandler({final:"H"},()=>(eq(this._bufferService),!1))),this._windowsWrappingHeuristics.value=at(()=>{for(let b of a)b.dispose()})}}},eQ={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']},eR=0,eS=class{constructor(a){this._getKey=a,this._array=[],this._insertedValues=[],this._flushInsertedTask=new du,this._isFlushingInserted=!1,this._deletedIndices=[],this._flushDeletedTask=new du,this._isFlushingDeleted=!1}clear(){this._array.length=0,this._insertedValues.length=0,this._flushInsertedTask.clear(),this._isFlushingInserted=!1,this._deletedIndices.length=0,this._flushDeletedTask.clear(),this._isFlushingDeleted=!1}insert(a){this._flushCleanupDeleted(),0===this._insertedValues.length&&this._flushInsertedTask.enqueue(()=>this._flushInserted()),this._insertedValues.push(a)}_flushInserted(){let a=this._insertedValues.sort((a,b)=>this._getKey(a)-this._getKey(b)),b=0,c=0,d=Array(this._array.length+this._insertedValues.length);for(let e=0;e<d.length;e++)c>=this._array.length||this._getKey(a[b])<=this._getKey(this._array[c])?(d[e]=a[b],b++):d[e]=this._array[c++];this._array=d,this._insertedValues.length=0}_flushCleanupInserted(){!this._isFlushingInserted&&this._insertedValues.length>0&&this._flushInsertedTask.flush()}delete(a){if(this._flushCleanupInserted(),0===this._array.length)return!1;let b=this._getKey(a);if(void 0===b||-1===(eR=this._search(b))||this._getKey(this._array[eR])!==b)return!1;do if(this._array[eR]===a)return 0===this._deletedIndices.length&&this._flushDeletedTask.enqueue(()=>this._flushDeleted()),this._deletedIndices.push(eR),!0;while(++eR<this._array.length&&this._getKey(this._array[eR])===b);return!1}_flushDeleted(){this._isFlushingDeleted=!0;let a=this._deletedIndices.sort((a,b)=>a-b),b=0,c=Array(this._array.length-a.length),d=0;for(let e=0;e<this._array.length;e++)a[b]===e?b++:c[d++]=this._array[e];this._array=c,this._deletedIndices.length=0,this._isFlushingDeleted=!1}_flushCleanupDeleted(){!this._isFlushingDeleted&&this._deletedIndices.length>0&&this._flushDeletedTask.flush()}*getKeyIterator(a){if(this._flushCleanupInserted(),this._flushCleanupDeleted(),0!==this._array.length&&!((eR=this._search(a))<0||eR>=this._array.length)&&this._getKey(this._array[eR])===a)do yield this._array[eR];while(++eR<this._array.length&&this._getKey(this._array[eR])===a)}forEachByKey(a,b){if(this._flushCleanupInserted(),this._flushCleanupDeleted(),0!==this._array.length&&!((eR=this._search(a))<0||eR>=this._array.length)&&this._getKey(this._array[eR])===a)do b(this._array[eR]);while(++eR<this._array.length&&this._getKey(this._array[eR])===a)}values(){return this._flushCleanupInserted(),this._flushCleanupDeleted(),[...this._array].values()}_search(a){let b=0,c=this._array.length-1;for(;c>=b;){let d=b+c>>1,e=this._getKey(this._array[d]);if(e>a)c=d-1;else if(e<a)b=d+1;else{for(;d>0&&this._getKey(this._array[d-1])===a;)d--;return d}}return b}},eT=0,eU=0,eV=class extends aw{constructor(){super(),this._decorations=new eS(a=>a?.marker.line),this._onDecorationRegistered=this._register(new aP),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this._register(new aP),this.onDecorationRemoved=this._onDecorationRemoved.event,this._register(at(()=>this.reset()))}get decorations(){return this._decorations.values()}registerDecoration(a){if(a.marker.isDisposed)return;let b=new eW(a);if(b){let a=b.marker.onDispose(()=>b.dispose()),c=b.onDispose(()=>{c.dispose(),b&&(this._decorations.delete(b)&&this._onDecorationRemoved.fire(b),a.dispose())});this._decorations.insert(b),this._onDecorationRegistered.fire(b)}return b}reset(){for(let a of this._decorations.values())a.dispose();this._decorations.clear()}*getDecorationsAtCell(a,b,c){let d=0,e=0;for(let f of this._decorations.getKeyIterator(b))e=(d=f.options.x??0)+(f.options.width??1),a>=d&&a<e&&(!c||(f.options.layer??"bottom")===c)&&(yield f)}forEachDecorationAtCell(a,b,c,d){this._decorations.forEachByKey(b,b=>{eU=(eT=b.options.x??0)+(b.options.width??1),a>=eT&&a<eU&&(!c||(b.options.layer??"bottom")===c)&&d(b)})}},eW=class extends av{constructor(a){super(),this.options=a,this.onRenderEmitter=this.add(new aP),this.onRender=this.onRenderEmitter.event,this._onDispose=this.add(new aP),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=a.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}get backgroundColorRGB(){return null===this._cachedBg&&(this.options.backgroundColor?this._cachedBg=eh.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return null===this._cachedFg&&(this.options.foregroundColor?this._cachedFg=eh.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}dispose(){this._onDispose.fire(),super.dispose()}},eX=class{constructor(a,b=1e3){this._renderCallback=a,this._debounceThresholdMS=b,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(a,b,c){this._rowCount=c,a=void 0!==a?a:0,b=void 0!==b?b:this._rowCount-1,this._rowStart=void 0!==this._rowStart?Math.min(this._rowStart,a):a,this._rowEnd=void 0!==this._rowEnd?Math.max(this._rowEnd,b):b;let d=performance.now();if(d-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=d,this._innerRefresh();else if(!this._additionalRefreshRequested){let a=d-this._lastRefreshMs,b=this._debounceThresholdMS-a;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout(()=>{this._lastRefreshMs=performance.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0},b)}}_innerRefresh(){if(void 0===this._rowStart||void 0===this._rowEnd||void 0===this._rowCount)return;let a=Math.max(this._rowStart,0),b=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(a,b)}},eY=class extends aw{constructor(a,b,c,d){super(),this._terminal=a,this._coreBrowserService=c,this._renderService=d,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="";let e=this._coreBrowserService.mainDocument;this._accessibilityContainer=e.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=e.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let a=0;a<this._terminal.rows;a++)this._rowElements[a]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[a]);if(this._topBoundaryFocusListener=a=>this._handleBoundaryFocus(a,0),this._bottomBoundaryFocusListener=a=>this._handleBoundaryFocus(a,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=e.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this._register(new eX(this._renderRows.bind(this))),!this._terminal.element)throw Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this._register(this._terminal.onResize(a=>this._handleResize(a.rows))),this._register(this._terminal.onRender(a=>this._refreshRows(a.start,a.end))),this._register(this._terminal.onScroll(()=>this._refreshRows())),this._register(this._terminal.onA11yChar(a=>this._handleChar(a))),this._register(this._terminal.onLineFeed(()=>this._handleChar(`
|
|
16
|
+
`))),this._register(this._terminal.onA11yTab(a=>this._handleTab(a))),this._register(this._terminal.onKey(a=>this._handleKey(a.key))),this._register(this._terminal.onBlur(()=>this._clearLiveRegion())),this._register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this._register(bT(e,"selectionchange",()=>this._handleSelectionChange())),this._register(this._coreBrowserService.onDprChange(()=>this._refreshRowsDimensions())),this._refreshRowsDimensions(),this._refreshRows(),this._register(at(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(a){for(let b=0;b<a;b++)this._handleChar(" ")}_handleChar(a){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==a&&(this._charsToAnnounce+=a):this._charsToAnnounce+=a,a===`
|
|
17
|
+
`&&(this._liveRegionLineCount++,21===this._liveRegionLineCount&&(this._liveRegion.textContent+=A)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(a){this._clearLiveRegion(),/\p{Control}/u.test(a)||this._charsToConsume.push(a)}_refreshRows(a,b){this._liveRegionDebouncer.refresh(a,b,this._terminal.rows)}_renderRows(a,b){let c=this._terminal.buffer,d=c.lines.length.toString();for(let e=a;e<=b;e++){let a=c.lines.get(c.ydisp+e),b=[],f=a?.translateToString(!0,void 0,void 0,b)||"",g=(c.ydisp+e+1).toString(),h=this._rowElements[e];h&&(0===f.length?(h.textContent="\xa0",this._rowColumns.set(h,[0,1])):(h.textContent=f,this._rowColumns.set(h,b)),h.setAttribute("aria-posinset",g),h.setAttribute("aria-setsize",d),this._alignRowWidth(h))}this._announceCharacters()}_announceCharacters(){0!==this._charsToAnnounce.length&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(a,b){let c,d,e=a.target,f=this._rowElements[0===b?1:this._rowElements.length-2];if(e.getAttribute("aria-posinset")!==(0===b?"1":`${this._terminal.buffer.lines.length}`)&&a.relatedTarget===f){if(0===b?(c=e,d=this._rowElements.pop(),this._rowContainer.removeChild(d)):(c=this._rowElements.shift(),d=e,this._rowContainer.removeChild(c)),c.removeEventListener("focus",this._topBoundaryFocusListener),d.removeEventListener("focus",this._bottomBoundaryFocusListener),0===b){let a=this._createAccessibilityTreeNode();this._rowElements.unshift(a),this._rowContainer.insertAdjacentElement("afterbegin",a)}else{let a=this._createAccessibilityTreeNode();this._rowElements.push(a),this._rowContainer.appendChild(a)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(0===b?-1:1),this._rowElements[0===b?1:this._rowElements.length-2].focus(),a.preventDefault(),a.stopImmediatePropagation()}}_handleSelectionChange(){if(0===this._rowElements.length)return;let a=this._coreBrowserService.mainDocument.getSelection();if(!a)return;if(a.isCollapsed){this._rowContainer.contains(a.anchorNode)&&this._terminal.clearSelection();return}if(!a.anchorNode||!a.focusNode)return void console.error("anchorNode and/or focusNode are null");let b={node:a.anchorNode,offset:a.anchorOffset},c={node:a.focusNode,offset:a.focusOffset};if((b.node.compareDocumentPosition(c.node)&Node.DOCUMENT_POSITION_PRECEDING||b.node===c.node&&b.offset>c.offset)&&([b,c]=[c,b]),b.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(b={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(b.node))return;let d=this._rowElements.slice(-1)[0];if(c.node.compareDocumentPosition(d)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(c={node:d,offset:d.textContent?.length??0}),!this._rowContainer.contains(c.node))return;let e=({node:a,offset:b})=>{let c=a instanceof Text?a.parentNode:a,d=parseInt(c?.getAttribute("aria-posinset"),10)-1;if(isNaN(d))return console.warn("row is invalid. Race condition?"),null;let e=this._rowColumns.get(c);if(!e)return console.warn("columns is null. Race condition?"),null;let f=b<e.length?e[b]:e.slice(-1)[0]+1;return f>=this._terminal.cols&&(++d,f=0),{row:d,column:f}},f=e(b),g=e(c);if(!(!f||!g)){if(f.row>g.row||f.row===g.row&&f.column>=g.column)throw Error("invalid range");this._terminal.select(f.column,f.row,(g.row-f.row)*this._terminal.cols-f.column+g.column)}}_handleResize(a){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let a=this._rowContainer.children.length;a<this._terminal.rows;a++)this._rowElements[a]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[a]);for(;this._rowElements.length>a;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){let a=this._coreBrowserService.mainDocument.createElement("div");return a.setAttribute("role","listitem"),a.tabIndex=-1,this._refreshRowDimensions(a),a}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){Object.assign(this._accessibilityContainer.style,{width:`${this._renderService.dimensions.css.canvas.width}px`,fontSize:`${this._terminal.options.fontSize}px`}),this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let a=0;a<this._terminal.rows;a++)this._refreshRowDimensions(this._rowElements[a]),this._alignRowWidth(this._rowElements[a])}}_refreshRowDimensions(a){a.style.height=`${this._renderService.dimensions.css.cell.height}px`}_alignRowWidth(a){a.style.transform="";let b=a.getBoundingClientRect().width,c=this._rowColumns.get(a)?.slice(-1)?.[0];if(!c)return;let d=c*this._renderService.dimensions.css.cell.width;a.style.transform=`scaleX(${d/b})`}};eY=x([y(1,T),y(2,_),y(3,ab)],eY);var eZ=class extends aw{constructor(a,b,c,d,e){super(),this._element=a,this._mouseService=b,this._renderService=c,this._bufferService=d,this._linkProviderService=e,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this._register(new aP),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this._register(new aP),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this._register(at(()=>{as(this._linkCacheDisposables),this._linkCacheDisposables.length=0,this._lastMouseEvent=void 0,this._activeProviderReplies?.clear()})),this._register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0})),this._register(bT(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this._register(bT(this._element,"mousemove",this._handleMouseMove.bind(this))),this._register(bT(this._element,"mousedown",this._handleMouseDown.bind(this))),this._register(bT(this._element,"mouseup",this._handleMouseUp.bind(this)))}get currentLink(){return this._currentLink}_handleMouseMove(a){this._lastMouseEvent=a;let b=this._positionFromMouseEvent(a,this._element,this._mouseService);if(!b)return;this._isMouseOut=!1;let c=a.composedPath();for(let a=0;a<c.length;a++){let b=c[a];if(b.classList.contains("xterm"))break;if(b.classList.contains("xterm-hover"))return}this._lastBufferCell&&b.x===this._lastBufferCell.x&&b.y===this._lastBufferCell.y||(this._handleHover(b),this._lastBufferCell=b)}_handleHover(a){if(this._activeLine!==a.y||this._wasResized){this._clearCurrentLink(),this._askForLink(a,!1),this._wasResized=!1;return}this._currentLink&&this._linkAtPosition(this._currentLink.link,a)||(this._clearCurrentLink(),this._askForLink(a,!0))}_askForLink(a,b){this._activeProviderReplies&&b||(this._activeProviderReplies?.forEach(a=>{a?.forEach(a=>{a.link.dispose&&a.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=a.y);let c=!1;for(let[d,e]of this._linkProviderService.linkProviders.entries())b?this._activeProviderReplies?.get(d)&&(c=this._checkLinkProviderResult(d,a,c)):e.provideLinks(a.y,b=>{if(this._isMouseOut)return;let e=b?.map(a=>({link:a}));this._activeProviderReplies?.set(d,e),c=this._checkLinkProviderResult(d,a,c),this._activeProviderReplies?.size===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(a.y,this._activeProviderReplies)})}_removeIntersectingLinks(a,b){let c=new Set;for(let d=0;d<b.size;d++){let e=b.get(d);if(e)for(let b=0;b<e.length;b++){let d=e[b],f=d.link.range.start.y<a?0:d.link.range.start.x,g=d.link.range.end.y>a?this._bufferService.cols:d.link.range.end.x;for(let a=f;a<=g;a++){if(c.has(a)){e.splice(b--,1);break}c.add(a)}}}}_checkLinkProviderResult(a,b,c){if(!this._activeProviderReplies)return c;let d=this._activeProviderReplies.get(a),e=!1;for(let b=0;b<a;b++)(!this._activeProviderReplies.has(b)||this._activeProviderReplies.get(b))&&(e=!0);if(!e&&d){let a=d.find(a=>this._linkAtPosition(a.link,b));a&&(c=!0,this._handleNewLink(a))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!c)for(let a=0;a<this._activeProviderReplies.size;a++){let d=this._activeProviderReplies.get(a)?.find(a=>this._linkAtPosition(a.link,b));if(d){c=!0,this._handleNewLink(d);break}}return c}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(a){var b,c;if(!this._currentLink)return;let d=this._positionFromMouseEvent(a,this._element,this._mouseService);d&&this._mouseDownLink&&(b=this._mouseDownLink.link,c=this._currentLink.link,b.text===c.text&&b.range.start.x===c.range.start.x&&b.range.start.y===c.range.start.y&&b.range.end.x===c.range.end.x&&b.range.end.y===c.range.end.y)&&this._linkAtPosition(this._currentLink.link,d)&&this._currentLink.link.activate(a,this._currentLink.link.text)}_clearCurrentLink(a,b){this._currentLink&&this._lastMouseEvent&&(!a||!b||this._currentLink.link.range.start.y>=a&&this._currentLink.link.range.end.y<=b)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,as(this._linkCacheDisposables),this._linkCacheDisposables.length=0)}_handleNewLink(a){if(!this._lastMouseEvent)return;let b=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);b&&this._linkAtPosition(a.link,b)&&(this._currentLink=a,this._currentLink.state={decorations:{underline:void 0===a.link.decorations||a.link.decorations.underline,pointerCursor:void 0===a.link.decorations||a.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,a.link,this._lastMouseEvent),a.link.decorations={},Object.defineProperties(a.link.decorations,{pointerCursor:{get:()=>this._currentLink?.state?.decorations.pointerCursor,set:a=>{this._currentLink?.state&&this._currentLink.state.decorations.pointerCursor!==a&&(this._currentLink.state.decorations.pointerCursor=a,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",a))}},underline:{get:()=>this._currentLink?.state?.decorations.underline,set:b=>{this._currentLink?.state&&this._currentLink?.state?.decorations.underline!==b&&(this._currentLink.state.decorations.underline=b,this._currentLink.state.isHovered&&this._fireUnderlineEvent(a.link,b))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(a=>{if(!this._currentLink)return;let b=0===a.start?0:a.start+1+this._bufferService.buffer.ydisp,c=this._bufferService.buffer.ydisp+1+a.end;if(this._currentLink.link.range.start.y>=b&&this._currentLink.link.range.end.y<=c&&(this._clearCurrentLink(b,c),this._lastMouseEvent)){let a=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);a&&this._askForLink(a,!1)}})))}_linkHover(a,b,c){this._currentLink?.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(b,!0),this._currentLink.state.decorations.pointerCursor&&a.classList.add("xterm-cursor-pointer")),b.hover&&b.hover(c,b.text)}_fireUnderlineEvent(a,b){let c=a.range,d=this._bufferService.buffer.ydisp,e=this._createLinkUnderlineEvent(c.start.x-1,c.start.y-d-1,c.end.x,c.end.y-d-1,void 0);(b?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(e)}_linkLeave(a,b,c){this._currentLink?.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(b,!1),this._currentLink.state.decorations.pointerCursor&&a.classList.remove("xterm-cursor-pointer")),b.leave&&b.leave(c,b.text)}_linkAtPosition(a,b){let c=a.range.start.y*this._bufferService.cols+a.range.start.x,d=a.range.end.y*this._bufferService.cols+a.range.end.x,e=b.y*this._bufferService.cols+b.x;return c<=e&&e<=d}_positionFromMouseEvent(a,b,c){let d=c.getCoords(a,b,this._bufferService.cols,this._bufferService.rows);if(d)return{x:d[0],y:d[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(a,b,c,d,e){return{x1:a,y1:b,x2:c,y2:d,cols:this._bufferService.cols,fg:e}}};eZ=x([y(1,aa),y(2,ab),y(3,P),y(4,af)],eZ);var e$=class extends eP{constructor(a={}){super(a),this._linkifier=this._register(new ax),this.browser=da,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this._register(new ax),this._onCursorMove=this._register(new aP),this.onCursorMove=this._onCursorMove.event,this._onKey=this._register(new aP),this.onKey=this._onKey.event,this._onRender=this._register(new aP),this.onRender=this._onRender.event,this._onSelectionChange=this._register(new aP),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this._register(new aP),this.onTitleChange=this._onTitleChange.event,this._onBell=this._register(new aP),this.onBell=this._onBell.event,this._onFocus=this._register(new aP),this._onBlur=this._register(new aP),this._onA11yCharEmitter=this._register(new aP),this._onA11yTabEmitter=this._register(new aP),this._onWillOpen=this._register(new aP),this._setup(),this._decorationService=this._instantiationService.createInstance(eV),this._instantiationService.setService(Y,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(c6),this._instantiationService.setService(af,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(Z)),this._register(this._inputHandler.onRequestBell(()=>this._onBell.fire())),this._register(this._inputHandler.onRequestRefreshRows(a=>this.refresh(a?.start??0,a?.end??this.rows-1))),this._register(this._inputHandler.onRequestSendFocus(()=>this._reportFocus())),this._register(this._inputHandler.onRequestReset(()=>this.reset())),this._register(this._inputHandler.onRequestWindowsOptionsReport(a=>this._reportWindowsOptions(a))),this._register(this._inputHandler.onColor(a=>this._handleColorEvent(a))),this._register(aI.forward(this._inputHandler.onCursorMove,this._onCursorMove)),this._register(aI.forward(this._inputHandler.onTitleChange,this._onTitleChange)),this._register(aI.forward(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this._register(aI.forward(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this._register(this._bufferService.onResize(a=>this._afterResize(a.cols,a.rows))),this._register(at(()=>{this._customKeyEventHandler=void 0,this.element?.parentNode?.removeChild(this.element)}))}get linkifier(){return this._linkifier.value}get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}_handleColorEvent(a){if(this._themeService)for(let b of a){let a,c="";switch(b.index){case 256:a="foreground",c="10";break;case 257:a="background",c="11";break;case 258:a="cursor",c="12";break;default:a="ansi",c="4;"+b.index}switch(b.type){case 0:let d=eg.toColorRGB("ansi"===a?this._themeService.colors.ansi[b.index]:this._themeService.colors[a]);this.coreService.triggerDataEvent(`${cv.ESC}]${c};${function(a,b=16){let[c,d,e]=a;return`rgb:${eF(c,b)}/${eF(d,b)}/${eF(e,b)}`}(d)}${cx.ST}`);break;case 1:if("ansi"===a)this._themeService.modifyColors(a=>a.ansi[b.index]=cy.toColor(...b.color));else{let c=a;this._themeService.modifyColors(a=>a[c]=cy.toColor(...b.color))}break;case 2:this._themeService.restoreColor(b.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(a){a?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(eY,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(a){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(cv.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){return this.textarea?.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(cv.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;let a=this.buffer.ybase+this.buffer.y,b=this.buffer.lines.get(a);if(!b)return;let c=Math.min(this.buffer.x,this.cols-1),d=this._renderService.dimensions.css.cell.height,e=b.getWidth(c),f=this._renderService.dimensions.css.cell.width*e,g=this.buffer.y*this._renderService.dimensions.css.cell.height,h=c*this._renderService.dimensions.css.cell.width;this.textarea.style.left=h+"px",this.textarea.style.top=g+"px",this.textarea.style.width=f+"px",this.textarea.style.height=d+"px",this.textarea.style.lineHeight=d+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this._register(bT(this.element,"copy",a=>{var b;this.hasSelection()&&(b=this._selectionService,a.clipboardData&&a.clipboardData.setData("text/plain",b.selectionText),a.preventDefault())}));let a=a=>{var b,c,d;return b=this.textarea,c=this.coreService,d=this.optionsService,void(a.stopPropagation(),a.clipboardData&&B(a.clipboardData.getData("text/plain"),b,c,d))};this._register(bT(this.textarea,"paste",a)),this._register(bT(this.element,"paste",a)),dg?this._register(bT(this.element,"mousedown",a=>{2===a.button&&D(a,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})):this._register(bT(this.element,"contextmenu",a=>{D(a,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})),dp&&this._register(bT(this.element,"auxclick",a=>{1===a.button&&C(a,this.textarea,this.screenElement)}))}_bindKeys(){this._register(bT(this.textarea,"keyup",a=>this._keyUp(a),!0)),this._register(bT(this.textarea,"keydown",a=>this._keyDown(a),!0)),this._register(bT(this.textarea,"keypress",a=>this._keyPress(a),!0)),this._register(bT(this.textarea,"compositionstart",()=>this._compositionHelper.compositionstart())),this._register(bT(this.textarea,"compositionupdate",a=>this._compositionHelper.compositionupdate(a))),this._register(bT(this.textarea,"compositionend",()=>this._compositionHelper.compositionend())),this._register(bT(this.textarea,"input",a=>this._inputEvent(a),!0)),this._register(this.onRender(()=>this._compositionHelper.updateCompositionElements()))}open(a){if(!a)throw Error("Terminal requires a parent element.");if(a.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this.element?.ownerDocument.defaultView&&this._coreBrowserService){this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView);return}this._document=a.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),a.appendChild(this.element);let b=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),b.appendChild(this._viewportElement),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._register(bT(this.screenElement,"mousemove",a=>this.updateCursorStyle(a))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),b.appendChild(this.screenElement);let c=this.textarea=this._document.createElement("textarea");this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",z),dq||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._register(this.optionsService.onSpecificOptionChange("disableStdin",()=>c.readOnly=this.optionsService.rawOptions.disableStdin)),this.textarea.readOnly=this.optionsService.rawOptions.disableStdin,this._coreBrowserService=this._register(this._instantiationService.createInstance(c4,this.textarea,a.ownerDocument.defaultView??window,this._document??"u">typeof window?window.document:null)),this._instantiationService.setService(_,this._coreBrowserService),this._register(bT(this.textarea,"focus",a=>this._handleTextAreaFocus(a))),this._register(bT(this.textarea,"blur",()=>this._handleTextAreaBlur())),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(c0,this._document,this._helperContainer),this._instantiationService.setService($,this._charSizeService),this._themeService=this._instantiationService.createInstance(dO),this._instantiationService.setService(ae,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(cO),this._instantiationService.setService(ad,this._characterJoinerService),this._renderService=this._register(this._instantiationService.createInstance(dw,this.rows,this.screenElement)),this._instantiationService.setService(ab,this._renderService),this._register(this._renderService.onRenderedViewportChange(a=>this._onRender.fire(a))),this.onResize(a=>this._renderService.resize(a.cols,a.rows)),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(cp,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(c8),this._instantiationService.setService(aa,this._mouseService);let d=this._linkifier.value=this._register(this._instantiationService.createInstance(eZ,this.screenElement));this.element.appendChild(b);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this._register(this.onCursorMove(()=>{this._renderService.handleCursorMove(),this._syncTextArea()})),this._register(this.onResize(()=>this._renderService.handleResize(this.cols,this.rows))),this._register(this.onBlur(()=>this._renderService.handleBlur())),this._register(this.onFocus(()=>this._renderService.handleFocus())),this._viewport=this._register(this._instantiationService.createInstance(ci,this.element,this.screenElement)),this._register(this._viewport.onRequestScrollLines(a=>{super.scrollLines(a,!1),this.refresh(0,this.rows-1)})),this._selectionService=this._register(this._instantiationService.createInstance(dG,this.element,this.screenElement,d)),this._instantiationService.setService(ac,this._selectionService),this._register(this._selectionService.onRequestScrollLines(a=>this.scrollLines(a.amount,a.suppressScrollEvent))),this._register(this._selectionService.onSelectionChange(()=>this._onSelectionChange.fire())),this._register(this._selectionService.onRequestRedraw(a=>this._renderService.handleSelectionChanged(a.start,a.end,a.columnSelectMode))),this._register(this._selectionService.onLinuxMouseSelection(a=>{this.textarea.value=a,this.textarea.focus(),this.textarea.select()})),this._register(aI.any(this._onScroll.event,this._inputHandler.onScroll)(()=>{this._selectionService.refresh(),this._viewport?.queueSync()})),this._register(this._instantiationService.createInstance(cj,this.screenElement)),this._register(bT(this.element,"mousedown",a=>this._selectionService.handleMouseDown(a))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(eY,this)),this._register(this.optionsService.onSpecificOptionChange("screenReaderMode",a=>this._handleScreenReaderModeOptionChange(a))),this.options.overviewRuler.width&&(this._overviewRulerRenderer=this._register(this._instantiationService.createInstance(co,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRuler",a=>{!this._overviewRulerRenderer&&a&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this._register(this._instantiationService.createInstance(co,this._viewportElement,this.screenElement)))}),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(c_,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){let a=this,b=this.element;function c(b){let c,d,e=a._mouseService.getMouseReportCoords(b,a.screenElement);if(!e)return!1;switch(b.overrideType||b.type){case"mousemove":d=32,void 0===b.buttons?(c=3,void 0!==b.button&&(c=b.button<3?b.button:3)):c=1&b.buttons?0:4&b.buttons?1:2&b.buttons?2:3;break;case"mouseup":d=0,c=b.button<3?b.button:3;break;case"mousedown":d=1,c=b.button<3?b.button:3;break;case"wheel":if(a._customWheelEventHandler&&!1===a._customWheelEventHandler(b))return!1;let f=b.deltaY;if(0===f||0===a.coreMouseService.consumeWheelEvent(b,a._renderService?.dimensions?.device?.cell?.height,a._coreBrowserService?.dpr))return!1;d=f<0?0:1,c=4;break;default:return!1}return void 0!==d&&void 0!==c&&!(c>4)&&a.coreMouseService.triggerMouseEvent({col:e.col,row:e.row,x:e.x,y:e.y,button:c,action:d,ctrl:b.ctrlKey,alt:b.altKey,shift:b.shiftKey})}let d={mouseup:null,wheel:null,mousedrag:null,mousemove:null},e=a=>(c(a),a.buttons||(this._document.removeEventListener("mouseup",d.mouseup),d.mousedrag&&this._document.removeEventListener("mousemove",d.mousedrag)),this.cancel(a)),f=a=>(c(a),this.cancel(a,!0)),g=a=>{a.buttons&&c(a)},h=a=>{a.buttons||c(a)};this._register(this.coreMouseService.onProtocolChange(a=>{a?("debug"===this.optionsService.rawOptions.logLevel&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(a)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),8&a?d.mousemove||(b.addEventListener("mousemove",h),d.mousemove=h):(b.removeEventListener("mousemove",d.mousemove),d.mousemove=null),16&a?d.wheel||(b.addEventListener("wheel",f,{passive:!1}),d.wheel=f):(b.removeEventListener("wheel",d.wheel),d.wheel=null),2&a?d.mouseup||(d.mouseup=e):(this._document.removeEventListener("mouseup",d.mouseup),d.mouseup=null),4&a?d.mousedrag||(d.mousedrag=g):(this._document.removeEventListener("mousemove",d.mousedrag),d.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this._register(bT(b,"mousedown",a=>{if(a.preventDefault(),this.focus(),!(!this.coreMouseService.areMouseEventsActive||this._selectionService.shouldForceSelection(a)))return c(a),d.mouseup&&this._document.addEventListener("mouseup",d.mouseup),d.mousedrag&&this._document.addEventListener("mousemove",d.mousedrag),this.cancel(a)})),this._register(bT(b,"wheel",b=>{if(!d.wheel){if(this._customWheelEventHandler&&!1===this._customWheelEventHandler(b))return!1;if(!this.buffer.hasScrollback){if(0===b.deltaY)return!1;if(0===a.coreMouseService.consumeWheelEvent(b,a._renderService?.dimensions?.device?.cell?.height,a._coreBrowserService?.dpr))return this.cancel(b,!0);let c=cv.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(b.deltaY<0?"A":"B");return this.coreService.triggerDataEvent(c,!0),this.cancel(b,!0)}}},{passive:!1}))}refresh(a,b){this._renderService?.refreshRows(a,b)}updateCursorStyle(a){this._selectionService?.shouldColumnSelect(a)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(a,b){this._viewport?this._viewport.scrollLines(a):super.scrollLines(a,b),this.refresh(0,this.rows-1)}scrollPages(a){this.scrollLines(a*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(a){a&&this._viewport?this._viewport.scrollToLine(this.buffer.ybase,!0):this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(a){let b=a-this._bufferService.buffer.ydisp;0!==b&&this.scrollLines(b)}paste(a){B(a,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(a){this._customKeyEventHandler=a}attachCustomWheelEventHandler(a){this._customWheelEventHandler=a}registerLinkProvider(a){return this._linkProviderService.registerLinkProvider(a)}registerCharacterJoiner(a){if(!this._characterJoinerService)throw Error("Terminal must be opened first");let b=this._characterJoinerService.register(a);return this.refresh(0,this.rows-1),b}deregisterCharacterJoiner(a){if(!this._characterJoinerService)throw Error("Terminal must be opened first");this._characterJoinerService.deregister(a)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(a){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+a)}registerDecoration(a){return this._decorationService.registerDecoration(a)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(a,b,c){this._selectionService.setSelection(a,b,c)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(!(!this._selectionService||!this._selectionService.hasSelection))return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){this._selectionService?.clearSelection()}selectAll(){this._selectionService?.selectAll()}selectLines(a,b){this._selectionService?.selectLines(a,b)}_keyDown(a){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&!1===this._customKeyEventHandler(a))return!1;let b=this.browser.isMac&&this.options.macOptionIsMeta&&a.altKey;if(!b&&!this._compositionHelper.keydown(a))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(!0),!1;b||"Dead"!==a.key&&"AltGraph"!==a.key||(this._unprocessedDeadKey=!0);let c=function(a,b,c,d){let e={type:0,cancel:!1,key:void 0},f=!!a.shiftKey|2*!!a.altKey|4*!!a.ctrlKey|8*!!a.metaKey;switch(a.keyCode){case 0:"UIKeyInputUpArrow"===a.key?b?e.key=cv.ESC+"OA":e.key=cv.ESC+"[A":"UIKeyInputLeftArrow"===a.key?b?e.key=cv.ESC+"OD":e.key=cv.ESC+"[D":"UIKeyInputRightArrow"===a.key?b?e.key=cv.ESC+"OC":e.key=cv.ESC+"[C":"UIKeyInputDownArrow"===a.key&&(b?e.key=cv.ESC+"OB":e.key=cv.ESC+"[B");break;case 8:e.key=a.ctrlKey?"\b":cv.DEL,a.altKey&&(e.key=cv.ESC+e.key);break;case 9:if(a.shiftKey){e.key=cv.ESC+"[Z";break}e.key=cv.HT,e.cancel=!0;break;case 13:e.key=a.altKey?cv.ESC+cv.CR:cv.CR,e.cancel=!0;break;case 27:e.key=cv.ESC,a.altKey&&(e.key=cv.ESC+cv.ESC),e.cancel=!0;break;case 37:if(a.metaKey)break;f?e.key=cv.ESC+"[1;"+(f+1)+"D":b?e.key=cv.ESC+"OD":e.key=cv.ESC+"[D";break;case 39:if(a.metaKey)break;f?e.key=cv.ESC+"[1;"+(f+1)+"C":b?e.key=cv.ESC+"OC":e.key=cv.ESC+"[C";break;case 38:if(a.metaKey)break;f?e.key=cv.ESC+"[1;"+(f+1)+"A":b?e.key=cv.ESC+"OA":e.key=cv.ESC+"[A";break;case 40:if(a.metaKey)break;f?e.key=cv.ESC+"[1;"+(f+1)+"B":b?e.key=cv.ESC+"OB":e.key=cv.ESC+"[B";break;case 45:a.shiftKey||a.ctrlKey||(e.key=cv.ESC+"[2~");break;case 46:f?e.key=cv.ESC+"[3;"+(f+1)+"~":e.key=cv.ESC+"[3~";break;case 36:f?e.key=cv.ESC+"[1;"+(f+1)+"H":b?e.key=cv.ESC+"OH":e.key=cv.ESC+"[H";break;case 35:f?e.key=cv.ESC+"[1;"+(f+1)+"F":b?e.key=cv.ESC+"OF":e.key=cv.ESC+"[F";break;case 33:a.shiftKey?e.type=2:a.ctrlKey?e.key=cv.ESC+"[5;"+(f+1)+"~":e.key=cv.ESC+"[5~";break;case 34:a.shiftKey?e.type=3:a.ctrlKey?e.key=cv.ESC+"[6;"+(f+1)+"~":e.key=cv.ESC+"[6~";break;case 112:f?e.key=cv.ESC+"[1;"+(f+1)+"P":e.key=cv.ESC+"OP";break;case 113:f?e.key=cv.ESC+"[1;"+(f+1)+"Q":e.key=cv.ESC+"OQ";break;case 114:f?e.key=cv.ESC+"[1;"+(f+1)+"R":e.key=cv.ESC+"OR";break;case 115:f?e.key=cv.ESC+"[1;"+(f+1)+"S":e.key=cv.ESC+"OS";break;case 116:f?e.key=cv.ESC+"[15;"+(f+1)+"~":e.key=cv.ESC+"[15~";break;case 117:f?e.key=cv.ESC+"[17;"+(f+1)+"~":e.key=cv.ESC+"[17~";break;case 118:f?e.key=cv.ESC+"[18;"+(f+1)+"~":e.key=cv.ESC+"[18~";break;case 119:f?e.key=cv.ESC+"[19;"+(f+1)+"~":e.key=cv.ESC+"[19~";break;case 120:f?e.key=cv.ESC+"[20;"+(f+1)+"~":e.key=cv.ESC+"[20~";break;case 121:f?e.key=cv.ESC+"[21;"+(f+1)+"~":e.key=cv.ESC+"[21~";break;case 122:f?e.key=cv.ESC+"[23;"+(f+1)+"~":e.key=cv.ESC+"[23~";break;case 123:f?e.key=cv.ESC+"[24;"+(f+1)+"~":e.key=cv.ESC+"[24~";break;default:if(!a.ctrlKey||a.shiftKey||a.altKey||a.metaKey)if((!c||d)&&a.altKey&&!a.metaKey){let b=eQ[a.keyCode]?.[+!!a.shiftKey];if(b)e.key=cv.ESC+b;else if(a.keyCode>=65&&a.keyCode<=90){let b=String.fromCharCode(a.ctrlKey?a.keyCode-64:a.keyCode+32);a.shiftKey&&(b=b.toUpperCase()),e.key=cv.ESC+b}else if(32===a.keyCode)e.key=cv.ESC+(a.ctrlKey?cv.NUL:" ");else if("Dead"===a.key&&a.code.startsWith("Key")){let b=a.code.slice(3,4);a.shiftKey||(b=b.toLowerCase()),e.key=cv.ESC+b,e.cancel=!0}}else!c||a.altKey||a.ctrlKey||a.shiftKey||!a.metaKey?!a.key||a.ctrlKey||a.altKey||a.metaKey||!(a.keyCode>=48)||1!==a.key.length?a.key&&a.ctrlKey&&("_"===a.key&&(e.key=cv.US),"@"===a.key&&(e.key=cv.NUL)):e.key=a.key:65===a.keyCode&&(e.type=1);else a.keyCode>=65&&a.keyCode<=90?e.key=String.fromCharCode(a.keyCode-64):32===a.keyCode?e.key=cv.NUL:a.keyCode>=51&&a.keyCode<=55?e.key=String.fromCharCode(a.keyCode-51+27):56===a.keyCode?e.key=cv.DEL:219===a.keyCode?e.key=cv.ESC:220===a.keyCode?e.key=cv.FS:221===a.keyCode&&(e.key=cv.GS)}return e}(a,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(a),3===c.type||2===c.type){let b=this.rows-1;return this.scrollLines(2===c.type?-b:b),this.cancel(a,!0)}return 1===c.type&&this.selectAll(),!!(this._isThirdLevelShift(this.browser,a)||(c.cancel&&this.cancel(a,!0),!c.key)||a.key&&!a.ctrlKey&&!a.altKey&&!a.metaKey&&1===a.key.length&&a.key.charCodeAt(0)>=65&&90>=a.key.charCodeAt(0))||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):((c.key===cv.ETX||c.key===cv.CR)&&(this.textarea.value=""),this._onKey.fire({key:c.key,domEvent:a}),this._showCursor(),this.coreService.triggerDataEvent(c.key,!0),!this.optionsService.rawOptions.screenReaderMode||a.altKey||a.ctrlKey)?this.cancel(a,!0):void(this._keyDownHandled=!0))}_isThirdLevelShift(a,b){let c=a.isMac&&!this.options.macOptionIsMeta&&b.altKey&&!b.ctrlKey&&!b.metaKey||a.isWindows&&b.altKey&&b.ctrlKey&&!b.metaKey||a.isWindows&&b.getModifierState("AltGraph");return"keypress"===b.type?c:c&&(!b.keyCode||b.keyCode>47)}_keyUp(a){var b;this._keyDownSeen=!1,this._customKeyEventHandler&&!1===this._customKeyEventHandler(a)||(16===(b=a).keyCode||17===b.keyCode||18===b.keyCode||this.focus(),this.updateCursorStyle(a),this._keyPressHandled=!1)}_keyPress(a){let b;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&!1===this._customKeyEventHandler(a))return!1;if(this.cancel(a),a.charCode)b=a.charCode;else if(null===a.which||void 0===a.which)b=a.keyCode;else{if(0===a.which||0===a.charCode)return!1;b=a.which}return!!b&&(!a.altKey&&!a.ctrlKey&&!a.metaKey||!!this._isThirdLevelShift(this.browser,a))&&(b=String.fromCharCode(b),this._onKey.fire({key:b,domEvent:a}),this._showCursor(),this.coreService.triggerDataEvent(b,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,!0)}_inputEvent(a){if(a.data&&"insertText"===a.inputType&&(!a.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;let b=a.data;return this.coreService.triggerDataEvent(b,!0),this.cancel(a),!0}return!1}resize(a,b){if(a===this.cols&&b===this.rows){this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure();return}super.resize(a,b)}_afterResize(a,b){this._charSizeService?.measure()}clear(){if(0!==this.buffer.ybase||0!==this.buffer.y){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let a=1;a<this.rows;a++)this.buffer.lines.push(this.buffer.getBlankLine(dV));this._onScroll.fire({position:this.buffer.ydisp}),this.refresh(0,this.rows-1)}}reset(){this.options.rows=this.rows,this.options.cols=this.cols;let a=this._customKeyEventHandler;this._setup(),super.reset(),this._selectionService?.reset(),this._decorationService.reset(),this._customKeyEventHandler=a,this.refresh(0,this.rows-1)}clearTextureAtlas(){this._renderService?.clearTextureAtlas()}_reportFocus(){this.element?.classList.contains("focus")?this.coreService.triggerDataEvent(cv.ESC+"[I"):this.coreService.triggerDataEvent(cv.ESC+"[O")}_reportWindowsOptions(a){if(this._renderService)switch(a){case 0:let b=this._renderService.dimensions.css.canvas.width.toFixed(0),c=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${cv.ESC}[4;${c};${b}t`);break;case 1:let d=this._renderService.dimensions.css.cell.width.toFixed(0),e=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${cv.ESC}[6;${e};${d}t`)}}cancel(a,b){if(!(!this.options.cancelEvents&&!b))return a.preventDefault(),a.stopPropagation(),!1}},e_=class{constructor(){this._addons=[]}dispose(){for(let a=this._addons.length-1;a>=0;a--)this._addons[a].instance.dispose()}loadAddon(a,b){let c={instance:b,dispose:b.dispose,isDisposed:!1};this._addons.push(c),b.dispose=()=>this._wrappedAddonDispose(c),b.activate(a)}_wrappedAddonDispose(a){if(a.isDisposed)return;let b=-1;for(let c=0;c<this._addons.length;c++)if(this._addons[c]===a){b=c;break}if(-1===b)throw Error("Could not dispose an addon that has not been loaded");a.isDisposed=!0,a.dispose.apply(a.instance),this._addons.splice(b,1)}},e0=class{constructor(a){this._line=a}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(a,b){if(!(a<0||a>=this._line.length))return b?(this._line.loadCell(a,b),b):this._line.loadCell(a,new K)}translateToString(a,b,c){return this._line.translateToString(a,b,c)}},e1=class{constructor(a,b){this._buffer=a,this.type=b}init(a){return this._buffer=a,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(a){let b=this._buffer.lines.get(a);if(b)return new e0(b)}getNullCell(){return new K}},e2=class extends aw{constructor(a){super(),this._core=a,this._onBufferChange=this._register(new aP),this.onBufferChange=this._onBufferChange.event,this._normal=new e1(this._core.buffers.normal,"normal"),this._alternate=new e1(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate(()=>this._onBufferChange.fire(this.active))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}},e3=class{constructor(a){this._core=a}registerCsiHandler(a,b){return this._core.registerCsiHandler(a,a=>b(a.toArray()))}addCsiHandler(a,b){return this.registerCsiHandler(a,b)}registerDcsHandler(a,b){return this._core.registerDcsHandler(a,(a,c)=>b(a,c.toArray()))}addDcsHandler(a,b){return this.registerDcsHandler(a,b)}registerEscHandler(a,b){return this._core.registerEscHandler(a,b)}addEscHandler(a,b){return this.registerEscHandler(a,b)}registerOscHandler(a,b){return this._core.registerOscHandler(a,b)}addOscHandler(a,b){return this.registerOscHandler(a,b)}},e4=class{constructor(a){this._core=a}register(a){this._core.unicodeService.register(a)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(a){this._core.unicodeService.activeVersion=a}},e5=["cols","rows"],e6=0,e7=class extends aw{constructor(a){super(),this._core=this._register(new e$(a)),this._addonManager=this._register(new e_),this._publicOptions={...this._core.options};let b=a=>this._core.options[a],c=(a,b)=>{this._checkReadonlyOptions(a),this._core.options[a]=b};for(let a in this._core.options){let d={get:b.bind(this,a),set:c.bind(this,a)};Object.defineProperty(this._publicOptions,a,d)}}_checkReadonlyOptions(a){if(e5.includes(a))throw Error(`Option "${a}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new e3(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new e4(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this._register(new e2(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){let a=this._core.coreService.decPrivateModes,b="none";switch(this._core.coreMouseService.activeProtocol){case"X10":b="x10";break;case"VT200":b="vt200";break;case"DRAG":b="drag";break;case"ANY":b="any"}return{applicationCursorKeysMode:a.applicationCursorKeys,applicationKeypadMode:a.applicationKeypad,bracketedPasteMode:a.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:b,originMode:a.origin,reverseWraparoundMode:a.reverseWraparound,sendFocusMode:a.sendFocus,synchronizedOutputMode:a.synchronizedOutput,wraparoundMode:a.wraparound}}get options(){return this._publicOptions}set options(a){for(let b in a)this._publicOptions[b]=a[b]}blur(){this._core.blur()}focus(){this._core.focus()}input(a,b=!0){this._core.input(a,b)}resize(a,b){this._verifyIntegers(a,b),this._core.resize(a,b)}open(a){this._core.open(a)}attachCustomKeyEventHandler(a){this._core.attachCustomKeyEventHandler(a)}attachCustomWheelEventHandler(a){this._core.attachCustomWheelEventHandler(a)}registerLinkProvider(a){return this._core.registerLinkProvider(a)}registerCharacterJoiner(a){return this._checkProposedApi(),this._core.registerCharacterJoiner(a)}deregisterCharacterJoiner(a){this._checkProposedApi(),this._core.deregisterCharacterJoiner(a)}registerMarker(a=0){return this._verifyIntegers(a),this._core.registerMarker(a)}registerDecoration(a){return this._checkProposedApi(),this._verifyPositiveIntegers(a.x??0,a.width??0,a.height??0),this._core.registerDecoration(a)}hasSelection(){return this._core.hasSelection()}select(a,b,c){this._verifyIntegers(a,b,c),this._core.select(a,b,c)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(a,b){this._verifyIntegers(a,b),this._core.selectLines(a,b)}dispose(){super.dispose()}scrollLines(a){this._verifyIntegers(a),this._core.scrollLines(a)}scrollPages(a){this._verifyIntegers(a),this._core.scrollPages(a)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(a){this._verifyIntegers(a),this._core.scrollToLine(a)}clear(){this._core.clear()}write(a,b){this._core.write(a,b)}writeln(a,b){this._core.write(a),this._core.write(`\r
|
|
18
|
+
`,b)}paste(a){this._core.paste(a)}refresh(a,b){this._verifyIntegers(a,b),this._core.refresh(a,b)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(a){this._addonManager.loadAddon(this,a)}static get strings(){return{get promptLabel(){return z},set promptLabel(t){z=t},get tooMuchOutput(){return A},set tooMuchOutput(t){A=t}}}_verifyIntegers(...a){for(e6 of a)if(e6===1/0||isNaN(e6)||e6%1!=0)throw Error("This API only accepts integers")}_verifyPositiveIntegers(...a){for(e6 of a)if(e6&&(e6===1/0||isNaN(e6)||e6%1!=0||e6<0))throw Error("This API only accepts positive integers")}},e8=class{activate(a){this._terminal=a}dispose(){}fit(){let a=this.proposeDimensions();if(!a||!this._terminal||isNaN(a.cols)||isNaN(a.rows))return;let b=this._terminal._core;(this._terminal.rows!==a.rows||this._terminal.cols!==a.cols)&&(b._renderService.clear(),this._terminal.resize(a.cols,a.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let a=this._terminal._core._renderService.dimensions;if(0===a.css.cell.width||0===a.css.cell.height)return;let b=0===this._terminal.options.scrollback?0:this._terminal.options.overviewRuler?.width||14,c=window.getComputedStyle(this._terminal.element.parentElement),d=parseInt(c.getPropertyValue("height")),e=Math.max(0,parseInt(c.getPropertyValue("width"))),f=window.getComputedStyle(this._terminal.element),g={top:parseInt(f.getPropertyValue("padding-top")),bottom:parseInt(f.getPropertyValue("padding-bottom")),right:parseInt(f.getPropertyValue("padding-right")),left:parseInt(f.getPropertyValue("padding-left"))},h=g.top+g.bottom;return{cols:Math.max(2,Math.floor((e-(g.right+g.left)-b)/a.css.cell.width)),rows:Math.max(1,Math.floor((d-h)/a.css.cell.height))}}},e9=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(a){setTimeout(()=>{throw a.stack?fd.isErrorNoTelemetry(a)?new fd(a.message+`
|
|
19
|
+
|
|
20
|
+
`+a.stack):Error(a.message+`
|
|
21
|
+
|
|
22
|
+
`+a.stack):a},0)}}addListener(a){return this.listeners.push(a),()=>{this._removeListener(a)}}emit(a){this.listeners.forEach(b=>{b(a)})}_removeListener(a){this.listeners.splice(this.listeners.indexOf(a),1)}setUnexpectedErrorHandler(a){this.unexpectedErrorHandler=a}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(a){this.unexpectedErrorHandler(a),this.emit(a)}onUnexpectedExternalError(a){this.unexpectedErrorHandler(a)}};function fa(a){var b;(b=a)instanceof fc||b instanceof Error&&b.name===fb&&b.message===fb||e9.onUnexpectedError(a)}var fb="Canceled",fc=class extends Error{constructor(){super(fb),this.name=this.message}},fd=class a extends Error{constructor(a){super(a),this.name="CodeExpectedError"}static fromError(b){if(b instanceof a)return b;let c=new a;return c.message=b.message,c.stack=b.stack,c}static isErrorNoTelemetry(a){return"CodeExpectedError"===a.name}};(ft=fu||={}).isLessThan=function(a){return a<0},ft.isLessThanOrEqual=function(a){return a<=0},ft.isGreaterThan=function(a){return a>0},ft.isNeitherLessOrGreaterThan=function(a){return 0===a},ft.greaterThan=1,ft.lessThan=-1,ft.neitherLessOrGreaterThan=0;var fe=class a{constructor(a){this.iterate=a}forEach(a){this.iterate(b=>(a(b),!0))}toArray(){let a=[];return this.iterate(b=>(a.push(b),!0)),a}filter(b){return new a(a=>this.iterate(c=>!b(c)||a(c)))}map(b){return new a(a=>this.iterate(c=>a(b(c))))}some(a){let b=!1;return this.iterate(c=>!(b=a(c))),b}findFirst(a){let b;return this.iterate(c=>!a(c)||(b=c,!1)),b}findLast(a){let b;return this.iterate(c=>(a(c)&&(b=c),!0)),b}findLastMaxBy(a){let b,c=!0;return this.iterate(d=>((c||fu.isGreaterThan(a(d,b)))&&(c=!1,b=d),!0)),b}};fe.empty=new fe(a=>{});(a=>{function b(a){return a&&"object"==typeof a&&"function"==typeof a[Symbol.iterator]}a.is=b;let c=Object.freeze([]);function*d(a){yield a}a.empty=function(){return c},a.single=d,a.wrap=function(a){return b(a)?a:d(a)},a.from=function(a){return a||c},a.reverse=function*(a){for(let b=a.length-1;b>=0;b--)yield a[b]},a.isEmpty=function(a){return!a||!0===a[Symbol.iterator]().next().done},a.first=function(a){return a[Symbol.iterator]().next().value},a.some=function(a,b){let c=0;for(let d of a)if(b(d,c++))return!0;return!1},a.find=function(a,b){for(let c of a)if(b(c))return c},a.filter=function*(a,b){for(let c of a)b(c)&&(yield c)},a.map=function*(a,b){let c=0;for(let d of a)yield b(d,c++)},a.flatMap=function*(a,b){let c=0;for(let d of a)yield*b(d,c++)},a.concat=function*(...a){for(let b of a)yield*b},a.reduce=function(a,b,c){let d=c;for(let c of a)d=b(d,c);return d},a.slice=function*(a,b,c=a.length){for(b<0&&(b+=a.length),c<0?c+=a.length:c>a.length&&(c=a.length);b<c;b++)yield a[b]},a.consume=function(b,c=1/0){let d=[];if(0===c)return[d,b];let e=b[Symbol.iterator]();for(let b=0;b<c;b++){let b=e.next();if(b.done)return[d,a.empty()];d.push(b.value)}return[d,{[Symbol.iterator]:()=>e}]},a.asyncToArray=async function(a){let b=[];for await(let c of a)b.push(c);return Promise.resolve(b)}})(fv||={});function ff(a){return a}function fg(a){}function fh(a,b){}function fi(a){if(fv.is(a)){let b=[];for(let c of a)if(c)try{c.dispose()}catch(a){b.push(a)}if(1===b.length)throw b[0];if(b.length>1)throw AggregateError(b,"Encountered errors while disposing of store");return Array.isArray(a)?[]:a}if(a)return a.dispose(),a}function fj(...a){let b=fk(()=>fi(a));return function(a,b){!1}(a,b),b}function fk(a){let b=ff({dispose:function(a,b){let c=this,d=!1,e;return function(){if(d)return e;if(d=!0,b)try{e=a.apply(c,arguments)}finally{b()}else e=a.apply(c,arguments);return e}}(()=>{fg(b),a()})});return b}var fl=class a{constructor(){this._toDispose=new Set,this._isDisposed=!1,ff(this)}dispose(){this._isDisposed||(fg(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(0!==this._toDispose.size)try{fi(this._toDispose)}finally{this._toDispose.clear()}}add(b){if(!b)return b;if(b===this)throw Error("Cannot register a disposable on itself!");return fh(b,this),this._isDisposed?a.DISABLE_DISPOSED_WARNING||console.warn(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(b),b}delete(a){if(a){if(a===this)throw Error("Cannot dispose a disposable on itself!");this._toDispose.delete(a),a.dispose()}}deleteAndLeak(a){a&&this._toDispose.has(a)&&(this._toDispose.delete(a),fh(a,null))}};fl.DISABLE_DISPOSED_WARNING=!1;var fm=class{constructor(){this._store=new fl,ff(this),fh(this._store,this)}dispose(){fg(this),this._store.dispose()}_register(a){if(a===this)throw Error("Cannot register a disposable on itself!");return this._store.add(a)}};fm.None=Object.freeze({dispose(){}});var fn=class{constructor(){this._isDisposed=!1,ff(this)}get value(){return this._isDisposed?void 0:this._value}set value(a){this._isDisposed||a===this._value||(this._value?.dispose(),a&&fh(a,this),this._value=a)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,fg(this),this._value?.dispose(),this._value=void 0}clearAndLeak(){let a=this._value;return this._value=void 0,a&&fh(a,null),a}},fo=class a{constructor(b){this.element=b,this.next=a.Undefined,this.prev=a.Undefined}};fo.Undefined=new fo(void 0);var fp=globalThis.performance&&"function"==typeof globalThis.performance.now,fq=class a{static create(b){return new a(b)}constructor(a){this._now=fp&&!1===a?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return -1!==this._stopTime?this._stopTime-this._startTime:this._now()-this._startTime}};(a=>{function b(a){}function c(a){return(b,c=null,d)=>{let e=!1,f;return f=a(a=>{if(!e)return f?f.dispose():e=!0,b.call(c,a)},null,d),e&&f.dispose(),f}}function d(a,b,c){return f((c,d=null,e)=>a(a=>c.call(d,b(a)),null,e),c)}function e(a,b,c){return f((c,d=null,e)=>a(a=>b(a)&&c.call(d,a),null,e),c)}function f(a,c){let d,e={onWillAddFirstListener(){d=a(f.fire,f)},onDidRemoveLastListener(){d?.dispose()}};c||b(e);let f=new fE(e);return c?.add(f),f.event}function g(a,c,d=100,e=!1,f=!1,h,i){let j,k,l,m=0,n,o={leakWarningThreshold:h,onWillAddFirstListener(){j=a(a=>{m++,k=c(k,a),e&&!l&&(p.fire(k),k=void 0),n=()=>{let a=k;k=void 0,l=void 0,(!e||m>1)&&p.fire(a),m=0},"number"==typeof d?(clearTimeout(l),l=setTimeout(n,d)):void 0===l&&(l=0,queueMicrotask(n))})},onWillRemoveListener(){f&&m>0&&n?.()},onDidRemoveLastListener(){n=void 0,j.dispose()}};i||b(o);let p=new fE(o);return i?.add(p),p.event}a.None=()=>fm.None,a.defer=function(a,b){return g(a,()=>{},0,void 0,!0,void 0,b)},a.once=c,a.map=d,a.forEach=function(a,b,c){return f((c,d=null,e)=>a(a=>{b(a),c.call(d,a)},null,e),c)},a.filter=e,a.signal=function(a){return a},a.any=function(...a){return(b,c=null,d)=>{var e,f;return e=fj(...a.map(a=>a(a=>b.call(c,a)))),(f=d)instanceof Array?f.push(e):f&&f.add(e),e}},a.reduce=function(a,b,c,e){let f=c;return d(a,a=>f=b(f,a),e)},a.debounce=g,a.accumulate=function(b,c=0,d){return a.debounce(b,(a,b)=>a?(a.push(b),a):[b],c,void 0,!0,void 0,d)},a.latch=function(a,b=(a,b)=>a===b,c){let d=!0,f;return e(a,a=>{let c=d||!b(a,f);return d=!1,f=a,c},c)},a.split=function(b,c,d){return[a.filter(b,c,d),a.filter(b,a=>!c(a),d)]},a.buffer=function(a,b=!1,c=[],d){let e=c.slice(),f=a(a=>{e?e.push(a):h.fire(a)});d&&d.add(f);let g=()=>{e?.forEach(a=>h.fire(a)),e=null},h=new fE({onWillAddFirstListener(){f||(f=a(a=>h.fire(a)),d&&d.add(f))},onDidAddFirstListener(){e&&(b?setTimeout(g):g())},onDidRemoveLastListener(){f&&f.dispose(),f=null}});return d&&d.add(h),h.event},a.chain=function(a,b){return(c,d,e)=>{let f=b(new i);return a(function(a){let b=f.evaluate(a);b!==h&&c.call(d,b)},void 0,e)}};let h=Symbol("HaltChainable");class i{constructor(){this.steps=[]}map(a){return this.steps.push(a),this}forEach(a){return this.steps.push(b=>(a(b),b)),this}filter(a){return this.steps.push(b=>a(b)?b:h),this}reduce(a,b){let c=b;return this.steps.push(b=>c=a(c,b)),this}latch(a=(a,b)=>a===b){let b=!0,c;return this.steps.push(d=>{let e=b||!a(d,c);return b=!1,c=d,e?d:h}),this}evaluate(a){for(let b of this.steps)if((a=b(a))===h)break;return a}}a.fromNodeEventEmitter=function(a,b,c=a=>a){let d=(...a)=>e.fire(c(...a)),e=new fE({onWillAddFirstListener:()=>a.on(b,d),onDidRemoveLastListener:()=>a.removeListener(b,d)});return e.event},a.fromDOMEventEmitter=function(a,b,c=a=>a){let d=(...a)=>e.fire(c(...a)),e=new fE({onWillAddFirstListener:()=>a.addEventListener(b,d),onDidRemoveLastListener:()=>a.removeEventListener(b,d)});return e.event},a.toPromise=function(a){return new Promise(b=>c(a)(b))},a.fromPromise=function(a){let b=new fE;return a.then(a=>{b.fire(a)},()=>{b.fire(void 0)}).finally(()=>{b.dispose()}),b.event},a.forward=function(a,b){return a(a=>b.fire(a))},a.runAndSubscribe=function(a,b,c){return b(c),a(a=>b(a))};class j{constructor(a,c){this._observable=a,this._counter=0,this._hasChanged=!1;let d={onWillAddFirstListener:()=>{a.addObserver(this)},onDidRemoveLastListener:()=>{a.removeObserver(this)}};c||b(d),this.emitter=new fE(d),c&&c.add(this.emitter)}beginUpdate(a){this._counter++}handlePossibleChange(a){}handleChange(a,b){this._hasChanged=!0}endUpdate(a){this._counter--,0===this._counter&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}a.fromObservable=function(a,b){return new j(a,b).emitter.event},a.fromObservableLight=function(a){return(b,c,d)=>{let e=0,f=!1,g={beginUpdate(){e++},endUpdate(){0==--e&&(a.reportChanges(),f&&(f=!1,b.call(c)))},handlePossibleChange(){},handleChange(){f=!0}};a.addObserver(g),a.reportChanges();let h={dispose(){a.removeObserver(g)}};return d instanceof fl?d.add(h):Array.isArray(d)&&d.push(h),h}}})(fw||={});var fr=class a{constructor(b){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${b}_${a._idPool++}`,a.all.add(this)}start(a){this._stopWatch=new fq,this.listenerCount=a}stop(){if(this._stopWatch){let a=this._stopWatch.elapsed();this.durations.push(a),this.elapsedOverall+=a,this.invocationCount+=1,this._stopWatch=void 0}}};fr.all=new Set,fr._idPool=0;var fs=class a{constructor(b,c,d=(a._idPool++).toString(16).padStart(3,"0")){this._errorHandler=b,this.threshold=c,this.name=d,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(a,b){let c=this.threshold;if(c<=0||b<c)return;this._stacks||(this._stacks=new Map);let d=this._stacks.get(a.value)||0;if(this._stacks.set(a.value,d+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=.5*c;let[a,d]=this.getMostFrequentStack(),e=`[${this.name}] potential listener LEAK detected, having ${b} listeners already. MOST frequent listener (${d}):`;console.warn(e),console.warn(a);let f=new fz(e,a);this._errorHandler(f)}return()=>{let b=this._stacks.get(a.value)||0;this._stacks.set(a.value,b-1)}}getMostFrequentStack(){if(!this._stacks)return;let a,b=0;for(let[c,d]of this._stacks)(!a||b<d)&&(a=[c,d],b=d);return a}};fs._idPool=1;var ft,fu,fv,fw,fx,fy=class a{constructor(a){this.value=a}static create(){return new a(Error().stack??"")}print(){console.warn(this.value.split(`
|
|
23
|
+
`).slice(2).join(`
|
|
24
|
+
`))}},fz=class extends Error{constructor(a,b){super(a),this.name="ListenerLeakError",this.stack=b}},fA=class extends Error{constructor(a,b){super(a),this.name="ListenerRefusalError",this.stack=b}},fB=0,fC=class{constructor(a){this.value=a,this.id=fB++}},fD,fE=class{constructor(a){this._size=0,this._options=a,this._leakageMon=this._options?.leakWarningThreshold?new fs(a?.onListenerError??fa,this._options?.leakWarningThreshold??-1):void 0,this._perfMon=this._options?._profName?new fr(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){this._disposed||(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose())}get event(){return this._event??=(a,b,c)=>{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 b=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],c=new fA(`${a}. HINT: Stack shows most frequent listener (${b[1]}-times)`,b[0]);return(this._options?.onListenerError||fa)(c),fm.None}if(this._disposed)return fm.None;b&&(a=a.bind(b));let d=new fC(a),e;this._leakageMon&&this._size>=Math.ceil(.2*this._leakageMon.threshold)&&(d.stack=fy.create(),e=this._leakageMon.check(d.stack,this._size+1)),this._listeners?this._listeners instanceof fC?(this._deliveryQueue??=new fF,this._listeners=[this._listeners,d]):this._listeners.push(d):(this._options?.onWillAddFirstListener?.(this),this._listeners=d,this._options?.onDidAddFirstListener?.(this)),this._size++;let f=fk(()=>{fx?.unregister(f),e?.(),this._removeListener(d)});if(c instanceof fl?c.add(f):Array.isArray(c)&&c.push(f),fx){let a=Error().stack.split(`
|
|
25
|
+
`).slice(2,3).join(`
|
|
26
|
+
`).trim(),b=/(file:|vscode-file:\/\/vscode-app)?(\/[^:]*:\d+:\d+)/.exec(a);fx.register(f,b?.[2]??a,f)}return f},this._event}_removeListener(a){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(1===this._size){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let b=this._listeners,c=b.indexOf(a);if(-1===c)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),Error("Attempted to dispose unknown listener");this._size--,b[c]=void 0;let d=this._deliveryQueue.current===this;if(2*this._size<=b.length){let a=0;for(let c=0;c<b.length;c++)b[c]?b[a++]=b[c]:d&&(this._deliveryQueue.end--,a<this._deliveryQueue.i&&this._deliveryQueue.i--);b.length=a}}_deliver(a,b){if(!a)return;let c=this._options?.onListenerError||fa;if(!c)return void a.value(b);try{a.value(b)}catch(a){c(a)}}_deliverQueue(a){let b=a.current._listeners;for(;a.i<a.end;)this._deliver(b[a.i++],a.value);a.reset()}fire(a){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners)if(this._listeners instanceof fC)this._deliver(this._listeners,a);else{let b=this._deliveryQueue;b.enqueue(this,a,this._listeners.length),this._deliverQueue(b)}this._perfMon?.stop()}hasListeners(){return this._size>0}},fF=class{constructor(){this.i=-1,this.end=0}enqueue(a,b,c){this.i=0,this.end=c,this.current=a,this.value=b}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},fG=Object.freeze(function(a,b){let c=setTimeout(a.bind(b),0);return{dispose(){clearTimeout(c)}}});(fH=fD||={}).isCancellationToken=function(a){return a===fH.None||a===fH.Cancelled||a instanceof fK||!!a&&"object"==typeof a&&"boolean"==typeof a.isCancellationRequested&&"function"==typeof a.onCancellationRequested},fH.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:fw.None}),fH.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:fG});var fH,fI,fJ,fK=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?fG:(this._emitter||(this._emitter=new fE),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}},fL=!1,fM="en",fN=globalThis;"u">typeof fN.vscode&&"u">typeof fN.vscode.process?fJ=fN.vscode.process:"u">typeof process&&"string"==typeof process?.versions?.node&&(fJ=process);var fO="string"==typeof fJ?.versions?.electron&&fJ?.type==="renderer";if("object"==typeof fJ){fJ.platform,fJ.platform,"linux"===fJ.platform&&fJ.env.SNAP&&fJ.env.SNAP_REVISION,fJ.env.CI||fJ.env.BUILD_ARTIFACTSTAGINGDIRECTORY,fM="en";let a=fJ.env.VSCODE_NLS_CONFIG;if(a)try{let b=JSON.parse(a);b.userLocale,b.osLocale,fM=b.resolvedLanguage||"en",b.languagePack?.translationsConfigFile}catch{}}else"object"!=typeof navigator||fO?console.error("Unable to resolve platform."):((fI=navigator.userAgent).indexOf("Windows"),fI.indexOf("Macintosh"),(fI.indexOf("Macintosh")>=0||fI.indexOf("iPad")>=0||fI.indexOf("iPhone")>=0)&&navigator.maxTouchPoints&&navigator.maxTouchPoints,fI.indexOf("Linux"),fI?.indexOf("Mobi"),fL=!0,fM=globalThis._VSCODE_NLS_LANGUAGE||"en",navigator.language.toLowerCase());fL&&"function"==typeof fN.importScripts&&fN.origin;var fP,fQ=fI,fR=fM;(p=fP||={}).value=function(){return fR},p.isDefaultVariant=function(){return 2===fR.length?"en"===fR:fR.length>=3&&"e"===fR[0]&&"n"===fR[1]&&"-"===fR[2]},p.isDefault=function(){return"en"===fR};var fS="function"==typeof fN.postMessage&&!fN.importScripts,fT=(()=>{if(fS){let a=[];fN.addEventListener("message",b=>{if(b.data&&b.data.vscodeScheduleAsyncWork)for(let c=0,d=a.length;c<d;c++){let d=a[c];if(d.id===b.data.vscodeScheduleAsyncWork){a.splice(c,1),d.callback();return}}});let b=0;return c=>{let d=++b;a.push({id:d,callback:c}),fN.postMessage({vscodeScheduleAsyncWork:d},"*")}}return a=>setTimeout(a)})(),fU=!!(fQ&&fQ.indexOf("Chrome")>=0);function fV(a,b=0,c){let d=setTimeout(()=>{a(),c&&e.dispose()},b),e=fk(()=>{clearTimeout(d),c?.deleteAndLeak(e)});return c?.add(e),e}fQ&&fQ.indexOf("Firefox"),!fU&&fQ&&fQ.indexOf("Safari"),fQ&&fQ.indexOf("Edg/"),fQ&&fQ.indexOf("Android"),Symbol("MicrotaskDelay"),(q=r||={}).settled=async function(a){let b,c=await Promise.all(a.map(a=>a.then(a=>a,a=>{b||(b=a)})));if("u">typeof b)throw b;return c},q.withAsyncBody=function(a){return new Promise(async(b,c)=>{try{await a(b,c)}catch(a){c(a)}})};var fW=class a{static fromArray(b){return new a(a=>{a.emitMany(b)})}static fromPromise(b){return new a(async a=>{a.emitMany(await b)})}static fromPromises(b){return new a(async a=>{await Promise.all(b.map(async b=>a.emitOne(await b)))})}static merge(b){return new a(async a=>{await Promise.all(b.map(async b=>{for await(let c of b)a.emitOne(c)}))})}constructor(a,b){this._state=0,this._results=[],this._error=null,this._onReturn=b,this._onStateChanged=new fE,queueMicrotask(async()=>{let b={emitOne:a=>this.emitOne(a),emitMany:a=>this.emitMany(a),reject:a=>this.reject(a)};try{await Promise.resolve(a(b)),this.resolve()}catch(a){this.reject(a)}finally{b.emitOne=void 0,b.emitMany=void 0,b.reject=void 0}})}[Symbol.asyncIterator](){let a=0;return{next:async()=>{for(;;){if(2===this._state)throw this._error;if(a<this._results.length)return{done:!1,value:this._results[a++]};if(1===this._state)return{done:!0,value:void 0};await fw.toPromise(this._onStateChanged.event)}},return:async()=>(this._onReturn?.(),{done:!0,value:void 0})}}static map(b,c){return new a(async a=>{for await(let d of b)a.emitOne(c(d))})}map(b){return a.map(this,b)}static filter(b,c){return new a(async a=>{for await(let d of b)c(d)&&a.emitOne(d)})}filter(b){return a.filter(this,b)}static coalesce(b){return a.filter(b,a=>!!a)}coalesce(){return a.coalesce(this)}static async toPromise(a){let b=[];for await(let c of a)b.push(c);return b}toPromise(){return a.toPromise(this)}emitOne(a){0===this._state&&(this._results.push(a),this._onStateChanged.fire())}emitMany(a){0===this._state&&(this._results=this._results.concat(a),this._onStateChanged.fire())}resolve(){0===this._state&&(this._state=1,this._onStateChanged.fire())}reject(a){0===this._state&&(this._state=2,this._error=a,this._onStateChanged.fire())}};fW.EMPTY=fW.fromArray([]);var fX=class extends fm{constructor(a){super(),this._terminal=a,this._linesCacheTimeout=this._register(new fn),this._linesCacheDisposables=this._register(new fn),this._register(fk(()=>this._destroyLinesCache()))}initLinesCache(){this._linesCache||(this._linesCache=Array(this._terminal.buffer.active.length),this._linesCacheDisposables.value=fj(this._terminal.onLineFeed(()=>this._destroyLinesCache()),this._terminal.onCursorMove(()=>this._destroyLinesCache()),this._terminal.onResize(()=>this._destroyLinesCache()))),this._linesCacheTimeout.value=fV(()=>this._destroyLinesCache(),15e3)}_destroyLinesCache(){this._linesCache=void 0,this._linesCacheDisposables.clear(),this._linesCacheTimeout.clear()}getLineFromCache(a){return this._linesCache?.[a]}setLineInCache(a,b){this._linesCache&&(this._linesCache[a]=b)}translateBufferLineToStringWithWrap(a,b){let c=[],d=[0],e=this._terminal.buffer.active.getLine(a);for(;e;){let f=this._terminal.buffer.active.getLine(a+1),g=!!f&&f.isWrapped,h=e.translateToString(!g&&b);if(g&&f){let a=e.getCell(e.length-1);a&&0===a.getCode()&&1===a.getWidth()&&f.getCell(0)?.getWidth()===2&&(h=h.slice(0,-1))}if(c.push(h),g)d.push(d[d.length-1]+h.length);else break;a++,e=f}return[c.join(""),d]}},fY=class{get cachedSearchTerm(){return this._cachedSearchTerm}set cachedSearchTerm(a){this._cachedSearchTerm=a}get lastSearchOptions(){return this._lastSearchOptions}set lastSearchOptions(a){this._lastSearchOptions=a}isValidSearchTerm(a){return!!(a&&a.length>0)}didOptionsChange(a){return!this._lastSearchOptions||!!a&&(this._lastSearchOptions.caseSensitive!==a.caseSensitive||this._lastSearchOptions.regex!==a.regex||this._lastSearchOptions.wholeWord!==a.wholeWord)}shouldUpdateHighlighting(a,b){return!!b?.decorations&&(void 0===this._cachedSearchTerm||a!==this._cachedSearchTerm||this.didOptionsChange(b))}clearCachedTerm(){this._cachedSearchTerm=void 0}reset(){this._cachedSearchTerm=void 0,this._lastSearchOptions=void 0}},fZ=class{constructor(a,b){this._terminal=a,this._lineCache=b}find(a,b,c,d){if(!a||0===a.length)return void this._terminal.clearSelection();if(c>this._terminal.cols)throw Error(`Invalid col: ${c} to search in terminal of ${this._terminal.cols} cols`);this._lineCache.initLinesCache();let e={startRow:b,startCol:c},f=this._findInLine(a,e,d);if(!f)for(let c=b+1;c<this._terminal.buffer.active.baseY+this._terminal.rows&&(e.startRow=c,e.startCol=0,!(f=this._findInLine(a,e,d)));c++);return f}findNextWithSelection(a,b,c){if(!a||0===a.length)return void this._terminal.clearSelection();let d=this._terminal.getSelectionPosition();this._terminal.clearSelection();let e=0,f=0;d&&(c===a?(e=d.end.x,f=d.end.y):(e=d.start.x,f=d.start.y)),this._lineCache.initLinesCache();let g={startRow:f,startCol:e},h=this._findInLine(a,g,b);if(!h)for(let c=f+1;c<this._terminal.buffer.active.baseY+this._terminal.rows&&(g.startRow=c,g.startCol=0,!(h=this._findInLine(a,g,b)));c++);if(!h&&0!==f)for(let c=0;c<f&&(g.startRow=c,g.startCol=0,!(h=this._findInLine(a,g,b)));c++);return!h&&d&&(g.startRow=d.start.y,g.startCol=0,h=this._findInLine(a,g,b)),h}findPreviousWithSelection(a,b,c){if(!a||0===a.length)return void this._terminal.clearSelection();let d=this._terminal.getSelectionPosition();this._terminal.clearSelection();let e=this._terminal.buffer.active.baseY+this._terminal.rows-1,f=this._terminal.cols;this._lineCache.initLinesCache();let g={startRow:e,startCol:f},h;if(d&&(g.startRow=e=d.start.y,g.startCol=f=d.start.x,c!==a&&((h=this._findInLine(a,g,b,!1))||(g.startRow=e=d.end.y,g.startCol=f=d.end.x))),h||(h=this._findInLine(a,g,b,!0)),!h){g.startCol=Math.max(g.startCol,this._terminal.cols);for(let c=e-1;c>=0&&(g.startRow=c,!(h=this._findInLine(a,g,b,!0)));c--);}if(!h&&e!==this._terminal.buffer.active.baseY+this._terminal.rows-1)for(let c=this._terminal.buffer.active.baseY+this._terminal.rows-1;c>=e&&(g.startRow=c,!(h=this._findInLine(a,g,b,!0)));c--);return h}_isWholeWord(a,b,c){return(0===a||" ~!@#$%^&*()+`-=[]{}|\\;:\"',./<>?".includes(b[a-1]))&&(a+c.length===b.length||" ~!@#$%^&*()+`-=[]{}|\\;:\"',./<>?".includes(b[a+c.length]))}_findInLine(a,b,c={},d=!1){let e=b.startRow,f=b.startCol;if(this._terminal.buffer.active.getLine(e)?.isWrapped){if(d){b.startCol+=this._terminal.cols;return}return b.startRow--,b.startCol+=this._terminal.cols,this._findInLine(a,b,c)}let g=this._lineCache.getLineFromCache(e);g||(g=this._lineCache.translateBufferLineToStringWithWrap(e,!0),this._lineCache.setLineInCache(e,g));let[h,i]=g,j=this._bufferColsToStringOffset(e,f),k=a,l=h;c.regex||(k=c.caseSensitive?a:a.toLowerCase(),l=c.caseSensitive?h:h.toLowerCase());let m=-1;if(c.regex){let b=RegExp(k,c.caseSensitive?"g":"gi"),e;if(d)for(;e=b.exec(l.slice(0,j));)m=b.lastIndex-e[0].length,a=e[0],b.lastIndex-=a.length-1;else(e=b.exec(l.slice(j)))&&e[0].length>0&&(m=j+(b.lastIndex-e[0].length),a=e[0])}else d?j-k.length>=0&&(m=l.lastIndexOf(k,j-k.length)):m=l.indexOf(k,j);if(m>=0){if(c.wholeWord&&!this._isWholeWord(m,l,a))return;let b=0;for(;b<i.length-1&&m>=i[b+1];)b++;let d=b;for(;d<i.length-1&&m+a.length>=i[d+1];)d++;let f=m-i[b],g=m+a.length-i[d],h=this._stringLengthToBufferSize(e+b,f),j=this._stringLengthToBufferSize(e+d,g)-h+this._terminal.cols*(d-b);return{term:a,col:h,row:e+b,size:j}}}_stringLengthToBufferSize(a,b){let c=this._terminal.buffer.active.getLine(a);if(!c)return 0;for(let a=0;a<b;a++){let d=c.getCell(a);if(!d)break;let e=d.getChars();e.length>1&&(b-=e.length-1);let f=c.getCell(a+1);f&&0===f.getWidth()&&b++}return b}_bufferColsToStringOffset(a,b){let c=a,d=0,e=this._terminal.buffer.active.getLine(c);for(;b>0&&e;){for(let a=0;a<b&&a<this._terminal.cols;a++){let b=e.getCell(a);if(!b)break;b.getWidth()&&(d+=0===b.getCode()?1:b.getChars().length)}if(c++,(e=this._terminal.buffer.active.getLine(c))&&!e.isWrapped)break;b-=this._terminal.cols}return d}},f$=class extends fm{constructor(a){super(),this._terminal=a,this._highlightDecorations=[],this._highlightedLines=new Set,this._register(fk(()=>this.clearHighlightDecorations()))}createHighlightDecorations(a,b){for(let c of(this.clearHighlightDecorations(),a)){let a=this._createResultDecorations(c,b,!1);if(a)for(let b of a)this._storeDecoration(b,c)}}createActiveDecoration(a,b){let c=this._createResultDecorations(a,b,!0);if(c)return{decorations:c,match:a,dispose(){fi(c)}}}clearHighlightDecorations(){fi(this._highlightDecorations),this._highlightDecorations=[],this._highlightedLines.clear()}_storeDecoration(a,b){this._highlightedLines.add(a.marker.line),this._highlightDecorations.push({decoration:a,match:b,dispose(){a.dispose()}})}_applyStyles(a,b,c){a.classList.contains("xterm-find-result-decoration")||(a.classList.add("xterm-find-result-decoration"),b&&(a.style.outline=`1px solid ${b}`)),c&&a.classList.add("xterm-find-active-result-decoration")}_createResultDecorations(a,b,c){let d=[],e=a.col,f=a.size,g=-this._terminal.buffer.active.baseY-this._terminal.buffer.active.cursorY+a.row;for(;f>0;){let a=Math.min(this._terminal.cols-e,f);d.push([g,e,a]),e=0,f-=a,g++}let h=[];for(let a of d){let d=this._terminal.registerMarker(a[0]),e=this._terminal.registerDecoration({marker:d,x:a[1],width:a[2],backgroundColor:c?b.activeMatchBackground:b.matchBackground,overviewRulerOptions:this._highlightedLines.has(d.line)?void 0:{color:c?b.activeMatchColorOverviewRuler:b.matchOverviewRuler,position:"center"}});if(e){let a=[];a.push(d),a.push(e.onRender(a=>this._applyStyles(a,c?b.activeMatchBorder:b.matchBorder,!1))),a.push(e.onDispose(()=>fi(a))),h.push(e)}}return 0===h.length?void 0:h}},f_=class extends fm{constructor(){super(...arguments),this._searchResults=[],this._onDidChangeResults=this._register(new fE)}get onDidChangeResults(){return this._onDidChangeResults.event}get searchResults(){return this._searchResults}get selectedDecoration(){return this._selectedDecoration}set selectedDecoration(a){this._selectedDecoration=a}updateResults(a,b){this._searchResults=a.slice(0,b)}clearResults(){this._searchResults=[]}clearSelectedDecoration(){this._selectedDecoration&&(this._selectedDecoration.dispose(),this._selectedDecoration=void 0)}findResultIndex(a){for(let b=0;b<this._searchResults.length;b++){let c=this._searchResults[b];if(c.row===a.row&&c.col===a.col&&c.size===a.size)return b}return -1}fireResultsChanged(a){if(!a)return;let b=-1;this._selectedDecoration&&(b=this.findResultIndex(this._selectedDecoration.match)),this._onDidChangeResults.fire({resultIndex:b,resultCount:this._searchResults.length})}reset(){this.clearSelectedDecoration(),this.clearResults()}},f0=class extends fm{constructor(a){super(),this._highlightTimeout=this._register(new fn),this._lineCache=this._register(new fn),this._state=new fY,this._resultTracker=this._register(new f_),this._highlightLimit=a?.highlightLimit??1e3}get onDidChangeResults(){return this._resultTracker.onDidChangeResults}activate(a){this._terminal=a,this._lineCache.value=new fX(a),this._engine=new fZ(a,this._lineCache.value),this._decorationManager=new f$(a),this._register(this._terminal.onWriteParsed(()=>this._updateMatches())),this._register(this._terminal.onResize(()=>this._updateMatches())),this._register(fk(()=>this.clearDecorations()))}_updateMatches(){this._highlightTimeout.clear(),this._state.cachedSearchTerm&&this._state.lastSearchOptions?.decorations&&(this._highlightTimeout.value=fV(()=>{let a=this._state.cachedSearchTerm;this._state.clearCachedTerm(),this.findPrevious(a,{...this._state.lastSearchOptions,incremental:!0},{noScroll:!0})},200))}clearDecorations(a){this._resultTracker.clearSelectedDecoration(),this._decorationManager?.clearHighlightDecorations(),this._resultTracker.clearResults(),a||this._state.clearCachedTerm()}clearActiveDecoration(){this._resultTracker.clearSelectedDecoration()}findNext(a,b,c){if(!this._terminal||!this._engine)throw Error("Cannot use addon until it has been loaded");this._state.lastSearchOptions=b,this._state.shouldUpdateHighlighting(a,b)&&this._highlightAllMatches(a,b);let d=this._findNextAndSelect(a,b,c);return this._fireResults(b),this._state.cachedSearchTerm=a,d}_highlightAllMatches(a,b){if(!this._terminal||!this._engine||!this._decorationManager)throw Error("Cannot use addon until it has been loaded");if(!this._state.isValidSearchTerm(a))return void this.clearDecorations();this.clearDecorations(!0);let c=[],d,e=this._engine.find(a,0,0,b);for(;e&&(d?.row!==e.row||d?.col!==e.col)&&!(c.length>=this._highlightLimit);)d=e,c.push(d),e=this._engine.find(a,d.col+d.term.length>=this._terminal.cols?d.row+1:d.row,d.col+d.term.length>=this._terminal.cols?0:d.col+1,b);this._resultTracker.updateResults(c,this._highlightLimit),b.decorations&&this._decorationManager.createHighlightDecorations(c,b.decorations)}_findNextAndSelect(a,b,c){if(!this._terminal||!this._engine)return!1;if(!this._state.isValidSearchTerm(a))return this._terminal.clearSelection(),this.clearDecorations(),!1;let d=this._engine.findNextWithSelection(a,b,this._state.cachedSearchTerm);return this._selectResult(d,b?.decorations,c?.noScroll)}findPrevious(a,b,c){if(!this._terminal||!this._engine)throw Error("Cannot use addon until it has been loaded");this._state.lastSearchOptions=b,this._state.shouldUpdateHighlighting(a,b)&&this._highlightAllMatches(a,b);let d=this._findPreviousAndSelect(a,b,c);return this._fireResults(b),this._state.cachedSearchTerm=a,d}_fireResults(a){this._resultTracker.fireResultsChanged(!!a?.decorations)}_findPreviousAndSelect(a,b,c){if(!this._terminal||!this._engine)return!1;if(!this._state.isValidSearchTerm(a))return this._terminal.clearSelection(),this.clearDecorations(),!1;let d=this._engine.findPreviousWithSelection(a,b,this._state.cachedSearchTerm);return this._selectResult(d,b?.decorations,c?.noScroll)}_selectResult(a,b,c){if(!this._terminal||!this._decorationManager)return!1;if(this._resultTracker.clearSelectedDecoration(),!a)return this._terminal.clearSelection(),!1;if(this._terminal.select(a.col,a.row,a.size),b){let c=this._decorationManager.createActiveDecoration(a,b);c&&(this._resultTracker.selectedDecoration=c)}if(!c&&(a.row>=this._terminal.buffer.active.viewportY+this._terminal.rows||a.row<this._terminal.buffer.active.viewportY)){let b=a.row-this._terminal.buffer.active.viewportY;b-=Math.floor(this._terminal.rows/2),this._terminal.scrollLines(b)}return!0}};let f1=(0,u.memo)((0,u.forwardRef)(function({output:a,isRunning:b,onInput:c,onResize:d,maximized:e,height:f},g){let h=(0,u.useRef)(null),i=(0,u.useRef)(null),j=(0,u.useRef)(null),k=(0,u.useRef)(null),l=(0,u.useRef)(0),m=(0,u.useRef)(c),n=(0,u.useRef)(d);(0,u.useEffect)(()=>{m.current=c},[c]),(0,u.useEffect)(()=>{n.current=d},[d]),(0,u.useImperativeHandle)(g,()=>({findNext:a=>k.current?.findNext(a,{caseSensitive:!1,decorations:{matchBackground:"#facc1550",matchBorder:"#facc15",matchOverviewRuler:"#facc15",activeMatchBackground:"#facc1590",activeMatchBorder:"#facc15",activeMatchColorOverviewRuler:"#facc15"}})??!1,findPrevious:a=>k.current?.findPrevious(a,{caseSensitive:!1,decorations:{matchBackground:"#facc1550",matchBorder:"#facc15",matchOverviewRuler:"#facc15",activeMatchBackground:"#facc1590",activeMatchBorder:"#facc15",activeMatchColorOverviewRuler:"#facc15"}})??!1,clearSearch:()=>{k.current?.clearDecorations()}}),[]),(0,u.useEffect)(()=>{if(!h.current)return;let a=new e7({convertEol:!1,scrollback:5e3,fontSize:13,fontFamily:'ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace',cursorStyle:"block",cursorBlink:!0,disableStdin:!1,allowProposedApi:!0,theme:{background:"transparent",foreground:"#d4d4d8",cursor:"#d4d4d8",cursorAccent:"#1a1a2e",selectionBackground:"#3b82f680",black:"#27272a",red:"#f87171",green:"#4ade80",yellow:"#facc15",blue:"#60a5fa",magenta:"#c084fc",cyan:"#22d3ee",white:"#e4e4e7",brightBlack:"#52525b",brightRed:"#fca5a5",brightGreen:"#86efac",brightYellow:"#fde047",brightBlue:"#93c5fd",brightMagenta:"#d8b4fe",brightCyan:"#67e8f9",brightWhite:"#fafafa"}}),b=new e8,c=new f0;a.loadAddon(b),a.loadAddon(c),a.open(h.current),a.onData(a=>{m.current&&m.current(a)});try{b.fit(),n.current&&n.current(a.cols,a.rows)}catch{}return i.current=a,j.current=b,k.current=c,l.current=0,()=>{a.dispose(),i.current=null,j.current=null,k.current=null,l.current=0}},[]),(0,u.useEffect)(()=>{let b=i.current;if(!b)return;let c=!1;if(a.length<l.current&&(b.reset(),l.current=0,c=!0),a.length>l.current){let c=a.slice(l.current);b.write(c),l.current=a.length}c&&m.current&&requestAnimationFrame(()=>b.focus())},[a]),(0,u.useEffect)(()=>{b&&i.current&&i.current.focus()},[b]);let o=(0,u.useCallback)(()=>{let a=i.current,b=j.current;if(a&&b)try{b.fit(),n.current&&n.current(a.cols,a.rows)}catch{}},[]);return(0,u.useEffect)(()=>{requestAnimationFrame(()=>{o(),requestAnimationFrame(o)})},[e,o]),(0,u.useEffect)(()=>{let a=h.current;if(!a)return;let b=new ResizeObserver(o);return b.observe(a),()=>b.disconnect()},[o]),(0,s.jsx)("div",{ref:h,className:"xterm-renderer px-2",style:{height:f??"100%",overflow:"hidden"}})}))}};
|